Skip to content

Commit bbe3653

Browse files
authored
fix(ci): upgrade @vscode/test-electron to fix macOS test failures (#1896)
The macOS job fails on every run while Linux and Windows pass, dying immediately after the VS Code download with: Test error: Error: spawn .../Visual Studio Code.app/Contents/MacOS/Electron ENOENT Error: Test run failed with code -2 VS Code 1.110 renamed the macOS main binary inside the app bundle from `Electron` to the product name (`Code`), keeping a compatibility symlink under the old name. That symlink was removed in microsoft/vscode#326502, so every 1.110+ archive now fails to launch. The test runner does not pin a VS Code version, so it resolves the latest release (1.131.0) and hits this. Only macOS goes through that code path, which is why the other platforms pass. `@vscode/test-electron` ^2.5.2 hardcodes the old path, so the breakage surfaced as soon as the symlink went away. 3.1.0 resolves the executable via `CFBundleExecutable` from `Info.plist`, with a fallback to the sole regular file in `Contents/MacOS/` and finally the legacy `Electron` name, so both the new and pre-1.110 layouts work. `skipLibCheck` is enabled alongside the bump. 3.1.0 ships declarations that use the generic `Buffer<ArrayBufferLike>`, which this repo's TypeScript 4.9 and older `@types/node` cannot resolve, so the upgrade otherwise fails to compile with `TS2315: Type 'Buffer' is not generic`. Raising `@types/node` instead was tried and pulls in unrelated type breakage, and sibling repos (vscode-java-dependency, vscode-spring-boot-dashboard) already set `skipLibCheck`, so this keeps the repos consistent. 3.x declares `engines.node >= 22` while CI runs Node 20, but this is a non-blocking `npm warn EBADENGINE`: the install succeeds, the package loads, and it uses no Node 22 only APIs. A Node bump is therefore left out to keep this change minimal. Copilot-Session: 0b39911b-23b6-4180-ae96-2b6c06d2265b
1 parent 498b158 commit bbe3653

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@
562562
"@types/vscode": "1.88.0",
563563
"@typescript-eslint/eslint-plugin": "^5.60.1",
564564
"@typescript-eslint/parser": "^5.60.1",
565-
"@vscode/test-electron": "^2.5.2",
565+
"@vscode/test-electron": "^3.1.0",
566566
"eslint": "^8.43.0",
567567
"glob": "^7.2.3",
568568
"mocha": "^11.1.0",

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"noImplicitReturns": true,
1616
"noUnusedParameters": true,
1717
"strictNullChecks": true,
18-
"alwaysStrict": true
18+
"alwaysStrict": true,
19+
"skipLibCheck": true
1920
},
2021
"exclude": [
2122
"node_modules",

0 commit comments

Comments
 (0)