fix: keep nested file: deps and re-resolve changed git refs (#9523)
The lockfile pruning added in 11.15.0 dropped every extraneous node outside node_modules to remove stale workspace entries. This also removed legitimate nested entries for a file: dependency that itself has a file: dependency (e.g. lib/b/lib/a), leaving the lockfile incomplete so `npm ci` failed with "Missing: a@1.0.0 from lock file". Only prune extraneous nodes that are direct fsChildren of the root or detached link targets (removed workspaces, removed root-level file: deps, orphaned link targets). Extraneous fsChildren nested under another package are kept so `npm ci` can resolve the parent's dependency. Fixes: https://github.com/npm/cli/issues/9433 Fixes: https://github.com/npm/cli/issues/9486 Supersedes: https://github.com/npm/cli/pull/9524
M
Michael Smith committed
fc6268ab7fa4ce1dcaefd6cd470a1f73eb192565
Parent: 34dbdf5
Committed by GitHub <noreply@github.com>
on 6/10/2026, 2:30:54 PM