Update package-lock.json to lockfileVersion 2 #5038
Merged
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 basics
The details
Proposed Changes
Update
package-lock.json
fromlockfileVersion: 1
tolockfileVersion: 2
.Reason for Changes
Version 7 of
npm
does this automatically; as a consequence, most of the team are usingnpm
v6 to avoid this update. But I believe the update is harmless:lockfileVersion: 2
is backward-compatible withlockfileVersion: 1
, sonpm
v6 can work fine with new file (although it does print a warning, because it can't know that this file-format-from-the-futrure is fine).npm
v7 is backwards compatible as far asnode.js
v10, so this update does not prevent anyone from usingnpm
v7 with any of the older versions ofnode.js
we wish to continue supporting.Test Coverage
Awaiting CI tests on GitHub.
Additional Information
You can update
npm
to the latest (v7.x) by runningnpm install -g npm
.