Skip to content

Fix incorrect stale statee during nodejs patch bump#302143

Closed
lramos15 wants to merge 1 commit intomainfrom
lramos15/endless-raven
Closed

Fix incorrect stale statee during nodejs patch bump#302143
lramos15 wants to merge 1 commit intomainfrom
lramos15/endless-raven

Conversation

@lramos15
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 15:51
@lramos15 lramos15 enabled auto-merge (squash) March 16, 2026 15:51
@lramos15 lramos15 self-assigned this Mar 16, 2026
@lramos15 lramos15 requested a review from hediet March 16, 2026 15:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the repo’s “npm install state” staleness detection to avoid treating Node.js patch bumps as requiring a reinstall, reducing false “node_modules is stale” signals during routine Node patch updates.

Changes:

  • Update the build-side isUpToDate() check to compare Node.js versions by major.minor instead of full semver (ignoring patch).
  • Update the vscode-extras “npm up-to-date” status UI to also ignore patch-level Node.js differences.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
build/npm/installStateHash.ts Adds a helper to compare Node versions by major.minor and uses it in isUpToDate() to ignore patch-only changes.
.vscode/extensions/vscode-extras/src/npmUpToDateFeature.ts Mirrors the major.minor comparison in the status UI so it doesn’t flag staleness on patch-only Node differences.

Comment on lines +216 to +217
const majorMinor = (v: string) => { const p = v.split('.'); return p.length >= 2 ? `${p[0]}.${p[1]}` : v; };
if (majorMinor(state.saved.nodeVersion) !== majorMinor(state.current.nodeVersion)) {
Comment on lines +127 to +130
*/
export function nodeMajorMinor(version: string): string {
const parts = version.split('.');
return parts.length >= 2 ? `${parts[0]}.${parts[1]}` : version;
@vs-code-engineering vs-code-engineering Bot added this to the 1.112.0 milestone Mar 16, 2026
@mjbvz
Copy link
Copy Markdown
Collaborator

mjbvz commented Mar 17, 2026

@lramos15 I am moving this to 1.113 since it is targeting main. Please create a candidate fix if this needs to go into 1.112

@mjbvz mjbvz modified the milestones: 1.112.0, 1.113.0 Mar 17, 2026
@lramos15 lramos15 closed this Mar 18, 2026
auto-merge was automatically disabled March 18, 2026 14:25

Pull request was closed

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