Skip to content

Commit

Permalink
Replace vscode-test with @vscode/test-electron (#533)
Browse files Browse the repository at this point in the history
* Replace vscode-test with @vscode/test-electron

Related: microsoft/vscode-test#153

* chore: auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ssbarnea and pre-commit-ci[bot] authored Jun 26, 2022
1 parent 7c20f38 commit 5339b4c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@
"@types/vscode": "^1.48.0",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"@vscode/test-electron": "^2.1.4",
"chai": "^4.3.6",
"copyfiles": "^2.4.1",
"eslint": "^8.16.0",
Expand All @@ -449,7 +450,6 @@
"typescript": "^4.6.4",
"vsce": "^2.9.2",
"vscode-extension-tester": "https://github.com/ssbarnea/vscode-extension-tester#master",
"vscode-test": "^1.6.1",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
"yarn-audit-fix": "^9.3.2"
Expand Down
14 changes: 12 additions & 2 deletions test/testRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
runTests,
downloadAndUnzipVSCode,
resolveCliPathFromVSCodeExecutablePath,
} from "vscode-test";
} from "@vscode/test-electron";
import fs from "fs";

export const FIXTURES_BASE_PATH = path.join("test", "testFixtures");
Expand All @@ -17,7 +17,17 @@ export const ANSIBLE_COLLECTIONS_FIXTURES_BASE_PATH = path.resolve(
async function main(): Promise<void> {
try {
const executable = await downloadAndUnzipVSCode();
const cliPath = resolveCliPathFromVSCodeExecutablePath(executable);
const downloadPlatform =
process.platform === "darwin"
? "darwin"
: process.platform === "win32"
? "win32-archive"
: "linux-x64";

const cliPath = resolveCliPathFromVSCodeExecutablePath(
executable,
downloadPlatform
);
const userDataPath = path.resolve(__dirname, "../../userdata");
const extPath = path.resolve(__dirname, "../../ext");
// We want to avoid using developer data dir as this is likely to break
Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,18 @@ __metadata:
languageName: node
linkType: hard

"@vscode/test-electron@npm:^2.1.4":
version: 2.1.4
resolution: "@vscode/test-electron@npm:2.1.4"
dependencies:
http-proxy-agent: ^4.0.1
https-proxy-agent: ^5.0.0
rimraf: ^3.0.2
unzipper: ^0.10.11
checksum: 2a541f70689cfdbfd911884caeba2fabf0bfeede4ee11b77bd97e8bd4bb6388341c7785230a05696b590e9aa6513d29b18ce82cc85965e664710ce4decc19b03
languageName: node
linkType: hard

"@webassemblyjs/ast@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/ast@npm:1.11.1"
Expand Down Expand Up @@ -983,6 +995,7 @@ __metadata:
"@types/vscode": ^1.48.0
"@typescript-eslint/eslint-plugin": ^5.26.0
"@typescript-eslint/parser": ^5.26.0
"@vscode/test-electron": ^2.1.4
chai: ^4.3.6
copyfiles: ^2.4.1
eslint: ^8.16.0
Expand All @@ -1000,7 +1013,6 @@ __metadata:
vsce: ^2.9.2
vscode-extension-tester: "https://github.com/ssbarnea/vscode-extension-tester#master"
vscode-languageclient: ^7.0.0
vscode-test: ^1.6.1
webpack: ^5.72.1
webpack-cli: ^4.9.2
yarn-audit-fix: ^9.3.2
Expand Down Expand Up @@ -6465,18 +6477,6 @@ __metadata:
languageName: node
linkType: hard

"vscode-test@npm:^1.6.1":
version: 1.6.1
resolution: "vscode-test@npm:1.6.1"
dependencies:
http-proxy-agent: ^4.0.1
https-proxy-agent: ^5.0.0
rimraf: ^3.0.2
unzipper: ^0.10.11
checksum: 37779441eaccfe7eb4c5ec53950441d2084b213010c6cb40855d4126f41140d021dbc12388da025df0f2ea1bfa85a4e5bcdd7c13bf78144dee18fa9b35c90793
languageName: node
linkType: hard

"vscode-uri@npm:^3.0.3":
version: 3.0.3
resolution: "vscode-uri@npm:3.0.3"
Expand Down

0 comments on commit 5339b4c

Please sign in to comment.