Merge pull request #50 from microsoft/caleteet-v140

Updates for release v1.4.0
This commit is contained in:
Cale Teeter 2020-05-29 15:59:50 -04:00 коммит произвёл GitHub
Родитель a18f076b36 01e3a95286
Коммит 618e9bfbe3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 38 добавлений и 27 удалений

Просмотреть файл

@ -2,6 +2,17 @@
All notable changes to the "azure blockchain" extension will be documented in this file.
## 1.4.0
### Enhancements
### Fixes
- Updated API calls for webviews to using updated APIs ([#42](https://github.com/microsoft/vscode-azure-blockchain-ethereum/issues/42) by [@mjbvz](https://github.com/mjbvz))
- Bumped version of VS Code core to support to 1.44.1 and internal vscode type def (1.39.0)
### Internal Improvements
## 1.3.1
### Enhancements

Просмотреть файл

@ -5,7 +5,7 @@
"publisher": "AzBlockchain",
"preview": false,
"icon": "images/blockchain-service-logo.png",
"version": "1.3.1",
"version": "1.4.0",
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/vscode-azure-blockchain-ethereum"
@ -16,7 +16,7 @@
"homepage": "https://github.com/Microsoft/vscode-azure-blockchain-ethereum/blob/master/README.md",
"license": "MIT",
"engines": {
"vscode": "^1.36.1"
"vscode": "^1.44.1"
},
"keywords": [
"blockchain",
@ -567,7 +567,7 @@
"@types/semver": "^6.0.0",
"@types/sinon": "^7.0.11",
"@types/uuid": "^3.4.4",
"@types/vscode": "^1.36.1",
"@types/vscode": "1.39.0",
"copy-webpack-plugin": "5.1.1",
"decache": "^4.5.1",
"glob": "^7.1.4",
@ -628,4 +628,4 @@
"git add"
]
}
}
}

Просмотреть файл

@ -62,24 +62,18 @@ export abstract class BasicWebView {
this.context.globalState.update(this.config.showOnStartup, await this.setShowOnStartupFlagAtFirstTime());
}
Telemetry.sendEvent(
Constants.telemetryEvents.webPages.showWebPage,
{
trigger: 'auto',
viewType: this.config.viewType,
},
);
Telemetry.sendEvent(Constants.telemetryEvents.webPages.showWebPage, {
trigger: 'auto',
viewType: this.config.viewType,
});
return this.createAndShow();
}
public async show() {
Telemetry.sendEvent(
Constants.telemetryEvents.webPages.showWebPage,
{
trigger: 'manual',
viewType: this.config.viewType,
},
);
Telemetry.sendEvent(Constants.telemetryEvents.webPages.showWebPage, {
trigger: 'manual',
viewType: this.config.viewType,
});
return this.createAndShow();
}
@ -108,10 +102,13 @@ export abstract class BasicWebView {
protected abstract async setShowOnStartupFlagAtFirstTime(): Promise<boolean>;
protected async getHtmlForWebview(): Promise<string> {
const rootPath = this.rootPath.with({ scheme: 'vscode-resource' }).toString();
const html = await fs.readFile(this.config.path, 'utf8');
if (this.panel) {
const rootPath = this.panel.webview.asWebviewUri(this.rootPath).toString();
const html = await fs.readFile(this.config.path, 'utf8');
return html.replace(/{{root}}/g, rootPath);
return html.replace(/{{root}}/g, rootPath);
}
return '';
}
protected async receiveMessage(message: { [key: string]: any }): Promise<void> {
@ -148,7 +145,7 @@ export abstract class BasicWebView {
Telemetry.sendEvent(
Constants.telemetryEvents.webPages.disposeWebPage,
{ viewType: this.config.viewType },
{ duration },
{ duration }
);
}

Просмотреть файл

@ -43,11 +43,14 @@ export class ChangelogPage extends BasicWebView {
}
protected async getHtmlForWebview(): Promise<string> {
const resourcePath = this.rootPath.with({ scheme: 'vscode-resource' }).toString();
const html = await fs.readFile(this.config.path, 'utf8');
const content = await fs.readFile(Constants.webViewPages.changelog.changelogPath, 'utf8');
const htmlContent = await commands.executeCommand('markdown.api.render', content) as string;
if (this.panel) {
const resourcePath = this.panel.webview.asWebviewUri(this.rootPath).toString();
const html = await fs.readFile(this.config.path, 'utf8');
const content = await fs.readFile(Constants.webViewPages.changelog.changelogPath, 'utf8');
const htmlContent = await commands.executeCommand('markdown.api.render', content) as string;
return html.replace(/{{root}}/g, resourcePath).replace(/{{content}}/g, htmlContent);
return html.replace(/{{root}}/g, resourcePath).replace(/{{content}}/g, htmlContent);
}
return '';
}
}