Skip to content

Fix Node updater for VS Code nativeBuild metadata - #4663

Open
cklin wants to merge 1 commit into
mainfrom
cklin/update-node-version-fix
Open

cklin wants to merge 1 commit into
mainfrom
cklin/update-node-version-fix

Conversation

@cklin

@cklin cklin commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Fix the scheduled Node version updater failing for VS Code 1.147.0, which stores its Electron version in package.json under nativeBuild.target rather than devDependencies.electron or a root .npmrc.

Read and validate nativeBuild.target when nativeBuild.runtime is electron, while retaining the existing package dependency and .npmrc formats for older releases. Add regression coverage for the new format, missing or invalid targets, and non-Electron runtime fallback.

Addresses the failure in https://github.com/github/vscode-codeql/actions/runs/44523521233.

Validation from extensions/ql-vscode:

  • npm run test:unit -- --runInBand --runTestsByPath test/unit-tests/scripts/util/vscode-versions.test.ts - passed (11 tests).
  • ./node_modules/.bin/eslint test/unit-tests/scripts/util/vscode-versions.test.ts --max-warnings=0 - passed.
  • ./node_modules/.bin/tsc --project scripts/tsconfig.json --noEmit - passed.
  • Both changed files were formatted with the repository's Prettier.

No changelog entry is needed because this only changes maintenance automation.

Remember to update the changelog if there have been user-facing changes!

Read and validate the Electron target from nativeBuild while retaining support for older VS Code metadata formats.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0d6e4f27-75bf-4d77-8758-1ef757ddb3db
@cklin
cklin requested a review from a team as a code owner November 19, 2026 18:58
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the update supporting VS Code’s new Electron metadata format.

No open issues 🎉

What changed in this PR

Updates maintenance automation to read VS Code 1.147.0’s Electron version from nativeBuild metadata, allowing the scheduled Node version updater to support the new format.

Changes:

  • Reads and validates nativeBuild.target when the runtime is Electron.
  • Preserves dependency-based and .npmrc lookup for older releases.
  • Adds regression tests for valid, missing, and invalid targets, plus non-Electron runtime fallback.
File Description
extensions/​ql-vscode/​test/​unit-tests/​scripts/​util/​vscode-versions.test.ts Adds nativeBuild validation and fallback regression coverage.
extensions/​ql-vscode/​scripts/​util/​vscode-versions.ts Supports Electron nativeBuild metadata while retaining older lookup formats.

Review effort: Balanced (adaptive)

@cklin
cklin enabled auto-merge November 19, 2026 19:17

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants