Skip to content

Commit 27a326a

Browse files
committed
Add documentation for updating the ESBuild target
1 parent e7eb33e commit 27a326a

File tree

5 files changed

+44
-2
lines changed

5 files changed

+44
-2
lines changed
85.5 KB
Loading
9.99 KB
Loading

docs/images/electron-version.png

10.2 KB
Loading

docs/node-version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ We should make sure the CodeQL for VS Code extension works with the Node.js vers
77

88
## Checking the version of Node.js supplied by VS Code
99

10-
You can find this info by seleting "About Visual Studio Code" from the top menu.
10+
You can find this info by selecting "About Visual Studio Code" from the top menu.
1111

1212
![about-vscode](images/about-vscode.png)
1313

docs/vscode-version.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,49 @@ Also consider what percentage of our users are using each VS Code version. This
2424

2525
## How to update the VS Code version
2626

27-
To provide a good experience to users, it is recommented to update the `MIN_VERSION` in `extension.ts` first and release, and then update the `vscode` version in `package.json` and release again. By stagging this update across two releases it gives users on older VS Code versions a chance to upgrade before it silently refuses to upgrade them.
27+
To provide a good experience to users, it is recommented to update the `MIN_VERSION` in `extension.ts` first and release, and then update the `vscode` version in `package.json` and release again.
28+
By staggering this update across two releases it gives users on older VS Code versions a chance to upgrade before it silently refuses to upgrade them.
29+
30+
When updating the minimum version in `package.json`, you should also follow the additional steps listed below.
31+
32+
### Updating the Chromium target version
33+
34+
For the webview code, we use [esbuild](https://esbuild.github.io/) to bundle the code. This requires a target version of Chromium to be specified.
35+
This version should be the same as the version of Chromium that is bundled with the new minimum VS Code version. There are two
36+
methods to find this version.
37+
38+
#### Using the About Visual Studio Code dialog
39+
40+
Download the new minimum VS Code version from [the previous release versions](https://code.visualstudio.com/docs/supporting/faq#_previous-release-versions). Then,
41+
select "About Visual Studio Code" from the top menu. This will show the version of Chromium that is bundled with that version of VS Code.
42+
43+
![Chromium version in the About Visual Studio Code dialog](images/about-vscode-chromium.png)
44+
45+
In this case, the `target` would be `chrome114`.
46+
47+
#### Using the VS Code source code
48+
49+
You can find the version of Electron that VS Code uses by looking at its `package.json` file for a specific version
50+
(for example [the `package.json` for `1.82.0`](https://github.com/microsoft/vscode/blob/1.82.0/package.json#L153)).
51+
52+
![Electron version in the `package.json` file](images/electron-version.png)
53+
54+
Then, you can find the version of Chromium that is bundled with that version of Electron by looking at the
55+
Chromium version that is shown for that Electron version on [the Electron releases site](https://releases.electronjs.org/releases/stable)
56+
(for example [the `25.8.0` release](https://releases.electronjs.org/release/v25.8.0)):
57+
58+
![Chromium version in the Electron releases site](images/electron-chromium-version.png)
59+
60+
In this case, the `target` would be `chrome114`.
61+
62+
#### Troubleshooting
63+
64+
In case there's an error when specifying a version of Chromium, you may need to update the version of `caniuse-lite`
65+
in `package.json` to a newer version. You should be able to do so by running:
66+
67+
```shell
68+
npx update-browserslist-db@latest
69+
```
2870

2971
## VS Code version used in tests
3072

0 commit comments

Comments
 (0)