Skip to content

Commit f8d5fd8

Browse files
authored
Merge pull request #1586 from github/koesie10/upgrade-vscode-test
Upgrade from vscode-test to @vscode/test-electron
2 parents e8d230c + 525f523 commit f8d5fd8

File tree

6 files changed

+61
-64
lines changed

6 files changed

+61
-64
lines changed

extensions/ql-vscode/package-lock.json

Lines changed: 54 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,7 @@
12971297
"@types/xml2js": "~0.4.4",
12981298
"@typescript-eslint/eslint-plugin": "^4.26.0",
12991299
"@typescript-eslint/parser": "^4.26.0",
1300+
"@vscode/test-electron": "^2.1.5",
13001301
"ansi-colors": "^4.1.1",
13011302
"applicationinsights": "^2.3.5",
13021303
"babel-loader": "^8.2.5",
@@ -1335,7 +1336,6 @@
13351336
"typescript": "^4.5.5",
13361337
"typescript-formatter": "^7.2.2",
13371338
"vsce": "^2.7.0",
1338-
"vscode-test": "^1.4.0",
13391339
"webpack": "^5.62.2",
13401340
"webpack-cli": "^4.6.0"
13411341
},

extensions/ql-vscode/src/vscode-tests/cli-integration/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'source-map-support/register';
2-
import 'vscode-test';
32
import { runTestsInDirectory } from '../index-template';
43
import 'mocha';
54
import * as sinonChai from 'sinon-chai';

extensions/ql-vscode/src/vscode-tests/minimal-workspace/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'source-map-support/register';
2-
import 'vscode-test';
32
import * as sinonChai from 'sinon-chai';
43
import * as chai from 'chai';
54
import 'chai/register-should';

extensions/ql-vscode/src/vscode-tests/no-workspace/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'source-map-support/register';
2-
import 'vscode-test';
32
import * as sinonChai from 'sinon-chai';
43
import * as chai from 'chai';
54
import * as chaiAsPromised from 'chai-as-promised';

extensions/ql-vscode/src/vscode-tests/run-integration-tests.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import * as cp from 'child_process';
44
import {
55
runTests,
66
downloadAndUnzipVSCode,
7-
resolveCliPathFromVSCodeExecutablePath
8-
} from 'vscode-test';
7+
resolveCliArgsFromVSCodeExecutablePath
8+
} from '@vscode/test-electron';
99
import { assertNever } from '../pure/helpers-pure';
1010
import * as tmp from 'tmp-promise';
1111

1212
// For some reason, the following are not exported directly from `vscode-test`,
1313
// but we can be tricky and import directly from the out file.
14-
import { TestOptions } from 'vscode-test/out/runTest';
14+
import { TestOptions } from '@vscode/test-electron/out/runTest';
1515

1616

1717
// For CI purposes we want to leave this at 'stable' to catch any bugs
@@ -78,10 +78,11 @@ async function main() {
7878
const extensionTestsEnv: Record<string, string> = {};
7979
if (dirs.includes(TestDir.CliIntegration)) {
8080
console.log('Installing required extensions');
81-
const cliPath = resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath);
81+
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
8282
cp.spawnSync(
83-
cliPath,
83+
cli,
8484
[
85+
...args,
8586
'--install-extension',
8687
'hbenl.vscode-test-explorer',
8788
'--install-extension',

0 commit comments

Comments
 (0)