Skip to content

Read VS Code Electron version from .npmrc - #4549

Merged
cklin merged 1 commit into
mainfrom
cklin/electron-ver-from-npm
Sep 16, 2026
Merged

cklin merged 1 commit into
mainfrom
cklin/electron-ver-from-npm

Conversation

@cklin

@cklin cklin commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This PR fixes broken update-node-version.yml workflow runs by reading the VS Code electron version from .npmrc.

Comment thread extensions/ql-vscode/scripts/util/vscode-versions.ts Dismissed
VS Code no longer consistently declares Electron in its root
package.json. Prefer that declaration for older releases and fall back
to the Electron target in .npmrc for newer releases.

Validate the resolved version and cover both metadata layouts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c8ecd08e-7635-4742-b943-e0fc528b7949
@cklin
cklin force-pushed the cklin/electron-ver-from-npm branch from e4cf492 to a1b7714 Compare September 15, 2026 19:56
Comment thread extensions/ql-vscode/scripts/util/vscode-versions.ts Dismissed

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.

Copilot review overview

🟢 Approval recommended

No unresolved review comments remain, and tests cover both lookup paths.

Review tier: Lite (auto)
Findings: None

Note

Copilot is running an experiment and ran this review at Lite.

What changed in this PR

Updates VS Code Electron version discovery so workflows support releases that define it in .npmrc.

Changes:

  • Added .npmrc parsing with package.json fallback.
  • Added shared text/JSON fetch handling.
  • Added unit tests for both lookup paths.
File Description
extensions/​ql-vscode/​test/​unit-tests/​scripts/​util/​vscode-versions.test.ts Tests Electron version discovery paths.
extensions/​ql-vscode/​scripts/​util/​vscode-versions.ts Resolves Electron versions from package metadata or .npmrc.
extensions/​ql-vscode/​scripts/​util/​fetch.ts Adds reusable response and text-fetching helpers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cklin
cklin marked this pull request as ready for review September 15, 2026 21:03
@cklin
cklin requested a review from a team as a code owner September 15, 2026 21:03
@cklin
cklin requested a review from kaspersv September 15, 2026 21:03
@cklin
cklin merged commit 3d925ba into main Sep 16, 2026
21 checks passed
@cklin
cklin deleted the cklin/electron-ver-from-npm branch September 16, 2026 13:28
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.

4 participants