This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Do not implicitly downgrade lockfileVersion from 3 to 2
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. PR-URL: #329 Credit: @isaacs Close: #329 Reviewed-by: @ljharb, @wraithgar
- Loading branch information
Showing
13 changed files
with
14,481 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.