Skip to content

Commit c7c709b

Browse files
authored
Revert "Upgrade from vscode-test to @vscode/test-electron"
1 parent bf66235 commit c7c709b

File tree

6 files changed

+64
-61
lines changed

6 files changed

+64
-61
lines changed

extensions/ql-vscode/package-lock.json

Lines changed: 55 additions & 54 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,7 +1297,6 @@
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",
13011300
"ansi-colors": "^4.1.1",
13021301
"applicationinsights": "^2.3.5",
13031302
"babel-loader": "^8.2.5",
@@ -1336,6 +1335,7 @@
13361335
"typescript": "^4.5.5",
13371336
"typescript-formatter": "^7.2.2",
13381337
"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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'source-map-support/register';
2+
import 'vscode-test';
23
import { runTestsInDirectory } from '../index-template';
34
import 'mocha';
45
import * as sinonChai from 'sinon-chai';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'source-map-support/register';
2+
import 'vscode-test';
23
import * as sinonChai from 'sinon-chai';
34
import * as chai from 'chai';
45
import 'chai/register-should';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'source-map-support/register';
2+
import 'vscode-test';
23
import * as sinonChai from 'sinon-chai';
34
import * as chai from 'chai';
45
import * as chaiAsPromised from 'chai-as-promised';

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

Lines changed: 5 additions & 6 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-
resolveCliArgsFromVSCodeExecutablePath
8-
} from '@vscode/test-electron';
7+
resolveCliPathFromVSCodeExecutablePath
8+
} from 'vscode-test';
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-electron/out/runTest';
14+
import { TestOptions } from 'vscode-test/out/runTest';
1515

1616

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

0 commit comments

Comments
 (0)