프로젝트

일반

사용자정보

통계
| 개정판:

root / HServer / 00.Server / 00.Program / node_modules / npm / CHANGELOG.md

이력 | 보기 | 이력해설 | 다운로드 (50 KB)

1 39 HKM
## v5.3.0 (2017-07-12):
2
3
As mentioned before, we're continuing to do relatively rapid, smaller releases
4
as we keep working on stomping out `npm@5` issues! We've made a lot of progress
5
since 5.0 already, and this release is no exception.
6
7
### FEATURES
8
9
* [`1e3a46944`](https://github.com/npm/npm/commit/1e3a469448b5db8376e6f64022c4c0c78cdb1686)
10
  [#17616](https://github.com/npm/npm/pull/17616)
11
  Add `--link` filter option to `npm ls`.
12
  ([@richardsimko](https://github.com/richardsimko))
13
* [`33df0aaa`](https://github.com/npm/npm/commit/33df0aaaa7271dac982b86f2701d10152c4177c8)
14
  `libnpx@9.2.0`:
15
  * 4 new languages - Czech, Italian, Turkish, and Chinese (Traditional)! This means npx is available in 14 different languages!
16
  * New --node-arg option lets you pass CLI arguments directly to node when the target binary is found to be a Node.js script.
17
  ([@zkat](https://github.com/zkat))
18
19
### BUGFIXES
20
21
* [`33df0aaa`](https://github.com/npm/npm/commit/33df0aaaa7271dac982b86f2701d10152c4177c8)
22
  `libnpx@9.2.0`:
23
  * npx should now work on (most) Windows installs. A couple of issues remain.
24
  * Prevent auto-fallback from going into an infinite loop when npx disappears.
25
  * `npx npx npx npx npx npx npx npx` works again.
26
  * `update-notifier` will no longer run for the npx bundled with npm.
27
  * `npx <cmd>` in a subdirectory of your project should be able to find your `node_modules/.bin` now. Oops
28
  ([@zkat](https://github.com/zkat))
29
* [`8e979bf80`](https://github.com/npm/npm/commit/8e979bf80fb93233f19db003f08443e26cfc5e64)
30
  Revert change where npm stopped flattening modules that required peerDeps.
31
  This caused problems because folks were using peer deps to indicate that the
32
  target of the peer dep needed to be able to require the dependency and had
33
  been relying on the fact that peer deps didn't change the shape of the tree
34
  (as of npm@3).
35
  The fix that will actually work for people is for a peer dep to insist on
36
  never being installed deeper than the the thing it relies on.  At the moment
37
  this is tricky because the thing the peer dep relies on may not yet have
38
  been added to the tree, so we don't know where it is.
39
  ([@iarna](https://github.com/iarna))
40
* [`7f28a77f3`](https://github.com/npm/npm/commit/7f28a77f33ef501065f22e8d5e8cffee3195dccd)
41
  [#17733](https://github.com/npm/npm/pull/17733)
42
  Split remove and unbuild actions into two to get uninstall lifecycles and the
43
  removal of transitive symlinks during uninstallation to run in the right
44
  order.
45
  ([@iarna](https://github.com/iarna))
46
* [`637f2548f`](https://github.com/npm/npm/commit/637f2548facae011eebf5e5c38bfe56a6c2db9fa)
47
  [#17748](https://github.com/npm/npm/pull/17748)
48
  When rolling back use symlink project-relative path, fixing some issues with
49
  `fs-vacuum` getting confused while removing symlinked things.
50
  ([@iarna](https://github.com/iarna))
51
* [`f153b5b22`](https://github.com/npm/npm/commit/f153b5b22f647d4d403f5b8cecd2ce63ac75b07c)
52
  [#17706](https://github.com/npm/npm/pull/17706)
53
  Use semver to compare node versions in npm doctor instead of plain `>`
54
  comparison.
55
  ([@leo-shopify](https://github.com/leo-shopify))
56
* [`542f7561`](https://github.com/npm/npm/commit/542f7561d173eca40eb8d838a16a0ed582fef989)
57
  [#17742](https://github.com/npm/npm/pull/17742)
58
  Fix issue where `npm version` would sometimes not commit package-locks.
59
  ([@markpeterfejes](https://github.com/markpeterfejes))
60
* [`51a9e63d`](https://github.com/npm/npm/commit/51a9e63d31cb5ac52259dcf1c364004286072426)
61
  [#17777](https://github.com/npm/npm/pull/17777)
62
  Fix bug exposed by other bugfixes where the wrong package would be removed.
63
  ([@iarna](https://github.com/iarna))
64
65
### DOCUMENTATION
66
67
Have we mentioned we really like documentation patches? Keep sending them in!
68
Small patches are just fine, and they're a great way to get started contributing
69
to npm!
70
71
* [`fb42d55a9`](https://github.com/npm/npm/commit/fb42d55a9a97afa5ab7db38b3b99088cf68684ea)
72
  [#17728](https://github.com/npm/npm/pull/17728)
73
  Document semver git urls in package.json docs.
74
  ([@sankethkatta](https://github.com/sankethkatta))
75
* [`f398c700f`](https://github.com/npm/npm/commit/f398c700fb0f2f3665ebf45995a910ad16cd8d05)
76
  [#17684](https://github.com/npm/npm/pull/17684)
77
  Tweak heading hierarchy in package.json docs.
78
  ([@sonicdoe](https://github.com/sonicdoe))
79
* [`d5ad65e50`](https://github.com/npm/npm/commit/d5ad65e50a573cdf9df4155225e869cd6c88ca5e)
80
  [#17691](https://github.com/npm/npm/pull/17691)
81
  Explicitly document `--no-save` flag for uninstall.
82
  ([@timneedham](https://github.com/timneedham))
83
84
## v5.2.0 (2017-07-05):
85
86
It's only been a couple of days but we've got some bug fixes we wanted to
87
get out to you all.  We also believe that
88
[`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is ready to be bundled
89
with npm, which we're really excited about!
90
91
### npx!!!
92
93
npx is a tool intended to help round out the experience of using packages
94
from the npm registry — the same way npm makes it super easy to install and
95
manage dependencies hosted on the registry, npx is meant to make it easy to
96
use CLI tools and other executables hosted on the registry.  It greatly
97
simplifies a number of things that, until now, required a bit of ceremony to
98
do with plain npm.
99
100
![](https://cdn-images-1.medium.com/max/1600/1*OlIRsvVO5aK7ja9HmwXz_Q.gif)
101
102
[@zkat](https://github.com/zkat) has a [great introduction post to npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b)
103
that I highly recommend you give a read
104
105
* [`fb040bee0`](https://github.com/npm/npm/commit/fb040bee0710759c60e45bf8fa2a3b8ddcf4212a)
106
  [#17685](https://github.com/npm/npm/pull/17685)
107
  Bundle npx with npm itself.
108
  ([@zkat](https://github.com/zkat))
109
110
### BUG FIXES
111
112
* [`9fe905c39`](https://github.com/npm/npm/commit/9fe905c399d07a3c00c7b22035ddb6b7762731e6)
113
  [#17652](https://github.com/npm/npm/pull/17652)
114
  Fix max callstack exceeded loops with trees with circular links.
115
  ([@iarna](https://github.com/iarna))
116
* [`c0a289b1b`](https://github.com/npm/npm/commit/c0a289b1ba6b99652c43a955b23acbf1de0b56ae)
117
  [#17606](https://github.com/npm/npm/pull/17606)
118
  Make sure that when write package.json and package-lock.json we always use unix path separators.
119
  ([@Standard8](https://github.com/Standard8))
120
* [`1658b79ca`](https://github.com/npm/npm/commit/1658b79cad89ccece5ae5ce3c2f691d44b933116)
121
  [#17654](https://github.com/npm/npm/pull/17654)
122
  Make `npm outdated` show results for globals again. Previously it never thought they were out of date.
123
  ([@iarna](https://github.com/iarna))
124
* [`06c154fd6`](https://github.com/npm/npm/commit/06c154fd653d18725d2e760ba825d43cdd807420)
125
  [#17678](https://github.com/npm/npm/pull/17678)
126
  Stop flattening modules that have peer dependencies.  We're making this
127
  change to support scenarios where the module requiring a peer dependency
128
  is flattened but the peer dependency itself is not, due to conflicts.  In
129
  those cases the module requiring the peer dep can't be flattened past the
130
  location its peer dep was placed in.  This initial fix is naive, never
131
  flattening peer deps, and we can look into doing something more
132
  sophisticated later on.
133
  ([@iarna](https://github.com/iarna))
134
* [`88aafee8b`](https://github.com/npm/npm/commit/88aafee8b5b232b7eeb5690279a098d056575791)
135
  [#17677](https://github.com/npm/npm/pull/17677)
136
  There was an issue where updating a flattened dependency would sometimes
137
  unflatten it.  This only happened when the dependency had dependencies
138
  that in turn required the original dependency.
139
  ([@iarna](https://github.com/iarna))
140
* [`b58ec8eab`](https://github.com/npm/npm/commit/b58ec8eab3b4141e7f1b8b42d8cc24f716a804d8)
141
  [#17626](https://github.com/npm/npm/pull/17626)
142
  Integrators who were building their own copies of npm ran into issues because
143
  `make install` and https://npmjs.com/install.sh weren't aware that
144
  `npm install` creates links now when given a directory to work on. This does not impact folks
145
  installing npm with `npm install -g npm`.
146
  ([@iarna](https://github.com/iarna))
147
148
### DOC FIXES
149
150
* [`10bef735e`](https://github.com/npm/npm/commit/10bef735e825acc8278827d34df415dfcd8c67d4)
151
  [#17645](https://github.com/npm/npm/pull/17645)
152
  Fix some github issue links in the 5.1.0 changelog
153
  ([@schmod](https://github.com/schmod))
154
* [`85fa9dcb2`](https://github.com/npm/npm/commit/85fa9dcb2f0b4f51b515358e0184ec82a5845227)
155
  [#17634](https://github.com/npm/npm/pull/17634)
156
  Fix typo in package-lock docs.
157
  ([@sonicdoe](https://github.com/sonicdoe))
158
* [`688699bef`](https://github.com/npm/npm/commit/688699befc2d147288c69a9405fb8354ecaebe36)
159
  [#17628](https://github.com/npm/npm/pull/17628)
160
  Recommend that folks looking for support join us on https://package.community/ or message
161
  [@npm_support](https://twitter.com/npm_support) on Twitter.
162
  ([@strugee](https://github.com/strugee))
163
164
165
## v5.1.0 (2017-07-05):
166
167
Hey y'all~
168
169
We've got some goodies for you here, including `npm@5`'s first semver-minor
170
release! This version includes a huge number of fixes, particularly for some of
171
the critical bugs users were running into after upgrading npm. You should
172
overall see a much more stable experience, and we're going to continue hacking
173
on fixes for the time being. Semver-major releases, specially for tools like
174
npm, are bound to cause some instability, and getting `npm@5` stable is the CLI
175
team's top priority for now!
176
177
Not that bugfixes are the only things that landed, either: between improvements
178
that fell out of the bugfixes, and some really cool work by community members
179
like [@mikesherov](https://github.com/mikesherov), `npm@5.1.0` is **_twice as
180
fast_** as `npm@5.0.0` in some benchmarks. We're not stopping there, either: you
181
can expect a steady stream of speed improvements over the course of the year.
182
It's not _top_ priority, but we'll keep doing what we can to make sure npm saves
183
its users as much time as possible.
184
185
Hang on to your seats. At **100 commits**, this release is a bit of a doozy. 😎
186
187
### FEATURES
188
189
Semver-minor releases, of course, mean that there's a new feature somewhere,
190
right? Here's what's bumping that number for us this time:
191
192
* [`a09c1a69d`](https://github.com/npm/npm/commit/a09c1a69df05b753464cc1272cdccc6af0f4da5a)
193
  [#16687](https://github.com/npm/npm/pull/16687)
194
  Allow customizing the shell used to execute `run-script`s.
195
  ([@mmkal](https://github.com/mmkal))
196
* [`4f45ba222`](https://github.com/npm/npm/commit/4f45ba222e2ac6dbe6d696cb7a8e678bbda7c839) [`a48958598`](https://github.com/npm/npm/commit/a489585985540deed4edc03418636c9e97aa9e40) [`901bef0e1`](https://github.com/npm/npm/commit/901bef0e1ea806fc08d8d58744a9f813b6c020ab)
197
  [#17508](https://github.com/npm/npm/pull/17508)
198
  Add a new `requires` field to `package-lock.json` with information about the
199
  _logical_ dependency tree. This includes references to the specific version
200
  each package is intended to see, and can be used for many things, such as
201
  [converting `package-lock.json` to other lockfile
202
  formats](https://twitter.com/maybekatz/status/880578566907248640), various
203
  optimizations, and verifying correctness of a package tree.
204
  ([@iarna](https://github.com/iarna))
205
* [`47e8fc8eb`](https://github.com/npm/npm/commit/47e8fc8eb9b5faccef9e03ab991cf37458c16249)
206
  [#17508](https://github.com/npm/npm/pull/17508)
207
  Make `npm ls` take package locks (and shrinkwraps) into account. This means
208
  `npm ls` can now be used to see [which dependencies are
209
  missing](https://twitter.com/maybekatz/status/880446509547794437), so long as
210
  a package lock has been previously generated with it in.
211
  ([@iarna](https://github.com/iarna))
212
* [`f0075e7ca`](https://github.com/npm/npm/commit/f0075e7caa3e151424a254d7809ae4489ed8df90)
213
  [#17508](https://github.com/npm/npm/pull/17508)
214
  Take `package.json` changes into account when running installs -- if you
215
  remove or add a dependency to `package.json` manually, npm will now pick that
216
  up and update your tree and package lock accordingly.
217
  ([@iarna](https://github.com/iarna))
218
* [`83a5455aa`](https://github.com/npm/npm/commit/83a5455aac3c5cc2511ab504923b652b13bd66a0)
219
  [#17205](https://github.com/npm/npm/pull/17205)
220
  Add `npm udpate` as an alias for `npm update`, for symmetry with
221
  `install`/`isntall`.
222
  ([@gdassori](https://github.com/gdassori))
223
* [`57225d394`](https://github.com/npm/npm/commit/57225d394b6174eb0be48393d8e18da0991f67b6)
224
  [#17120](https://github.com/npm/npm/pull/17120)
225
  npm will no longer warn about `preferGlobal`, and the option is now
226
  deprecated.
227
  ([@zkat](https://github.com/zkat))
228
* [`82df7bb16`](https://github.com/npm/npm/commit/82df7bb16fc29c47a024db4a8c393e55f883744b)
229
  [#17351](https://github.com/npm/npm/pull/17351)
230
  As some of you may already know `npm build` doesn't do what a lot of people
231
  expect: It's mainly an npm plumbing command, and is part of the more familiar
232
  `npm rebuild` command. That said, a lot of users assume that this is the way
233
  to run an npm `run-script` named `build`, which is an incredibly common script
234
  name to use. To clarify things for users, and encourage them to use `npm run
235
  build` instead, npm will now warn if `npm build` is run without any arguments.
236
  ([@lennym](https://github.com/lennym))
237
238
### PERFORMANCE
239
240
* [`59f86ef90`](https://github.com/npm/npm/commit/59f86ef90a58d8dc925c9613f1c96e68bee5ec7b) [`43be9d222`](https://github.com/npm/npm/commit/43be9d2222b23ebb0a427ed91824ae217e6d077a) [`e906cdd98`](https://github.com/npm/npm/commit/e906cdd980b4722e66618ce295c682b9a8ffaf8f)
241
  [#16633](https://github.com/npm/npm/pull/16633)
242
  npm now parallelizes tarball extraction across multiple child process workers.
243
  This can significantly speed up installations, specially when installing from
244
  cache, and will improve with number of processors.
245
  ([@zkat](https://github.com/zkat))
246
* [`e0849878d`](https://github.com/npm/npm/commit/e0849878dd248de8988c2ef3fc941054625712ca)
247
  [#17441](https://github.com/npm/npm/pull/17441)
248
  Avoid building environment for empty lifecycle scripts. This change alone
249
  accounted for as much as a 15% speed boost for npm installations by outright
250
  skipping entire steps of the installer when not needed.
251
  ([@mikesherov](https://github.com/mikesherov))
252
* [`265c2544c`](https://github.com/npm/npm/commit/265c2544c8ded10854909243482e6437ed03c261)
253
  [npm/hosted-git-info#24](https://github.com/npm/hosted-git-info/pull/24)
254
  `hosted-git-info@2.5.0`: Add caching to `fromURL`, which gets called many,
255
  many times by the installer. This improved installation performance by around
256
  10% on realistic application repositories.
257
  ([@mikesherov](https://github.com/mikesherov))
258
* [`901d26cb`](https://github.com/npm/npm/commit/901d26cb656e7e773d9a38ef4eac9263b95e07c8)
259
  [npm/read-package-json#20](https://github.com/npm/read-package-json/pull/70)
260
  `read-package-json@2.0.9`: Speed up installs by as much as 20% by
261
  reintroducing a previously-removed cache and making it actually be correct
262
  this time around.
263
  ([@mikesherov](https://github.com/mikesherov))
264
* [`44e37045d`](https://github.com/npm/npm/commit/44e37045d77bc40adf339b423d42bf5e9b4d4d91)
265
  Eliminate `Bluebird.promisifyAll` from our codebase.
266
  ([@iarna](https://github.com/iarna))
267
* [`3b4681b53`](https://github.com/npm/npm/commit/3b4681b53db7757985223932072875d099694677)
268
  [#17508](https://github.com/npm/npm/pull/17508)
269
  Stop calling `addBundle` on locked deps, speeding up the
270
  `package-lock.json`-based fast path.
271
  ([@iarna](https://github.com/iarna))
272
273
### BUGFIXES
274
275
* [#17508](https://github.com/npm/npm/pull/17508)
276
  This is a big PR that fixes a variety of issues when installing from package
277
  locks. If you were previously having issues with missing dependencies or
278
  unwanted removals, this might have fixed it:
279
  * It introduces a new `package-lock.json` field, called `requires`, which tracks which modules a given module requires.
280
  * It fixes [#16839](https://github.com/npm/npm/issues/16839) which was caused by not having this information available, particularly when git dependencies were involved.
281
  * It fixes [#16866](https://github.com/npm/npm/issues/16866), allowing the `package.json` to trump the `package-lock.json`.
282
  * `npm ls` now loads the shrinkwrap, which opens the door to showing a full tree of dependencies even when nothing is yet installed. (It doesn't do that yet though.)
283
  ([@iarna](https://github.com/iarna))
284
* [`656544c31`](https://github.com/npm/npm/commit/656544c31cdef3cef64fc10c24f03a8ae2685e35) [`d21ab57c3`](https://github.com/npm/npm/commit/d21ab57c3ef4f01d41fb6c2103debe884a17dc22)
285
  [#16637](https://github.com/npm/npm/pull/16637)
286
  Fix some cases where `npm prune` was leaving some dependencies unpruned if
287
  to-be-pruned dependencies depended on them.
288
  ([@exogen](https://github.com/exogen))
289
* [`394436b09`](https://github.com/npm/npm/commit/394436b098dcca2d252061f95c4eeb92c4a7027c)
290
  [#17552](https://github.com/npm/npm/pull/17552)
291
  Make `refresh-package-json` re-verify the package platform. This fixes an
292
  issue most notably experienced by Windows users using `create-react-app` where
293
  `fsevents` would not short-circuit and cause a crash during its
294
  otherwise-skipped native build phase.
295
  ([@zkat](https://github.com/zkat))
296
* [`9e5a94354`](https://github.com/npm/npm/commit/9e5a943547b29c8d022192afd9398b3a136a7e5a)
297
  [#17590](https://github.com/npm/npm/pull/17590)
298
  Fix an issue where `npm@5` would crash when trying to remove packages
299
  installed with `npm@<5`.
300
  ([@iarna](https://github.com/iarna))
301
* [`c3b586aaf`](https://github.com/npm/npm/commit/c3b586aafa9eabac572eb6e2b8a7266536dbc65b)
302
  [#17141](https://github.com/npm/npm/issues/17141)
303
  Don't update the package.json when modifying packages that don't go there.
304
  This was previously causing `package.json` to get a `"false": {}` field added.
305
  ([@iarna](https://github.com/iarna))
306
* [`d04a23de2`](https://github.com/npm/npm/commit/d04a23de21dd9991b32029d839b71e10e07b400d) [`4a5b360d5`](https://github.com/npm/npm/commit/4a5b360d561f565703024085da0927ccafe8793e) [`d9e53db48`](https://github.com/npm/npm/commit/d9e53db48ca227b21bb67df48c9b3580cb390e9e)
307
  `pacote@2.7.38`:
308
  * [zkat/pacote#102](https://github.com/zkat/pacote/pull/102) Fix issue with tar extraction and special characters.
309
  * Enable loose semver parsing in some missing corner cases.
310
  ([@colinrotherham](https://github.com/colinrotherham), [@zkat](https://github.com/zkat), [@mcibique](https://github.com/mcibique))
311
* [`e2f815f87`](https://github.com/npm/npm/commit/e2f815f87676b7c50b896e939cee15a01aa976e4)
312
  [#17104](https://github.com/npm/npm/pull/17104)
313
  Write an empty str and wait for flush to exit to reduce issues with npm
314
  exiting before all output is complete when it's a child process.
315
  ([@zkat](https://github.com/zkat))
316
* [`835fcec60`](https://github.com/npm/npm/commit/835fcec601204971083aa3a281c3a9da6061a7c2)
317
  [#17060](https://github.com/npm/npm/pull/17060)
318
  Make git repos with prepare scripts always install with both dev and prod
319
  flags.
320
  ([@intellix](https://github.com/intellix))
321
* [`f1dc8a175`](https://github.com/npm/npm/commit/f1dc8a175eed56f1ed23bd5773e5e10beaf6cb31)
322
  [#16879](https://github.com/npm/npm/pull/16879)
323
  Fix support for `always-auth` and `_auth`. They are now both available in both
324
  unscoped and registry-scoped configurations.
325
  ([@jozemlakar](https://github.com/jozemlakar))
326
* [`ddd8a1ca2`](https://github.com/npm/npm/commit/ddd8a1ca2fa3377199af74ede9d0c1a406d19793)
327
  Serialize package specs to prevent `[object Object]` showing up in logs during
328
  extraction.
329
  ([@zkat](https://github.com/zkat))
330
* [`99ef3b52c`](https://github.com/npm/npm/commit/99ef3b52caa7507e87a4257e622f8964b1c1f5f3)
331
  [#17505](https://github.com/npm/npm/pull/17505)
332
  Stop trying to commit updated `npm-shrinkwrap.json` and `package-lock.json` if
333
  they're `.gitignore`d.
334
  ([@zkat](https://github.com/zkat))
335
* [`58be2ec59`](https://github.com/npm/npm/commit/58be2ec596dfb0353ad2570e6750e408339f1478)
336
  Make sure uid and gid are getting correctly set even when they're `0`. This
337
  should fix some Docker-related issues with bad permissions/broken ownership.
338
  ([@rgrove](https://github.com/rgrove))
339
  ([@zkat](https://github.com/zkat))
340
* [`9d1e3b6fa`](https://github.com/npm/npm/commit/9d1e3b6fa01bb563d76018ee153259d9507658cf)
341
  [#17506](https://github.com/npm/npm/pull/17506)
342
  Skip writing package.json and locks if on-disk version is identical to the new
343
  one.
344
  ([@zkat](https://github.com/zkat))
345
* [`3fc6477a8`](https://github.com/npm/npm/commit/3fc6477a89773786e6c43ef43a23e5cdc662ff8e)
346
  [#17592](https://github.com/npm/npm/pull/17592)
347
  Fix an issue where `npm install -g .` on a package with no `name` field would
348
  cause the entire global `node_modules` directory to be replaced with a symlink
349
  to `$CWD`. lol.
350
  ([@iarna](https://github.com/iarna))
351
* [`06ba0a14a`](https://github.com/npm/npm/commit/06ba0a14a6c1c8cdcc8c062b68c8c63041b0cec0)
352
  [#17591](https://github.com/npm/npm/pull/17591)
353
  Fix spurious removal reporting: if you tried to remove something that didn't
354
  actually exist, npm would tell you it removed 1 package even though there was
355
  nothing to do.
356
  ([@iarna](https://github.com/iarna))
357
* [`20ff05f8`](https://github.com/npm/npm/commit/20ff05f8fe0ad8c36e1323d30b63b4d2ff7e11ef)
358
  [#17629](https://github.com/npm/npm/pull/17629)
359
  When removing a link, keep dependencies installed inside of it instead of
360
  removing them, if the link is outside the scope of the current project. This
361
  fixes an issue where removing globally-linked packages would remove all their
362
  dependencies in the source directory, as well as some ergonomic issues when
363
  using links in other situations.
364
  ([@iarna](https://github.com/iarna))
365
366
### DOCS
367
368
* [`fd5fab595`](https://github.com/npm/npm/commit/fd5fab5955a20a9bb8c0e77092ada1435f73a8d2)
369
  [#16441](https://github.com/npm/npm/pull/16441)
370
  Add spec for `npm-shrinkwrap.json` and `package-lock.json` from RFC.
371
  ([@iarna](https://github.com/iarna))
372
* [`9589c1ccb`](https://github.com/npm/npm/commit/9589c1ccb3f794abaaa48c2a647ada311dd881ef)
373
  [#17451](https://github.com/npm/npm/pull/17451)
374
  Fix typo in changelog.
375
  ([@watilde](https://github.com/watilde))
376
* [`f8e76d856`](https://github.com/npm/npm/commit/f8e76d8566ae1965e57d348df74edad0643b66a6)
377
  [#17370](https://github.com/npm/npm/pull/17370)
378
  Correct the default prefix config path for Windows operating systems in the
379
  documentation for npm folders.
380
  ([@kierendixon](https://github.com/kierendixon))
381
* [`d0f3b5a12`](https://github.com/npm/npm/commit/d0f3b5a127718b0347c6622a2b9c28341c530d36)
382
  [#17369](https://github.com/npm/npm/pull/17369)
383
  Fix `npm-config` reference to `userconfig` & `globalconfig` environment
384
  variables.
385
  ([@racztiborzoltan](https://github.com/racztiborzoltan))
386
* [`87629880a`](https://github.com/npm/npm/commit/87629880a71baec352c1b5345bc29268d6212467)
387
  [#17336](https://github.com/npm/npm/pull/17336)
388
  Remove note in docs about `prepublish` being entirely removed.
389
  ([@Hirse](https://github.com/Hirse))
390
* [`a1058afd9`](https://github.com/npm/npm/commit/a1058afd9a7a569bd0ac65b86eadd4fe077a7221)
391
  [#17169](https://github.com/npm/npm/pull/17169)
392
  Document `--no-package-lock` flag.
393
  ([@leggsimon](https://github.com/leggsimon))
394
* [`32fc6e41a`](https://github.com/npm/npm/commit/32fc6e41a2ce4dbcd5ce1e5f291e2e2efc779d48)
395
  [#17250](https://github.com/npm/npm/pull/17250)
396
  Fix a typo in the shrinkwrap docs.
397
  ([@Zarel](https://github.com/Zarel))
398
* [`f19bd3c8c`](https://github.com/npm/npm/commit/f19bd3c8cbd37c8a99487d6b5035282580ac3e9d)
399
  [#17249](https://github.com/npm/npm/pull/17249)
400
  Fix a package-lock.json cross-reference link.
401
  ([@not-an-aardvark](https://github.com/not-an-aardvark))
402
* [`153245edc`](https://github.com/npm/npm/commit/153245edc4845db670ada5e95ef384561706a751)
403
  [#17075](https://github.com/npm/npm/pull/17075/files)
404
  Fix a typo in `npm-config` docs.
405
  ([@KennethKinLum](https://github.com/KennethKinLum))
406
* [`c9b534a14`](https://github.com/npm/npm/commit/c9b534a148818d1a97787c0dfdba5f64ce3618a6)
407
  [#17074](https://github.com/npm/npm/pull/17074)
408
  Clarify config documention with multiple boolean flags.
409
  ([@KennethKinLum](https://github.com/KennethKinLum))
410
* [`e111b0a40`](https://github.com/npm/npm/commit/e111b0a40c4bc6691d7b8d67ddce5419e67bfd27)
411
  [#16768](https://github.com/npm/npm/pull/16768)
412
  Document the `-l` option to `npm config list`.
413
  ([@happylynx](https://github.com/happylynx))
414
* [`5a803ebad`](https://github.com/npm/npm/commit/5a803ebadd61229bca3d64fb3ef1981729b2548e)
415
  [#16548](https://github.com/npm/npm/pull/16548)
416
  Fix permissions for documentation files. Some of them had `+x` set. (???)
417
  ([@metux](https://github.com/metux))
418
* [`d57d4f48c`](https://github.com/npm/npm/commit/d57d4f48c6cd00fdf1e694eb49e9358071d8e105)
419
  [#17319](https://github.com/npm/npm/pull/17319)
420
  Document that the `--silent` option for `npm run-script` can be used to
421
  suppress `npm ERR!` output on errors.
422
  ([@styfle](https://github.com/styfle))
423
424
### MISC
425
426
Not all contributions need to be visible features, docs, or bugfixes! It's super
427
helpful when community members go over our code and help clean it up, too!
428
429
* [`9e5b76140`](https://github.com/npm/npm/commit/9e5b76140ffdb7dcd12aa402793644213fb8c5d7)
430
  [#17411](https://github.com/npm/npm/pull/17411)
431
  Convert all callback-style `move` usage to use Promises.
432
  ([@vramana](https://github.com/vramana))
433
* [`0711c08f7`](https://github.com/npm/npm/commit/0711c08f779ac641ec42ecc96f604c8861008b28)
434
  [#17394](https://github.com/npm/npm/pull/17394)
435
  Remove unused argument in `deepSortObject`.
436
  ([@vramana](https://github.com/vramana))
437
* [`7d650048c`](https://github.com/npm/npm/commit/7d650048c8ed5faa0486492f1eeb698e7383e32f)
438
  [#17563](https://github.com/npm/npm/pull/17563)
439
  Refactor some code to use `Object.assign`.
440
  ([@vramana](https://github.com/vramana))
441
* [`993f673f0`](https://github.com/npm/npm/commit/993f673f056aea5f602ea04b1e697b027c267a2d)
442
  [#17600](https://github.com/npm/npm/pull/17600)
443
  Remove an old comment.
444
  ([@vramana](https://github.com/vramana))
445
446
## v5.0.4 (2017-06-13):
447
448
Hey y'all. This is another minor patch release with a variety of little fixes
449
we've been accumulating~
450
451
* [`f0a37ace9`](https://github.com/npm/npm/commit/f0a37ace9ab7879cab20f2b0fcd7840bfc305feb)
452
  Fix `npm doctor` when hitting registries without `ping`.
453
  ([@zkat](https://github.com/zkat))
454
* [`64f0105e8`](https://github.com/npm/npm/commit/64f0105e81352b42b72900d83b437b90afc6d9ce)
455
  Fix invalid format error when setting cache-related headers.
456
  ([@zkat](https://github.com/zkat))
457
* [`d2969c80e`](https://github.com/npm/npm/commit/d2969c80e4178faebf0f7c4cab6eb610dd953cc6)
458
  Fix spurious `EINTEGRITY` issue.
459
  ([@zkat](https://github.com/zkat))
460
* [`800cb2b4e`](https://github.com/npm/npm/commit/800cb2b4e2d0bd00b5c9082a896f2110e907eb0b)
461
  [#17076](https://github.com/npm/npm/pull/17076)
462
  Use legacy `from` field to improve upgrade experience from legacy shrinkwraps
463
  and installs.
464
  ([@zkat](https://github.com/zkat))
465
* [`4100d47ea`](https://github.com/npm/npm/commit/4100d47ea58b4966c02604f71350b5316108df6a)
466
  [#17007](https://github.com/npm/npm/pull/17007)
467
  Restore loose semver parsing to match older npm behavior when running into
468
  invalid semver ranges in dependencies.
469
  ([@zkat](https://github.com/zkat))
470
* [`35316cce2`](https://github.com/npm/npm/commit/35316cce2ca2d8eb94161ec7fe7e8f7bec7b3aa7)
471
  [#17005](https://github.com/npm/npm/pull/17005)
472
  Emulate npm@4's behavior of simply marking the peerDep as invalid, instead of
473
  crashing.
474
  ([@zkat](https://github.com/zkat))
475
* [`e7e8ee5c5`](https://github.com/npm/npm/commit/e7e8ee5c57c7238655677e118a8809b652019f53)
476
  [#16937](https://github.com/npm/npm/pull/16937)
477
  Workaround for separate bug where `requested` was somehow null.
478
  ([@forivall](https://github.com/forivall))
479
* [`2d9629bb2`](https://github.com/npm/npm/commit/2d9629bb2043cff47eaad2654a64d2cef5725356)
480
  Better logging output for git errors.
481
  ([@zkat](https://github.com/zkat))
482
* [`2235aea73`](https://github.com/npm/npm/commit/2235aea73569fb9711a06fa6344ef31247177dcd)
483
  More scp-url fixes: parsing only worked correctly when a committish was
484
  present.
485
  ([@zkat](https://github.com/zkat))
486
* [`80c33cf5e`](https://github.com/npm/npm/commit/80c33cf5e6ef207450949764de41ea96538c636e)
487
  Standardize package permissions on tarball extraction, instead of using perms
488
  from the tarball. This matches previous npm behavior and fixes a number of
489
  incompatibilities in the wild.
490
  ([@zkat](https://github.com/zkat))
491
* [`2b1e40efb`](https://github.com/npm/npm/commit/2b1e40efba0b3d1004259efa4275cf42144e3ce3)
492
  Limit shallow cloning to hosts which are known to support it.
493
  ([@zkat](https://github.com/zkat))
494
495
## v5.0.3 (2017-06-05)
496
497
Happy Monday, y'all! We've got another npm release for you with the fruits of
498
our ongoing bugsquashing efforts. You can expect at least one more this week,
499
but probably more -- and as we announced last week, we'll be merging fixes more
500
rapidly into the `npmc` canary so you can get everything as soon as possible!
501
502
Hope y'all are enjoying npm5 in the meantime, and don't hesitate to file issues
503
for anything you find! The goal is to get this release rock-solid as soon as we
504
can. 💚
505
506
* [`6e12a5cc0`](https://github.com/npm/npm/commit/6e12a5cc022cb5a157a37df7283b6d7b3d49bdab)
507
  Bump several dependencies to get improvements and bugfixes:
508
  * `cacache`: content files (the tarballs) are now read-only.
509
  * `pacote`: fix failing clones with bad heads, send extra TLS-related opts to proxy, enable global auth configurations and `_auth`-based auth.
510
  * `ssri`: stop crashing with `can't call method find of undefined` when running into a weird `opts.integrity`/`opts.algorithms` conflict during verification.
511
  ([@zkat](https://github.com/zkat))
512
* [`89cc8e3e1`](https://github.com/npm/npm/commit/89cc8e3e12dad67fd9844accf4d41deb4c180c5c)
513
  [#16917](https://github.com/npm/npm/pull/16917)
514
  Send `ca`, `cert` and `key` config through to network layer.
515
  ([@colinrotherham](https://github.com/colinrotherham))
516
* [`6a9b51c67`](https://github.com/npm/npm/commit/6a9b51c67ba3df0372991631992748329b84f2e7)
517
  [#16929](https://github.com/npm/npm/pull/16929)
518
  Send `npm-session` header value with registry requests again.
519
  ([@zarenner](https://github.com/zarenner))
520
* [`662a15ab7`](https://github.com/npm/npm/commit/662a15ab7e790e87f5e5a35252f05d5a4a0724a1)
521
  Fix `npm doctor` so it stop complaining about read-only content files in the
522
  cache.
523
  ([@zkat](https://github.com/zkat))
524
* [`191d10a66`](https://github.com/npm/npm/commit/191d10a6616d72e26d89fd00f5a4f6158bfbc526)
525
  [#16918](https://github.com/npm/npm/pull/16918)
526
  Clarify prepublish deprecation message.
527
  ([@Hirse](https://github.com/Hirse))
528
529
## v5.0.2 (2017-06-02)
530
531
Here's another patch release, soon after the other!
532
533
This particular release includes a slew of fixes to npm's git support, which was
534
causing some issues for a chunk of people, specially those who were using
535
self-hosted/Enterprise repos. All of those should be back in working condition
536
now.
537
538
There's another shiny thing you might wanna know about: npm has a Canary release
539
now! The `npm5` experiment we did during our beta proved to be incredibly
540
successful: users were able to have a tight feedback loop between reports and
541
getting the bugfixes they needed, and the CLI team was able to roll out
542
experimental patches and have the community try them out right away. So we want
543
to keep doing that.
544
545
From now on, you'll be able to install the 'npm canary' with `npm i -g npmc`.
546
This release will be a separate binary (`npmc`. Because canary. Get it?), which
547
will update independently of the main CLI. Most of the time, this will track
548
`release-next` or something close to it. We might occasionally toss experimental
549
branches in there to see if our more adventurous users run into anything
550
interesting with it. For example, the current canary (`npmc@5.0.1-canary.6`)
551
includes an [experimental multiproc
552
branch](https://github.com/npm/npm/pull/16633) that parallelizes tarball
553
extraction across multiple processes.
554
555
If you find any issues while running the canary version, please report them and
556
let us know it came from `npmc`! It would be tremendously helpful, and finding
557
things early is a huge reason to have it there. Happy hacking!
558
559
### A NOTE ABOUT THE ISSUE TRACKER
560
561
Just a heads up: We're preparing to do a massive cleanup of the issue tracker.
562
It's been a long time since it was something we could really keep up with, and
563
we didn't have a process for dealing with it that could actually be sustainable.
564
565
We're still sussing the details out, and we'll talk about it more when we're
566
about to do it, but the plan is essentially to close old, abandoned issues and
567
start over. We will also [add some automation](https://github.com/probot) around
568
issue management so that things that we can't keep up with don't just stay
569
around forever.
570
571
Stay tuned!
572
573
### GIT YOLO
574
575
* [`1f26e9567`](https://github.com/npm/npm/commit/1f26e9567a6d14088704e121ebe787c38b6849a4)
576
  `pacote@2.7.27`: Fixes installing committishes that look like semver, even
577
  though they're not using the required `#semver:` syntax.
578
  ([@zkat](https://github.com/zkat))
579
* [`85ea1e0b9`](https://github.com/npm/npm/commit/85ea1e0b9478551265d03d545e7dc750b9edf547)
580
  `npm-package-arg@5.1.1`: This includes the npa git-parsing patch to make it so
581
  non-hosted SCP-style identifiers are correctly handled. Previously, npa would
582
  mangle them (even though hosted-git-info is doing the right thing for them).
583
  ([@zkat](https://github.com/zkat))
584
585
### COOL NEW OUTPUT
586
587
The new summary output has been really well received! One downside that reared
588
its head as more people used it, though, is that it doesn't really tell you
589
anything about the toplevel versions it installed. So, if you did `npm i -g
590
foo`, it would just say "added 1 package". This patch by
591
[@rmg](https://github.com/rmg) keeps things concise while still telling you
592
what you got! So now, you'll see something like this:
593
594
```
595
$ npm i -g foo bar
596
+ foo@1.2.3
597
+ bar@3.2.1
598
added 234 packages in .005ms
599
```
600
601
* [`362f9fd5b`](https://github.com/npm/npm/commit/362f9fd5bec65301082416b4292b8fe3eb7f824a)
602
  [#16899](https://github.com/npm/npm/pull/16899)
603
  For every package that is given as an argument to install, print the name and
604
  version that was actually installed.
605
  ([@rmg](https://github.com/rmg))
606
607
### OTHER BUGFIXES
608
609
* [`a47593a98`](https://github.com/npm/npm/commit/a47593a98a402143081d7077d2ac677d13083010)
610
  [#16835](https://github.com/npm/npm/pull/16835)
611
  Fix a crash while installing with `--no-shrinkwrap`.
612
  ([@jacknagel](https://github.com/jacknagel))
613
614
### DOC UPATES
615
616
* [`89e0cb816`](https://github.com/npm/npm/commit/89e0cb8165dd9c3c7ac74d531617f367099608f4)
617
  [#16818](https://github.com/npm/npm/pull/16818)
618
  Fixes a spelling error in the docs. Because the CLI team has trouble spelling
619
  "package", I guess.
620
  ([@ankon](https://github.com/ankon))
621
* [`c01fbc46e`](https://github.com/npm/npm/commit/c01fbc46e151bcfb359fd68dd7faa392789b4f55)
622
  [#16895](https://github.com/npm/npm/pull/16895)
623
  Remove `--save` from `npm init` instructions, since it's now the default.
624
  ([@jhwohlgemuth](https://github.com/jhwohlgemuth))
625
* [`80c42d218`](https://github.com/npm/npm/commit/80c42d2181dd4d1b79fcee4e9233df268dfb30b7)
626
  Guard against cycles when inflating bundles, as symlinks are bundles now.
627
  ([@iarna](https://github.com/iarna))
628
* [`7fe7f8665`](https://github.com/npm/npm/commit/7fe7f86658798db6667df89afc75588c0e43bc94)
629
  [#16674](https://github.com/npm/npm/issues/16674)
630
  Write the builtin config for `npmc`, not just `npm`. This is hardcoded for npm
631
  self-installations and is needed for Canary to work right.
632
  ([@zkat](https://github.com/zkat))
633
634
### DEP UPDATES
635
636
* [`63df4fcdd`](https://github.com/npm/npm/commit/63df4fcddc7445efb50cc7d8e09cdd45146d3e39)
637
  [#16894](https://github.com/npm/npm/pull/16894)
638
  [`node-gyp@3.6.2`](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md#v362-2017-06-01):
639
  Fixes an issue parsing SDK versions on Windows, among other things.
640
  ([@refack](https://github.com/refack))
641
* [`5bb15c3c4`](https://github.com/npm/npm/commit/5bb15c3c4f0d7d77c73fd6dafa38ac36549b6e00)
642
  `read-package-tree@5.1.6`: Fixes some racyness while reading the tree.
643
  ([@iarna](https://github.com/iarna))
644
* [`a6f7a52e7`](https://github.com/npm/npm/commit/a6f7a52e7)
645
  `aproba@1.1.2`: Remove nested function declaration for speed up
646
  ([@mikesherov](https://github.com/mikesherov))
647
648
## v5.0.1 (2017-05-31):
649
650
Hey y'all! Hope you're enjoying the new npm!
651
652
As you all know, fresh software that's gone through major overhauls tends to
653
miss a lot of spots the old one used to handle well enough, and `npm@5` is no
654
exception. The CLI team will be doing faster release cycles that go directly to
655
the `latest` tag for a couple of weeks while 5 stabilizes a bit and we're
656
confident the common low-hanging fruit people are running into are all taken
657
care of.
658
659
With that said: this is our first patch release! The biggest focus is fixing up
660
a number of git-related issues that folks ran into right out the door. It also
661
fixes other things, like some proxy/auth-related issues, and even has a neat
662
speed boost! (You can expect more speed bumps in the coming releases as pending
663
work starts landing, too!)
664
665
Thanks everyone who's been reporting issues and submitting patches!
666
667
### BUGFIXES
668
669
* [`e61e68dac`](https://github.com/npm/npm/commit/e61e68dac4fa51c0540a064204a75b19f8052e58)
670
  [#16762](https://github.com/npm/npm/pull/16762)
671
  Make `npm publish` obey the `--tag` flag again.
672
  ([@zkat](https://github.com/zkat))
673
* [`923fd58d3`](https://github.com/npm/npm/commit/923fd58d312f40f8c17b232ad1dfc8e2ff622dbd)
674
  [#16749](https://github.com/npm/npm/pull/16749)
675
  Speed up installations by nearly 20% by... removing one line of code. (hah)
676
  ([@mikesherov](https://github.com/mikesherov))
677
* [`9aac984cb`](https://github.com/npm/npm/commit/9aac984cbbfef22182ee42b51a193c0b47146ad6)
678
  Guard against a particular failure mode for a bug still being hunted down.
679
  ([@iarna](https://github.com/iarna))
680
* [`80ab521f1`](https://github.com/npm/npm/commit/80ab521f18d34df109de0c5dc9eb1cde5ff6d7e8)
681
  Pull in dependency updates for various core deps:
682
  * New `pacote` fixes several git-related bugs.
683
  * `ssri` update fixes crash on early node@4 versions.
684
  * `make-fetch-happen` update fixes proxy authentication issue.
685
  * `npm-user-validate` adds regex for blocking usernames with illegal chars.
686
  ([@zkat](https://github.com/zkat))
687
* [`7e5ce87b8`](https://github.com/npm/npm/commit/7e5ce87b84880c7433ee4c07d2dd6ce8806df436)
688
  `pacote@2.7.26`:
689
  Fixes various other git issues related to commit hashes.
690
  ([@zkat](https://github.com/zkat))
691
* [`acbe85bfc`](https://github.com/npm/npm/commit/acbe85bfc1a68d19ca339a3fb71da0cffbf58926)
692
  [#16791](https://github.com/npm/npm/pull/16791)
693
  `npm view` was calling `cb` prematurely and giving partial output when called
694
  in a child process.
695
  ([@zkat](https://github.com/zkat))
696
* [`ebafe48af`](https://github.com/npm/npm/commit/ebafe48af91f702ccefc8c619d52fed3b8dfd3c7)
697
  [#16750](https://github.com/npm/npm/pull/16750)
698
  Hamilpatch the Musical: Talk less, complete more.
699
  ([@aredridel](https://github.com/aredridel))
700
701
### DOCUMENTATION
702
703
* [`dc2823a6c`](https://github.com/npm/npm/commit/dc2823a6c5fc098041e61515c643570819d059d2)
704
  [#16799](https://github.com/npm/npm/pull/16799)
705
  Document that `package-lock.json` is never allowed in tarballs.
706
  ([@sonicdoe](https://github.com/sonicdoe))
707
* [`f3cb84b44`](https://github.com/npm/npm/commit/f3cb84b446c51d628ee0033cdf13752c15b31a29)
708
  [#16771](https://github.com/npm/npm/pull/16771)
709
  Fix `npm -l` usage information for the `test` command.
710
  ([@grawlinson](https://github.com/grawlinson))
711
712
### OTHER CHANGES
713
714
* [`661262309`](https://github.com/npm/npm/commit/66126230912ab5ab35287b40a9908e036fa73994)
715
  [#16756](https://github.com/npm/npm/pull/16756)
716
  remove unused argument
717
  ([@Aladdin-ADD](https://github.com/Aladdin-ADD))
718
* [`c3e0b4287`](https://github.com/npm/npm/commit/c3e0b4287ea69735cc367aa7bb7e7aa9a6d9804b)
719
  [#16296](https://github.com/npm/npm/pull/16296)
720
  preserve same name convention for command
721
  ([@desfero](https://github.com/desfero))
722
* [`9f814831d`](https://github.com/npm/npm/commit/9f814831d330dde7702973186aea06caaa77ff31)
723
  [#16757](https://github.com/npm/npm/pull/16757)
724
  remove unused argument
725
  ([@Aladdin-ADD](https://github.com/Aladdin-ADD))
726
* [`3cb843239`](https://github.com/npm/npm/commit/3cb8432397b3666d88c31131dbb4599016a983ff)
727
  minor linter fix
728
  ([@zkat](https://github.com/zkat))
729
730
## v5.0.0 (2017-05-25)
731
732
Wowowowowow npm@5!
733
734
This release marks months of hard work for the young, scrappy, and hungry CLI
735
team, and includes some changes we've been hoping to do for literally years.
736
npm@5 takes npm a pretty big step forward, significantly improving its
737
performance in almost all common situations, fixing a bunch of old errors due to
738
the architecture, and just generally making it more robust and fault-tolerant.
739
It comes with changes to make life easier for people doing monorepos, for users
740
who want consistency/security guarantees, and brings semver support to git
741
dependencies. See below for all the deets!
742
743
### Breaking Changes
744
745
* Existing npm caches will no longer be used: you will have to redownload any cached packages. There is no tool or intention to reuse old caches. ([#15666](https://github.com/npm/npm/pull/15666))
746
747
* `npm install ./packages/subdir` will now create a symlink instead of a regular installation. `file://path/to/tarball.tgz` will not change -- only directories are symlinked. ([#15900](https://github.com/npm/npm/pull/15900))
748
749
* npm will now scold you if you capitalize its name. seriously it will fight you.
750
751
* [npm will `--save` by default now](https://twitter.com/maybekatz/status/859229741676625920). Additionally, `package-lock.json` will be automatically created unless an `npm-shrinkwrap.json` exists. ([#15666](https://github.com/npm/npm/pull/15666))
752
753
* Git dependencies support semver through `user/repo#semver:^1.2.3` ([#15308](https://github.com/npm/npm/pull/15308)) ([#15666](https://github.com/npm/npm/pull/15666)) ([@sankethkatta](https://github.com/sankethkatta))
754
755
* Git dependencies with `prepare` scripts will have their `devDependencies` installed, and `npm install` run in their directory before being packed.
756
757
* `npm cache` commands have been rewritten and don't really work anything like they did before. ([#15666](https://github.com/npm/npm/pull/15666))
758
759
* `--cache-min` and `--cache-max` have been deprecated. ([#15666](https://github.com/npm/npm/pull/15666))
760
761
* Running npm while offline will no longer insist on retrying network requests. npm will now immediately fall back to cache if possible, or fail. ([#15666](https://github.com/npm/npm/pull/15666))
762
763
* package locks no longer exclude `optionalDependencies` that failed to build. This means package-lock.json and npm-shrinkwrap.json should now be cross-platform. ([#15900](https://github.com/npm/npm/pull/15900))
764
765
* If you generated your package lock against registry A, and you switch to registry B, npm will now try to [install the packages from registry B, instead of A](https://twitter.com/maybekatz/status/862834964932435969). If you want to use different registries for different packages, use scope-specific registries (`npm config set @myscope:registry=https://myownregist.ry/packages/`). Different registries for different unscoped packages are not supported anymore.
766
767
* Shrinkwrap and package-lock no longer warn and exit without saving the lockfile.
768
769
* Local tarballs can now only be installed if they have a file extensions `.tar`, `.tar.gz`, or `.tgz`.
770
771
* A new loglevel, `notice`, has been added and set as default.
772
773
* One binary to rule them all: `./cli.js` has been removed in favor of `./bin/npm-cli.js`. In case you were doing something with `./cli.js` itself. ([#12096](https://github.com/npm/npm/pull/12096)) ([@watilde](https://github.com/watilde))
774
775
* Stub file removed ([#16204](https://github.com/npm/npm/pull/16204)) ([@watilde](https://github.com/watilde))
776
777
* The "extremely legacy" `_token` couchToken has been removed. ([#12986](https://github.com/npm/npm/pull/12986))
778
779
### Feature Summary
780
781
#### Installer changes
782
783
* A new, standardised lockfile feature meant for cross-package-manager compatibility (`package-lock.json`), and a new format and semantics for shrinkwrap. ([#16441](https://github.com/npm/npm/pull/16441))
784
785
* `--save` is no longer necessary. All installs will be saved by default. You can prevent saving with `--no-save`. Installing optional and dev deps is unchanged: use `-D/--save-dev` and `-O/--save-optional` if you want them saved into those fields instead. Note that since npm@3, npm will automatically update npm-shrinkwrap.json when you save: this will also be true for `package-lock.json`. ([#15666](https://github.com/npm/npm/pull/15666))
786
787
* Installing a package directory now ends up creating a symlink and does the Right Thing™ as far as saving to and installing from the package lock goes. If you have a monorepo, this might make things much easier to work with, and probably a lot faster too. 😁 ([#15900](https://github.com/npm/npm/pull/15900))
788
789
* Project-level (toplevel) `preinstall` scripts now run before anything else, and can modify `node_modules` before the CLI reads it.
790
791
* Two new scripts have been added, `prepack` and `postpack`, which will run on both `npm pack` and `npm publish`, but NOT on `npm install` (without arguments). Combined with the fact that `prepublishOnly` is run before the tarball is generated, this should round out the general story as far as putzing around with your code before publication.
792
793
* Git dependencies with `prepare` scripts will now [have their devDependencies installed, and their prepare script executed](https://twitter.com/maybekatz/status/860363896443371520) as if under `npm pack`.
794
795
* Git dependencies now support semver-based matching: `npm install git://github.com/npm/npm#semver:^5` (#15308, #15666)
796
797
* `node-gyp` now supports `node-gyp.cmd` on Windows ([#14568](https://github.com/npm/npm/pull/14568))
798
799
* npm no longer blasts your screen with the whole installed tree. Instead, you'll see a summary report of the install that is much kinder on your shell real-estate. Specially for large projects. ([#15914](https://github.com/npm/npm/pull/15914)):
800
```
801
$ npm install
802
npm added 125, removed 32, updated 148 and moved 5 packages in 5.032s.
803
$
804
```
805
806
* `--parseable` and `--json` now work more consistently across various commands, particularly `install` and `ls`.
807
808
* Indentation is now [detected and preserved](https://twitter.com/maybekatz/status/860690502932340737) for `package.json`, `package-lock.json`, and `npm-shrinkwrap.json`. If the package lock is missing, it will default to `package.json`'s current indentation.
809
810
#### Publishing
811
812
* New [publishes will now include *both* `sha512`](https://twitter.com/maybekatz/status/863201943082065920) and `sha1` checksums. Versions of npm from 5 onwards will use the strongest algorithm available to verify downloads. [npm/npm-registry-client#157](https://github.com/npm/npm-registry-client/pull/157)
813
814
#### Cache Rewrite!
815
816
We've been talking about rewriting the cache for a loooong time. So here it is.
817
Lots of exciting stuff ahead. The rewrite will also enable some exciting future
818
features, but we'll talk about those when they're actually in the works. #15666
819
is the main PR for all these changes. Additional PRs/commits are linked inline.
820
821
* Package metadata, package download, and caching infrastructure replaced.
822
823
* It's a bit faster. [Hopefully it will be noticeable](https://twitter.com/maybekatz/status/865393382260056064). 🤔
824
825
* With the shrinkwrap and package-lock changes, tarballs will be looked up in the cache by content address (and verified with it).
826
827
* Corrupted cache entries will [automatically be removed and re-fetched](https://twitter.com/maybekatz/status/854933138182557696) on integrity check failure.
828
829
* npm CLI now supports tarball hashes with any hash function supported by Node.js. That is, it will [use `sha512` for tarballs from registries that send a `sha512` checksum as the tarball hash](https://twitter.com/maybekatz/status/858137093624573953). Publishing with `sha512` is added by [npm/npm-registry-client#157](https://github.com/npm/npm-registry-client/pull/157) and may be backfilled by the registry for older entries.
830
831
* Remote tarball requests are now cached. This means that even if you're missing the `integrity` field in your shrinkwrap or package-lock, npm will be able to install from the cache.
832
833
* Downloads for large packages are streamed in and out of disk. npm is now able to install packages of """any""" size without running out of memory. Support for publishing them is pending (due to registry limitations).
834
835
* [Automatic fallback-to-offline mode](https://twitter.com/maybekatz/status/854176565587984384). npm will seamlessly use your cache if you are offline, or if you lose access to a particular registry (for example, if you can no longer access a private npm repo, or if your git host is unavailable).
836
837
* A new `--prefer-offline` option will make npm skip any conditional requests (304 checks) for stale cache data, and *only* hit the network if something is missing from the cache.
838
839
* A new `--prefer-online` option that will force npm to revalidate cached data (with 304 checks), ignoring any staleness checks, and refreshing the cache with revalidated, fresh data.
840
841
* A new `--offline` option will force npm to use the cache or exit. It will error with an `ENOTCACHED` code if anything it tries to install isn't already in the cache.
842
843
* A new `npm cache verify` command that will garbage collect your cache, reducing disk usage for things you don't need (-handwave-), and will do full integrity verification on both the index and the content. This is also hooked into `npm doctor` as part of its larger suite of checking tools.
844
845
* The new cache is *very* fault tolerant and supports concurrent access.
846
  * Multiple npm processes will not corrupt a shared cache.
847
  * Corrupted data will not be installed. Data is checked on both insertion and extraction, and treated as if it were missing if found to be corrupted. I will literally bake you a cookie if you manage to corrupt the cache in such a way that you end up with the wrong data in your installation (installer bugs notwithstanding).
848
  * `npm cache clear` is no longer useful for anything except clearing up disk space.
849
850
* Package metadata is cached separately per registry and package type: you can't have package name conflicts between locally-installed packages, private repo packages, and public repo packages. Identical tarball data will still be shared/deduplicated as long as their hashes match.
851
852
* HTTP cache-related headers and features are "fully" (lol) supported for both metadata and tarball requests -- if you have your own registry, you can define your own cache settings the CLI will obey!
853
854
* `prepublishOnly` now runs *before* the tarball to publish is created, after `prepare` has run.