Skip to content

Commit b518e39

Browse files
authored
chore: upgrade to VS Code 1.106 / Electron 37 / Node 22 (#848)
Bump minimum VS Code from 1.95 to 1.106, upgrading the platform to Electron 37 and Node 22. Update all dependencies, pin Electron to 37.7.0, remove Node 20 workarounds, unify test runners under Electron, and add a release pipeline safety check requiring tags on main.
1 parent abf2652 commit b518e39

File tree

15 files changed

+1426
-1624
lines changed

15 files changed

+1426
-1624
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ updates:
1414
schedule:
1515
interval: "weekly"
1616
ignore:
17+
# Pinned to engines.vscode minimum; bump manually with engine updates.
1718
- dependency-name: "@types/vscode"
1819
# These versions must match the versions specified in coder/coder exactly.
1920
- dependency-name: "@types/ua-parser-js"

.github/workflows/ci.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v6
1919

20-
- uses: pnpm/action-setup@v4
20+
- uses: pnpm/action-setup@v5
2121

2222
- uses: actions/setup-node@v6
2323
with:
@@ -40,13 +40,14 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
# Minimum supported version: VS Code 1.95 (Oct 2024) -> Electron 32 -> Node 20
44-
electron-version: ["32", "latest"]
43+
# Minimum supported version: VS Code 1.106 (Oct 2025) -> Electron 37 -> Node 22
44+
# See https://github.com/ewanharris/vscode-versions for version mapping
45+
electron-version: ["37", "latest"]
4546

4647
steps:
4748
- uses: actions/checkout@v6
4849

49-
- uses: pnpm/action-setup@v4
50+
- uses: pnpm/action-setup@v5
5051

5152
- uses: actions/setup-node@v6
5253
with:
@@ -66,12 +67,12 @@ jobs:
6667
strategy:
6768
fail-fast: false
6869
matrix:
69-
vscode-version: ["1.95.0", "stable"]
70+
vscode-version: ["1.106.0", "stable"]
7071

7172
steps:
7273
- uses: actions/checkout@v6
7374

74-
- uses: pnpm/action-setup@v4
75+
- uses: pnpm/action-setup@v5
7576

7677
- uses: actions/setup-node@v6
7778
with:
@@ -92,7 +93,7 @@ jobs:
9293
steps:
9394
- uses: actions/checkout@v6
9495

95-
- uses: pnpm/action-setup@v4
96+
- uses: pnpm/action-setup@v5
9697

9798
- uses: actions/setup-node@v6
9899
with:

.github/workflows/pre-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v6
2020

21-
- uses: pnpm/action-setup@v4
21+
- uses: pnpm/action-setup@v5
2222

2323
- uses: actions/setup-node@v6
2424
with:

.github/workflows/release.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,17 @@ jobs:
1818
version: ${{ steps.version.outputs.version }}
1919
steps:
2020
- uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Verify tag is on main
25+
run: |
26+
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
27+
echo "Error: Release tags must be pushed from the main branch"
28+
exit 1
29+
fi
2130
22-
- uses: pnpm/action-setup@v4
31+
- uses: pnpm/action-setup@v5
2332

2433
- uses: actions/setup-node@v6
2534
with:

.vscode-test.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { defineConfig } from "@vscode/test-cli";
22

33
// VS Code to Electron/Node version mapping:
4-
// VS Code 1.95 (Oct 2024) -> Node 20 - Minimum supported
5-
// VS Code stable -> Latest
6-
const versions = ["1.95.0", "stable"];
4+
// VS Code 1.106 (Oct 2025) -> Electron 37, Node 22 - Minimum supported
5+
// VS Code stable -> Latest
6+
// See https://github.com/ewanharris/vscode-versions for version mapping
7+
const versions = ["1.106.0", "stable"];
78

89
const baseConfig = {
910
files: "out/test/integration/**/*.test.js",

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Changed
6+
7+
- **Breaking**: Minimum VS Code version is now 1.106.0.
8+
59
### Fixed
610

711
- SSH connections now recover faster after laptop sleep/wake by detecting port changes

CONTRIBUTING.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ code --open-url 'vscode://coder.coder-remote/open?url=dev.coder.com&owner=my-use
126126
The project uses Vitest with separate test configurations for extension and webview code:
127127

128128
```bash
129-
pnpm test:extension # Extension tests (runs in Electron with mocked VS Code APIs)
130-
pnpm test:webview # Webview tests (runs in jsdom)
129+
pnpm test:extension # Extension tests (runs in Electron)
130+
pnpm test:webview # Webview tests (runs in Electron with jsdom)
131131
pnpm test # Both extension and webview tests (CI mode)
132132
```
133133

@@ -187,7 +187,7 @@ This extension targets the Node.js version bundled with VS Code's Electron:
187187

188188
| VS Code | Electron | Node.js | Status |
189189
| ------- | -------- | ------- | ----------------- |
190-
| 1.95 | 32 | 20 | Minimum supported |
190+
| 1.106 | 37 | 22 | Minimum supported |
191191
| stable | latest | varies | Also tested in CI |
192192

193193
When updating the minimum Node.js version, update these files:
@@ -207,11 +207,30 @@ Some dependencies are not directly used in the source but are required anyway.
207207
The coder client is vendored from coder/coder. Every now and then, we should be running `pnpm update coder`
208208
to make sure we're using up to date versions of the client.
209209

210+
After running `pnpm update`, always run `pnpm dedupe` to consolidate duplicate
211+
package versions across the workspace. Without this, workspace packages can
212+
resolve to different versions of the same dependency, causing issues like broken
213+
React context propagation when two copies of a library are loaded.
214+
210215
## Releasing
211216

217+
For both stable and pre-releases:
218+
212219
1. Check that the changelog lists all the important changes.
213220
2. Update the package.json version and add a version heading to the changelog.
214-
3. Push a tag matching the new package.json version.
215-
4. Update the resulting draft release with the changelog contents.
216-
5. Publish the draft release.
217-
6. Download the `.vsix` file from the release and upload to both the [official VS Code Extension Marketplace](https://code.visualstudio.com/api/working-with-extensions/publishing-extension), and the [open-source VSX Registry](https://open-vsx.org/).
221+
222+
### Stable Release
223+
224+
1. Push a tag `v<version>` (e.g. `v1.15.0`) from the `main` branch. The release
225+
pipeline will only run for tags on `main`.
226+
2. The pipeline builds, publishes to the VS Code Marketplace and Open VSX, and
227+
creates a draft GitHub release.
228+
3. Update the draft release with the changelog contents and publish it.
229+
230+
### Pre-Release
231+
232+
1. Push a tag `v<version>-pre` (e.g. `v1.15.0-pre`) from any branch. The version
233+
in the tag must match package.json (the `-pre` suffix is stripped during
234+
validation). Pre-release tags are not restricted to `main`.
235+
2. The pipeline builds with `--pre-release`, publishes to both marketplaces, and
236+
creates a draft pre-release on GitHub.

esbuild.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const buildOptions = {
2424
bundle: true,
2525
outfile: "dist/extension.js",
2626
platform: "node",
27-
target: "node20",
27+
target: "node22",
2828
format: "cjs",
2929
mainFields: ["module", "main"],
3030
alias: {

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"lint:fix": "pnpm lint --fix",
2828
"package": "pnpm build:production && vsce package --no-dependencies",
2929
"package:prerelease": "pnpm build:production && vsce package --pre-release --no-dependencies",
30-
"test": "CI=true pnpm test:extension && CI=true pnpm test:webview",
30+
"test": "CI=true ELECTRON_RUN_AS_NODE=1 electron node_modules/vitest/vitest.mjs",
3131
"test:extension": "ELECTRON_RUN_AS_NODE=1 electron node_modules/vitest/vitest.mjs --project extension",
3232
"test:integration": "tsc -p test/integration --outDir out --noCheck && node esbuild.mjs && vscode-test",
33-
"test:webview": "vitest --project webview",
33+
"test:webview": "ELECTRON_RUN_AS_NODE=1 electron node_modules/vitest/vitest.mjs --project webview",
3434
"typecheck": "concurrently -g -n extension,tests,packages \"tsc --noEmit\" \"tsc --noEmit -p test\" \"pnpm typecheck:packages\"",
3535
"typecheck:packages": "pnpm -r --filter \"./packages/*\" --parallel typecheck",
3636
"watch": "concurrently -g -n extension,webviews \"pnpm watch:extension\" \"pnpm watch:webviews\"",
@@ -516,31 +516,31 @@
516516
"semver": "^7.7.4",
517517
"strip-ansi": "^7.2.0",
518518
"ua-parser-js": "^1.0.41",
519-
"ws": "^8.19.0",
519+
"ws": "^8.20.0",
520520
"zod": "^4.3.6"
521521
},
522522
"devDependencies": {
523-
"@eslint-react/eslint-plugin": "^2.13.0",
523+
"@eslint-react/eslint-plugin": "^3.0.0",
524524
"@eslint/js": "^10.0.1",
525525
"@eslint/markdown": "^7.5.1",
526526
"@rolldown/plugin-babel": "catalog:",
527527
"@tanstack/react-query": "catalog:",
528528
"@testing-library/jest-dom": "^6.9.1",
529529
"@testing-library/react": "^16.3.2",
530-
"@tsconfig/node20": "^20.1.9",
530+
"@tsconfig/node22": "^22.0.5",
531531
"@types/mocha": "^10.0.10",
532-
"@types/node": "^20",
532+
"@types/node": "^22.19.15",
533533
"@types/proper-lockfile": "^4.1.4",
534534
"@types/react": "catalog:",
535535
"@types/react-dom": "catalog:",
536536
"@types/semver": "^7.7.1",
537537
"@types/ua-parser-js": "0.7.39",
538-
"@types/vscode": "^1.95.0",
538+
"@types/vscode": "1.106.0",
539539
"@types/ws": "^8.18.1",
540-
"@typescript-eslint/eslint-plugin": "^8.57.0",
541-
"@typescript-eslint/parser": "^8.57.0",
540+
"@typescript-eslint/eslint-plugin": "^8.57.2",
541+
"@typescript-eslint/parser": "^8.57.2",
542542
"@vitejs/plugin-react": "catalog:",
543-
"@vitest/coverage-v8": "^4.1.0",
543+
"@vitest/coverage-v8": "^4.1.1",
544544
"@vscode/test-cli": "^0.0.12",
545545
"@vscode/test-electron": "^2.5.2",
546546
"@vscode/vsce": "^3.7.1",
@@ -549,33 +549,33 @@
549549
"coder": "catalog:",
550550
"concurrently": "^9.2.1",
551551
"dayjs": "^1.11.20",
552-
"electron": "^41.0.0",
552+
"electron": "37.7.0",
553553
"esbuild": "^0.27.4",
554-
"eslint": "^10.0.3",
554+
"eslint": "^10.1.0",
555555
"eslint-config-prettier": "^10.1.8",
556556
"eslint-import-resolver-typescript": "^4.4.4",
557557
"eslint-plugin-import-x": "^4.16.2",
558-
"eslint-plugin-package-json": "^0.90.1",
558+
"eslint-plugin-package-json": "^0.91.0",
559559
"globals": "^17.4.0",
560-
"jsdom": "^28.1.0",
560+
"jsdom": "^29.0.1",
561561
"jsonc-eslint-parser": "^3.1.0",
562-
"memfs": "^4.56.11",
562+
"memfs": "^4.57.1",
563563
"prettier": "^3.8.1",
564564
"react": "catalog:",
565565
"react-dom": "catalog:",
566566
"typescript": "catalog:",
567-
"typescript-eslint": "^8.57.0",
567+
"typescript-eslint": "^8.57.2",
568568
"utf-8-validate": "^6.0.6",
569569
"vite": "catalog:",
570-
"vitest": "^4.1.0"
570+
"vitest": "^4.1.1"
571571
},
572572
"extensionPack": [
573573
"ms-vscode-remote.remote-ssh"
574574
],
575575
"packageManager": "pnpm@10.32.1",
576576
"engines": {
577-
"vscode": "^1.95.0",
578-
"node": ">= 20"
577+
"vscode": "^1.106.0",
578+
"node": ">= 22"
579579
},
580580
"icon": "media/logo.png",
581581
"capabilities": {

packages/tsconfig.packages.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"extends": "@tsconfig/node20/tsconfig.json",
2+
"extends": "@tsconfig/node22/tsconfig.json",
33
"compilerOptions": {
4-
"lib": ["ES2023", "DOM", "DOM.Iterable"],
4+
"lib": ["ES2024", "DOM", "DOM.Iterable"],
55
"module": "ESNext",
66
"moduleResolution": "bundler",
77
"jsx": "react-jsx",

0 commit comments

Comments
 (0)