#3113 closed defect (bug) (fixed)
Add npm `package-lock.json` for npm v5.x
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Tools - Build | Keywords: | |
Cc: |
Description
npm v5 now by default generates a package-lock.json
file
Some paraphrased notes from the announcement post: http://blog.npmjs.org/post/161081169345/v500
package-lock.json
andnpm-shrinkwrap.json
are aware of each other and happy to coexist
- package locks no longer exclude optionalDependencies that failed to build. This means
package-lock.json
andnpm-shrinkwrap.json
should now be cross-platform.
- Running npm while offline will no longer insist on retrying network requests. npm will now immediately fall back to cache if possible, or fail, npm's caching is vastly improved in npm 5
- On performance, NodeJS 6.9.1 and NPM 3.10.8 running
npm install
in tests took ~65.44 seconds on average, with NodeJS v7.10.0 and npm v5.0.0 this is down to one third at ~20.471 seconds on average, once npm modules are cached reinstallingnode_modules
averages 11.313 seconds, just shy of a 6x speed boost- Detailed bbPress, BuddyPress, and WordPress performance tests can be seen in this spreedsheet
- The performance boost is comparable to that of Yarn, initial install 21.40 seconds, and subsequent installs 18.82 seconds, see #WP38603
Related: #WP40938 Add npm package-lock.json
for npm v5.x
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
In 6494: