Permalink
Browse files

deps: upgrade npm to 5.0.0

PR-URL: #13276
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
  • Loading branch information...
zkat authored and jasnell committed May 29, 2017
1 parent ac2e882 commit 6083c4dc102b4da306faaf81469e33687f30daf1
Showing with 7,639 additions and 3,413 deletions.
  1. +70 −1,511 deps/npm/CHANGELOG.md
  2. +23 −9 deps/npm/TODO.org
  3. +0 −1 deps/npm/appveyor.yml
  4. +1,566 −0 deps/npm/changelogs/CHANGELOG-4.md
  5. +36 −24 deps/npm/doc/cli/npm-cache.md
  6. +89 −35 deps/npm/doc/cli/npm-install.md
  7. +4 −0 deps/npm/doc/cli/npm-publish.md
  8. +9 −176 deps/npm/doc/cli/npm-shrinkwrap.md
  9. +145 −0 deps/npm/doc/files/npm-package-locks.md
  10. +27 −0 deps/npm/doc/files/npm-shrinkwrap.json.md
  11. +132 −0 deps/npm/doc/files/package-lock.json.md
  12. +26 −2 deps/npm/doc/misc/npm-config.md
  13. +13 −1 deps/npm/doc/misc/npm-index.md
  14. +11 −5 deps/npm/doc/misc/npm-scripts.md
  15. +1 −1 deps/npm/html/doc/README.html
  16. +1 −1 deps/npm/html/doc/cli/npm-access.html
  17. +1 −1 deps/npm/html/doc/cli/npm-adduser.html
  18. +1 −1 deps/npm/html/doc/cli/npm-bin.html
  19. +1 −1 deps/npm/html/doc/cli/npm-bugs.html
  20. +1 −1 deps/npm/html/doc/cli/npm-build.html
  21. +1 −1 deps/npm/html/doc/cli/npm-bundle.html
  22. +34 −27 deps/npm/html/doc/cli/npm-cache.html
  23. +1 −1 deps/npm/html/doc/cli/npm-completion.html
  24. +1 −1 deps/npm/html/doc/cli/npm-config.html
  25. +1 −1 deps/npm/html/doc/cli/npm-dedupe.html
  26. +1 −1 deps/npm/html/doc/cli/npm-deprecate.html
  27. +1 −1 deps/npm/html/doc/cli/npm-dist-tag.html
  28. +1 −1 deps/npm/html/doc/cli/npm-docs.html
  29. +1 −1 deps/npm/html/doc/cli/npm-doctor.html
  30. +1 −1 deps/npm/html/doc/cli/npm-edit.html
  31. +1 −1 deps/npm/html/doc/cli/npm-explore.html
  32. +1 −1 deps/npm/html/doc/cli/npm-help-search.html
  33. +1 −1 deps/npm/html/doc/cli/npm-help.html
  34. +1 −1 deps/npm/html/doc/cli/npm-init.html
  35. +1 −1 deps/npm/html/doc/cli/npm-install-test.html
  36. +86 −37 deps/npm/html/doc/cli/npm-install.html
  37. +1 −1 deps/npm/html/doc/cli/npm-link.html
  38. +1 −1 deps/npm/html/doc/cli/npm-logout.html
  39. +2 −2 deps/npm/html/doc/cli/npm-ls.html
  40. +1 −1 deps/npm/html/doc/cli/npm-outdated.html
  41. +1 −1 deps/npm/html/doc/cli/npm-owner.html
  42. +1 −1 deps/npm/html/doc/cli/npm-pack.html
  43. +1 −1 deps/npm/html/doc/cli/npm-ping.html
  44. +1 −1 deps/npm/html/doc/cli/npm-prefix.html
  45. +1 −1 deps/npm/html/doc/cli/npm-prune.html
  46. +4 −1 deps/npm/html/doc/cli/npm-publish.html
  47. +1 −1 deps/npm/html/doc/cli/npm-rebuild.html
  48. +1 −1 deps/npm/html/doc/cli/npm-repo.html
  49. +1 −1 deps/npm/html/doc/cli/npm-restart.html
  50. +1 −1 deps/npm/html/doc/cli/npm-root.html
  51. +1 −1 deps/npm/html/doc/cli/npm-run-script.html
  52. +1 −1 deps/npm/html/doc/cli/npm-search.html
  53. +10 −149 deps/npm/html/doc/cli/npm-shrinkwrap.html
  54. +1 −1 deps/npm/html/doc/cli/npm-star.html
  55. +1 −1 deps/npm/html/doc/cli/npm-stars.html
  56. +1 −1 deps/npm/html/doc/cli/npm-start.html
  57. +1 −1 deps/npm/html/doc/cli/npm-stop.html
  58. +1 −1 deps/npm/html/doc/cli/npm-team.html
  59. +1 −1 deps/npm/html/doc/cli/npm-test.html
  60. +1 −1 deps/npm/html/doc/cli/npm-uninstall.html
  61. +1 −1 deps/npm/html/doc/cli/npm-unpublish.html
  62. +1 −1 deps/npm/html/doc/cli/npm-update.html
  63. +1 −1 deps/npm/html/doc/cli/npm-version.html
  64. +1 −1 deps/npm/html/doc/cli/npm-view.html
  65. +1 −1 deps/npm/html/doc/cli/npm-whoami.html
  66. +3 −3 deps/npm/html/doc/cli/npm.html
  67. +1 −1 deps/npm/html/doc/files/npm-folders.html
  68. +1 −1 deps/npm/html/doc/files/npm-global.html
  69. +1 −1 deps/npm/html/doc/files/npm-json.html
  70. +148 −0 deps/npm/html/doc/files/npm-package-locks.html
  71. +45 −0 deps/npm/html/doc/files/npm-shrinkwrap.json.html
  72. +1 −1 deps/npm/html/doc/files/npmrc.html
  73. +127 −0 deps/npm/html/doc/files/package-lock.json.html
  74. +1 −1 deps/npm/html/doc/files/package.json.html
  75. +8 −2 deps/npm/html/doc/index.html
  76. +1 −1 deps/npm/html/doc/misc/npm-coding-style.html
  77. +23 −3 deps/npm/html/doc/misc/npm-config.html
  78. +1 −1 deps/npm/html/doc/misc/npm-developers.html
  79. +6 −6 deps/npm/html/doc/misc/npm-disputes.html
  80. +8 −2 deps/npm/html/doc/misc/npm-index.html
  81. +1 −1 deps/npm/html/doc/misc/npm-orgs.html
  82. +1 −1 deps/npm/html/doc/misc/npm-registry.html
  83. +1 −1 deps/npm/html/doc/misc/npm-scope.html
  84. +12 −6 deps/npm/html/doc/misc/npm-scripts.html
  85. +1 −1 deps/npm/html/doc/misc/removing-npm.html
  86. +1 −1 deps/npm/html/doc/misc/semver.html
  87. +1 −0 deps/npm/lib/config/cmd-list.js
  88. +5 −0 deps/npm/lib/config/defaults.js
  89. +30 −97 deps/npm/lib/config/pacote.js
  90. +7 −2 deps/npm/lib/fetch-package-metadata.js
  91. +53 −32 deps/npm/lib/install.js
  92. +4 −7 deps/npm/lib/install/action/extract.js
  93. +3 −2 deps/npm/lib/install/action/finalize.js
  94. +1 −2 deps/npm/lib/install/action/preinstall.js
  95. +4 −4 deps/npm/lib/install/action/refresh-package-json.js
  96. +65 −26 deps/npm/lib/install/deps.js
  97. +24 −13 deps/npm/lib/install/inflate-shrinkwrap.js
  98. +0 −10 deps/npm/lib/install/is-extraneous.js
  99. +2 −1 deps/npm/lib/install/mutate-into-logical-tree.js
  100. +6 −11 deps/npm/lib/install/read-shrinkwrap.js
  101. +28 −9 deps/npm/lib/install/save.js
  102. +111 −7 deps/npm/lib/pack.js
  103. +2 −1 deps/npm/lib/prune.js
  104. +10 −2 deps/npm/lib/publish.js
  105. +6 −30 deps/npm/lib/shrinkwrap.js
  106. +42 −40 deps/npm/lib/uninstall.js
  107. +6 −4 deps/npm/lib/utils/error-handler.js
  108. +1 −1 deps/npm/lib/utils/link.js
  109. +0 −21 deps/npm/lib/utils/package-integrity.js
  110. +0 −19 deps/npm/lib/utils/tar.js
  111. +38 −29 deps/npm/man/man1/npm-cache.1
  112. +89 −35 deps/npm/man/man1/npm-install.1
  113. +1 −1 deps/npm/man/man1/npm-ls.1
  114. +4 −0 deps/npm/man/man1/npm-publish.1
  115. +12 −217 deps/npm/man/man1/npm-shrinkwrap.1
  116. +1 −1 deps/npm/man/man1/npm.1
  117. +183 −0 deps/npm/man/man5/npm-package-locks.5
  118. +32 −0 deps/npm/man/man5/npm-shrinkwrap.json.5
  119. +144 −0 deps/npm/man/man5/package-lock.json.5
  120. +33 −2 deps/npm/man/man7/npm-config.7
  121. +10 −1 deps/npm/man/man7/npm-index.7
  122. +13 −5 deps/npm/man/man7/npm-scripts.7
  123. +70 −0 deps/npm/node_modules/cacache/CHANGELOG.md
  124. +31 −13 deps/npm/node_modules/cacache/README.md
  125. +3 −0 deps/npm/node_modules/cacache/en.js
  126. +3 −0 deps/npm/node_modules/cacache/es.js
  127. +1 −9 deps/npm/node_modules/cacache/index.js
  128. +3 −2 deps/npm/node_modules/cacache/lib/content/read.js
  129. +7 −3 deps/npm/node_modules/cacache/lib/content/rm.js
  130. +7 −4 deps/npm/node_modules/cacache/lib/content/write.js
  131. +5 −2 deps/npm/node_modules/cacache/lib/entry-index.js
  132. +25 −0 deps/npm/node_modules/cacache/lib/util/y.js
  133. +42 −0 deps/npm/node_modules/cacache/locales/en.js
  134. +6 −0 deps/npm/node_modules/cacache/locales/en.json
  135. +44 −0 deps/npm/node_modules/cacache/locales/es.js
  136. +6 −0 deps/npm/node_modules/cacache/locales/es.json
  137. +13 −0 deps/npm/node_modules/cacache/node_modules/y18n/LICENSE
  138. +91 −0 deps/npm/node_modules/cacache/node_modules/y18n/README.md
  139. +172 −0 deps/npm/node_modules/cacache/node_modules/y18n/index.js
  140. +65 −0 deps/npm/node_modules/cacache/node_modules/y18n/package.json
  141. +28 −27 deps/npm/node_modules/cacache/package.json
  142. +0 −2 deps/npm/node_modules/glob/glob.js
  143. +17 −19 deps/npm/node_modules/glob/node_modules/minimatch/package.json
  144. +14 −16 deps/npm/node_modules/glob/package.json
  145. +91 −0 deps/npm/node_modules/pacote/CHANGELOG.md
  146. +13 −6 deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js
  147. +62 −0 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/CHANGELOG.md
  148. +15 −14 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/agent.js
  149. +1 −1 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/cache.js
  150. +58 −3 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js
  151. +5 −0 ...te/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/History.md
  152. +17 −0 ...acote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/LICENSE
  153. +40 −37 ...s/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
  154. +32 −35 ...ke-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
  155. +1 −2 .../make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
  156. +7 −10 .../node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/package.json
  157. +9 −2 ...cote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/CHANGELOG.md
  158. +1 −1 .../pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/README.md
  159. +1 −1 ...te/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/component.json
  160. +40 −37 ...dules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node_modules/ms/index.js
  161. +32 −35 ...s/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node_modules/ms/package.json
  162. +1 −2 ...ules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node_modules/ms/readme.md
  163. +7 −10 ...cote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/package.json
  164. +4 −4 ...te/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/browser.js
  165. +6 −1 ...acote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/node.js
  166. +9 −2 ...ote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md
  167. +1 −1 ...pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md
  168. +1 −1 ...e/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json
  169. +40 −37 ...ules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node_modules/ms/index.js
  170. +32 −35 .../make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node_modules/ms/package.json
  171. +1 −2 ...les/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node_modules/ms/readme.md
  172. +7 −10 ...ote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json
  173. +4 −4 ...e/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js
  174. +6 −1 ...cote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js
  175. +10 −0 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/CHANGELOG.md
  176. +14 −0 .../make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/.editorconfig
  177. +28 −0 ...les/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/.npmignore
  178. +21 −0 ...odules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/LICENSE
  179. +29 −0 ...ules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/README.md
  180. +21 −0 ...dules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/index.js
  181. +9 −0 ...ppen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/.npmignore
  182. +13 −0 ...-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/LICENSE
  183. +242 −0 ...appen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/README.md
  184. +32 −0 ...happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/index.js
  185. +91 −0 .../node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js
  186. +484 −0 ...node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js
  187. +764 −0 ...en/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js
  188. +382 −0 ...ode_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js
  189. +71 −0 .../node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js
  190. +45 −0 ...en/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js
  191. +65 −0 ...en/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json
  192. +45 −0 ...en/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml
  193. +63 −0 ...s/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json
  194. +32 −0 ...s/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js
  195. +7 −9 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json
  196. +2 −1 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js
  197. +22 −3 ...npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.travis.yml
  198. +10 −0 .../npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/History.md
  199. +1 −1 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/README.md
  200. +6 −9 ...pm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/package.json
  201. +11 −3 ...modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/socks-proxy-agent.js
  202. +0 −13 ...node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/server.crt
  203. +0 −15 ...node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/server.key
  204. +15 −0 ...s/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key
  205. +12 −0 ...s/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem
  206. +2 −2 ...pm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/test.js
  207. +14 −17 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json
  208. +23 −22 deps/npm/node_modules/pacote/package.json
  209. 0 deps/npm/node_modules/{pacote/node_modules → }/safe-buffer/.travis.yml
  210. 0 deps/npm/node_modules/{pacote/node_modules → }/safe-buffer/LICENSE
  211. 0 deps/npm/node_modules/{pacote/node_modules → }/safe-buffer/README.md
  212. 0 deps/npm/node_modules/{pacote/node_modules → }/safe-buffer/browser.js
  213. 0 deps/npm/node_modules/{pacote/node_modules → }/safe-buffer/index.js
  214. +10 −14 deps/npm/node_modules/{pacote/node_modules → }/safe-buffer/package.json
  215. 0 deps/npm/node_modules/{pacote/node_modules → }/safe-buffer/test.js
  216. +10 −0 deps/npm/node_modules/ssri/CHANGELOG.md
  217. +9 −4 deps/npm/node_modules/ssri/index.js
  218. +15 −17 deps/npm/node_modules/ssri/package.json
  219. +8 −6 deps/npm/package.json
  220. +4 −1 deps/npm/test/tap/bearer-token-check.js
  221. +1 −0 deps/npm/test/tap/config-meta.js
  222. +26 −42 deps/npm/test/tap/gently-rm-linked-module.js
  223. +18 −17 deps/npm/test/tap/no-scan-full-global-dir.js
  224. +1 −1 deps/npm/test/tap/noargs-install-config-save.js
  225. +0 −5 deps/npm/test/tap/shrinkwrap-extra-metadata.js
  226. +0 −50 deps/npm/test/tap/shrinkwrap-package-integrity.js
  227. +13 −11 deps/npm/test/tap/shrinkwrap-scoped-auth.js
  228. +5 −9 deps/npm/test/tap/uninstall-link-clean.js
  229. +39 −57 deps/npm/test/tap/uninstall-save.js
  230. +1 −1 deps/npm/test/tap/unit-link.js
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,18 @@
* Finished
* [COMPLETED] npm: remove packageIntegrity
* [COMPLETED] npm: fix lifecycle stuff
* pack:
* pre-: immediately before tarball contents are packed. Need to re-read package.json immediately after
* pack: No pack lifecycle
* post-: immediately after tarball reaches its final destination (not immediately after packaging)
* prepare: `npm install`, immediately before `postinstall`, and immediately before `prepack`, never if `--prod`, after prepublish, before prepublishOnly
* prepublish: alias for `prepare`
* 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
* [COMPLETED] pacote: fix always-auth bug
* [COMPLETED] pacote: figure out why cache is being written as root
* [COMPLETED] npm: make `npm update` save files as the right type
* [COMPLETED] npm: update docs with npm5 changes
* [COMPLETED] npm: don't write "problems" into package-lock
* [COMPLETED] npm: add `created-with`, `shrinkwrap-version`, and `package-integrity`
* [COMPLETED] npm: warn on incompatible package-lock version
* [COMPLETED] npm: warn if both shrinkwrap and package-lock are there
@@ -46,6 +60,12 @@
* [COMPLETED] npm: fix bundle replacement issues (see: npm i nyc warning spam)
* need fromBundle attribute on shrinkwrap and pass it through. the sw.version && sw.integrity-based fake node needs to have this there.
* Backlog
* [TODO] make-fetch-happen: integrity failures are being thrown
* [TODO] write-file-atomic: review https://github.com/npm/write-file-atomic/pull/22
* [TODO] pacote: write tests for git handlers
* https://github.com/zkat/pacote/issues/70
* [TODO] pacote: offline feature support for git deps
* [TODO] npm: get logging working during the recalculateMetadata spam
* [TODO] pacote: opts.extraHeaders
* https://github.com/zkat/pacote/issues/79
* [TODO] pacote: ECONNRESET recovery
@@ -59,14 +79,8 @@
* https://github.com/zkat/make-fetch-happen/issues/16
* [TODO] make-fetch-happen: retry notification
* https://github.com/zkat/make-fetch-happen/issues/21
* [TODO] npm: move addBundled call from inflate-shrinkwrap to extract
* fix the fucking bundling thing while at it
* [TODO] npm: more informative logging when building git deps
* Needed for npm@5
* [TODO] pacote: write tests for git handlers
* https://github.com/zkat/pacote/issues/70
* [TODO] pacote: offline feature support for git deps
* [TODO] npm: get logging working during the recalculateMetadata spam
* [TODO] write-file-atomic: review https://github.com/npm/write-file-atomic/pull/22
* Active
* [TODO] npm: make `npm update` save files as the right type
* [TODO] node: track down lifecycle signal failure
* [TODO] npm: figure out https://github.com/npm/npm/issues/16665
* [TODO] npm: first-run notice about npm5 still having known issues
View
@@ -15,7 +15,6 @@ install:
- ps: Install-Product node $env:nodejs_version $env:platform
- npm config set spin false
- npm rebuild
- npm i -g "npm/npm#release-beta-5"
- node . install -g .
- set "PATH=%APPDATA%\npm;C:\Program Files\Git\mingw64\libexec;%PATH%"
- npm install --loglevel=http

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -8,11 +8,11 @@ npm-cache(1) -- Manipulates packages cache
npm cache add <tarball url>
npm cache add <name>@<version>
npm cache ls [<path>]
npm cache clean [<path>]
aliases: npm cache clear, npm cache rm
npm cache verify
## DESCRIPTION
Used to add, list, or clean the npm cache folder.
@@ -22,35 +22,45 @@ Used to add, list, or clean the npm cache folder.
intended to be used internally by npm, but it can provide a way to
add data to the local installation cache explicitly.
* ls:
Show the data in the cache. Argument is a path to show in the cache
folder. Works a bit like the `find` program, but limited by the
`depth` config.
* clean:
Delete data out of the cache folder. If an argument is provided, then
it specifies a subpath to delete. If no argument is provided, then
the entire cache is deleted.
Delete all data out of the cache folder.
* verify:
Verify the contents of the cache folder, garbage collecting any unneeded data,
and verifying the integrity of the cache index and all cached data.
## DETAILS
npm stores cache data in the directory specified in `npm config get cache`.
For each package that is added to the cache, three pieces of information are
stored in `{cache}/{name}/{version}`:
npm stores cache data in an opaque directory within the configured `cache`,
named `_cacache`. This directory is a `cacache`-based content-addressable cache
that stores all http request data as well as other package-related data. This
directory is primarily accessed through `pacote`, the library responsible for
all package fetching as of npm@5.
All data that passes through the cache is fully verified for integrity on both
insertion and extraction. Cache corruption will either trigger an error, or
signal to `pacote` that the data must be refetched, which it will do
automatically. For this reason, it should never be necessary to clear the cache
for any reason other than reclaiming disk space, thus why `clean` now requires
`--force` to run.
There is currently no method exposed through npm to inspect or directly manage
the contents of this cache. In order to access it, `cacache` must be used
directly.
npm will not remove data by itself: the cache will grow as new packages are
installed.
* .../package/package.json:
The package.json file, as npm sees it.
* .../package.tgz:
The tarball for that version.
## A NOTE ABOUT THE CACHE'S DESIGN
Additionally, whenever a registry request is made, a `.cache.json` file
is placed at the corresponding URI, to store the ETag and the requested
data. This is stored in `{cache}/{hostname}/{path}/.cache.json`.
The npm cache is strictly a cache: it should not be relied upon as a persistent
and reliable data store for package data. npm makes no guarantee that a
previously-cached piece of data will be available later, and will automatically
delete corrupted contents. The primary guarantee that the cache makes is that,
if it does return data, that data will be exactly the data that was inserted.
Commands that make non-essential registry requests (such as `search` and
`view`, or the completion scripts) generally specify a minimum timeout.
If the `.cache.json` file is younger than the specified timeout, then
they do not make an HTTP request to the registry.
To run an offline verification of existing cache contents, use `npm cache
verify`.
## CONFIGURATION
@@ -69,3 +79,5 @@ The root cache folder.
* npm-install(1)
* npm-publish(1)
* npm-pack(1)
* https://npm.im/cacache
* https://npm.im/pacote
Oops, something went wrong.

0 comments on commit 6083c4d

Please sign in to comment.