Rename update Chromium version to generate

This also adds the script as a script in the `package.json` with the
naming such that `npm generate` will re-generate the Chromium version
file. This will ensure that the CI checks fail when the Chromium version
doesn't match the minimum supported VS Code version.
This commit is contained in:
Koen Vlaswinkel
2024-01-03 11:42:20 +01:00
parent cce0e146ff
commit 9718aa5806
3 changed files with 4 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ This version should be the same as the version of Chromium that is bundled with
the version, run:
```bash
npx ts-node scripts/update-chromium-version.ts
npx ts-node scripts/generate-chromium-version.ts
```
#### Troubleshooting

View File

@@ -1902,6 +1902,7 @@
"lint:scenarios": "ts-node scripts/lint-scenarios.ts",
"generate": "npm-run-all -p generate:*",
"generate:schemas": "ts-node scripts/generate-schemas.ts",
"generate:chromium-version": "ts-node scripts/generate-chromium-version.ts",
"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\"",
"postinstall": "patch-package",
"prepare": "cd ../.. && husky install"

View File

@@ -5,7 +5,7 @@ import { getVersionInformation } from "./util/vscode-versions";
const extensionDirectory = resolve(__dirname, "..");
async function updateChromiumVersion() {
async function generateChromiumVersion() {
const packageJson = await readJSON(
resolve(extensionDirectory, "package.json"),
);
@@ -36,7 +36,7 @@ async function updateChromiumVersion() {
);
}
updateChromiumVersion().catch((e: unknown) => {
generateChromiumVersion().catch((e: unknown) => {
console.error(e);
process.exit(2);
});