import * as path from 'path' ; import * as vscode from 'vscode' ; import { ExtensionUtil } from '../util/ExtensionUtil' ; import { LogType } from 'ibm-blockchain-platform-common' ; import { VSCodeBlockchainOutputAdapter } from '../logging/VSCodeBlockchainOutputAdapter' ; export async function openReleaseNotes ( ) { const outputAdapter = VSCodeBlockchainOutputAdapter . instance ( ) ; outputAdapter . log ( LogType . INFO , undefined , `openReleaseNotes` ) ; try { const getExtensionPath = ExtensionUtil . getExtensionPath ( ) ; const releaseNotes = path . join ( getExtensionPath , 'RELEASE-NOTES.md' ) ; const uri = vscode . Uri . file ( releaseNotes ) ; await vscode . commands . executeCommand ( 'markdown.showPreview' , uri ) ; } catch ( error ) { outputAdapter . log ( LogType . ERROR , `Unable to open release notes: ${ error . toString ( ) }` ) ; } }