Skip to content

Commit 45fe4aa

Browse files
authored
Merge pull request #3186 from github/koesie10/generate-chromium-version
Rename update Chromium version script to generate Chromium version
2 parents 902074f + dbee8dd commit 45fe4aa

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

docs/vscode-version.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,11 @@ Also consider what percentage of our users are using each VS Code version. This
2727
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.
2828
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.
2929

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. To update
36-
the version, run:
30+
After updating the minimum version in `package.json`, make sure to also run the following command to update any generated
31+
files dependent on this version:
3732

3833
```bash
39-
npx ts-node scripts/update-chromium-version.ts
40-
```
41-
42-
#### Troubleshooting
43-
44-
In case there's an error when specifying a version of Chromium, you may need to update the version of `caniuse-lite`
45-
in `package.json` to a newer version. You should be able to do so by running:
46-
47-
```shell
48-
npx update-browserslist-db@latest
34+
npm run generate
4935
```
5036

5137
## VS Code version used in tests

extensions/ql-vscode/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,7 @@
19021902
"lint:scenarios": "ts-node scripts/lint-scenarios.ts",
19031903
"generate": "npm-run-all -p generate:*",
19041904
"generate:schemas": "ts-node scripts/generate-schemas.ts",
1905+
"generate:chromium-version": "ts-node scripts/generate-chromium-version.ts",
19051906
"check-types": "find . -type f -name \"tsconfig.json\" -not -path \"./node_modules/*\" | sed -r 's|/[^/]+$||' | sort | uniq | xargs -I {} sh -c \"echo Checking types in {} && cd {} && npx tsc --noEmit\"",
19061907
"postinstall": "patch-package",
19071908
"prepare": "cd ../.. && husky install"

extensions/ql-vscode/scripts/update-chromium-version.ts renamed to extensions/ql-vscode/scripts/generate-chromium-version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getVersionInformation } from "./util/vscode-versions";
55

66
const extensionDirectory = resolve(__dirname, "..");
77

8-
async function updateChromiumVersion() {
8+
async function generateChromiumVersion() {
99
const packageJson = await readJSON(
1010
resolve(extensionDirectory, "package.json"),
1111
);
@@ -36,7 +36,7 @@ async function updateChromiumVersion() {
3636
);
3737
}
3838

39-
updateChromiumVersion().catch((e: unknown) => {
39+
generateChromiumVersion().catch((e: unknown) => {
4040
console.error(e);
4141
process.exit(2);
4242
});

0 commit comments

Comments
 (0)