[wp-trac] [WordPress Trac] #40938: Add npm `package-lock.json` for npm v5.x
WordPress Trac
noreply at wordpress.org
Wed Jun 7 04:05:12 UTC 2017
#40938: Add npm `package-lock.json` for npm v5.x
------------------------------+-----------------
Reporter: netweb | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 4.9
Component: Build/Test Tools | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------
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` and `npm-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` and `npm-shrinkwrap.json` should now
be cross-platform.
* This will hopefully mitigate the optionalDependencies issue with our
build server in #38657 / r39368, when the build server is bumped to use
the upcoming Node.js v8.x LTS release this can be tested and confirmed.
* 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 ~67.39 seconds on average, with NodeJS v7.10.0 and npm v5.0.0
this is halved to ~28.938 seconds on average, once npm modules are cached
reinstalling `node_modules` averages 23.091 seconds, just shy of a 3x
speed boost
* Detailed bbPress, BuddyPress, and WordPress performance tests can be
seen in [https://docs.google.com/spreadsheets/d/1UJHm_dzezZK4ZPz48X-
K39bND0y_0p5kLJl8jvybNgk/edit?usp=sharing this spreedsheet]
* The performance boost is comparable to that of Yarn, initial install
21.40 seconds, and subsequent installs 18.82 seconds, see #38603
Related: #38603 Explore adding Yarn and a `yarn.lock` file for NPM module
management
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40938>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list