Repository navigation
Conversation
Before the lockfile lookup, `validateLockfile` now skips an ideal-tree entry when it is inert and `entry.package?.version` is absent. The new unit test passes an empty virtual tree and one inert `@example/native` node whose package has no version, and expects an empty error list. Fixes npm#10043
3 tasks done
6 tasks done
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.
Before the lockfile lookup,
validateLockfilenow skips an ideal-tree entry when it is inert andentry.package?.versionis absent. Not run locally forlib/utils/validate-lockfile.js:npm testcould not run in this environment (tap is not installed).npm ciaborts and reports that package.json and the lockfile are out of sync, listing unresolved platform-specific optional packages such as@esbuild/*,@napi-rs/*,@rollup/rollup-*, andfseventsas missing. Those entries are the optional native packages thatnpm installno longer writes into the lockfile.validateLockfilewalks every ideal-tree entry and treats a key missing from the virtual tree as lockfile drift.Shrinkwrap.commitomits inert nodes that have no package version, and those nodes are unresolved optional dependencies, so a lockfile that correctly left them out is reported as out of sync.npm testcould not run in this environment (tap is not installed).The targeted JavaScript check found no runner and did not execute the new validate-lockfile test.
The npm test script failed to start the suite because tap is not available.
References
Closes #10043