Repository navigation
[staging] prefetch-npm-deps: exclude deprecated field from packument whitelist - #481866
Merged
Merged
Conversation
The 'deprecated' field can be modified by package maintainers at any time via 'npm deprecate', even for already-published versions. This causes hash mismatches when the npm registry adds deprecation notices to packages that were previously not deprecated. For lockfile-based installs, the version is already resolved, so the deprecation hint used by npm-pick-manifest for version selection is not needed. The only behavioral change is that users won't see deprecation warnings during 'npm install', which is an acceptable tradeoff for reproducible builds. This was discovered when [email protected] was deprecated upstream, breaking builds in downstream projects using fetcherVersion=2.
Mic92
force-pushed
the
prefetch-npm-deps-no-deprecated
branch
from
January 20, 2026 08:11
e8e6a18 to
e11702f
Compare
4 of 13 tasks
Member
Author
|
I have checked for safety also the other fields again in npm cli, if there is any registry endpoint that can be mutated and couldn't find anything that allows mutations of those. |
Member
Author
|
Since the fetcher change was only merged yesterday into staging, I don't think anyone uses it yet and we don't need to have another version bump if we merge this one quickly. |
philiptaron
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The 'deprecated' field can be modified by package maintainers at any time via 'npm deprecate', even for already-published versions. This causes hash mismatches when the npm registry adds deprecation notices to packages that were previously not deprecated.
For lockfile-based installs, the version is already resolved, so the deprecation hint used by npm-pick-manifest for version selection is not needed. The only behavioral change is that users won't see deprecation warnings during 'npm install', which is an acceptable tradeoff for reproducible builds.
This was discovered when [email protected] was deprecated upstream, breaking builds in downstream projects using fetcherVersion=2.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.