[wp-trac] [WordPress Trac] #40938: Add npm `package-lock.json` for npm v5.x

WordPress Trac noreply at wordpress.org
Wed Jun 7 06:41:57 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            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+------------------

Comment (by netweb):

 Via https://docs.npmjs.com/files/package-lock.json

 > One key detail about `package-lock.json` is that it cannot be published,
 and it will be ignored if found in any place other than the toplevel
 package. It shares a format with `npm-shrinkwrap.json`, which is
 essentially the same file, but allows publication.
 >
 > This is not recommended unless deploying a CLI tool or otherwise using
 the publication process for producing production packages.
 >
 > ''If both `package-lock.json` and `npm-shrinkwrap.json` are present in
 the root of a package, `package-lock.json` will be completely ignored.''

 With a switch to npm 5 as the minimum required version this would also
 eliminate the need to commit a `npm-shrinkwrap.json` file to each branch
 at release time, refer to #40928 / [40878] for 4.8 for example

 That said bumping npm version requirements is for another ticket, possibly
 #35105 if it remains open long enough

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40938#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list