Skip to content

fix(arborist): validate linked store deps against the store package - #9983

Open
manzoorwanijk wants to merge 3 commits into
npm:latestfrom
manzoorwanijk:fix/linked-ls-dist-tag-dep
Open

manzoorwanijk wants to merge 3 commits into
npm:latestfrom
manzoorwanijk:fix/linked-ls-dist-tag-dep

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Contributor

Under install-strategy=linked, npm ls reported dependencies with dist-tag, remote tarball, git or install-links directory specs as invalid, exiting with ELSPROBLEMS.
The edge target is a Link whose resolved is always file:, so the source checks in dep-valid.js could never pass.
Those checks now use the .store package the Link points to, while git ref lookups and plain directory links keep using the Link.

When the hidden lockfile is not used, store packages also had no resolved because package-lock.json has no entry at their .store location.
Shrinkwrap.add now falls back to the lockfile entry with the same name and version, and skips it when entries disagree on resolved or integrity.

References

Fixes #9976

@manzoorwanijk
manzoorwanijk marked this pull request as ready for review September 15, 2026 09:37
@manzoorwanijk
manzoorwanijk requested a review from a team as a code owner September 15, 2026 09:37
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.

[BUG] npm ls reports dist-tag dependencies as invalid under install-strategy=linked

1 participant