[npm] Support lockfile version 3
See original GitHub issueSince NPM version 7, the package-lock.json version 2 file now uses a packages
field, and the dependencies
field is duplicated for backwards compatibility.
It is possible to configure NPM to use a package-lock.json version 3, which omits the dependencies
field to greatly reduce the size of the lock file. See https://docs.npmjs.com/cli/v8/using-npm/config#lockfile-version.
To support lockfile-version=3
, patch-package must be able to interpret the packages
field of the lock file.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7
Top Results From Across the Web
package-lock.json - npm Docs
3 : The lockfile version used by npm v7, without backwards compatibility affordances. This is used for the hidden lockfile at node_modules/.package-lock.json , ......
Read more >Is there any way to fix package-lock.json lockfileVersion so ...
1: The lockfile version used by npm v5 and v6. 2: The lockfile version used by npm v7, which is backwards compatible to...
Read more >Dependency scanning fails for npm if lockfileVersion equals 3
Dependency Scanning supports NPM projects that utilize lockfile version 3. Gitalab version. Tested on 14.10 and 15.0. Possible fixes. Add to ...
Read more >npm - Catching Up with Package Lockfile Changes in v7
The seventh version of npm is already published and arrives with ... with CLI versions supporting v1 lockfiles (for example, npm v5 &...
Read more >Ubuntu Manpage: package-lock.json - A manifestation of the ...
In contrast, npm help npm-shrinkwrap.json allows publication, ... 3: The lockfile version used by npm v7, without backwards compatibility affordances.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
modify this file directly 👉🏻
/node_modules/patch-package/dist/getPackageResolution.js
with code below. then apply a patch.I’ve opened a PR to solve this issue here: https://github.com/ds300/patch-package/pull/434 I’ve tested it locally and it works fine. I’ve made the change in a way that should make it compatible with all versions of lockfile.