This repository was archived by the owner on Jan 20, 2022. It is now read-only.
Closed
Conversation
5b74497 to
5a14631
Compare
ljharb
reviewed
Oct 11, 2021
3098028 to
bc2d313
Compare
This will tell Arborist to save an appropriate lockfile based on the version specified. Version 3 = packages section only Version 2 = packages and dependencies sections (default) Version 1 = dependencies section only (legacy npm v6 support) Re: npm/rfcs#434
bc2d313 to
d38bab3
Compare
wraithgar
reviewed
Oct 12, 2021
wraithgar
reviewed
Oct 12, 2021
wraithgar
reviewed
Oct 12, 2021
If lockfileVersion is explicitly set to 3, and then later it is not
explicitly set, then we continue to use a version 3 lockfile.
If the lockfileVersion is explicitly set, we always use the version in
the options.
Also adds validation to the lockfileVersion config option, and cleans up
the logic in old/ancient lockfile inflation, so that we're not doing
that extra work if there just isn't a lockfile at all.
Finally, this also corrects a weird edge case where we were doing the
"inflate old lockfile" behavior when there is no lockfile present and we
load the initial idealTree state from the actualTree. That would result
in adding integrity values for packages found present in the tree.
However, as we cannot be sure that `node_modules/foo` came from
`{registry}/foo`, this is an assertion we can't guarantee. No one has
yet reported this obscure edge case as causing problems.
d38bab3 to
50deb0d
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This will tell Arborist to save an appropriate lockfile based on
the version specified.
Version 3 = packages section only
Version 2 = packages and dependencies sections (default)
Version 1 = dependencies section only (legacy npm v6 support)
Re: npm/rfcs#434
lockfile-versionto match the field in the actual lockfile (since it applies to bothpackage-lock.jsonandnpm-shrinkwrap.jsonequally).References