[buddypress-trac] [BuddyPress Trac] #7535: Add npm `package-lock.json` for npm v5.x

buddypress-trac noreply at wordpress.org
Wed Jun 7 04:05:51 UTC 2017

#7535: Add npm `package-lock.json` for npm v5.x
 Reporter:  netweb            |      Owner:  netweb
     Type:  task              |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
 npm v5 now by default generates a `package-lock.json` file

 Some paraphrased notes from the announcement post:

 * `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 ~63.94 seconds on average, with NodeJS v7.10.0 and npm v5.0.0
 this is halved to ~26.26 seconds on average, once npm modules are cached
 reinstalling `node_modules` averages 16.163 seconds, just shy of a 4x
 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: #7378 Investigate using yarn instead of npm
 Related: #WP40938 Add npm `package-lock.json` for npm v5.x

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7535>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list