Skip to content

Commit 6083c4d

Browse files
zkatjasnell
authored andcommitted
deps: upgrade npm to 5.0.0
PR-URL: #13276 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent ac2e882 commit 6083c4d

File tree

230 files changed

+7639
-3413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+7639
-3413
lines changed

deps/npm/CHANGELOG.md

+70-1,511
Large diffs are not rendered by default.

deps/npm/TODO.org

+23-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
* Finished
2+
* [COMPLETED] npm: remove packageIntegrity
3+
* [COMPLETED] npm: fix lifecycle stuff
4+
* pack:
5+
* pre-: immediately before tarball contents are packed. Need to re-read package.json immediately after
6+
* pack: No pack lifecycle
7+
* post-: immediately after tarball reaches its final destination (not immediately after packaging)
8+
* prepare: `npm install`, immediately before `postinstall`, and immediately before `prepack`, never if `--prod`, after prepublish, before prepublishOnly
9+
* prepublish: alias for `prepare`
10+
* prepublishOnly: ONLY on `npm publish` (never on `npm pack`), runs before prepack (which takes care of re-reading package.json), re-reads package.json immediately after
11+
* [COMPLETED] pacote: fix always-auth bug
12+
* [COMPLETED] pacote: figure out why cache is being written as root
13+
* [COMPLETED] npm: make `npm update` save files as the right type
14+
* [COMPLETED] npm: update docs with npm5 changes
15+
* [COMPLETED] npm: don't write "problems" into package-lock
216
* [COMPLETED] npm: add `created-with`, `shrinkwrap-version`, and `package-integrity`
317
* [COMPLETED] npm: warn on incompatible package-lock version
418
* [COMPLETED] npm: warn if both shrinkwrap and package-lock are there
@@ -46,6 +60,12 @@
4660
* [COMPLETED] npm: fix bundle replacement issues (see: npm i nyc warning spam)
4761
* need fromBundle attribute on shrinkwrap and pass it through. the sw.version && sw.integrity-based fake node needs to have this there.
4862
* Backlog
63+
* [TODO] make-fetch-happen: integrity failures are being thrown
64+
* [TODO] write-file-atomic: review https://github.com/npm/write-file-atomic/pull/22
65+
* [TODO] pacote: write tests for git handlers
66+
* https://github.com/zkat/pacote/issues/70
67+
* [TODO] pacote: offline feature support for git deps
68+
* [TODO] npm: get logging working during the recalculateMetadata spam
4969
* [TODO] pacote: opts.extraHeaders
5070
* https://github.com/zkat/pacote/issues/79
5171
* [TODO] pacote: ECONNRESET recovery
@@ -59,14 +79,8 @@
5979
* https://github.com/zkat/make-fetch-happen/issues/16
6080
* [TODO] make-fetch-happen: retry notification
6181
* https://github.com/zkat/make-fetch-happen/issues/21
62-
* [TODO] npm: move addBundled call from inflate-shrinkwrap to extract
63-
* fix the fucking bundling thing while at it
82+
* [TODO] npm: more informative logging when building git deps
6483
* Needed for npm@5
65-
* [TODO] pacote: write tests for git handlers
66-
* https://github.com/zkat/pacote/issues/70
67-
* [TODO] pacote: offline feature support for git deps
68-
* [TODO] npm: get logging working during the recalculateMetadata spam
69-
* [TODO] write-file-atomic: review https://github.com/npm/write-file-atomic/pull/22
7084
* Active
71-
* [TODO] npm: make `npm update` save files as the right type
72-
* [TODO] node: track down lifecycle signal failure
85+
* [TODO] npm: figure out https://github.com/npm/npm/issues/16665
86+
* [TODO] npm: first-run notice about npm5 still having known issues

deps/npm/appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ install:
1515
- ps: Install-Product node $env:nodejs_version $env:platform
1616
- npm config set spin false
1717
- npm rebuild
18-
- npm i -g "npm/npm#release-beta-5"
1918
- node . install -g .
2019
- set "PATH=%APPDATA%\npm;C:\Program Files\Git\mingw64\libexec;%PATH%"
2120
- npm install --loglevel=http

