GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(reify): report added count for fresh linked installs by manzoorwanijk · Pull Request #9661 · npm/cli

Conversation

@manzoorwanijk

@manzoorwanijk manzoorwanijk commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Under install-strategy=linked, a fresh npm install that actually creates .store entries and symlinks printed up to date, audited N packages instead of added N packages, misleading users and CI into thinking nothing changed.

reify-output counts adds with actualTree.inventory.has(d.ideal). Under the linked strategy the diff's ideal nodes belong to the isolated store tree (locations under node_modules/.store/<key>/node_modules/<name>), while the actualTree returned after reify is the logical hoisted-layout tree. The two never share node identity, so the lookup always failed and added stayed 0.

The ADD branch now also counts a node when it is a real store package node (isInStore && !isLink), which maps 1:1 to a hoisted package add. This excludes the internal store symlinks and the top-level consumer symlink, so the count matches hoisted for registry dependencies (verified: minimatch 4/4, rimraf 12/12, express 69/69). Omitted/incompatible optional deps have no store entry and are still not counted, and hoisted behavior is unchanged.

Known limitations (tracked separately): workspace and file:/npm link additions are represented as links rather than store nodes under linked, so they are not yet counted here — counting them is entangled with the self-link bug (#9398) and the undeclared-workspaces bug (#9618). The --json add[].path for a counted store package points to its .store realpath rather than a logical node_modules/<name> path.

References

Fixes #9623

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@manzoorwanijk
fix(reify): report added count for fresh linked installs
a8d9f6c
@manzoorwanijk
manzoorwanijk marked this pull request as ready for review June 25, 2026 14:33
@manzoorwanijk
manzoorwanijk requested review from a team as code owners June 25, 2026 14:33
@owlstronaut owlstronaut added the backport:v11 label Jun 25, 2026
owlstronaut
owlstronaut approved these changes Jun 25, 2026
View reviewed changes
@owlstronaut
owlstronaut merged commit 0c33947 into npm:latest Jun 25, 2026
28 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

🎉 Backport to release/v11 created: #9667

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jun 25, 2026
fix(reify): report added count for fresh linked installs #9667
Merged
chore: release 12.0.0-pre.2 #9594
Merged
@manzoorwanijk
manzoorwanijk deleted the fix/linked-reify-output-added-count branch June 25, 2026 18:26
owlstronaut pushed a commit that referenced this pull request Jun 25, 2026
@github-actions @manzoorwanijk Michael Smith
fix(reify): report added count for fresh linked installs (#9667)
5b6ff9c
Backport of #9661 to `release/v11`.

---------

Co-authored-by: Manzoor Wani <[email protected]>
Co-authored-by: Michael Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@owlstronaut owlstronaut owlstronaut approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

backport:v11

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[BUG] install-strategy=linked: a fresh install reports "up to date" instead of "added N"

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@manzoorwanijk @owlstronaut
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.