Skip to content

Commit 5f71b99

Browse files
committed
Upgrade to VS Code 1.106 / Electron 37 / Node 22
- Bump engines.vscode to ^1.106.0, engines.node to >= 22 - Update @types/vscode to 1.106.0 (adds SecretStorage.keys()) - Switch to @tsconfig/node22, target node22 in esbuild, lib ES2024 - Unify CI test jobs into single Electron run, simplify pnpm test - Remove --experimental-require-module workaround (native in Node 22) - Run webview tests in Electron alongside extension tests - Restrict release pipeline to tags on main, document pre-release flow - Update CONTRIBUTING.md release instructions and version table
1 parent cdb8f94 commit 5f71b99

File tree

11 files changed

+105
-111
lines changed

11 files changed

+105
-111
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ jobs:
3434

3535
- run: pnpm build
3636

37-
test-extension:
38-
name: Extension Test (Electron ${{ matrix.electron-version }})
37+
test-unit:
38+
name: Unit Test (Electron ${{ matrix.electron-version }})
3939
runs-on: ubuntu-22.04
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
# Minimum supported version: VS Code 1.95 (Oct 2024) -> Electron 32 -> Node 20
43+
# Minimum supported version: VS Code 1.106 (Oct 2025) -> Electron 37 -> Node 22
4444
# See https://github.com/ewanharris/vscode-versions for version mapping
45-
electron-version: ["32", "latest"]
45+
electron-version: ["37", "latest"]
4646

4747
steps:
4848
- uses: actions/checkout@v6
@@ -56,39 +56,18 @@ jobs:
5656

5757
- run: pnpm install
5858

59-
- name: Run extension tests with Electron ${{ matrix.electron-version }}
59+
- name: Run tests with Electron ${{ matrix.electron-version }}
6060
run: ./scripts/test-electron.sh ${{ matrix.electron-version }}
6161
env:
6262
CI: true
6363

64-
test-webview:
65-
name: Webview Test
66-
runs-on: ubuntu-22.04
67-
68-
steps:
69-
- uses: actions/checkout@v6
70-
71-
- uses: pnpm/action-setup@v5
72-
73-
- uses: actions/setup-node@v6
74-
with:
75-
node-version: "22"
76-
cache: "pnpm"
77-
78-
- run: pnpm install
79-
80-
- name: Run webview tests
81-
run: pnpm test:webview
82-
env:
83-
CI: true
84-
8564
test-integration:
8665
name: Integration Test (VS Code ${{ matrix.vscode-version }})
8766
runs-on: ubuntu-22.04
8867
strategy:
8968
fail-fast: false
9069
matrix:
91-
vscode-version: ["1.95.0", "stable"]
70+
vscode-version: ["1.106.0", "stable"]
9271

9372
steps:
9473
- uses: actions/checkout@v6
@@ -110,7 +89,7 @@ jobs:
11089
package:
11190
name: Package
11291
runs-on: ubuntu-22.04
113-
needs: [lint, test-extension, test-webview, test-integration]
92+
needs: [lint, test-unit, test-integration]
11493
steps:
11594
- uses: actions/checkout@v6
11695

.github/workflows/release.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ 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
2231
- uses: pnpm/action-setup@v5
2332

.vscode-test.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +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) -> Electron 32, Node 20 - Minimum supported
5-
// VS Code stable -> Latest
4+
// VS Code 1.106 (Oct 2025) -> Electron 37, Node 22 - Minimum supported
5+
// VS Code stable -> Latest
66
// See https://github.com/ewanharris/vscode-versions for version mapping
7-
const versions = ["1.95.0", "stable"];
7+
const versions = ["1.106.0", "stable"];
88

99
const baseConfig = {
1010
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: 21 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:
@@ -209,9 +209,23 @@ to make sure we're using up to date versions of the client.
209209

210210
## Releasing
211211

212+
For both stable and pre-releases:
213+
212214
1. Check that the changelog lists all the important changes.
213215
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/).
216+
217+
### Stable Release
218+
219+
1. Push a tag `v<version>` (e.g. `v1.15.0`) from the `main` branch. The release
220+
pipeline will only run for tags on `main`.
221+
2. The pipeline builds, publishes to the VS Code Marketplace and Open VSX, and
222+
creates a draft GitHub release.
223+
3. Update the draft release with the changelog contents and publish it.
224+
225+
### Pre-Release
226+
227+
1. Push a tag `v<version>-pre` (e.g. `v1.15.0-pre`) from any branch. The version
228+
in the tag must match package.json (the `-pre` suffix is stripped during
229+
validation). Pre-release tags are not restricted to `main`.
230+
2. The pipeline builds with `--pre-release`, publishes to both marketplaces, and
231+
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: 8 additions & 8 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\"",
@@ -527,15 +527,15 @@
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",
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",
540540
"@typescript-eslint/eslint-plugin": "^8.57.1",
541541
"@typescript-eslint/parser": "^8.57.1",
@@ -549,7 +549,7 @@
549549
"coder": "catalog:",
550550
"concurrently": "^9.2.1",
551551
"dayjs": "^1.11.20",
552-
"electron": "35.2.1",
552+
"electron": "37.7.0",
553553
"esbuild": "^0.27.4",
554554
"eslint": "^10.0.3",
555555
"eslint-config-prettier": "^10.1.8",
@@ -574,8 +574,8 @@
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)