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.jsonfromlockfileVersion: 1tolockfileVersion: 2.Reason for Changes
Version 7 of
npmdoes this automatically; as a consequence, most of the team are usingnpmv6 to avoid this update. But I believe the update is harmless:lockfileVersion: 2is backward-compatible withlockfileVersion: 1, sonpmv6 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).npmv7 is backwards compatible as far asnode.jsv10, so this update does not prevent anyone from usingnpmv7 with any of the older versions ofnode.jswe wish to continue supporting.Test Coverage
Awaiting CI tests on GitHub.
Additional Information
You can update
npmto the latest (v7.x) by runningnpm install -g npm.