deps/npm/changelogs/CHANGELOG-4.md

+1,566
Large diffs are not rendered by default.

deps/npm/doc/cli/npm-cache.md

+36-24
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ npm-cache(1) -- Manipulates packages cache
88
npm cache add <tarball url>
99
npm cache add <name>@<version>
1010

11-
npm cache ls [<path>]
12-
1311
npm cache clean [<path>]
1412
aliases: npm cache clear, npm cache rm
1513

14+
npm cache verify
15+
1616
## DESCRIPTION
1717

1818
Used to add, list, or clean the npm cache folder.
@@ -22,35 +22,45 @@ Used to add, list, or clean the npm cache folder.
2222
intended to be used internally by npm, but it can provide a way to
2323
add data to the local installation cache explicitly.
2424

25-
* ls:
26-
Show the data in the cache. Argument is a path to show in the cache
27-
folder. Works a bit like the `find` program, but limited by the
28-
`depth` config.
29-
3025
* clean:
31-
Delete data out of the cache folder. If an argument is provided, then
32-
it specifies a subpath to delete. If no argument is provided, then
33-
the entire cache is deleted.
26+
Delete all data out of the cache folder.
27+
28+
* verify:
29+
Verify the contents of the cache folder, garbage collecting any unneeded data,
30+
and verifying the integrity of the cache index and all cached data.
3431

3532
## DETAILS
3633

37-
npm stores cache data in the directory specified in `npm config get cache`.
38-
For each package that is added to the cache, three pieces of information are
39-
stored in `{cache}/{name}/{version}`:
34+
npm stores cache data in an opaque directory within the configured `cache`,
35+
named `_cacache`. This directory is a `cacache`-based content-addressable cache
36+
that stores all http request data as well as other package-related data. This
37+
directory is primarily accessed through `pacote`, the library responsible for
38+
all package fetching as of npm@5.
39+
40+
All data that passes through the cache is fully verified for integrity on both
41+
insertion and extraction. Cache corruption will either trigger an error, or
42+
signal to `pacote` that the data must be refetched, which it will do
43+
automatically. For this reason, it should never be necessary to clear the cache
44+
for any reason other than reclaiming disk space, thus why `clean` now requires
45+
`--force` to run.
46+
47+
There is currently no method exposed through npm to inspect or directly manage
48+
the contents of this cache. In order to access it, `cacache` must be used
49+
directly.
50+
51+
npm will not remove data by itself: the cache will grow as new packages are
52+
installed.
4053

41-
* .../package/package.json:
42-
The package.json file, as npm sees it.
43-
* .../package.tgz:
44-
The tarball for that version.
54+
## A NOTE ABOUT THE CACHE'S DESIGN
4555

46-
Additionally, whenever a registry request is made, a `.cache.json` file
47-
is placed at the corresponding URI, to store the ETag and the requested
48-
data. This is stored in `{cache}/{hostname}/{path}/.cache.json`.
56+
The npm cache is strictly a cache: it should not be relied upon as a persistent
57+
and reliable data store for package data. npm makes no guarantee that a
58+
previously-cached piece of data will be available later, and will automatically
59+
delete corrupted contents. The primary guarantee that the cache makes is that,
60+
if it does return data, that data will be exactly the data that was inserted.
4961

50-
Commands that make non-essential registry requests (such as `search` and
51-
`view`, or the completion scripts) generally specify a minimum timeout.
52-
If the `.cache.json` file is younger than the specified timeout, then
53-
they do not make an HTTP request to the registry.
62+
To run an offline verification of existing cache contents, use `npm cache
63+
verify`.
5464

5565
## CONFIGURATION
5666

@@ -69,3 +79,5 @@ The root cache folder.
6979
* npm-install(1)
7080
* npm-publish(1)
7181
* npm-pack(1)
82+
* https://npm.im/cacache
83+
* https://npm.im/pacote

0 commit comments

Comments
 (0)