Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ updates:
schedule:
interval: "weekly"
ignore:
- dependency-name: "@types/vscode"
# These versions must match the versions specified in coder/coder exactly.
- dependency-name: "@types/ua-parser-js"
- dependency-name: "ua-parser-js"
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5

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

steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
with:
Expand All @@ -66,12 +67,12 @@ jobs:
strategy:
fail-fast: false
matrix:
vscode-version: ["1.95.0", "stable"]
vscode-version: ["1.106.0", "stable"]

steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
with:
Expand All @@ -92,7 +93,7 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
with:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@ jobs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Verify tag is on main
run: |
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "Error: Release tags must be pushed from the main branch"
exit 1
fi

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
with:
Expand Down
7 changes: 4 additions & 3 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { defineConfig } from "@vscode/test-cli";

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

const baseConfig = {
files: "out/test/integration/**/*.test.js",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Changed

- **Breaking**: Minimum VS Code version is now 1.106.0.

### Fixed

- SSH connections now recover faster after laptop sleep/wake by detecting port changes
Expand Down
28 changes: 21 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ code --open-url 'vscode://coder.coder-remote/open?url=dev.coder.com&owner=my-use
The project uses Vitest with separate test configurations for extension and webview code:

```bash
pnpm test:extension # Extension tests (runs in Electron with mocked VS Code APIs)
pnpm test:webview # Webview tests (runs in jsdom)
pnpm test:extension # Extension tests (runs in Electron)
pnpm test:webview # Webview tests (runs in Electron with jsdom)
pnpm test # Both extension and webview tests (CI mode)
```

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

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

When updating the minimum Node.js version, update these files:
Expand All @@ -209,9 +209,23 @@ to make sure we're using up to date versions of the client.

## Releasing

For both stable and pre-releases:

1. Check that the changelog lists all the important changes.
2. Update the package.json version and add a version heading to the changelog.
3. Push a tag matching the new package.json version.
4. Update the resulting draft release with the changelog contents.
5. Publish the draft release.
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/).

### Stable Release

1. Push a tag `v<version>` (e.g. `v1.15.0`) from the `main` branch. The release
pipeline will only run for tags on `main`.
2. The pipeline builds, publishes to the VS Code Marketplace and Open VSX, and
creates a draft GitHub release.
3. Update the draft release with the changelog contents and publish it.

### Pre-Release

1. Push a tag `v<version>-pre` (e.g. `v1.15.0-pre`) from any branch. The version
in the tag must match package.json (the `-pre` suffix is stripped during
validation). Pre-release tags are not restricted to `main`.
2. The pipeline builds with `--pre-release`, publishes to both marketplaces, and
creates a draft pre-release on GitHub.
2 changes: 1 addition & 1 deletion esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const buildOptions = {
bundle: true,
outfile: "dist/extension.js",
platform: "node",
target: "node20",
target: "node22",
format: "cjs",
mainFields: ["module", "main"],
alias: {
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"lint:fix": "pnpm lint --fix",
"package": "pnpm build:production && vsce package --no-dependencies",
"package:prerelease": "pnpm build:production && vsce package --pre-release --no-dependencies",
"test": "CI=true pnpm test:extension && CI=true pnpm test:webview",
"test": "CI=true ELECTRON_RUN_AS_NODE=1 electron node_modules/vitest/vitest.mjs",
"test:extension": "ELECTRON_RUN_AS_NODE=1 electron node_modules/vitest/vitest.mjs --project extension",
"test:integration": "tsc -p test/integration --outDir out --noCheck && node esbuild.mjs && vscode-test",
"test:webview": "vitest --project webview",
"test:webview": "ELECTRON_RUN_AS_NODE=1 electron node_modules/vitest/vitest.mjs --project webview",
"typecheck": "concurrently -g -n extension,tests,packages \"tsc --noEmit\" \"tsc --noEmit -p test\" \"pnpm typecheck:packages\"",
"typecheck:packages": "pnpm -r --filter \"./packages/*\" --parallel typecheck",
"watch": "concurrently -g -n extension,webviews \"pnpm watch:extension\" \"pnpm watch:webviews\"",
Expand Down Expand Up @@ -520,25 +520,25 @@
"zod": "^4.3.6"
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^2.13.0",
"@eslint-react/eslint-plugin": "^3.0.0",
"@eslint/js": "^10.0.1",
"@eslint/markdown": "^7.5.1",
"@rolldown/plugin-babel": "catalog:",
"@tanstack/react-query": "catalog:",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@tsconfig/node20": "^20.1.9",
"@tsconfig/node22": "^22.0.5",
"@types/mocha": "^10.0.10",
"@types/node": "^20",
"@types/node": "^22",
"@types/proper-lockfile": "^4.1.4",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@types/semver": "^7.7.1",
"@types/ua-parser-js": "0.7.39",
"@types/vscode": "^1.95.0",
"@types/vscode": "1.106.0",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.57.0",
"@typescript-eslint/parser": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^8.57.1",
"@typescript-eslint/parser": "^8.57.1",
"@vitejs/plugin-react": "catalog:",
"@vitest/coverage-v8": "^4.1.0",
"@vscode/test-cli": "^0.0.12",
Expand All @@ -549,22 +549,22 @@
"coder": "catalog:",
"concurrently": "^9.2.1",
"dayjs": "^1.11.20",
"electron": "^41.0.0",
"electron": "37.7.0",
"esbuild": "^0.27.4",
"eslint": "^10.0.3",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import-x": "^4.16.2",
"eslint-plugin-package-json": "^0.90.1",
"eslint-plugin-package-json": "^0.91.0",
"globals": "^17.4.0",
"jsdom": "^28.1.0",
"jsdom": "^29.0.0",
"jsonc-eslint-parser": "^3.1.0",
"memfs": "^4.56.11",
"prettier": "^3.8.1",
"react": "catalog:",
"react-dom": "catalog:",
"typescript": "catalog:",
"typescript-eslint": "^8.57.0",
"typescript-eslint": "^8.57.1",
"utf-8-validate": "^6.0.6",
"vite": "catalog:",
"vitest": "^4.1.0"
Expand All @@ -574,8 +574,8 @@
],
"packageManager": "pnpm@10.32.1",
"engines": {
"vscode": "^1.95.0",
"node": ">= 20"
"vscode": "^1.106.0",
"node": ">= 22"
},
"icon": "media/logo.png",
"capabilities": {
Expand Down
4 changes: 2 additions & 2 deletions packages/tsconfig.packages.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"lib": ["ES2024", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
Expand Down
Loading