Switch to latest VS Code test package (#3275)

Co-authored-by: phoff <phoff@microsoft.com>
This commit is contained in:
Alex Weininger 2022-08-04 10:45:44 -07:00 коммит произвёл GitHub
Родитель c27703a3e0
Коммит 32c2d51312
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 53 добавлений и 40 удалений

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

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as msRest from '@azure/ms-rest-js';
import { gulp_installAzureAccount, gulp_installResourceGroups, gulp_installVSCodeExtension, gulp_webpack } from '@microsoft/vscode-azext-dev';
import { gulp_webpack } from '@microsoft/vscode-azext-dev';
import * as fse from 'fs-extra';
import * as gulp from 'gulp';
import * as chmod from 'gulp-chmod';
@ -71,10 +71,6 @@ function installFuncCli() {
.pipe(gulp.dest(funcDir));
}
async function gulp_installPythonExtension() {
return gulp_installVSCodeExtension('ms-python', 'python');
}
async function cleanReadme() {
const readmePath: string = path.join(__dirname, 'README.md');
let data: string = (await fse.readFile(readmePath)).toString();
@ -84,5 +80,5 @@ async function cleanReadme() {
exports['webpack-dev'] = gulp.series(prepareForWebpack, () => gulp_webpack('development'));
exports['webpack-prod'] = gulp.series(prepareForWebpack, () => gulp_webpack('production'));
exports.preTest = gulp.series(gulp_installAzureAccount, gulp_installResourceGroups, gulp_installPythonExtension, getFuncLink, installFuncCli);
exports.preTest = gulp.series(getFuncLink, installFuncCli);
exports.cleanReadme = cleanReadme;

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

@ -16,10 +16,10 @@ let perfStats = {
Object.defineProperty(exports, "__esModule", { value: true });
const extension = require('./out/src/extension');
const extension = require('./dist/extension.bundle');
async function activate(ctx) {
return await extension.activateInternal(ctx, perfStats, true /* ignoreBundle */);
return await extension.activateInternal(ctx, perfStats);
}
async function deactivate(ctx) {

57
package-lock.json сгенерированный
Просмотреть файл

@ -52,6 +52,7 @@
"@types/xml2js": "^0.4.5",
"@types/xregexp": "4.3.0",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@vscode/test-electron": "^2.1.5",
"copy-webpack-plugin": "^6.0.3",
"eslint": "^7.19.0",
"eslint-plugin-import": "^2.22.1",
@ -69,7 +70,6 @@
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
"vsce": "^1.87.0",
"vscode-test": "^1.5.2",
"webpack": "^5.28.0",
"webpack-cli": "^4.6.0"
},
@ -2049,6 +2049,21 @@
"vscode": "^1.60.0"
}
},
"node_modules/@vscode/test-electron": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.1.5.tgz",
"integrity": "sha512-O/ioqFpV+RvKbRykX2ItYPnbcZ4Hk5V0rY4uhQjQTLhGL9WZUvS7exzuYQCCI+ilSqJpctvxq2llTfGXf9UnnA==",
"dev": true,
"dependencies": {
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"rimraf": "^3.0.2",
"unzipper": "^0.10.11"
},
"engines": {
"node": ">=8.9.3"
}
},
"node_modules/@webassemblyjs/ast": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
@ -12987,22 +13002,6 @@
"vscode": "^1.19.1"
}
},
"node_modules/vscode-test": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.6.1.tgz",
"integrity": "sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA==",
"deprecated": "This package has been renamed to @vscode/test-electron, please update to the new name",
"dev": true,
"dependencies": {
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"rimraf": "^3.0.2",
"unzipper": "^0.10.11"
},
"engines": {
"node": ">=8.9.3"
}
},
"node_modules/watchpack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz",
@ -15399,6 +15398,18 @@
"@microsoft/1ds-post-js": "^3.2.3"
}
},
"@vscode/test-electron": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.1.5.tgz",
"integrity": "sha512-O/ioqFpV+RvKbRykX2ItYPnbcZ4Hk5V0rY4uhQjQTLhGL9WZUvS7exzuYQCCI+ilSqJpctvxq2llTfGXf9UnnA==",
"dev": true,
"requires": {
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"rimraf": "^3.0.2",
"unzipper": "^0.10.11"
}
},
"@webassemblyjs/ast": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
@ -23989,18 +24000,6 @@
"tas-client": "0.1.45"
}
},
"vscode-test": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.6.1.tgz",
"integrity": "sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA==",
"dev": true,
"requires": {
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"rimraf": "^3.0.2",
"unzipper": "^0.10.11"
}
},
"watchpack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz",

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

@ -5,7 +5,7 @@
"version": "1.7.5-alpha.0",
"publisher": "ms-azuretools",
"icon": "resources/azure-functions.png",
"aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"engines": {
"vscode": "^1.66.0"
},
@ -1062,6 +1062,7 @@
"@types/xml2js": "^0.4.5",
"@types/xregexp": "4.3.0",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@vscode/test-electron": "^2.1.5",
"copy-webpack-plugin": "^6.0.3",
"eslint": "^7.19.0",
"eslint-plugin-import": "^2.22.1",
@ -1079,7 +1080,6 @@
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
"vsce": "^1.87.0",
"vscode-test": "^1.5.2",
"webpack": "^5.28.0",
"webpack-cli": "^4.6.0"
},

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

@ -3,13 +3,31 @@
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from '@vscode/test-electron';
import * as cp from 'child_process';
import * as path from 'path';
import { runTests } from 'vscode-test';
async function main(): Promise<void> {
try {
const vscodeExecutablePath = await downloadAndUnzipVSCode('1.69.0');
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
cp.spawnSync(
cli,
[
...args,
'--install-extension', 'ms-vscode.azure-account',
'--install-extension', 'ms-azuretools.vscode-azureresourcegroups',
'--install-extension', 'ms-python.python',
],
{
encoding: 'utf-8',
stdio: 'inherit'
});
const repoRoot: string = path.resolve(__dirname, '..', '..');
await runTests({
vscodeExecutablePath,
extensionDevelopmentPath: repoRoot,
launchArgs: [
path.resolve(repoRoot, 'test', 'test.code-workspace'),