From 8cae4dde9101edc5d313d1e515a77105ec95749a Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 26 Feb 2020 17:11:08 -0800 Subject: [PATCH] deps: upgrade npm to 6.14.1 PR-URL: https://github.com/nodejs/node/pull/31977 Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Shelley Vohr Reviewed-By: Beth Griggs Reviewed-By: Michael Dawson --- deps/npm/AUTHORS | 6 + deps/npm/CHANGELOG.md | 38 ++ .../npm/docs/content/cli-commands/npm-fund.md | 12 +- .../docs/content/cli-commands/npm-publish.md | 12 +- .../content/configuring-npm/package-json.md | 21 +- deps/npm/docs/content/using-npm/disputes.md | 2 +- deps/npm/docs/content/using-npm/scripts.md | 169 ++--- .../public/cli-commands/npm-access/index.html | 4 +- .../cli-commands/npm-adduser/index.html | 4 +- .../public/cli-commands/npm-audit/index.html | 4 +- .../public/cli-commands/npm-bin/index.html | 4 +- .../public/cli-commands/npm-bugs/index.html | 4 +- .../public/cli-commands/npm-build/index.html | 4 +- .../public/cli-commands/npm-bundle/index.html | 4 +- .../public/cli-commands/npm-cache/index.html | 4 +- .../public/cli-commands/npm-ci/index.html | 4 +- .../cli-commands/npm-completion/index.html | 4 +- .../public/cli-commands/npm-config/index.html | 4 +- .../public/cli-commands/npm-dedupe/index.html | 4 +- .../cli-commands/npm-deprecate/index.html | 4 +- .../cli-commands/npm-dist-tag/index.html | 4 +- .../public/cli-commands/npm-docs/index.html | 4 +- .../public/cli-commands/npm-doctor/index.html | 4 +- .../public/cli-commands/npm-edit/index.html | 4 +- .../cli-commands/npm-explore/index.html | 4 +- .../public/cli-commands/npm-fund/index.html | 15 +- .../cli-commands/npm-help-search/index.html | 4 +- .../public/cli-commands/npm-help/index.html | 4 +- .../public/cli-commands/npm-hook/index.html | 4 +- .../public/cli-commands/npm-init/index.html | 4 +- .../npm-install-ci-test/index.html | 4 +- .../cli-commands/npm-install-test/index.html | 4 +- .../cli-commands/npm-install/index.html | 4 +- .../public/cli-commands/npm-link/index.html | 4 +- .../public/cli-commands/npm-logout/index.html | 4 +- .../public/cli-commands/npm-ls/index.html | 6 +- .../public/cli-commands/npm-org/index.html | 4 +- .../cli-commands/npm-outdated/index.html | 4 +- .../public/cli-commands/npm-owner/index.html | 4 +- .../public/cli-commands/npm-pack/index.html | 4 +- .../public/cli-commands/npm-ping/index.html | 4 +- .../public/cli-commands/npm-prefix/index.html | 4 +- .../cli-commands/npm-profile/index.html | 4 +- .../public/cli-commands/npm-prune/index.html | 4 +- .../cli-commands/npm-publish/index.html | 16 +- .../cli-commands/npm-rebuild/index.html | 4 +- .../public/cli-commands/npm-repo/index.html | 4 +- .../cli-commands/npm-restart/index.html | 4 +- .../public/cli-commands/npm-root/index.html | 4 +- .../cli-commands/npm-run-script/index.html | 4 +- .../public/cli-commands/npm-search/index.html | 4 +- .../cli-commands/npm-shrinkwrap/index.html | 4 +- .../public/cli-commands/npm-star/index.html | 4 +- .../public/cli-commands/npm-stars/index.html | 4 +- .../public/cli-commands/npm-start/index.html | 4 +- .../public/cli-commands/npm-stop/index.html | 4 +- .../public/cli-commands/npm-team/index.html | 4 +- .../public/cli-commands/npm-test/index.html | 4 +- .../public/cli-commands/npm-token/index.html | 4 +- .../cli-commands/npm-uninstall/index.html | 4 +- .../cli-commands/npm-unpublish/index.html | 4 +- .../public/cli-commands/npm-update/index.html | 4 +- .../cli-commands/npm-version/index.html | 4 +- .../public/cli-commands/npm-view/index.html | 4 +- .../public/cli-commands/npm-whoami/index.html | 4 +- .../docs/public/cli-commands/npm/index.html | 6 +- .../public/configuring-npm/folders/index.html | 4 +- .../public/configuring-npm/install/index.html | 4 +- .../public/configuring-npm/npmrc/index.html | 4 +- .../configuring-npm/package-json/index.html | 26 +- .../package-lock-json/index.html | 4 +- .../configuring-npm/package-locks/index.html | 4 +- .../shrinkwrap-json/index.html | 4 +- deps/npm/docs/public/index.html | 2 +- deps/npm/docs/public/static/d/2215187023.json | 2 +- .../docs/public/using-npm/config/index.html | 4 +- .../public/using-npm/developers/index.html | 4 +- .../docs/public/using-npm/disputes/index.html | 6 +- .../npm/docs/public/using-npm/orgs/index.html | 4 +- .../docs/public/using-npm/registry/index.html | 4 +- .../docs/public/using-npm/removal/index.html | 4 +- .../docs/public/using-npm/scope/index.html | 4 +- .../docs/public/using-npm/scripts/index.html | 154 ++--- .../docs/public/using-npm/semver/index.html | 4 +- deps/npm/lib/access.js | 2 +- deps/npm/lib/fund.js | 128 ++-- deps/npm/lib/utils/error-handler.js | 8 +- deps/npm/lib/utils/error-message.js | 4 +- deps/npm/lib/utils/funding.js | 94 ++- deps/npm/lib/utils/unsupported.js | 31 +- deps/npm/man/man1/npm-README.1 | 2 +- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-audit.1 | 2 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-build.1 | 2 +- deps/npm/man/man1/npm-bundle.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-ci.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-fund.1 | 19 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-hook.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-ci-test.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-org.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man5/folders.5 | 2 +- deps/npm/man/man5/install.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package-json.5 | 22 +- deps/npm/man/man5/package-lock-json.5 | 2 +- deps/npm/man/man5/package-locks.5 | 2 +- deps/npm/man/man5/shrinkwrap-json.5 | 2 +- deps/npm/man/man7/config.7 | 2 +- deps/npm/man/man7/developers.7 | 2 +- deps/npm/man/man7/disputes.7 | 4 +- deps/npm/man/man7/orgs.7 | 2 +- deps/npm/man/man7/registry.7 | 2 +- deps/npm/man/man7/removal.7 | 2 +- deps/npm/man/man7/scope.7 | 2 +- deps/npm/man/man7/scripts.7 | 205 +++--- deps/npm/man/man7/semver.7 | 2 +- deps/npm/node_modules/chownr/chownr.js | 74 ++- deps/npm/node_modules/chownr/package.json | 33 +- .../node_modules/hosted-git-info/CHANGELOG.md | 16 + .../npm/node_modules/hosted-git-info/index.js | 27 +- .../node_modules/hosted-git-info/package.json | 22 +- .../node_modules/npm-packlist/package.json | 25 +- .../npm-registry-fetch/CHANGELOG.md | 11 + .../node_modules/npm-registry-fetch/README.md | 31 +- .../node_modules/npm-registry-fetch/config.js | 4 +- .../node_modules/npm-registry-fetch/index.js | 32 +- .../npm-registry-fetch/package.json | 25 +- .../node_modules/readable-stream/README.md | 11 +- .../readable-stream/lib/_stream_readable.js | 71 ++- .../readable-stream/lib/_stream_writable.js | 28 +- .../lib/internal/streams/buffer_list.js | 313 +++++----- .../lib/internal/streams/destroy.js | 32 +- .../lib/internal/streams/from-browser.js | 3 + .../lib/internal/streams/from.js | 64 ++ .../node_modules/readable-stream/package.json | 24 +- .../node_modules/safe-buffer/LICENSE | 21 + .../node_modules/safe-buffer/README.md | 586 ++++++++++++++++++ .../node_modules/safe-buffer/index.d.ts | 187 ++++++ .../node_modules/safe-buffer/index.js | 64 ++ .../node_modules/safe-buffer/package.json | 62 ++ .../node_modules/string_decoder/package.json | 14 +- deps/npm/package.json | 17 +- deps/npm/scripts/update-dist-tags.js | 123 ++++ .../test-tap-fund.js-TAP.test.js | 35 +- .../test/fixtures/config/userconfig-with-gc | 2 +- deps/npm/test/tap/access.js | 27 + deps/npm/test/tap/fund.js | 96 ++- deps/npm/test/tap/unsupported.js | 3 +- deps/npm/test/tap/utils.funding.js | 43 ++ 199 files changed, 2611 insertions(+), 945 deletions(-) create mode 100644 deps/npm/node_modules/readable-stream/lib/internal/streams/from-browser.js create mode 100644 deps/npm/node_modules/readable-stream/lib/internal/streams/from.js create mode 100644 deps/npm/node_modules/string_decoder/node_modules/safe-buffer/LICENSE create mode 100644 deps/npm/node_modules/string_decoder/node_modules/safe-buffer/README.md create mode 100644 deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts create mode 100644 deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.js create mode 100644 deps/npm/node_modules/string_decoder/node_modules/safe-buffer/package.json create mode 100644 deps/npm/scripts/update-dist-tags.js diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 3e75785db4763a..89270e3c127b4f 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -682,3 +682,9 @@ Zhenya Vinogradov Rafael Hengles Jan-Philip Gehrcke Caleb Sacks <16855387+clabe45@users.noreply.github.com> +Kyle Getz +Sean Healy +Netanel Gilad +Dave Nicolson +Ajay Narain Mathur +Vitaliy Markitanov <9357021+vit100@users.noreply.github.com> diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 3abd37703a4d02..ff02d1dea0bcad 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,41 @@ +## 6.14.1 (2020-02-26) + +* [`303e5c11e`](https://github.com/npm/cli/commit/303e5c11e7db34cf014107aecd2e81c821bfde8d) + `hosted-git-info@2.8.7` + Fixes a regression where scp-style git urls are passed to the WhatWG URL + parser, which does not handle them properly. + ([@isaacs](https://github.com/isaacs)) + +## 6.14.0 (2020-02-25) + +### FEATURES +* [`30f170877`](https://github.com/npm/cli/commit/30f170877954acd036cb234a581e4eb155049b82) [#731](https://github.com/npm/cli/pull/731) add support for multiple funding sources ([@ljharb](https://github.com/ljharb) & [@ruyadorno](hhttps://github.com/ruyadorno/)) + +### BUG FIXES +* [`55916b130`](https://github.com/npm/cli/commit/55916b130ef52984584678f2cc17c15c1f031cb5) [#508](https://github.com/npm/cli/pull/508) fix: check `npm.config` before accessing its members ([@kaiyoma](https://github.com/kaiyoma)) +* [`7d0cd65b2`](https://github.com/npm/cli/commit/7d0cd65b23c0986b631b9b54d87bbe74902cc023) [#733](https://github.com/npm/cli/pull/733) fix: access grant with unscoped packages ([@netanelgilad](https://github.com/netanelgilad)) +* [`28c3d40d6`](https://github.com/npm/cli/commit/28c3d40d65eef63f9d6ccb60b99ac57f5057a46e), [`0769c5b20`](https://github.com/npm/cli/commit/30f170877954acd036cb234a581e4eb155049b82) [#945](https://github.com/npm/cli/pull/945), [#697](https://github.com/npm/cli/pull/697) fix: allow new major versions of node to be automatically considered "supported" ([@isaacs](https://github.com/isaacs), [@ljharb](https://github.com/ljharb)) + +### DEPENDENCIES +* [`6f39e93`](https://github.com/npm/hosted-git-info/commit/6f39e93bae9162663af6f15a9d10bce675dd5de3) `hosted-git-info@2.8.6` ([@darcyclarke](https://github.com/darcyclarke)) + * fix: passwords & usernames are escaped properly in git deps ([@stevenhilder](https://github.com/stevenhilder)) +* [`f14b594ee`](https://github.com/npm/cli/commit/f14b594ee9dbfc98ed0b65c65d904782db4f31ad) `chownr@1.1.4` ([@isaacs](https://github.com/isaacs)) +* [`77044150b`](https://github.com/npm/cli/commit/77044150b763d67d997f9ff108219132ea922678) `npm-packlist@1.4.8` ([@isaacs](https://github.com/isaacs)) +* [`1d112461a`](https://github.com/npm/cli/commit/1d112461ad8dc99e5ff7fabb5177e8c2f89a9755) `npm-registry-fetch@4.0.3` ([@isaacs](https://github.com/isaacs)) + * [`ba8b4fe`](https://github.com/npm/npm-registry-fetch/commit/ba8b4fe60eb6cdf9b39012560aec596eda8ce924) fix: always bypass cache when ?write=true +* [`a47fed760`](https://github.com/npm/cli/commit/a47fed7603a6ed31dcc314c0c573805f05a96830) `readable-stream@3.6.0` + * [`3bbf2d6`](https://github.com/nodejs/readable-stream/commit/3bbf2d6feb45b03f4e46a2ae8251601ad2262121) fix: babel's "loose mode" class transform enbrittles BufferList ([@ljharb](https://github.com/ljharb)) + +### DOCUMENTATION +* [`284c1c055`](https://github.com/npm/cli/commit/284c1c055a28c4b334496101799acefe3c54ceb3), [`fbb5f0e50`](https://github.com/npm/cli/commit/fbb5f0e50e54425119fa3f03c5de93e4cb6bfda7) [#729](https://github.com/npm/cli/pull/729) update lifecycle hooks docs + ([@seanhealy](https://github.com/seanhealy), [@mikemimik](https://github.com/mikemimik)) +* [`1c272832d`](https://github.com/npm/cli/commit/1c272832d048300e409882313305c416dc6f21a2) [#787](https://github.com/npm/cli/pull/787) fix: trademarks typo ([@dnicolson](https://github.com/dnicolson)) +* [`f6ff41776`](https://github.com/npm/cli/commit/f6ff417767d52418cc8c9e7b9731ede2c3916d2e) [#936](https://github.com/npm/cli/pull/936) fix: postinstall example ([@ajaymathur](https://github.com/ajaymathur)) +* [`373224b16`](https://github.com/npm/cli/commit/373224b16e019b7b63d8f0b4c5d4adb7e5cb80dd) [#939](https://github.com/npm/cli/pull/939) fix: bad links in publish docs ([@vit100](https://github.com/vit100)) + +### MISCELLANEOUS +* [`85c79636d`](https://github.com/npm/cli/commit/85c79636df31bac586c0e380c4852ee155a7723c) [#736](https://github.com/npm/cli/pull/736) add script to update dist-tags ([@mikemimik](https://github.com/mikemimik)) + ## 6.13.7 (2020-01-28) ### BUG FIXES diff --git a/deps/npm/docs/content/cli-commands/npm-fund.md b/deps/npm/docs/content/cli-commands/npm-fund.md index 64894e291fc4f6..5a751eec466871 100644 --- a/deps/npm/docs/content/cli-commands/npm-fund.md +++ b/deps/npm/docs/content/cli-commands/npm-fund.md @@ -21,7 +21,8 @@ a given project. If no package name is provided, it will list all dependencies that are looking for funding in a tree-structure in which are listed the type of funding and the url to visit. If a package name is provided then it tries to open its funding url using the `--browser` -config param. +config param; if there are multiple funding sources for the package, the +user will be instructed to pass the `--which` command to disambiguate. The list will avoid duplicated entries and will stack all packages that share the same type/url as a single entry. Given this nature the @@ -38,8 +39,8 @@ The browser that is called by the `npm fund` command to open websites. #### json -* Default: false * Type: Boolean +* Default: false Show information in JSON format. @@ -51,6 +52,13 @@ Show information in JSON format. Whether to represent the tree structure using unicode characters. Set it to `false` in order to use all-ansi output. +#### which + +* Type: Number +* Default: undefined + +If there are multiple funding sources, which 1-indexed source URL to open. + ## See Also * [npm docs](/cli-commands/npm-docs) diff --git a/deps/npm/docs/content/cli-commands/npm-publish.md b/deps/npm/docs/content/cli-commands/npm-publish.md index b9d0cf1449e760..44c36e0b7ac6cc 100644 --- a/deps/npm/docs/content/cli-commands/npm-publish.md +++ b/deps/npm/docs/content/cli-commands/npm-publish.md @@ -73,9 +73,9 @@ included and packs them into a tarball to be uploaded to the registry. * [npm registry](/using-npm/registry) * [npm scope](/using-npm/scope) -* [npm adduser](/cli-commands/npm-adduser) -* [npm owner](/cli-commands/npm-owner) -* [npm deprecate](/cli-commands/npm-deprecate) -* [npm dist-tag](/cli-commands/npm-dist-tag) -* [npm pack](/cli-commands/npm-pack) -* [npm profile](/cli-commands/npm-profile) +* [npm adduser](/cli-commands/adduser) +* [npm owner](/cli-commands/owner) +* [npm deprecate](/cli-commands/deprecate) +* [npm dist-tag](/cli-commands/dist-tag) +* [npm pack](/cli-commands/pack) +* [npm profile](/cli-commands/profile) diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md index ccdbe041fb063f..9af70ea0ab2ccc 100644 --- a/deps/npm/docs/content/configuring-npm/package-json.md +++ b/deps/npm/docs/content/configuring-npm/package-json.md @@ -197,7 +197,8 @@ npm also sets a top-level "maintainers" field with your npm user info. ### funding You can specify an object containing an URL that provides up-to-date -information about ways to help fund development of your package: +information about ways to help fund development of your package, or +a string URL, or an array of these: "funding": { "type" : "individual", @@ -209,10 +210,26 @@ information about ways to help fund development of your package: "url" : "https://www.patreon.com/my-account" } + "funding": "http://example.com/donate" + + "funding": [ + { + "type" : "individual", + "url" : "http://example.com/donate" + }, + "http://example.com/donateAlso", + { + "type" : "patreon", + "url" : "https://www.patreon.com/my-account" + } + ] + + Users can use the `npm fund` subcommand to list the `funding` URLs of all dependencies of their project, direct and indirect. A shortcut to visit each funding url is also available when providing the project name such as: -`npm fund `. +`npm fund ` (when there are multiple URLs, the first one will be +visited) ### files diff --git a/deps/npm/docs/content/using-npm/disputes.md b/deps/npm/docs/content/using-npm/disputes.md index 65751618cab8ae..bb2d25663cb26c 100644 --- a/deps/npm/docs/content/using-npm/disputes.md +++ b/deps/npm/docs/content/using-npm/disputes.md @@ -105,7 +105,7 @@ If you see bad behavior like this, please report it to right away. **You are never expected to resolve abusive behavior on your own. We are here to help.** -### Trademarkss +### Trademarks If you think another npm publisher is infringing your trademark, such as by using a confusingly similar package name, email with a link to diff --git a/deps/npm/docs/content/using-npm/scripts.md b/deps/npm/docs/content/using-npm/scripts.md index 6a2522fba43a77..a518e804727a51 100644 --- a/deps/npm/docs/content/using-npm/scripts.md +++ b/deps/npm/docs/content/using-npm/scripts.md @@ -10,90 +10,64 @@ description: How npm handles the "scripts" field ### Description -npm supports the "scripts" property of the package.json file, for the -following scripts: - -* **prepublish** (_as of npm@5, `prepublish` is deprecated. Use `prepare` for build steps and `prepublishOnly` for upload-only._): - Run BEFORE the package is packed and published, as well as on local `npm - install` without any arguments. (See below) -* **prepare**: - Run both BEFORE the package is packed and published, on local `npm - install` without any arguments, and when installing git dependencies (See - below). This is run AFTER `prepublish`, but BEFORE `prepublishOnly`. -* **prepublishOnly**: - Run BEFORE the package is prepared and packed, ONLY on `npm publish`. (See - below.) -* **prepack**: - run BEFORE a tarball is packed (on `npm pack`, `npm publish`, and when - installing git dependencies) -* **postpack**: - Run AFTER the tarball has been generated and moved to its final destination. -* **publish**, **postpublish**: - Run AFTER the package is published. -* **preinstall**: - Run BEFORE the package is installed -* **install**, **postinstall**: - Run AFTER the package is installed. -* **preuninstall**, **uninstall**: - Run BEFORE the package is uninstalled. -* **postuninstall**: - Run AFTER the package is uninstalled. -* **preversion**: - Run BEFORE bumping the package version. -* **version**: - Run AFTER bumping the package version, but BEFORE commit. -* **postversion**: - Run AFTER bumping the package version, and AFTER commit. -* **pretest**, **test**, **posttest**: - Run by the `npm test` command. -* **prestop**, **stop**, **poststop**: - Run by the `npm stop` command. -* **prestart**, **start**, **poststart**: - Run by the `npm start` command. -* **prerestart**, **restart**, **postrestart**: - Run by the `npm restart` command. Note: `npm restart` will run the - stop and start scripts if no `restart` script is provided. -* **preshrinkwrap**, **shrinkwrap**, **postshrinkwrap**: - Run by the `npm shrinkwrap` command. - -Additionally, arbitrary scripts can be executed by running `npm -run-script `. *Pre* and *post* commands with matching -names will be run for those as well (e.g. `premyscript`, `myscript`, -`postmyscript`). Scripts from dependencies can be run with -`npm explore -- npm run `. - -#### Prepublish and Prepare - -#### Deprecation Note - -Since `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm -publish` and `npm install`, because it's a convenient way to prepare a package -for use (some common use cases are described in the section below). It has -also turned out to be, in practice, [very -confusing](https://github.com/npm/npm/issues/10074). As of `npm@4.0.0`, a new -event has been introduced, `prepare`, that preserves this existing behavior. A -_new_ event, `prepublishOnly` has been added as a transitional strategy to -allow users to avoid the confusing behavior of existing npm versions and only -run on `npm publish` (for instance, running the tests one last time to ensure -they're in good shape). - -See for a much lengthier -justification, with further reading, for this change. - -#### Use Cases - -If you need to perform operations on your package before it is used, in a way -that is not dependent on the operating system or architecture of the -target system, use a `prepublish` script. This includes -tasks such as: +The `"scripts"` property of of your `package.json` file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running `npm run-script ` or `npm run ` for short. *Pre* and *post* commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, `postmyscript`). Scripts from dependencies can be run with `npm explore -- npm run `. + +### Pre & Post Scripts + +To create "pre" or "post" scripts for any scripts defined in the `"scripts"` section of the `package.json`, simply create another script *with a matching name* and add "pre" or "post" to the beginning of them. + +```json +{ + "scripts": { + "precompress": "{{ executes BEFORE the `compress` script }}", + "compress": "{{ run command to compress files }}", + "postcompress": "{{ executes AFTER `compress` script }}" + } +} +``` + +### Life Cycle Scripts + +There are some special life cycle scripts that happen only in certain situations. These scripts happen in addtion to the "pre" and "post" script. +* `prepare`, `prepublish`, `prepublishOnly`, `prepack`, `postpack` + +**prepare** (since `npm@4.0.0`) +* Runs BEFORE the package is packed +* Runs BEFORE the package is published +* Runs on local `npm install` without any arguments +* Run AFTER `prepublish`, but BEFORE `prepublishOnly` +* NOTE: If a package being installed through git contains a `prepare` script, its `dependencies` and `devDependencies` will be installed, and the prepare script will be run, before the package is packaged and installed. + +**prepublish** (DEPRECATED) +* Same as `prepare` + +**prepublishOnly** +* Runs BEFORE the package is prepared and packed, ONLY on `npm publish`. + +**prepack** +* Runs BEFORE a tarball is packed (on "`npm pack`", "`npm publish`", and when installing a git dependencies). +* NOTE: "`npm run pack`" is NOT the same as "`npm pack`". "`npm run pack`" is an arbitrary user defined script name, where as, "`npm pack`" is a CLI defined command. + +**postpack** +* Runs AFTER the tarball has been generated and moved to its final destination. + +#### Prepare and Prepublish + +**Deprecation Note: prepublish** + +Since `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074). As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape). + +See for a much lengthier justification, with further reading, for this change. + +**Use Cases** + +If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a `prepublish` script. This includes tasks such as: * Compiling CoffeeScript source code into JavaScript. * Creating minified versions of JavaScript source code. * Fetching remote resources that your package will use. -The advantage of doing these things at `prepublish` time is that they can be done once, in a -single place, thus reducing complexity and variability. -Additionally, this means that: +The advantage of doing these things at `prepublish` time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that: * You can depend on `coffee-script` as a `devDependency`, and thus your users don't need to have it installed. @@ -102,8 +76,41 @@ Additionally, this means that: * You don't need to rely on your users having `curl` or `wget` or other system tools on the target machines. -### Default Values +### Life Cycle Operation Order + +#### [`npm publish`](/cli-commands/npm-publish) + +* `prepublishOnly` +* `prepare` +* `prepublish` +* `publish` +* `postpublish` + +#### [`npm pack`](/cli-commands/npm-pack) + +* `prepack` +* `postpack` +#### [`npm install`](/cli-commands/npm-install) + +* `preinstall` +* `install` +* `postinstall` + +Also triggers + +* `prepublish` (when on local) +* `prepare` (when on local) + +#### [`npm start`](/cli-commands/npm-start) + +`npm run start` has an `npm start` shorthand. + +* `prestart` +* `start` +* `poststart` + +### Default Values npm will default some script values based on package contents. * `"start": "node server.js"`: @@ -208,7 +215,7 @@ For example, if your package.json contains this: ```json { "scripts" : { "install" : "scripts/install.js" - , "postinstall" : "scripts/install.js" + , "postinstall" : "scripts/postinstall.js" , "uninstall" : "scripts/uninstall.js" } } diff --git a/deps/npm/docs/public/cli-commands/npm-access/index.html b/deps/npm/docs/public/cli-commands/npm-access/index.html index 33febc80177727..925113b9b8e9ec 100644 --- a/deps/npm/docs/public/cli-commands/npm-access/index.html +++ b/deps/npm/docs/public/cli-commands/npm-access/index.html @@ -74,7 +74,7 @@ } } }) -

npm access

+

npm access

Set access level on published packages

Synopsis

npm access public [<package>]
@@ -148,4 +148,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-adduser/index.html b/deps/npm/docs/public/cli-commands/npm-adduser/index.html index cf1efe2b9fa631..38de0b0d9a8bd4 100644 --- a/deps/npm/docs/public/cli-commands/npm-adduser/index.html +++ b/deps/npm/docs/public/cli-commands/npm-adduser/index.html @@ -74,7 +74,7 @@ } } }) -

+

section: cli-commands title: npm-adduser description: Set access level on published packages

@@ -143,4 +143,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-audit/index.html b/deps/npm/docs/public/cli-commands/npm-audit/index.html index 594d46ad9d3f38..38e49d8acfd59c 100644 --- a/deps/npm/docs/public/cli-commands/npm-audit/index.html +++ b/deps/npm/docs/public/cli-commands/npm-audit/index.html @@ -74,7 +74,7 @@ } } }) -

npm audit

+

npm audit

Run a security audit

Synopsis

npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)]
@@ -165,4 +165,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bin/index.html b/deps/npm/docs/public/cli-commands/npm-bin/index.html index c6ec5573855133..9ab0c902e28d7f 100644 --- a/deps/npm/docs/public/cli-commands/npm-bin/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bin/index.html @@ -74,7 +74,7 @@ } } }) -

npm bin

+

npm bin

Display npm bin folder

Synopsis

npm bin [-g|--global]
@@ -94,4 +94,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bugs/index.html b/deps/npm/docs/public/cli-commands/npm-bugs/index.html index c5992039ed42b4..2be442a22d2257 100644 --- a/deps/npm/docs/public/cli-commands/npm-bugs/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bugs/index.html @@ -74,7 +74,7 @@ } } }) -

npm bugs

+

npm bugs

Bugs for a package in a web browser maybe

Synopsis

npm bugs [<pkgname>]
@@ -114,4 +114,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-build/index.html b/deps/npm/docs/public/cli-commands/npm-build/index.html index bfaa096a04bf97..8e1a7d49e31256 100644 --- a/deps/npm/docs/public/cli-commands/npm-build/index.html +++ b/deps/npm/docs/public/cli-commands/npm-build/index.html @@ -74,7 +74,7 @@ } } }) -

npm build

+

npm build

Build a package

Synopsis

npm build [<package-folder>]
@@ -100,4 +100,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-bundle/index.html b/deps/npm/docs/public/cli-commands/npm-bundle/index.html index 393c5b63358a23..4860ead9435ed1 100644 --- a/deps/npm/docs/public/cli-commands/npm-bundle/index.html +++ b/deps/npm/docs/public/cli-commands/npm-bundle/index.html @@ -74,7 +74,7 @@ } } }) -

npm bundle

+

npm bundle

REMOVED

Description

The npm bundle command has been removed in 1.0, for the simple reason @@ -91,4 +91,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-cache/index.html b/deps/npm/docs/public/cli-commands/npm-cache/index.html index 01e2bee9191d07..ae8d90e7b63bc0 100644 --- a/deps/npm/docs/public/cli-commands/npm-cache/index.html +++ b/deps/npm/docs/public/cli-commands/npm-cache/index.html @@ -74,7 +74,7 @@ } } }) -

npm cache

+

npm cache

Manipulates packages cache

Synopsis

npm cache add <tarball file>
@@ -145,4 +145,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ci/index.html b/deps/npm/docs/public/cli-commands/npm-ci/index.html index c4312a4f8b252f..fd0561cfc04ed3 100644 --- a/deps/npm/docs/public/cli-commands/npm-ci/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ci/index.html @@ -74,7 +74,7 @@ } } }) -

npm ci

+

npm ci

Install a project with a clean slate

Synopsis

npm ci
@@ -122,4 +122,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-completion/index.html b/deps/npm/docs/public/cli-commands/npm-completion/index.html index 8011d6cc650021..a97a27f53f494f 100644 --- a/deps/npm/docs/public/cli-commands/npm-completion/index.html +++ b/deps/npm/docs/public/cli-commands/npm-completion/index.html @@ -74,7 +74,7 @@ } } }) -

npm completion

+

npm completion

Tab Completion for npm

Synopsis

source <(npm completion)
@@ -104,4 +104,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-config/index.html b/deps/npm/docs/public/cli-commands/npm-config/index.html index d20a4504b7bfc4..445ffb15f02d82 100644 --- a/deps/npm/docs/public/cli-commands/npm-config/index.html +++ b/deps/npm/docs/public/cli-commands/npm-config/index.html @@ -74,7 +74,7 @@ } } }) -

npm config

+

npm config

Manage the npm configuration files

Synopsis

npm config set <key> <value> [-g|--global]
@@ -128,4 +128,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html b/deps/npm/docs/public/cli-commands/npm-dedupe/index.html index 6ab29223b2b02f..617444b4bda9fb 100644 --- a/deps/npm/docs/public/cli-commands/npm-dedupe/index.html +++ b/deps/npm/docs/public/cli-commands/npm-dedupe/index.html @@ -74,7 +74,7 @@ } } }) -

npm dedupe

+

npm dedupe

Reduce duplication

Synopsis

npm dedupe
@@ -121,4 +121,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html b/deps/npm/docs/public/cli-commands/npm-deprecate/index.html index 1c451c1ea62d86..188fe3ecfe2d58 100644 --- a/deps/npm/docs/public/cli-commands/npm-deprecate/index.html +++ b/deps/npm/docs/public/cli-commands/npm-deprecate/index.html @@ -74,7 +74,7 @@ } } }) -

npm deprecate

+

npm deprecate

Deprecate a version of a package

Synopsis

npm deprecate <pkg>[@<version>] <message>
@@ -100,4 +100,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html b/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html index 4f358442d2f1b6..d5644af8ace98b 100644 --- a/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html +++ b/deps/npm/docs/public/cli-commands/npm-dist-tag/index.html @@ -74,7 +74,7 @@ } } }) -

+

section: cli-commands title: npm-dist-tag description: Modify package distribution tags

@@ -149,4 +149,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-docs/index.html b/deps/npm/docs/public/cli-commands/npm-docs/index.html index 7d6c5dd7a3cf41..1ce1101b8f389c 100644 --- a/deps/npm/docs/public/cli-commands/npm-docs/index.html +++ b/deps/npm/docs/public/cli-commands/npm-docs/index.html @@ -74,7 +74,7 @@ } } }) -

npm docs

+

npm docs

Docs for a package in a web browser maybe

Synopsis

npm docs [<pkgname> [<pkgname> ...]]
@@ -115,4 +115,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-doctor/index.html b/deps/npm/docs/public/cli-commands/npm-doctor/index.html index 98941778502b08..8d7a375fd38362 100644 --- a/deps/npm/docs/public/cli-commands/npm-doctor/index.html +++ b/deps/npm/docs/public/cli-commands/npm-doctor/index.html @@ -74,7 +74,7 @@ } } }) -

npm doctor

+

npm doctor

Check your environments

Synopsis

npm doctor
@@ -163,4 +163,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-edit/index.html b/deps/npm/docs/public/cli-commands/npm-edit/index.html index d405195ef1582a..54e32d0a5dbb66 100644 --- a/deps/npm/docs/public/cli-commands/npm-edit/index.html +++ b/deps/npm/docs/public/cli-commands/npm-edit/index.html @@ -74,7 +74,7 @@ } } }) -

npm edit

+

npm edit

Edit an installed package

Synopsis

npm edit <pkg>[/<subpkg>...]
@@ -110,4 +110,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-explore/index.html b/deps/npm/docs/public/cli-commands/npm-explore/index.html index 0a087af7ad73bc..45fdf5557d58ef 100644 --- a/deps/npm/docs/public/cli-commands/npm-explore/index.html +++ b/deps/npm/docs/public/cli-commands/npm-explore/index.html @@ -74,7 +74,7 @@ } } }) -

+

section: cli-commands title: npm-explore description: Browse an installed package

@@ -114,4 +114,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-fund/index.html b/deps/npm/docs/public/cli-commands/npm-fund/index.html index bfe02b228d5bc2..a924adfadaed53 100644 --- a/deps/npm/docs/public/cli-commands/npm-fund/index.html +++ b/deps/npm/docs/public/cli-commands/npm-fund/index.html @@ -74,7 +74,7 @@ } } }) -

npm fund

+

npm fund

Retrieve funding information

Synopsis

    npm fund [<pkg>]
@@ -84,7 +84,8 @@

--browser -config param.

+config param; if there are multiple funding sources for the package, the +user will be instructed to pass the --which command to disambiguate.

The list will avoid duplicated entries and will stack all packages that share the same type/url as a single entry. Given this nature the list is not going to have the same shape of the output from npm ls.

@@ -97,8 +98,8 @@

npm fund command to open websites.

json

    -
  • Default: false
  • Type: Boolean
  • +
  • Default: false

Show information in JSON format.

unicode

@@ -108,6 +109,12 @@

false in order to use all-ansi output.

+

which

+
    +
  • Type: Number
  • +
  • Default: undefined
  • +
+

If there are multiple funding sources, which 1-indexed source URL to open.

See Also

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help-search/index.html b/deps/npm/docs/public/cli-commands/npm-help-search/index.html index 1f6170daae7a97..ba2f9d323b1287 100644 --- a/deps/npm/docs/public/cli-commands/npm-help-search/index.html +++ b/deps/npm/docs/public/cli-commands/npm-help-search/index.html @@ -74,7 +74,7 @@ } } }) -

npm help-search

+

npm help-search

Search npm help documentation

Synopsis

npm help-search <text>
@@ -105,4 +105,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-help/index.html b/deps/npm/docs/public/cli-commands/npm-help/index.html index 7bb65bffd3ce55..f547a63b990dee 100644 --- a/deps/npm/docs/public/cli-commands/npm-help/index.html +++ b/deps/npm/docs/public/cli-commands/npm-help/index.html @@ -74,7 +74,7 @@ } } }) -

npm help

+

npm help

Get help on npm

Synopsis

npm help <term> [<terms..>]
@@ -107,4 +107,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-hook/index.html b/deps/npm/docs/public/cli-commands/npm-hook/index.html index 4474cc5565f703..de18367b6a74c0 100644 --- a/deps/npm/docs/public/cli-commands/npm-hook/index.html +++ b/deps/npm/docs/public/cli-commands/npm-hook/index.html @@ -74,7 +74,7 @@ } } }) -

npm hook

+

npm hook

Manage registry hooks

Synopsis

npm hook ls [pkg]
@@ -119,4 +119,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-init/index.html b/deps/npm/docs/public/cli-commands/npm-init/index.html index 8a585d1ae6d53c..436d4865354c9d 100644 --- a/deps/npm/docs/public/cli-commands/npm-init/index.html +++ b/deps/npm/docs/public/cli-commands/npm-init/index.html @@ -74,7 +74,7 @@ } } }) -

npm init

+

npm init

create a package.json file

Synopsis

npm init [--force|-f|--yes|-y|--scope]
@@ -126,4 +126,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html index e3ed77e9147b56..5e4f7b005d1e95 100644 --- a/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install-ci-test/index.html @@ -74,7 +74,7 @@ } } }) -

npm install-ci-test

+

npm install-ci-test

Install a project with a clean slate and run tests

Synopsis

npm install-ci-test
@@ -93,4 +93,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install-test/index.html b/deps/npm/docs/public/cli-commands/npm-install-test/index.html index 7c264c56fb922b..3f2748ab4963c1 100644 --- a/deps/npm/docs/public/cli-commands/npm-install-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install-test/index.html @@ -74,7 +74,7 @@ } } }) -

npm install-test

+

npm install-test

Install package(s) and run tests

Synopsis

npm install-test (with no args, in package dir)
@@ -102,4 +102,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-install/index.html b/deps/npm/docs/public/cli-commands/npm-install/index.html index c64ae4d529fd56..81db8d705a5725 100644 --- a/deps/npm/docs/public/cli-commands/npm-install/index.html +++ b/deps/npm/docs/public/cli-commands/npm-install/index.html @@ -74,7 +74,7 @@ } } }) -

npm install

+

npm install

Install a package

Synopsis

npm install (with no args, in package dir)
@@ -468,4 +468,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-link/index.html b/deps/npm/docs/public/cli-commands/npm-link/index.html index f84406e8a8d3a0..a4f7fcee914700 100644 --- a/deps/npm/docs/public/cli-commands/npm-link/index.html +++ b/deps/npm/docs/public/cli-commands/npm-link/index.html @@ -74,7 +74,7 @@ } } }) -

npm link

+

npm link

Synopsis

npm link (in package dir)
@@ -134,4 +134,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-logout/index.html b/deps/npm/docs/public/cli-commands/npm-logout/index.html index a7512ee5af2430..3168c941901e4b 100644 --- a/deps/npm/docs/public/cli-commands/npm-logout/index.html +++ b/deps/npm/docs/public/cli-commands/npm-logout/index.html @@ -74,7 +74,7 @@ } } }) -

npm logout

+

npm logout

Log out of the registry

Synopsis

npm logout [--registry=<url>] [--scope=<@scope>]
@@ -109,4 +109,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ls/index.html b/deps/npm/docs/public/cli-commands/npm-ls/index.html index bfd746a74ef8de..60e60c921ad328 100644 --- a/deps/npm/docs/public/cli-commands/npm-ls/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ls/index.html @@ -74,7 +74,7 @@ } } }) -

npm ls

+
\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-org/index.html b/deps/npm/docs/public/cli-commands/npm-org/index.html index 57b897e9638f19..6ca3da7e31974b 100644 --- a/deps/npm/docs/public/cli-commands/npm-org/index.html +++ b/deps/npm/docs/public/cli-commands/npm-org/index.html @@ -74,7 +74,7 @@ } } }) -

npm org

+

npm org

Manage orgs

Synopsis

npm org set <orgname> <username> [developer | admin | owner]
@@ -107,4 +107,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-outdated/index.html b/deps/npm/docs/public/cli-commands/npm-outdated/index.html index e80c1cfe0cd137..a9764a487afdc2 100644 --- a/deps/npm/docs/public/cli-commands/npm-outdated/index.html +++ b/deps/npm/docs/public/cli-commands/npm-outdated/index.html @@ -74,7 +74,7 @@ } } }) -

npm outdated

+

npm outdated

Check for outdated packages

Synopsis

npm outdated [[<@scope>/]<pkg> ...]
@@ -178,4 +178,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-owner/index.html b/deps/npm/docs/public/cli-commands/npm-owner/index.html index f8439c79695da0..7eb600b8972ed9 100644 --- a/deps/npm/docs/public/cli-commands/npm-owner/index.html +++ b/deps/npm/docs/public/cli-commands/npm-owner/index.html @@ -74,7 +74,7 @@ } } }) -

npm owner

+

npm owner

Manage package owners

Synopsis

npm owner add <user> [<@scope>/]<pkg>
@@ -114,4 +114,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-pack/index.html b/deps/npm/docs/public/cli-commands/npm-pack/index.html index f3756959783413..f0920804fde85b 100644 --- a/deps/npm/docs/public/cli-commands/npm-pack/index.html +++ b/deps/npm/docs/public/cli-commands/npm-pack/index.html @@ -74,7 +74,7 @@ } } }) -

npm pack

+

npm pack

Create a tarball from a package

Synopsis

npm pack [[<@scope>/]<pkg>...] [--dry-run]
@@ -102,4 +102,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-ping/index.html b/deps/npm/docs/public/cli-commands/npm-ping/index.html index 711d2b5a5ed372..a3c47f6d5cf5c4 100644 --- a/deps/npm/docs/public/cli-commands/npm-ping/index.html +++ b/deps/npm/docs/public/cli-commands/npm-ping/index.html @@ -74,7 +74,7 @@ } } }) -

npm ping

+

npm ping

Ping npm registry

Synopsis

npm ping [--registry <registry>]
@@ -95,4 +95,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prefix/index.html b/deps/npm/docs/public/cli-commands/npm-prefix/index.html index c14010a2d9cf66..bd592f89e1b8a5 100644 --- a/deps/npm/docs/public/cli-commands/npm-prefix/index.html +++ b/deps/npm/docs/public/cli-commands/npm-prefix/index.html @@ -74,7 +74,7 @@ } } }) -

npm prefix

+

npm prefix

Display prefix

Synopsis

npm prefix [-g]
@@ -98,4 +98,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-profile/index.html b/deps/npm/docs/public/cli-commands/npm-profile/index.html index 8cd34b5c300f20..ae212cc643e90c 100644 --- a/deps/npm/docs/public/cli-commands/npm-profile/index.html +++ b/deps/npm/docs/public/cli-commands/npm-profile/index.html @@ -74,7 +74,7 @@ } } }) -

npm profile

+

npm profile

Change settings on your registry profile

Synopsis

npm profile get [--json|--parseable] [<property>]
@@ -148,4 +148,4 @@ 

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-prune/index.html b/deps/npm/docs/public/cli-commands/npm-prune/index.html index 59c87eb763154b..aa9972bf58d0b0 100644 --- a/deps/npm/docs/public/cli-commands/npm-prune/index.html +++ b/deps/npm/docs/public/cli-commands/npm-prune/index.html @@ -74,7 +74,7 @@ } } }) -

npm prune

+

npm prune

Remove extraneous packages

Synopsis

npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
@@ -108,4 +108,4 @@

\ No newline at end of file +
\ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-publish/index.html b/deps/npm/docs/public/cli-commands/npm-publish/index.html index 5cac777b54ef80..9d163ecb6640a0 100644 --- a/deps/npm/docs/public/cli-commands/npm-publish/index.html +++ b/deps/npm/docs/public/cli-commands/npm-publish/index.html @@ -74,7 +74,7 @@ } } }) -

npm publish

+

npm publish

Publish a package

Synopsis

npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
@@ -127,12 +127,12 @@ 

npm registry
  • npm scope
  • -
  • npm adduser
  • -
  • npm owner
  • -
  • npm deprecate
  • -
  • npm dist-tag
  • -
  • npm pack
  • -
  • npm profile
  • +
  • npm adduser
  • +
  • npm owner
  • +
  • npm deprecate
  • +
  • npm dist-tag
  • +
  • npm pack
  • +
  • npm profile
  • 👀 Found a typo? Let us know!

    The current stable version of npm is here. To upgrade, run: npm install npm@latest -g

    To report bugs or submit feature requests for the docs, please post here. Submit npm issues here.

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html b/deps/npm/docs/public/cli-commands/npm-rebuild/index.html index d09ba09ab78cbf..a5252346e9eb21 100644 --- a/deps/npm/docs/public/cli-commands/npm-rebuild/index.html +++ b/deps/npm/docs/public/cli-commands/npm-rebuild/index.html @@ -74,7 +74,7 @@ } } }) -

    npm rebuild

    +

    npm rebuild

    Rebuild a package

    Synopsis

    npm rebuild [[<@scope>/<name>]...]
    @@ -93,4 +93,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-repo/index.html b/deps/npm/docs/public/cli-commands/npm-repo/index.html index 3b01aea44a5b9f..4eae022c2d1c01 100644 --- a/deps/npm/docs/public/cli-commands/npm-repo/index.html +++ b/deps/npm/docs/public/cli-commands/npm-repo/index.html @@ -74,7 +74,7 @@ } } }) -

    npm repo

    +

    npm repo

    Open package repository page in the browser

    Synopsis

    npm repo [<pkg>]
    @@ -101,4 +101,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-restart/index.html b/deps/npm/docs/public/cli-commands/npm-restart/index.html index a561fad81da43c..3c7836d0506365 100644 --- a/deps/npm/docs/public/cli-commands/npm-restart/index.html +++ b/deps/npm/docs/public/cli-commands/npm-restart/index.html @@ -74,7 +74,7 @@ } } }) -

    npm restart

    +

    npm restart

    Restart a package

    Synopsis

    npm restart [-- <args>]
    @@ -113,4 +113,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-root/index.html b/deps/npm/docs/public/cli-commands/npm-root/index.html index 81173f0f3e859e..a26538db7c89a2 100644 --- a/deps/npm/docs/public/cli-commands/npm-root/index.html +++ b/deps/npm/docs/public/cli-commands/npm-root/index.html @@ -74,7 +74,7 @@ } } }) -

    npm root

    +

    npm root

    Display npm root

    Synopsis

    npm root [-g]
    @@ -94,4 +94,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-run-script/index.html b/deps/npm/docs/public/cli-commands/npm-run-script/index.html index efb484e69d7906..4575220b541478 100644 --- a/deps/npm/docs/public/cli-commands/npm-run-script/index.html +++ b/deps/npm/docs/public/cli-commands/npm-run-script/index.html @@ -74,7 +74,7 @@ } } }) -

    npm run-script

    +

    npm run-script

    Run arbitrary package scripts

    Synopsis

    npm run-script <command> [--silent] [-- <args>...]
    @@ -143,4 +143,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-search/index.html b/deps/npm/docs/public/cli-commands/npm-search/index.html index d305edcce484ec..1c44fd0cbf4cbd 100644 --- a/deps/npm/docs/public/cli-commands/npm-search/index.html +++ b/deps/npm/docs/public/cli-commands/npm-search/index.html @@ -74,7 +74,7 @@ } } }) -

    npm search

    +

    npm search

    Search for packages

    Synopsis

    npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
    @@ -168,4 +168,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html b/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html index 5bc73cbdc9d753..aeb9ab9a9d573c 100644 --- a/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html +++ b/deps/npm/docs/public/cli-commands/npm-shrinkwrap/index.html @@ -74,7 +74,7 @@ } } }) -

    npm shrinkwrap

    +

    npm shrinkwrap

    Lock down dependency versions for publication

    Synopsis

    npm shrinkwrap
    @@ -101,4 +101,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-star/index.html b/deps/npm/docs/public/cli-commands/npm-star/index.html index 12babbf3f3ea12..641b39795e0a83 100644 --- a/deps/npm/docs/public/cli-commands/npm-star/index.html +++ b/deps/npm/docs/public/cli-commands/npm-star/index.html @@ -74,7 +74,7 @@ } } }) -

    npm star

    +

    npm star

    Mark your favorite packages

    Synopsis

    npm star [<pkg>...]
    @@ -96,4 +96,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stars/index.html b/deps/npm/docs/public/cli-commands/npm-stars/index.html index 629267c0ebfae3..821469b4585e60 100644 --- a/deps/npm/docs/public/cli-commands/npm-stars/index.html +++ b/deps/npm/docs/public/cli-commands/npm-stars/index.html @@ -74,7 +74,7 @@ } } }) -

    npm stars

    +

    npm stars

    View packages marked as favorites

    Synopsis

    npm stars [<user>]
    @@ -96,4 +96,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-start/index.html b/deps/npm/docs/public/cli-commands/npm-start/index.html index 13ad0d84b30a48..3cc8120bd3b82b 100644 --- a/deps/npm/docs/public/cli-commands/npm-start/index.html +++ b/deps/npm/docs/public/cli-commands/npm-start/index.html @@ -74,7 +74,7 @@ } } }) -

    npm start

    +

    npm start

    Start a package

    Synopsis

    npm start [-- <args>]
    @@ -98,4 +98,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-stop/index.html b/deps/npm/docs/public/cli-commands/npm-stop/index.html index 65e34691c59c11..94c7b6861645d6 100644 --- a/deps/npm/docs/public/cli-commands/npm-stop/index.html +++ b/deps/npm/docs/public/cli-commands/npm-stop/index.html @@ -74,7 +74,7 @@ } } }) -

    npm stop

    +

    npm stop

    Stop a package

    Synopsis

    npm stop [-- <args>]
    @@ -94,4 +94,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-team/index.html b/deps/npm/docs/public/cli-commands/npm-team/index.html index ab494c39401d11..b8af3c5821bb93 100644 --- a/deps/npm/docs/public/cli-commands/npm-team/index.html +++ b/deps/npm/docs/public/cli-commands/npm-team/index.html @@ -74,7 +74,7 @@ } } }) -

    npm team

    +

    npm team

    Manage organization teams and team memberships

    Synopsis

    npm team create <scope:team>
    @@ -124,4 +124,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-test/index.html b/deps/npm/docs/public/cli-commands/npm-test/index.html index 05ab9ecca9d3cc..f65035e5b24501 100644 --- a/deps/npm/docs/public/cli-commands/npm-test/index.html +++ b/deps/npm/docs/public/cli-commands/npm-test/index.html @@ -74,7 +74,7 @@ } } }) -

    npm test

    +

    npm test

    Test a package

    Synopsis

    npm test [-- <args>]
    @@ -96,4 +96,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-token/index.html b/deps/npm/docs/public/cli-commands/npm-token/index.html index 38faa5edc32c28..f94d350e8dc925 100644 --- a/deps/npm/docs/public/cli-commands/npm-token/index.html +++ b/deps/npm/docs/public/cli-commands/npm-token/index.html @@ -74,7 +74,7 @@ } } }) -

    npm token

    +

    npm token

    Manage your authentication tokens

    Synopsis

      npm token list [--json|--parseable]
    @@ -133,4 +133,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html b/deps/npm/docs/public/cli-commands/npm-uninstall/index.html index 8abde62f8e6bff..80f165f90dd781 100644 --- a/deps/npm/docs/public/cli-commands/npm-uninstall/index.html +++ b/deps/npm/docs/public/cli-commands/npm-uninstall/index.html @@ -74,7 +74,7 @@ } } }) -

    npm uninstall

    +

    npm uninstall

    Remove a package

    Synopsis

    npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]
    @@ -118,4 +118,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html b/deps/npm/docs/public/cli-commands/npm-unpublish/index.html index 89884913bcee15..7f42a97a7def07 100644 --- a/deps/npm/docs/public/cli-commands/npm-unpublish/index.html +++ b/deps/npm/docs/public/cli-commands/npm-unpublish/index.html @@ -74,7 +74,7 @@ } } }) -

    npm unpublish

    +

    npm unpublish

    Remove a package from the registry

    Synopsis

    npm unpublish [<@scope>/]<pkg>[@<version>]
    @@ -113,4 +113,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-update/index.html b/deps/npm/docs/public/cli-commands/npm-update/index.html index 0c10e200ca677a..2f81638b91dd3e 100644 --- a/deps/npm/docs/public/cli-commands/npm-update/index.html +++ b/deps/npm/docs/public/cli-commands/npm-update/index.html @@ -74,7 +74,7 @@ } } }) -

    npm update

    +

    npm update

    Update a package

    Synopsis

    npm update [-g] [<pkg>...]
    @@ -166,4 +166,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-version/index.html b/deps/npm/docs/public/cli-commands/npm-version/index.html index a9201194edf6e0..047c689cf3007e 100644 --- a/deps/npm/docs/public/cli-commands/npm-version/index.html +++ b/deps/npm/docs/public/cli-commands/npm-version/index.html @@ -74,7 +74,7 @@ } } }) -

    npm version

    +

    npm version

    Bump a package version

    Synopsis

    npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
    @@ -180,4 +180,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-view/index.html b/deps/npm/docs/public/cli-commands/npm-view/index.html index e6f88d50b36cb8..23115f84ff6163 100644 --- a/deps/npm/docs/public/cli-commands/npm-view/index.html +++ b/deps/npm/docs/public/cli-commands/npm-view/index.html @@ -74,7 +74,7 @@ } } }) -

    npm view

    +

    npm view

    View registry info

    Synopsis

    npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
    @@ -145,4 +145,4 @@ 

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm-whoami/index.html b/deps/npm/docs/public/cli-commands/npm-whoami/index.html index 79bbd7ba4d6a12..aca97476eb19bb 100644 --- a/deps/npm/docs/public/cli-commands/npm-whoami/index.html +++ b/deps/npm/docs/public/cli-commands/npm-whoami/index.html @@ -74,7 +74,7 @@ } } }) -

    npm whoami

    +

    npm whoami

    Display npm username

    Synopsis

    npm whoami [--registry <registry>]
    @@ -92,4 +92,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/cli-commands/npm/index.html b/deps/npm/docs/public/cli-commands/npm/index.html index bc67b74183ecc3..610982c2e0d8f0 100644 --- a/deps/npm/docs/public/cli-commands/npm/index.html +++ b/deps/npm/docs/public/cli-commands/npm/index.html @@ -74,12 +74,12 @@ } } }) -

    npm

    +

    npm

    javascript package manager

    Synopsis

    npm <command> [args]

    Version

    -

    6.13.7

    +

    6.14.1

    Description

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -211,4 +211,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/folders/index.html b/deps/npm/docs/public/configuring-npm/folders/index.html index 4b6eadf7737714..3e94c99b2ce678 100644 --- a/deps/npm/docs/public/configuring-npm/folders/index.html +++ b/deps/npm/docs/public/configuring-npm/folders/index.html @@ -74,7 +74,7 @@ } } }) -

    folders

    +

    folders

    Folder Structures Used by npm

    Description

    npm puts various things on your computer. That's its job.

    @@ -240,4 +240,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/install/index.html b/deps/npm/docs/public/configuring-npm/install/index.html index 598a8534777e15..2b9dee47e6dc40 100644 --- a/deps/npm/docs/public/configuring-npm/install/index.html +++ b/deps/npm/docs/public/configuring-npm/install/index.html @@ -74,7 +74,7 @@ } } }) -

    install

    +

    install

    Download and Install npm

    Description

    To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager to install Node.js and npm. We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

    @@ -123,4 +123,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/npmrc/index.html b/deps/npm/docs/public/configuring-npm/npmrc/index.html index a5c8911f547b4e..b7fed53c905956 100644 --- a/deps/npm/docs/public/configuring-npm/npmrc/index.html +++ b/deps/npm/docs/public/configuring-npm/npmrc/index.html @@ -74,7 +74,7 @@ } } }) -

    npmrc

    +

    npmrc

    The npm config files

    Description

    npm gets its config settings from the command line, environment @@ -145,4 +145,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-json/index.html b/deps/npm/docs/public/configuring-npm/package-json/index.html index ad6300d846d7f6..ef1025e327d9a7 100644 --- a/deps/npm/docs/public/configuring-npm/package-json/index.html +++ b/deps/npm/docs/public/configuring-npm/package-json/index.html @@ -74,7 +74,7 @@ } } }) -

    package.json

    +

    package.json

    Specifics of npm's package.json handling

    Description

    This document is all you need to know about what's required in your package.json @@ -198,7 +198,8 @@

    funding

    You can specify an object containing an URL that provides up-to-date -information about ways to help fund development of your package:

    +information about ways to help fund development of your package, or +a string URL, or an array of these:

    "funding": {
       "type" : "individual",
       "url" : "http://example.com/donate"
    @@ -207,11 +208,26 @@ 

    npm fund subcommand to list the funding URLs of all dependencies of their project, direct and indirect. A shortcut to visit each funding url is also available when providing the project name such as: -npm fund <projectname>.

    +npm fund <projectname> (when there are multiple URLs, the first one will be +visited)

    files

    The optional files field is an array of file patterns that describes the entries to be included when your package is installed as a @@ -697,4 +713,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html b/deps/npm/docs/public/configuring-npm/package-lock-json/index.html index 07ea625f509782..7256154fe32d40 100644 --- a/deps/npm/docs/public/configuring-npm/package-lock-json/index.html +++ b/deps/npm/docs/public/configuring-npm/package-lock-json/index.html @@ -74,7 +74,7 @@ } } }) -

    package-lock.json

    +

    package-lock.json

    A manifestation of the manifest

    Description

    package-lock.json is automatically generated for any operations where npm @@ -186,4 +186,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/package-locks/index.html b/deps/npm/docs/public/configuring-npm/package-locks/index.html index f3846d3ad01565..16fdc3eeea2c58 100644 --- a/deps/npm/docs/public/configuring-npm/package-locks/index.html +++ b/deps/npm/docs/public/configuring-npm/package-locks/index.html @@ -74,7 +74,7 @@ } } }) -

    package-locks

    +

    package-locks

    An explanation of npm lockfiles

    Description

    Conceptually, the "input" to npm install is a package.json, while its @@ -214,4 +214,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html b/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html index 1eb28bd824fa1e..1f0ac45677ee5f 100644 --- a/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html +++ b/deps/npm/docs/public/configuring-npm/shrinkwrap-json/index.html @@ -74,7 +74,7 @@ } } }) -

    npm shrinkwrap.json

    +

    npm shrinkwrap.json

    A publishable lockfile

    Description

    npm-shrinkwrap.json is a file created by npm shrinkwrap. It is identical to @@ -102,4 +102,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/index.html b/deps/npm/docs/public/index.html index da5b9e791b1708..8b66aab22a4504 100644 --- a/deps/npm/docs/public/index.html +++ b/deps/npm/docs/public/index.html @@ -128,4 +128,4 @@ } } }) -
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!

    The current stable version of npm is available on GitHub.

    To upgrade, run: npm install npm@latest -g

    \ No newline at end of file +
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
    npm cli _
    The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!

    The current stable version of npm is available on GitHub.

    To upgrade, run: npm install npm@latest -g

    \ No newline at end of file diff --git a/deps/npm/docs/public/static/d/2215187023.json b/deps/npm/docs/public/static/d/2215187023.json index 328c36542ed0de..c26e85bd6966e2 100644 --- a/deps/npm/docs/public/static/d/2215187023.json +++ b/deps/npm/docs/public/static/d/2215187023.json @@ -1 +1 @@ -{"data":{"allMarkdownRemark":{"nodes":[{"fields":{"slug":"/cli-commands/npm-adduser"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-dist-tag"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-explore"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/using-npm/semver"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/using-npm/config"},"frontmatter":{"description":"More than you probably want to know about npm configuration","section":"using-npm","title":"config"}},{"fields":{"slug":"/using-npm/developers"},"frontmatter":{"description":"Developer Guide","section":"using-npm","title":"developers"}},{"fields":{"slug":"/using-npm/disputes"},"frontmatter":{"description":"Handling Module Name Disputes","section":"using-npm","title":"disputes"}},{"fields":{"slug":"/configuring-npm/folders"},"frontmatter":{"description":"Folder Structures Used by npm","section":"configuring-npm","title":"folders"}},{"fields":{"slug":"/configuring-npm/install"},"frontmatter":{"description":"Download and install node and npm","section":"configuring-npm","title":"install"}},{"fields":{"slug":"/cli-commands/npm"},"frontmatter":{"description":"javascript package manager","section":"cli-commands","title":"npm"}},{"fields":{"slug":"/cli-commands/npm-access"},"frontmatter":{"description":"Set access level on published packages","section":"cli-commands","title":"npm-access"}},{"fields":{"slug":"/cli-commands/npm-audit"},"frontmatter":{"description":"Run a security audit","section":"cli-commands","title":"npm-audit"}},{"fields":{"slug":"/cli-commands/npm-bin"},"frontmatter":{"description":"Display npm bin folder","section":"cli-commands","title":"npm-bin"}},{"fields":{"slug":"/cli-commands/npm-bugs"},"frontmatter":{"description":"Bugs for a package in a web browser maybe","section":"cli-commands","title":"npm-bugs"}},{"fields":{"slug":"/cli-commands/npm-build"},"frontmatter":{"description":"Build a package","section":"cli-commands","title":"npm-build"}},{"fields":{"slug":"/cli-commands/npm-bundle"},"frontmatter":{"description":"REMOVED","section":"cli-commands","title":"npm-bundle"}},{"fields":{"slug":"/cli-commands/npm-cache"},"frontmatter":{"description":"Manipulates packages cache","section":"cli-commands","title":"npm-cache"}},{"fields":{"slug":"/cli-commands/npm-ci"},"frontmatter":{"description":"Install a project with a clean slate","section":"cli-commands","title":"npm-ci"}},{"fields":{"slug":"/cli-commands/npm-completion"},"frontmatter":{"description":"Tab Completion for npm","section":"cli-commands","title":"npm-completion"}},{"fields":{"slug":"/cli-commands/npm-config"},"frontmatter":{"description":"Manage the npm configuration files","section":"cli-commands","title":"npm-config"}},{"fields":{"slug":"/cli-commands/npm-dedupe"},"frontmatter":{"description":"Reduce duplication","section":"cli-commands","title":"npm-dedupe"}},{"fields":{"slug":"/cli-commands/npm-deprecate"},"frontmatter":{"description":"Deprecate a version of a package","section":"cli-commands","title":"npm-deprecate"}},{"fields":{"slug":"/cli-commands/npm-docs"},"frontmatter":{"description":"Docs for a package in a web browser maybe","section":"cli-commands","title":"npm-docs"}},{"fields":{"slug":"/cli-commands/npm-doctor"},"frontmatter":{"description":"Check your environments","section":"cli-commands","title":"npm-doctor"}},{"fields":{"slug":"/cli-commands/npm-edit"},"frontmatter":{"description":"Edit an installed package","section":"cli-commands","title":"npm-edit"}},{"fields":{"slug":"/cli-commands/npm-fund"},"frontmatter":{"description":"Retrieve funding information","section":"cli-commands","title":"npm-fund"}},{"fields":{"slug":"/cli-commands/npm-help"},"frontmatter":{"description":"Get help on npm","section":"cli-commands","title":"npm-help"}},{"fields":{"slug":"/cli-commands/npm-help-search"},"frontmatter":{"description":"Search npm help documentation","section":"cli-commands","title":"npm-help-search"}},{"fields":{"slug":"/cli-commands/npm-hook"},"frontmatter":{"description":"Manage registry hooks","section":"cli-commands","title":"npm-hook"}},{"fields":{"slug":"/cli-commands/npm-init"},"frontmatter":{"description":"create a package.json file","section":"cli-commands","title":"npm-init"}},{"fields":{"slug":"/cli-commands/npm-install"},"frontmatter":{"description":"Install a package","section":"cli-commands","title":"npm-install"}},{"fields":{"slug":"/cli-commands/npm-install-ci-test"},"frontmatter":{"description":"Install a project with a clean slate and run tests","section":"cli-commands","title":"npm-install-ci-test"}},{"fields":{"slug":"/cli-commands/npm-install-test"},"frontmatter":{"description":"Install package(s) and run tests","section":"cli-commands","title":"npm-install-test"}},{"fields":{"slug":"/cli-commands/npm-link"},"frontmatter":{"description":"Symlink a package folder","section":"cli-commands","title":"npm-link"}},{"fields":{"slug":"/cli-commands/npm-logout"},"frontmatter":{"description":"Log out of the registry","section":"cli-commands","title":"npm-logout"}},{"fields":{"slug":"/cli-commands/npm-ls"},"frontmatter":{"description":"List installed packages","section":"cli-commands","title":"npm-ls"}},{"fields":{"slug":"/cli-commands/npm-org"},"frontmatter":{"description":"Manage orgs","section":"cli-commands","title":"npm-org"}},{"fields":{"slug":"/cli-commands/npm-outdated"},"frontmatter":{"description":"Check for outdated packages","section":"cli-commands","title":"npm-outdated"}},{"fields":{"slug":"/cli-commands/npm-owner"},"frontmatter":{"description":"Manage package owners","section":"cli-commands","title":"npm-owner"}},{"fields":{"slug":"/cli-commands/npm-pack"},"frontmatter":{"description":"Create a tarball from a package","section":"cli-commands","title":"npm-pack"}},{"fields":{"slug":"/cli-commands/npm-ping"},"frontmatter":{"description":"Ping npm registry","section":"cli-commands","title":"npm-ping"}},{"fields":{"slug":"/cli-commands/npm-prefix"},"frontmatter":{"description":"Display prefix","section":"cli-commands","title":"npm-prefix"}},{"fields":{"slug":"/cli-commands/npm-profile"},"frontmatter":{"description":"Change settings on your registry profile","section":"cli-commands","title":"npm-profile"}},{"fields":{"slug":"/cli-commands/npm-prune"},"frontmatter":{"description":"Remove extraneous packages","section":"cli-commands","title":"npm-prune"}},{"fields":{"slug":"/cli-commands/npm-publish"},"frontmatter":{"description":"Publish a package","section":"cli-commands","title":"npm-publish"}},{"fields":{"slug":"/cli-commands/npm-rebuild"},"frontmatter":{"description":"Rebuild a package","section":"cli-commands","title":"npm-rebuild"}},{"fields":{"slug":"/cli-commands/npm-repo"},"frontmatter":{"description":"Open package repository page in the browser","section":"cli-commands","title":"npm-repo"}},{"fields":{"slug":"/cli-commands/npm-restart"},"frontmatter":{"description":"Restart a package","section":"cli-commands","title":"npm-restart"}},{"fields":{"slug":"/cli-commands/npm-root"},"frontmatter":{"description":"Display npm root","section":"cli-commands","title":"npm-root"}},{"fields":{"slug":"/cli-commands/npm-run-script"},"frontmatter":{"description":"Run arbitrary package scripts","section":"cli-commands","title":"npm-run-script"}},{"fields":{"slug":"/cli-commands/npm-search"},"frontmatter":{"description":"Search for packages","section":"cli-commands","title":"npm-search"}},{"fields":{"slug":"/cli-commands/npm-shrinkwrap"},"frontmatter":{"description":"Lock down dependency versions for publication","section":"cli-commands","title":"npm-shrinkwrap"}},{"fields":{"slug":"/cli-commands/npm-star"},"frontmatter":{"description":"Mark your favorite packages","section":"cli-commands","title":"npm-star"}},{"fields":{"slug":"/cli-commands/npm-stars"},"frontmatter":{"description":"View packages marked as favorites","section":"cli-commands","title":"npm-stars"}},{"fields":{"slug":"/cli-commands/npm-start"},"frontmatter":{"description":"Start a package","section":"cli-commands","title":"npm-start"}},{"fields":{"slug":"/cli-commands/npm-stop"},"frontmatter":{"description":"Stop a package","section":"cli-commands","title":"npm-stop"}},{"fields":{"slug":"/cli-commands/npm-team"},"frontmatter":{"description":"Manage organization teams and team memberships","section":"cli-commands","title":"npm-team"}},{"fields":{"slug":"/cli-commands/npm-test"},"frontmatter":{"description":"Test a package","section":"cli-commands","title":"npm-test"}},{"fields":{"slug":"/cli-commands/npm-token"},"frontmatter":{"description":"Manage your authentication tokens","section":"cli-commands","title":"npm-token"}},{"fields":{"slug":"/cli-commands/npm-uninstall"},"frontmatter":{"description":"Remove a package","section":"cli-commands","title":"npm-uninstall"}},{"fields":{"slug":"/cli-commands/npm-unpublish"},"frontmatter":{"description":"Remove a package from the registry","section":"cli-commands","title":"npm-unpublish"}},{"fields":{"slug":"/cli-commands/npm-update"},"frontmatter":{"description":"Update a package","section":"cli-commands","title":"npm-update"}},{"fields":{"slug":"/cli-commands/npm-version"},"frontmatter":{"description":"Bump a package version","section":"cli-commands","title":"npm-version"}},{"fields":{"slug":"/cli-commands/npm-view"},"frontmatter":{"description":"View registry info","section":"cli-commands","title":"npm-view"}},{"fields":{"slug":"/cli-commands/npm-whoami"},"frontmatter":{"description":"Display npm username","section":"cli-commands","title":"npm-whoami"}},{"fields":{"slug":"/configuring-npm/npmrc"},"frontmatter":{"description":"The npm config files","section":"configuring-npm","title":"npmrc"}},{"fields":{"slug":"/using-npm/orgs"},"frontmatter":{"description":"Working with Teams & Orgs","section":"using-npm","title":"orgs"}},{"fields":{"slug":"/configuring-npm/package-lock-json"},"frontmatter":{"description":"A manifestation of the manifest","section":"configuring-npm","title":"package-lock.json"}},{"fields":{"slug":"/configuring-npm/package-locks"},"frontmatter":{"description":"An explanation of npm lockfiles","section":"configuring-npm","title":"package-locks"}},{"fields":{"slug":"/configuring-npm/package-json"},"frontmatter":{"description":"Specifics of npm's package.json handling","section":"configuring-npm","title":"package.json"}},{"fields":{"slug":"/using-npm/registry"},"frontmatter":{"description":"The JavaScript Package Registry","section":"using-npm","title":"registry"}},{"fields":{"slug":"/using-npm/removal"},"frontmatter":{"description":"Cleaning the Slate","section":"using-npm","title":"removal"}},{"fields":{"slug":"/using-npm/scope"},"frontmatter":{"description":"Scoped packages","section":"using-npm","title":"scope"}},{"fields":{"slug":"/using-npm/scripts"},"frontmatter":{"description":"How npm handles the \"scripts\" field","section":"using-npm","title":"scripts"}},{"fields":{"slug":"/configuring-npm/shrinkwrap-json"},"frontmatter":{"description":"A publishable lockfile","section":"configuring-npm","title":"shrinkwrap.json"}}]}}} \ No newline at end of file +{"data":{"allMarkdownRemark":{"nodes":[{"fields":{"slug":"/using-npm/semver"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-adduser"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-dist-tag"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/cli-commands/npm-explore"},"frontmatter":{"description":null,"section":null,"title":""}},{"fields":{"slug":"/using-npm/config"},"frontmatter":{"description":"More than you probably want to know about npm configuration","section":"using-npm","title":"config"}},{"fields":{"slug":"/using-npm/developers"},"frontmatter":{"description":"Developer Guide","section":"using-npm","title":"developers"}},{"fields":{"slug":"/using-npm/disputes"},"frontmatter":{"description":"Handling Module Name Disputes","section":"using-npm","title":"disputes"}},{"fields":{"slug":"/configuring-npm/folders"},"frontmatter":{"description":"Folder Structures Used by npm","section":"configuring-npm","title":"folders"}},{"fields":{"slug":"/configuring-npm/install"},"frontmatter":{"description":"Download and install node and npm","section":"configuring-npm","title":"install"}},{"fields":{"slug":"/cli-commands/npm"},"frontmatter":{"description":"javascript package manager","section":"cli-commands","title":"npm"}},{"fields":{"slug":"/cli-commands/npm-access"},"frontmatter":{"description":"Set access level on published packages","section":"cli-commands","title":"npm-access"}},{"fields":{"slug":"/cli-commands/npm-audit"},"frontmatter":{"description":"Run a security audit","section":"cli-commands","title":"npm-audit"}},{"fields":{"slug":"/cli-commands/npm-bin"},"frontmatter":{"description":"Display npm bin folder","section":"cli-commands","title":"npm-bin"}},{"fields":{"slug":"/cli-commands/npm-bugs"},"frontmatter":{"description":"Bugs for a package in a web browser maybe","section":"cli-commands","title":"npm-bugs"}},{"fields":{"slug":"/cli-commands/npm-build"},"frontmatter":{"description":"Build a package","section":"cli-commands","title":"npm-build"}},{"fields":{"slug":"/cli-commands/npm-bundle"},"frontmatter":{"description":"REMOVED","section":"cli-commands","title":"npm-bundle"}},{"fields":{"slug":"/cli-commands/npm-cache"},"frontmatter":{"description":"Manipulates packages cache","section":"cli-commands","title":"npm-cache"}},{"fields":{"slug":"/cli-commands/npm-ci"},"frontmatter":{"description":"Install a project with a clean slate","section":"cli-commands","title":"npm-ci"}},{"fields":{"slug":"/cli-commands/npm-completion"},"frontmatter":{"description":"Tab Completion for npm","section":"cli-commands","title":"npm-completion"}},{"fields":{"slug":"/cli-commands/npm-config"},"frontmatter":{"description":"Manage the npm configuration files","section":"cli-commands","title":"npm-config"}},{"fields":{"slug":"/cli-commands/npm-dedupe"},"frontmatter":{"description":"Reduce duplication","section":"cli-commands","title":"npm-dedupe"}},{"fields":{"slug":"/cli-commands/npm-deprecate"},"frontmatter":{"description":"Deprecate a version of a package","section":"cli-commands","title":"npm-deprecate"}},{"fields":{"slug":"/cli-commands/npm-docs"},"frontmatter":{"description":"Docs for a package in a web browser maybe","section":"cli-commands","title":"npm-docs"}},{"fields":{"slug":"/cli-commands/npm-doctor"},"frontmatter":{"description":"Check your environments","section":"cli-commands","title":"npm-doctor"}},{"fields":{"slug":"/cli-commands/npm-edit"},"frontmatter":{"description":"Edit an installed package","section":"cli-commands","title":"npm-edit"}},{"fields":{"slug":"/cli-commands/npm-fund"},"frontmatter":{"description":"Retrieve funding information","section":"cli-commands","title":"npm-fund"}},{"fields":{"slug":"/cli-commands/npm-help"},"frontmatter":{"description":"Get help on npm","section":"cli-commands","title":"npm-help"}},{"fields":{"slug":"/cli-commands/npm-help-search"},"frontmatter":{"description":"Search npm help documentation","section":"cli-commands","title":"npm-help-search"}},{"fields":{"slug":"/cli-commands/npm-hook"},"frontmatter":{"description":"Manage registry hooks","section":"cli-commands","title":"npm-hook"}},{"fields":{"slug":"/cli-commands/npm-init"},"frontmatter":{"description":"create a package.json file","section":"cli-commands","title":"npm-init"}},{"fields":{"slug":"/cli-commands/npm-install"},"frontmatter":{"description":"Install a package","section":"cli-commands","title":"npm-install"}},{"fields":{"slug":"/cli-commands/npm-install-ci-test"},"frontmatter":{"description":"Install a project with a clean slate and run tests","section":"cli-commands","title":"npm-install-ci-test"}},{"fields":{"slug":"/cli-commands/npm-install-test"},"frontmatter":{"description":"Install package(s) and run tests","section":"cli-commands","title":"npm-install-test"}},{"fields":{"slug":"/cli-commands/npm-link"},"frontmatter":{"description":"Symlink a package folder","section":"cli-commands","title":"npm-link"}},{"fields":{"slug":"/cli-commands/npm-logout"},"frontmatter":{"description":"Log out of the registry","section":"cli-commands","title":"npm-logout"}},{"fields":{"slug":"/cli-commands/npm-ls"},"frontmatter":{"description":"List installed packages","section":"cli-commands","title":"npm-ls"}},{"fields":{"slug":"/cli-commands/npm-org"},"frontmatter":{"description":"Manage orgs","section":"cli-commands","title":"npm-org"}},{"fields":{"slug":"/cli-commands/npm-outdated"},"frontmatter":{"description":"Check for outdated packages","section":"cli-commands","title":"npm-outdated"}},{"fields":{"slug":"/cli-commands/npm-owner"},"frontmatter":{"description":"Manage package owners","section":"cli-commands","title":"npm-owner"}},{"fields":{"slug":"/cli-commands/npm-pack"},"frontmatter":{"description":"Create a tarball from a package","section":"cli-commands","title":"npm-pack"}},{"fields":{"slug":"/cli-commands/npm-ping"},"frontmatter":{"description":"Ping npm registry","section":"cli-commands","title":"npm-ping"}},{"fields":{"slug":"/cli-commands/npm-prefix"},"frontmatter":{"description":"Display prefix","section":"cli-commands","title":"npm-prefix"}},{"fields":{"slug":"/cli-commands/npm-profile"},"frontmatter":{"description":"Change settings on your registry profile","section":"cli-commands","title":"npm-profile"}},{"fields":{"slug":"/cli-commands/npm-prune"},"frontmatter":{"description":"Remove extraneous packages","section":"cli-commands","title":"npm-prune"}},{"fields":{"slug":"/cli-commands/npm-publish"},"frontmatter":{"description":"Publish a package","section":"cli-commands","title":"npm-publish"}},{"fields":{"slug":"/cli-commands/npm-rebuild"},"frontmatter":{"description":"Rebuild a package","section":"cli-commands","title":"npm-rebuild"}},{"fields":{"slug":"/cli-commands/npm-repo"},"frontmatter":{"description":"Open package repository page in the browser","section":"cli-commands","title":"npm-repo"}},{"fields":{"slug":"/cli-commands/npm-restart"},"frontmatter":{"description":"Restart a package","section":"cli-commands","title":"npm-restart"}},{"fields":{"slug":"/cli-commands/npm-root"},"frontmatter":{"description":"Display npm root","section":"cli-commands","title":"npm-root"}},{"fields":{"slug":"/cli-commands/npm-run-script"},"frontmatter":{"description":"Run arbitrary package scripts","section":"cli-commands","title":"npm-run-script"}},{"fields":{"slug":"/cli-commands/npm-search"},"frontmatter":{"description":"Search for packages","section":"cli-commands","title":"npm-search"}},{"fields":{"slug":"/cli-commands/npm-shrinkwrap"},"frontmatter":{"description":"Lock down dependency versions for publication","section":"cli-commands","title":"npm-shrinkwrap"}},{"fields":{"slug":"/cli-commands/npm-star"},"frontmatter":{"description":"Mark your favorite packages","section":"cli-commands","title":"npm-star"}},{"fields":{"slug":"/cli-commands/npm-stars"},"frontmatter":{"description":"View packages marked as favorites","section":"cli-commands","title":"npm-stars"}},{"fields":{"slug":"/cli-commands/npm-start"},"frontmatter":{"description":"Start a package","section":"cli-commands","title":"npm-start"}},{"fields":{"slug":"/cli-commands/npm-stop"},"frontmatter":{"description":"Stop a package","section":"cli-commands","title":"npm-stop"}},{"fields":{"slug":"/cli-commands/npm-team"},"frontmatter":{"description":"Manage organization teams and team memberships","section":"cli-commands","title":"npm-team"}},{"fields":{"slug":"/cli-commands/npm-test"},"frontmatter":{"description":"Test a package","section":"cli-commands","title":"npm-test"}},{"fields":{"slug":"/cli-commands/npm-token"},"frontmatter":{"description":"Manage your authentication tokens","section":"cli-commands","title":"npm-token"}},{"fields":{"slug":"/cli-commands/npm-uninstall"},"frontmatter":{"description":"Remove a package","section":"cli-commands","title":"npm-uninstall"}},{"fields":{"slug":"/cli-commands/npm-unpublish"},"frontmatter":{"description":"Remove a package from the registry","section":"cli-commands","title":"npm-unpublish"}},{"fields":{"slug":"/cli-commands/npm-update"},"frontmatter":{"description":"Update a package","section":"cli-commands","title":"npm-update"}},{"fields":{"slug":"/cli-commands/npm-version"},"frontmatter":{"description":"Bump a package version","section":"cli-commands","title":"npm-version"}},{"fields":{"slug":"/cli-commands/npm-view"},"frontmatter":{"description":"View registry info","section":"cli-commands","title":"npm-view"}},{"fields":{"slug":"/cli-commands/npm-whoami"},"frontmatter":{"description":"Display npm username","section":"cli-commands","title":"npm-whoami"}},{"fields":{"slug":"/configuring-npm/npmrc"},"frontmatter":{"description":"The npm config files","section":"configuring-npm","title":"npmrc"}},{"fields":{"slug":"/using-npm/orgs"},"frontmatter":{"description":"Working with Teams & Orgs","section":"using-npm","title":"orgs"}},{"fields":{"slug":"/configuring-npm/package-lock-json"},"frontmatter":{"description":"A manifestation of the manifest","section":"configuring-npm","title":"package-lock.json"}},{"fields":{"slug":"/configuring-npm/package-locks"},"frontmatter":{"description":"An explanation of npm lockfiles","section":"configuring-npm","title":"package-locks"}},{"fields":{"slug":"/configuring-npm/package-json"},"frontmatter":{"description":"Specifics of npm's package.json handling","section":"configuring-npm","title":"package.json"}},{"fields":{"slug":"/using-npm/registry"},"frontmatter":{"description":"The JavaScript Package Registry","section":"using-npm","title":"registry"}},{"fields":{"slug":"/using-npm/removal"},"frontmatter":{"description":"Cleaning the Slate","section":"using-npm","title":"removal"}},{"fields":{"slug":"/using-npm/scope"},"frontmatter":{"description":"Scoped packages","section":"using-npm","title":"scope"}},{"fields":{"slug":"/using-npm/scripts"},"frontmatter":{"description":"How npm handles the \"scripts\" field","section":"using-npm","title":"scripts"}},{"fields":{"slug":"/configuring-npm/shrinkwrap-json"},"frontmatter":{"description":"A publishable lockfile","section":"configuring-npm","title":"shrinkwrap.json"}}]}}} \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/config/index.html b/deps/npm/docs/public/using-npm/config/index.html index f84138225e4935..14b2f75498ec67 100644 --- a/deps/npm/docs/public/using-npm/config/index.html +++ b/deps/npm/docs/public/using-npm/config/index.html @@ -74,7 +74,7 @@ } } }) -

    config

    +

    config

    More than you probably want to know about npm configuration

    Description

    npm gets its configuration values from the following sources, sorted by priority:

    @@ -1161,4 +1161,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/developers/index.html b/deps/npm/docs/public/using-npm/developers/index.html index 5b091a729ac996..98b491cb57a762 100644 --- a/deps/npm/docs/public/using-npm/developers/index.html +++ b/deps/npm/docs/public/using-npm/developers/index.html @@ -74,7 +74,7 @@ } } }) -

    developers

    +

    developers

    Developer Guide

    Description

    So, you've decided to use npm to develop (and maybe publish/deploy) @@ -259,4 +259,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/disputes/index.html b/deps/npm/docs/public/using-npm/disputes/index.html index 8611bde28cae41..19011ba37b70dc 100644 --- a/deps/npm/docs/public/using-npm/disputes/index.html +++ b/deps/npm/docs/public/using-npm/disputes/index.html @@ -74,7 +74,7 @@ } } }) -

    disputes

    +

    disputes

    Handling Module Name Disputes

    This document describes the steps that you should take to resolve module name disputes with other npm publishers. It also describes special steps you should @@ -163,7 +163,7 @@

    If you see bad behavior like this, please report it to abuse@npmjs.com right away. You are never expected to resolve abusive behavior on your own. We are here to help.

    -

    Trademarkss

    +

    Trademarks

    If you think another npm publisher is infringing your trademark, such as by using a confusingly similar package name, email abuse@npmjs.com with a link to the package or user account on https://www.npmjs.com/. @@ -192,4 +192,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/orgs/index.html b/deps/npm/docs/public/using-npm/orgs/index.html index efd4f3c09848de..d3583790ce3568 100644 --- a/deps/npm/docs/public/using-npm/orgs/index.html +++ b/deps/npm/docs/public/using-npm/orgs/index.html @@ -74,7 +74,7 @@ } } }) -

    orgs

    +

    orgs

    Working with Teams & Orgs

    Description

    There are three levels of org users:

    @@ -144,4 +144,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/registry/index.html b/deps/npm/docs/public/using-npm/registry/index.html index 4fa0e05d14c7de..91e28bb9514e46 100644 --- a/deps/npm/docs/public/using-npm/registry/index.html +++ b/deps/npm/docs/public/using-npm/registry/index.html @@ -74,7 +74,7 @@ } } }) -

    registry

    +

    registry

    The JavaScript Package Registry

    Description

    To resolve packages by name and version, npm talks to a registry website @@ -156,4 +156,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/removal/index.html b/deps/npm/docs/public/using-npm/removal/index.html index 2c73f0c54d03c2..d537016410ea10 100644 --- a/deps/npm/docs/public/using-npm/removal/index.html +++ b/deps/npm/docs/public/using-npm/removal/index.html @@ -74,7 +74,7 @@ } } }) -

    removal

    +

    removal

    Cleaning the Slate

    Synopsis

    So sad to see you go.

    @@ -116,4 +116,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scope/index.html b/deps/npm/docs/public/using-npm/scope/index.html index 8c7b6d75a3f49b..1fcfa14853a6e3 100644 --- a/deps/npm/docs/public/using-npm/scope/index.html +++ b/deps/npm/docs/public/using-npm/scope/index.html @@ -74,7 +74,7 @@ } } }) -

    scope

    +

    scope

    Scoped packages

    Description

    All npm packages have a name. Some package names also have a scope. A scope @@ -159,4 +159,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/scripts/index.html b/deps/npm/docs/public/using-npm/scripts/index.html index 954cc85258cfa4..8e10a99e532e68 100644 --- a/deps/npm/docs/public/using-npm/scripts/index.html +++ b/deps/npm/docs/public/using-npm/scripts/index.html @@ -74,87 +74,61 @@ } } }) -

    scripts

    +

    scripts

    How npm handles the "scripts" field

    Description

    -

    npm supports the "scripts" property of the package.json file, for the -following scripts:

    +

    The "scripts" property of of your package.json file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running npm run-script <stage> or npm run <stage> for short. Pre and post commands with matching names will be run for those as well (e.g. premyscript, myscript, postmyscript). Scripts from dependencies can be run with npm explore <pkg> -- npm run <stage>.

    +

    Pre & Post Scripts

    +

    To create "pre" or "post" scripts for any scripts defined in the "scripts" section of the package.json, simply create another script with a matching name and add "pre" or "post" to the beginning of them.

    +
    {
    +  "scripts": {
    +    "precompress": "{{ executes BEFORE the `compress` script }}",
    +    "compress": "{{ run command to compress files }}",
    +    "postcompress": "{{ executes AFTER `compress` script }}"
    +  }
    +}
    +

    Life Cycle Scripts

    +

    There are some special life cycle scripts that happen only in certain situations. These scripts happen in addtion to the "pre" and "post" script.

    +
      +
    • prepare, prepublish, prepublishOnly, prepack, postpack
    • +
    +

    prepare (since npm@4.0.0)

    +
      +
    • Runs BEFORE the package is packed
    • +
    • Runs BEFORE the package is published
    • +
    • Runs on local npm install without any arguments
    • +
    • Run AFTER prepublish, but BEFORE prepublishOnly
    • +
    • NOTE: If a package being installed through git contains a prepare script, its dependencies and devDependencies will be installed, and the prepare script will be run, before the package is packaged and installed.
    • +
    +

    prepublish (DEPRECATED)

    +
      +
    • Same as prepare
    • +
    +

    prepublishOnly

    +
      +
    • Runs BEFORE the package is prepared and packed, ONLY on npm publish.
    • +
    +

    prepack

    +
      +
    • Runs BEFORE a tarball is packed (on "npm pack", "npm publish", and when installing a git dependencies).
    • +
    • NOTE: "npm run pack" is NOT the same as "npm pack". "npm run pack" is an arbitrary user defined script name, where as, "npm pack" is a CLI defined command.
    • +
    +

    postpack

      -
    • prepublish (as of npm@5, prepublish is deprecated. Use prepare for build steps and prepublishOnly for upload-only.): -Run BEFORE the package is packed and published, as well as on local npm -install without any arguments. (See below)
    • -
    • prepare: -Run both BEFORE the package is packed and published, on local npm -install without any arguments, and when installing git dependencies (See -below). This is run AFTER prepublish, but BEFORE prepublishOnly.
    • -
    • prepublishOnly: -Run BEFORE the package is prepared and packed, ONLY on npm publish. (See -below.)
    • -
    • prepack: -run BEFORE a tarball is packed (on npm pack, npm publish, and when -installing git dependencies)
    • -
    • postpack: -Run AFTER the tarball has been generated and moved to its final destination.
    • -
    • publish, postpublish: -Run AFTER the package is published.
    • -
    • preinstall: -Run BEFORE the package is installed
    • -
    • install, postinstall: -Run AFTER the package is installed.
    • -
    • preuninstall, uninstall: -Run BEFORE the package is uninstalled.
    • -
    • postuninstall: -Run AFTER the package is uninstalled.
    • -
    • preversion: -Run BEFORE bumping the package version.
    • -
    • version: -Run AFTER bumping the package version, but BEFORE commit.
    • -
    • postversion: -Run AFTER bumping the package version, and AFTER commit.
    • -
    • pretest, test, posttest: -Run by the npm test command.
    • -
    • prestop, stop, poststop: -Run by the npm stop command.
    • -
    • prestart, start, poststart: -Run by the npm start command.
    • -
    • prerestart, restart, postrestart: -Run by the npm restart command. Note: npm restart will run the -stop and start scripts if no restart script is provided.
    • -
    • preshrinkwrap, shrinkwrap, postshrinkwrap: -Run by the npm shrinkwrap command.
    • +
    • Runs AFTER the tarball has been generated and moved to its final destination.
    -

    Additionally, arbitrary scripts can be executed by running npm -run-script <stage>. Pre and post commands with matching -names will be run for those as well (e.g. premyscript, myscript, -postmyscript). Scripts from dependencies can be run with -npm explore <pkg> -- npm run <stage>.

    -

    Prepublish and Prepare

    -

    Deprecation Note

    -

    Since npm@1.1.71, the npm CLI has run the prepublish script for both npm -publish and npm install, because it's a convenient way to prepare a package -for use (some common use cases are described in the section below). It has -also turned out to be, in practice, very -confusing. As of npm@4.0.0, a new -event has been introduced, prepare, that preserves this existing behavior. A -new event, prepublishOnly has been added as a transitional strategy to -allow users to avoid the confusing behavior of existing npm versions and only -run on npm publish (for instance, running the tests one last time to ensure -they're in good shape).

    -

    See https://github.com/npm/npm/issues/10074 for a much lengthier -justification, with further reading, for this change.

    -

    Use Cases

    -

    If you need to perform operations on your package before it is used, in a way -that is not dependent on the operating system or architecture of the -target system, use a prepublish script. This includes -tasks such as:

    +

    Prepare and Prepublish

    +

    Deprecation Note: prepublish

    +

    Since npm@1.1.71, the npm CLI has run the prepublish script for both npm publish and npm install, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, very confusing. As of npm@4.0.0, a new event has been introduced, prepare, that preserves this existing behavior. A new event, prepublishOnly has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on npm publish (for instance, running the tests one last time to ensure they're in good shape).

    +

    See https://github.com/npm/npm/issues/10074 for a much lengthier justification, with further reading, for this change.

    +

    Use Cases

    +

    If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a prepublish script. This includes tasks such as:

    • Compiling CoffeeScript source code into JavaScript.
    • Creating minified versions of JavaScript source code.
    • Fetching remote resources that your package will use.
    -

    The advantage of doing these things at prepublish time is that they can be done once, in a -single place, thus reducing complexity and variability. -Additionally, this means that:

    +

    The advantage of doing these things at prepublish time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:

    +

    Life Cycle Operation Order

    +

    npm publish

    +
      +
    • prepublishOnly
    • +
    • prepare
    • +
    • prepublish
    • +
    • publish
    • +
    • postpublish
    • +
    +

    npm pack

    +
      +
    • prepack
    • +
    • postpack
    • +
    +

    npm install

    +
      +
    • preinstall
    • +
    • install
    • +
    • postinstall
    • +
    +

    Also triggers

    +
      +
    • prepublish (when on local)
    • +
    • prepare (when on local)
    • +
    +

    npm start

    +

    npm run start has an npm start shorthand.

    +
      +
    • prestart
    • +
    • start
    • +
    • poststart
    • +

    Default Values

    npm will default some script values based on package contents.

    @@ -303,4 +309,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/docs/public/using-npm/semver/index.html b/deps/npm/docs/public/using-npm/semver/index.html index da4134247cdfa2..bd26f5f4d4ce09 100644 --- a/deps/npm/docs/public/using-npm/semver/index.html +++ b/deps/npm/docs/public/using-npm/semver/index.html @@ -74,7 +74,7 @@ } } }) -

    semver(7) -- The semantic versioner for npm

    +

    semver(7) -- The semantic versioner for npm

    Install

    npm install --save semver

    Usage

    @@ -435,4 +435,4 @@

    \ No newline at end of file +
    \ No newline at end of file diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js index 6657f4b0717a1f..e850c132eb24b2 100644 --- a/deps/npm/lib/access.js +++ b/deps/npm/lib/access.js @@ -112,7 +112,7 @@ access.grant = ([perms, scopeteam, pkg], opts) => { } return modifyPackage(pkg, opts, (pkgName, opts) => { return libaccess.grant(pkgName, scopeteam, perms, opts) - }) + }, false) }) } diff --git a/deps/npm/lib/fund.js b/deps/npm/lib/fund.js index 00954c844d7981..e605ea8c3fd039 100644 --- a/deps/npm/lib/fund.js +++ b/deps/npm/lib/fund.js @@ -14,13 +14,14 @@ const readShrinkwrap = require('./install/read-shrinkwrap.js') const mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') const output = require('./utils/output.js') const openUrl = require('./utils/open-url.js') -const { getFundingInfo, retrieveFunding, validFundingUrl } = require('./utils/funding.js') +const { getFundingInfo, retrieveFunding, validFundingField, flatCacheSymbol } = require('./utils/funding.js') const FundConfig = figgyPudding({ browser: {}, // used by ./utils/open-url global: {}, json: {}, - unicode: {} + unicode: {}, + which: {} }) module.exports = fundCmd @@ -29,7 +30,7 @@ const usage = require('./utils/usage') fundCmd.usage = usage( 'fund', 'npm fund [--json]', - 'npm fund [--browser] [[<@scope>/]' + 'npm fund [--browser] [[<@scope>/] [--which=]' ) fundCmd.completion = function (opts, cb) { @@ -52,96 +53,52 @@ function printJSON (fundingInfo) { // level possible, in that process they also carry their dependencies along // with them, moving those up in the visual tree function printHuman (fundingInfo, opts) { - // mapping logic that keeps track of seen items in order to be able - // to push all other items from the same type/url in the same place - const seen = new Map() + const flatCache = fundingInfo[flatCacheSymbol] - function seenKey ({ type, url } = {}) { - return url ? String(type) + String(url) : null - } - - function setStackedItem (funding, result) { - const key = seenKey(funding) - if (key && !seen.has(key)) seen.set(key, result) - } + const { name, version } = fundingInfo + const printableVersion = version ? `@${version}` : '' - function retrieveStackedItem (funding) { - const key = seenKey(funding) - if (key && seen.has(key)) return seen.get(key) - } + const items = Object.keys(flatCache).map((url) => { + const deps = flatCache[url] - // --- - - const getFundingItems = (fundingItems) => - Object.keys(fundingItems || {}).map((fundingItemName) => { - // first-level loop, prepare the pretty-printed formatted data - const fundingItem = fundingItems[fundingItemName] - const { version, funding } = fundingItem - const { type, url } = funding || {} + const packages = deps.map((dep) => { + const { name, version } = dep const printableVersion = version ? `@${version}` : '' - const printableType = type && { label: `type: ${funding.type}` } - const printableUrl = url && { label: `url: ${funding.url}` } - const result = { - fundingItem, - label: fundingItemName + printableVersion, - nodes: [] - } - - if (printableType) { - result.nodes.push(printableType) - } - - if (printableUrl) { - result.nodes.push(printableUrl) - } - - setStackedItem(funding, result) - - return result - }).reduce((res, result) => { - // recurse and exclude nodes that are going to be stacked together - const { fundingItem } = result - const { dependencies, funding } = fundingItem - const items = getFundingItems(dependencies) - const stackedResult = retrieveStackedItem(funding) - items.forEach(i => result.nodes.push(i)) - - if (stackedResult && stackedResult !== result) { - stackedResult.label += `, ${result.label}` - items.forEach(i => stackedResult.nodes.push(i)) - return res - } - - res.push(result) - - return res - }, []) - - const [ result ] = getFundingItems({ - [fundingInfo.name]: { - dependencies: fundingInfo.dependencies, - funding: fundingInfo.funding, - version: fundingInfo.version + return `${name}${printableVersion}` + }) + + return { + label: url, + nodes: [packages.join(', ')] } }) - return archy(result, '', { unicode: opts.unicode }) + return archy({ label: `${name}${printableVersion}`, nodes: items }, '', { unicode: opts.unicode }) } -function openFundingUrl (packageName, cb) { +function openFundingUrl (packageName, fundingSourceNumber, cb) { function getUrlAndOpen (packageMetadata) { const { funding } = packageMetadata - const { type, url } = retrieveFunding(funding) || {} - const noFundingError = - new Error(`No funding method available for: ${packageName}`) - noFundingError.code = 'ENOFUND' - const typePrefix = type ? `${type} funding` : 'Funding' - const msg = `${typePrefix} available at the following URL` - - if (validFundingUrl(funding)) { + const validSources = [].concat(retrieveFunding(funding)).filter(validFundingField) + + if (validSources.length === 1 || (fundingSourceNumber > 0 && fundingSourceNumber <= validSources.length)) { + const { type, url } = validSources[fundingSourceNumber ? fundingSourceNumber - 1 : 0] + const typePrefix = type ? `${type} funding` : 'Funding' + const msg = `${typePrefix} available at the following URL` openUrl(url, msg, cb) + } else if (!(fundingSourceNumber >= 1)) { + validSources.forEach(({ type, url }, i) => { + const typePrefix = type ? `${type} funding` : 'Funding' + const msg = `${typePrefix} available at the following URL` + console.log(`${i + 1}: ${msg}: ${url}`) + }) + console.log('Run `npm fund [<@scope>/] --which=1`, for example, to open the first funding URL listed in that package') + cb() } else { + const noFundingError = new Error(`No valid funding method available for: ${packageName}`) + noFundingError.code = 'ENOFUND' + throw noFundingError } } @@ -161,15 +118,24 @@ function fundCmd (args, cb) { const opts = FundConfig(npmConfig()) const dir = path.resolve(npm.dir, '..') const packageName = args[0] + const numberArg = opts.which + + const fundingSourceNumber = numberArg && parseInt(numberArg, 10) + + if (numberArg !== undefined && (String(fundingSourceNumber) !== numberArg || fundingSourceNumber < 1)) { + const err = new Error('`npm fund [<@scope>/] [--which=fundingSourceNumber]` must be given a positive integer') + err.code = 'EFUNDNUMBER' + throw err + } if (opts.global) { - const err = new Error('`npm fund` does not support globals') + const err = new Error('`npm fund` does not support global packages') err.code = 'EFUNDGLOBAL' throw err } if (packageName) { - openFundingUrl(packageName, cb) + openFundingUrl(packageName, fundingSourceNumber, cb) return } diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index 39e0035c272881..3e6f176ef8206b 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -36,7 +36,7 @@ process.on('timing', function (name, value) { process.on('exit', function (code) { process.emit('timeEnd', 'npm') log.disableProgress() - if (npm.config.loaded && npm.config.get('timing')) { + if (npm.config && npm.config.loaded && npm.config.get('timing')) { try { timings.logfile = getLogFile() cacheFile.append('_timing.json', JSON.stringify(timings) + '\n') @@ -64,7 +64,7 @@ process.on('exit', function (code) { log.verbose('code', code) } } - if (npm.config.loaded && npm.config.get('timing') && !wroteLogFile) writeLogFile() + if (npm.config && npm.config.loaded && npm.config.get('timing') && !wroteLogFile) writeLogFile() if (wroteLogFile) { // just a line break if (log.levels[log.level] <= log.levels.error) console.error('') @@ -79,7 +79,7 @@ process.on('exit', function (code) { wroteLogFile = false } - var doExit = npm.config.loaded && npm.config.get('_exit') + var doExit = npm.config && npm.config.loaded && npm.config.get('_exit') if (doExit) { // actually exit. if (exitCode === 0 && !itWorked) { @@ -94,7 +94,7 @@ process.on('exit', function (code) { function exit (code, noLog) { exitCode = exitCode || process.exitCode || code - var doExit = npm.config.loaded ? npm.config.get('_exit') : true + var doExit = npm.config && npm.config.loaded ? npm.config.get('_exit') : true log.verbose('exit', [code, doExit]) if (log.level === 'silent') noLog = true diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js index 12f304d1e894ac..3faa78f3089146 100644 --- a/deps/npm/lib/utils/error-message.js +++ b/deps/npm/lib/utils/error-message.js @@ -35,9 +35,9 @@ function errorMessage (er) { case 'EACCES': case 'EPERM': const isCachePath = typeof er.path === 'string' && - er.path.startsWith(npm.config.get('cache')) + npm.config && er.path.startsWith(npm.config.get('cache')) const isCacheDest = typeof er.dest === 'string' && - er.dest.startsWith(npm.config.get('cache')) + npm.config && er.dest.startsWith(npm.config.get('cache')) const isWindows = process.platform === 'win32' diff --git a/deps/npm/lib/utils/funding.js b/deps/npm/lib/utils/funding.js index c3d06b10899638..5375639109ee2a 100644 --- a/deps/npm/lib/utils/funding.js +++ b/deps/npm/lib/utils/funding.js @@ -4,22 +4,31 @@ const URL = require('url').URL exports.getFundingInfo = getFundingInfo exports.retrieveFunding = retrieveFunding -exports.validFundingUrl = validFundingUrl +exports.validFundingField = validFundingField -// supports both object funding and string shorthand +const flatCacheSymbol = Symbol('npm flat cache') +exports.flatCacheSymbol = flatCacheSymbol + +// supports object funding and string shorthand, or an array of these +// if original was an array, returns an array; else returns the lone item function retrieveFunding (funding) { - return typeof funding === 'string' - ? { - url: funding - } - : funding + const sources = [].concat(funding || []).map(item => ( + typeof item === 'string' + ? { url: item } + : item + )) + return Array.isArray(funding) ? sources : sources[0] } // Is the value of a `funding` property of a `package.json` // a valid type+url for `npm fund` to display? -function validFundingUrl (funding) { +function validFundingField (funding) { if (!funding) return false + if (Array.isArray(funding)) { + return funding.every(f => !Array.isArray(f) && validFundingField(f)) + } + try { var parsed = new URL(funding.url || funding) } catch (error) { @@ -34,11 +43,13 @@ function validFundingUrl (funding) { return Boolean(parsed.host) } +const empty = () => Object.create(null) + function getFundingInfo (idealTree, opts) { - let length = 0 + let packageWithFundingCount = 0 + const flat = empty() const seen = new Set() const { countOnly } = opts || {} - const empty = () => Object.create(null) const _trailingDependencies = Symbol('trailingDependencies') function tracked (name, version) { @@ -70,52 +81,70 @@ function getFundingInfo (idealTree, opts) { ) } + function addToFlatCache (funding, dep) { + [].concat(funding || []).forEach((f) => { + const key = f.url + if (!Array.isArray(flat[key])) { + flat[key] = [] + } + flat[key].push(dep) + }) + } + + function attachFundingInfo (target, funding, dep) { + if (funding && validFundingField(funding)) { + target.funding = retrieveFunding(funding) + if (!countOnly) { + addToFlatCache(target.funding, dep) + } + + packageWithFundingCount++ + } + } + function getFundingDependencies (tree) { const deps = tree && tree.dependencies if (!deps) return empty() - // broken into two steps to make sure items appearance - // within top levels takes precedence over nested ones - return (Object.keys(deps)).map((key) => { + const directDepsWithFunding = Object.keys(deps).map((key) => { const dep = deps[key] const { name, funding, version } = dep - const fundingItem = {} - // avoids duplicated items within the funding tree if (tracked(name, version)) return empty() + const fundingItem = {} + if (version) { fundingItem.version = version } - if (funding && validFundingUrl(funding)) { - fundingItem.funding = retrieveFunding(funding) - length++ - } + attachFundingInfo(fundingItem, funding, dep) return { dep, fundingItem } - }).reduce((res, { dep, fundingItem }, i) => { - if (!fundingItem) return res + }) + + return directDepsWithFunding.reduce((res, { dep: directDep, fundingItem }, i) => { + if (!fundingItem || fundingItem.length === 0) return res // recurse - const dependencies = dep.dependencies && - Object.keys(dep.dependencies).length > 0 && - getFundingDependencies(dep) + const transitiveDependencies = directDep.dependencies && + Object.keys(directDep.dependencies).length > 0 && + getFundingDependencies(directDep) // if we're only counting items there's no need // to add all the data to the resulting object if (countOnly) return null - if (hasDependencies(dependencies)) { - fundingItem.dependencies = retrieveDependencies(dependencies) + if (hasDependencies(transitiveDependencies)) { + fundingItem.dependencies = retrieveDependencies(transitiveDependencies) } - if (fundingItem.funding) { - res[dep.name] = fundingItem + if (fundingItem.funding && fundingItem.funding.length !== 0) { + res[directDep.name] = fundingItem } else if (fundingItem.dependencies) { res[_trailingDependencies] = Object.assign( @@ -126,12 +155,12 @@ function getFundingInfo (idealTree, opts) { } return res - }, empty()) + }, countOnly ? null : empty()) } const idealTreeDependencies = getFundingDependencies(idealTree) const result = { - length + length: packageWithFundingCount } if (!countOnly) { @@ -145,8 +174,9 @@ function getFundingInfo (idealTree, opts) { result.funding = retrieveFunding(idealTree.funding) } - result.dependencies = - retrieveDependencies(idealTreeDependencies) + result.dependencies = retrieveDependencies(idealTreeDependencies) + + result[flatCacheSymbol] = flat } return result diff --git a/deps/npm/lib/utils/unsupported.js b/deps/npm/lib/utils/unsupported.js index c34e17374e0405..c78cdcbc294940 100644 --- a/deps/npm/lib/utils/unsupported.js +++ b/deps/npm/lib/utils/unsupported.js @@ -1,23 +1,14 @@ 'use strict' var semver = require('semver') -var supportedNode = [ - {ver: '6', min: '6.0.0'}, - {ver: '8', min: '8.0.0'}, - {ver: '9', min: '9.0.0'}, - {ver: '10', min: '10.0.0'}, - {ver: '11', min: '11.0.0'}, - {ver: '12', min: '12.0.0'}, - {ver: '13', min: '13.0.0'}, - {ver: '14', min: '14.0.0'} -] -var knownBroken = '<6.2.0 || 9.0 - 9.2' +var supported = require('../../package.json').engines.node +var knownBroken = '<6.2.0 || 9 <9.3.0' var checkVersion = exports.checkVersion = function (version) { var versionNoPrerelease = version.replace(/-.*$/, '') return { version: versionNoPrerelease, broken: semver.satisfies(versionNoPrerelease, knownBroken), - unsupported: !semver.satisfies(versionNoPrerelease, supportedNode.map(function (n) { return '^' + n.min }).join('||')) + unsupported: !semver.satisfies(versionNoPrerelease, supported) } } @@ -25,18 +16,8 @@ exports.checkForBrokenNode = function () { var nodejs = checkVersion(process.version) if (nodejs.broken) { console.error('ERROR: npm is known not to run on Node.js ' + process.version) - supportedNode.forEach(function (rel) { - if (semver.satisfies(nodejs.version, rel.ver)) { - console.error('Node.js ' + rel.ver + " is supported but the specific version you're running has") - console.error('a bug known to break npm. Please update to at least ' + rel.min + ' to use this') - console.error('version of npm. You can find the latest release of Node.js at https://nodejs.org/') - process.exit(1) - } - }) - var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ') - console.error("You'll need to upgrade to a newer version in order to use this") - console.error('version of npm. Supported versions are ' + supportedMajors + '. You can find the') - console.error('latest version at https://nodejs.org/') + console.error("You'll need to upgrade to a newer Node.js version in order to use this") + console.error('version of npm. You can find the latest version at https://nodejs.org/') process.exit(1) } } @@ -45,11 +26,9 @@ exports.checkForUnsupportedNode = function () { var nodejs = checkVersion(process.version) if (nodejs.unsupported) { var log = require('npmlog') - var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ') log.warn('npm', 'npm does not support Node.js ' + process.version) log.warn('npm', 'You should probably upgrade to a newer version of node as we') log.warn('npm', "can't make any promises that npm will work with this version.") - log.warn('npm', 'Supported releases of Node.js are the latest release of ' + supportedMajors + '.') log.warn('npm', 'You can find the latest version at https://nodejs.org/') } } diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index a068aae1ffc1be..bc250bdaabc40c 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2020" "" "" +.TH "NPM" "1" "February 2020" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index d4a40015f243ed..5521fd45a5ea05 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "January 2020" "" "" +.TH "NPM\-ACCESS" "1" "February 2020" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SS Synopsis diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 05166e52ec91df..9e2ed19a86b336 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -3,7 +3,7 @@ section: cli\-commands title: npm\-adduser .SH description: Set access level on published packages -.TH "NPM\-ADDUSER" "1" "January 2020" "" "" +.TH "NPM\-ADDUSER" "1" "February 2020" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SS Synopsis diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1 index 4ef6441cbee4ea..3665ef2f7b690a 100644 --- a/deps/npm/man/man1/npm-audit.1 +++ b/deps/npm/man/man1/npm-audit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-AUDIT" "1" "January 2020" "" "" +.TH "NPM\-AUDIT" "1" "February 2020" "" "" .SH "NAME" \fBnpm-audit\fR \- Run a security audit .SS Synopsis diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index 78c581b58aa847..806e11757fb0e7 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "January 2020" "" "" +.TH "NPM\-BIN" "1" "February 2020" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SS Synopsis diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 2292e9e17b168f..019763dd8c8c0e 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "January 2020" "" "" +.TH "NPM\-BUGS" "1" "February 2020" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SS Synopsis diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index c081bfc04b36eb..f199a43ad95303 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "January 2020" "" "" +.TH "NPM\-BUILD" "1" "February 2020" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index effd87724844b1..7c927041da9d1d 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "January 2020" "" "" +.TH "NPM\-BUNDLE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SS Description diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 44a66252bbd88b..330f127fed0cf3 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "January 2020" "" "" +.TH "NPM\-CACHE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SS Synopsis diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index 42910229ccb2ba..ae835891432faa 100644 --- a/deps/npm/man/man1/npm-ci.1 +++ b/deps/npm/man/man1/npm-ci.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CI" "1" "January 2020" "" "" +.TH "NPM\-CI" "1" "February 2020" "" "" .SH "NAME" \fBnpm-ci\fR \- Install a project with a clean slate .SS Synopsis diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 75c51c53cdb672..92d201f8c05539 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "January 2020" "" "" +.TH "NPM\-COMPLETION" "1" "February 2020" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SS Synopsis diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index c213beac47f0ca..278a7df70c65ef 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "January 2020" "" "" +.TH "NPM\-CONFIG" "1" "February 2020" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SS Synopsis diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 0dfb8dadb210ac..22653cc2729c4f 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "January 2020" "" "" +.TH "NPM\-DEDUPE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SS Synopsis diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index f76790723ae753..82a5c34b1b4302 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "January 2020" "" "" +.TH "NPM\-DEPRECATE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 354438674bdfa0..9fe3f66a3b6b91 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -3,7 +3,7 @@ section: cli\-commands title: npm\-dist\-tag .SH description: Modify package distribution tags -.TH "NPM\-DIST\-TAG" "1" "January 2020" "" "" +.TH "NPM\-DIST\-TAG" "1" "February 2020" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SS Synopsis diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index 4cbdb3e2aefca8..24d9054c06839a 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "January 2020" "" "" +.TH "NPM\-DOCS" "1" "February 2020" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SS Synopsis diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index 8cbc40a0d07540..fb947f1b205a70 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCTOR" "1" "January 2020" "" "" +.TH "NPM\-DOCTOR" "1" "February 2020" "" "" .SH "NAME" \fBnpm-doctor\fR \- Check your environments .SS Synopsis diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 5addfe7bb4c94a..2f8332a88813c0 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "January 2020" "" "" +.TH "NPM\-EDIT" "1" "February 2020" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SS Synopsis diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 81597ca8809246..bce86b07718fd9 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -3,7 +3,7 @@ section: cli\-commands title: npm\-explore .SH description: Browse an installed package -.TH "NPM\-EXPLORE" "1" "January 2020" "" "" +.TH "NPM\-EXPLORE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SS Synopsis diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index af46ce81099dd1..75e3eb5bc36ae3 100644 --- a/deps/npm/man/man1/npm-fund.1 +++ b/deps/npm/man/man1/npm-fund.1 @@ -1,4 +1,4 @@ -.TH "NPM\-FUND" "1" "January 2020" "" "" +.TH "NPM\-FUND" "1" "February 2020" "" "" .SH "NAME" \fBnpm-fund\fR \- Retrieve funding information .SS Synopsis @@ -15,7 +15,8 @@ a given project\. If no package name is provided, it will list all dependencies that are looking for funding in a tree\-structure in which are listed the type of funding and the url to visit\. If a package name is provided then it tries to open its funding url using the \fB\-\-browser\fP -config param\. +config param; if there are multiple funding sources for the package, the +user will be instructed to pass the \fB\-\-which\fP command to disambiguate\. .P The list will avoid duplicated entries and will stack all packages that share the same type/url as a single entry\. Given this nature the @@ -34,9 +35,9 @@ The browser that is called by the \fBnpm fund\fP command to open websites\. .SS json .RS 0 .IP \(bu 2 -Default: false -.IP \(bu 2 Type: Boolean +.IP \(bu 2 +Default: false .RE .P @@ -52,6 +53,16 @@ Default: true .P Whether to represent the tree structure using unicode characters\. Set it to \fBfalse\fP in order to use all\-ansi output\. +.SS which +.RS 0 +.IP \(bu 2 +Type: Number +.IP \(bu 2 +Default: undefined + +.RE +.P +If there are multiple funding sources, which 1\-indexed source URL to open\. .SH See Also .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index c25ecaf9a4822a..35020590bcfc59 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "January 2020" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "February 2020" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SS Synopsis diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 483193bbc0823e..3e1f7cf8cbd64c 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "January 2020" "" "" +.TH "NPM\-HELP" "1" "February 2020" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SS Synopsis diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1 index a71f6826a2a8cc..a7f11bbf11ae21 100644 --- a/deps/npm/man/man1/npm-hook.1 +++ b/deps/npm/man/man1/npm-hook.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HOOK" "1" "January 2020" "" "" +.TH "NPM\-HOOK" "1" "February 2020" "" "" .SH "NAME" \fBnpm-hook\fR \- Manage registry hooks .SS Synopsis diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 3d7cc749b1e248..50e1bfa21b01e0 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "January 2020" "" "" +.TH "NPM\-INIT" "1" "February 2020" "" "" .SH "NAME" \fBnpm-init\fR \- create a package\.json file .SS Synopsis diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index 729c0aa2e23fe7..b9de2ba2a63c74 100644 --- a/deps/npm/man/man1/npm-install-ci-test.1 +++ b/deps/npm/man/man1/npm-install-ci-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "January 2020" "" "" +.TH "NPM" "" "February 2020" "" "" .SH "NAME" \fBnpm\fR .SS Synopsis diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index 52731cee7d3d25..d5fb253f77c1e8 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "January 2020" "" "" +.TH "NPM" "" "February 2020" "" "" .SH "NAME" \fBnpm\fR .SS Synopsis diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 171d7a896cc6cb..099a1534e13cdd 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "January 2020" "" "" +.TH "NPM\-INSTALL" "1" "February 2020" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index fbb7c1708dcfe6..f9f4ec3e37aea8 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "January 2020" "" "" +.TH "NPM\-LINK" "1" "February 2020" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SS Synopsis diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 4a7463bb3003bd..7f53279a540c4a 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "January 2020" "" "" +.TH "NPM\-LOGOUT" "1" "February 2020" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SS Synopsis diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 78c2d9ee14cc57..a621cf829ecd91 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "January 2020" "" "" +.TH "NPM\-LS" "1" "February 2020" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SS Synopsis @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf - npm@6\.13\.7 /path/to/npm + npm@6\.14\.1 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index 9c3b722f7ce4d3..b8fde0ed95d641 100644 --- a/deps/npm/man/man1/npm-org.1 +++ b/deps/npm/man/man1/npm-org.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ORG" "1" "January 2020" "" "" +.TH "NPM\-ORG" "1" "February 2020" "" "" .SH "NAME" \fBnpm-org\fR \- Manage orgs .SS Synopsis diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index d0fa0d52d55a01..f547f08a1c3187 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "January 2020" "" "" +.TH "NPM\-OUTDATED" "1" "February 2020" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SS Synopsis diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index dc2eb2d4f86cbf..1c15beef6cff14 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "January 2020" "" "" +.TH "NPM\-OWNER" "1" "February 2020" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SS Synopsis diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index d551d9add4e718..eca5f3c7b6dbb1 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "January 2020" "" "" +.TH "NPM\-PACK" "1" "February 2020" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 672c8b752d6efe..0611ffe2e1186b 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "January 2020" "" "" +.TH "NPM\-PING" "1" "February 2020" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SS Synopsis diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index e6e3c6dd82db86..d65e3b45ecc5f0 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "January 2020" "" "" +.TH "NPM\-PREFIX" "1" "February 2020" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SS Synopsis diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index 45ec331f0bf935..ee5018341e54d3 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PROFILE" "1" "January 2020" "" "" +.TH "NPM\-PROFILE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-profile\fR \- Change settings on your registry profile .SS Synopsis diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 6b875c4524f325..81c474ccf08979 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "January 2020" "" "" +.TH "NPM\-PRUNE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SS Synopsis diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 1ce1a94ae0d4f2..7bb65ff36bd82a 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "January 2020" "" "" +.TH "NPM\-PUBLISH" "1" "February 2020" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 8ef5729d104a2c..9666d94ab1408a 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "January 2020" "" "" +.TH "NPM\-REBUILD" "1" "February 2020" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index eae4c2a45bfdf7..3da701d2e09417 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "January 2020" "" "" +.TH "NPM\-REPO" "1" "February 2020" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SS Synopsis diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index a3627c8fcde82d..25d39529847e4b 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "January 2020" "" "" +.TH "NPM\-RESTART" "1" "February 2020" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 801c5c9659e182..b87596ea23ed79 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "January 2020" "" "" +.TH "NPM\-ROOT" "1" "February 2020" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SS Synopsis diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 84c956a464976e..e0ae4fe6a3bb8a 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "January 2020" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "February 2020" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SS Synopsis diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index e2a3a6b8bbdf17..6ba914b01bc002 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "January 2020" "" "" +.TH "NPM\-SEARCH" "1" "February 2020" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SS Synopsis diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index b051e6a233d8d0..07283a8a326360 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "January 2020" "" "" +.TH "NPM\-SHRINKWRAP" "1" "February 2020" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication .SS Synopsis diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 0843a7e923e400..e8384832905bd4 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "January 2020" "" "" +.TH "NPM\-STAR" "1" "February 2020" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SS Synopsis diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index 8049d0131229b0..5f666362a90058 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "January 2020" "" "" +.TH "NPM\-STARS" "1" "February 2020" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SS Synopsis diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index d07181ead7d9ca..b7d61384e4a3de 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "January 2020" "" "" +.TH "NPM\-START" "1" "February 2020" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 77b3b888c4dbfe..15b7fea95073f1 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "January 2020" "" "" +.TH "NPM\-STOP" "1" "February 2020" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 4d42d12872c11c..5b04f786639a04 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "January 2020" "" "" +.TH "NPM\-TEAM" "1" "February 2020" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SS Synopsis diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 17b690dcc70f64..c5e017eaea2dca 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "January 2020" "" "" +.TH "NPM\-TEST" "1" "February 2020" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index 7fc5f2bffbf88f..7e2a93d2621959 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TOKEN" "1" "January 2020" "" "" +.TH "NPM\-TOKEN" "1" "February 2020" "" "" .SH "NAME" \fBnpm-token\fR \- Manage your authentication tokens .SS Synopsis diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 290bf532ea5665..a46cc6b1e153cf 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "1" "January 2020" "" "" +.TH "NPM\-UNINSTALL" "1" "February 2020" "" "" .SH "NAME" \fBnpm-uninstall\fR \- Remove a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index aeb37d6667482f..73c4c17b0d047b 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "January 2020" "" "" +.TH "NPM\-UNPUBLISH" "1" "February 2020" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SS Synopsis diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 1a6a63a9199c28..e91c4a0a09f236 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "January 2020" "" "" +.TH "NPM\-UPDATE" "1" "February 2020" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SS Synopsis diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 86bad64efd3931..83040d7709325f 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "January 2020" "" "" +.TH "NPM\-VERSION" "1" "February 2020" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SS Synopsis diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 0d522c82a3636d..7aec57fbc7c631 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "January 2020" "" "" +.TH "NPM\-VIEW" "1" "February 2020" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SS Synopsis diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index e5d72be0035f7e..1fe3c7a0327f46 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "January 2020" "" "" +.TH "NPM\-WHOAMI" "1" "February 2020" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SS Synopsis diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 7674110bf36d71..d2626ef19f1a35 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "January 2020" "" "" +.TH "NPM" "1" "February 2020" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SS Synopsis @@ -10,7 +10,7 @@ npm [args] .RE .SS Version .P -6\.13\.7 +6\.14\.1 .SS Description .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5 index 3148604e7f391b..95b668999f2aee 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "January 2020" "" "" +.TH "FOLDERS" "5" "February 2020" "" "" .SH "NAME" \fBfolders\fR \- Folder Structures Used by npm .SS Description diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5 index 5ab99d1513eecb..745eab3ed3f637 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,4 +1,4 @@ -.TH "INSTALL" "5" "January 2020" "" "" +.TH "INSTALL" "5" "February 2020" "" "" .SH "NAME" \fBinstall\fR \- Download and Install npm .SS Description diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 503e5725d6cf4b..f3f9057d883786 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "January 2020" "" "" +.TH "NPMRC" "5" "February 2020" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SS Description diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5 index 7c82b4e95573ff..f188a08e50a416 100644 --- a/deps/npm/man/man5/package-json.5 +++ b/deps/npm/man/man5/package-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "January 2020" "" "" +.TH "PACKAGE\.JSON" "5" "February 2020" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SS Description @@ -216,7 +216,8 @@ npm also sets a top\-level "maintainers" field with your npm user info\. .SS funding .P You can specify an object containing an URL that provides up\-to\-date -information about ways to help fund development of your package: +information about ways to help fund development of your package, or +a string URL, or an array of these: .P .RS 2 .nf @@ -229,13 +230,28 @@ information about ways to help fund development of your package: "type" : "patreon", "url" : "https://www\.patreon\.com/my\-account" } + +"funding": "http://example\.com/donate" + +"funding": [ + { + "type" : "individual", + "url" : "http://example\.com/donate" + }, + "http://example\.com/donateAlso", + { + "type" : "patreon", + "url" : "https://www\.patreon\.com/my\-account" + } +] .fi .RE .P Users can use the \fBnpm fund\fP subcommand to list the \fBfunding\fP URLs of all dependencies of their project, direct and indirect\. A shortcut to visit each funding url is also available when providing the project name such as: -\fBnpm fund \fP\|\. +\fBnpm fund \fP (when there are multiple URLs, the first one will be +visited) .SS files .P The optional \fBfiles\fP field is an array of file patterns that describes diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5 index 9ddd9d275c5a2e..6a4dece03d0027 100644 --- a/deps/npm/man/man5/package-lock-json.5 +++ b/deps/npm/man/man5/package-lock-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\-LOCK\.JSON" "5" "January 2020" "" "" +.TH "PACKAGE\-LOCK\.JSON" "5" "February 2020" "" "" .SH "NAME" \fBpackage-lock.json\fR \- A manifestation of the manifest .SS Description diff --git a/deps/npm/man/man5/package-locks.5 b/deps/npm/man/man5/package-locks.5 index acbed3b397d640..0658ff24682af8 100644 --- a/deps/npm/man/man5/package-locks.5 +++ b/deps/npm/man/man5/package-locks.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\-LOCKS" "5" "January 2020" "" "" +.TH "PACKAGE\-LOCKS" "5" "February 2020" "" "" .SH "NAME" \fBpackage-locks\fR \- An explanation of npm lockfiles .SS Description diff --git a/deps/npm/man/man5/shrinkwrap-json.5 b/deps/npm/man/man5/shrinkwrap-json.5 index d6d5ff490f1204..11f24412a9c637 100644 --- a/deps/npm/man/man5/shrinkwrap-json.5 +++ b/deps/npm/man/man5/shrinkwrap-json.5 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP\.JSON" "5" "January 2020" "" "" +.TH "NPM\-SHRINKWRAP\.JSON" "5" "February 2020" "" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR \- A publishable lockfile .SS Description diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index ad67a24a3bc43e..32612e44c55fd3 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,4 +1,4 @@ -.TH "CONFIG" "7" "January 2020" "" "" +.TH "CONFIG" "7" "February 2020" "" "" .SH "NAME" \fBconfig\fR \- More than you probably want to know about npm configuration .SS Description diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7 index bbb122c0f023d1..da4a8a0af5c91c 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,4 +1,4 @@ -.TH "DEVELOPERS" "7" "January 2020" "" "" +.TH "DEVELOPERS" "7" "February 2020" "" "" .SH "NAME" \fBdevelopers\fR \- Developer Guide .SS Description diff --git a/deps/npm/man/man7/disputes.7 b/deps/npm/man/man7/disputes.7 index 0647464866d923..64088b488db647 100644 --- a/deps/npm/man/man7/disputes.7 +++ b/deps/npm/man/man7/disputes.7 @@ -1,4 +1,4 @@ -.TH "DISPUTES" "7" "January 2020" "" "" +.TH "DISPUTES" "7" "February 2020" "" "" .SH "NAME" \fBdisputes\fR \- Handling Module Name Disputes .P @@ -116,7 +116,7 @@ language, pornographic content, or harassment\. If you see bad behavior like this, please report it to abuse@npmjs\.com right away\. \fBYou are never expected to resolve abusive behavior on your own\. We are here to help\.\fR -.SS Trademarkss +.SS Trademarks .P If you think another npm publisher is infringing your trademark, such as by using a confusingly similar package name, email abuse@npmjs\.com with a link to diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7 index 5b1386a0ebf61f..9674c00d19b788 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,4 +1,4 @@ -.TH "ORGS" "7" "January 2020" "" "" +.TH "ORGS" "7" "February 2020" "" "" .SH "NAME" \fBorgs\fR \- Working with Teams & Orgs .SS Description diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7 index 518bc433292c8d..1bfb2dcf609e52 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,4 +1,4 @@ -.TH "REGISTRY" "7" "January 2020" "" "" +.TH "REGISTRY" "7" "February 2020" "" "" .SH "NAME" \fBregistry\fR \- The JavaScript Package Registry .SS Description diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7 index db25812c7c06bc..cfc7bce1ba978b 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,4 +1,4 @@ -.TH "REMOVAL" "7" "January 2020" "" "" +.TH "REMOVAL" "7" "February 2020" "" "" .SH "NAME" \fBremoval\fR \- Cleaning the Slate .SS Synopsis diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7 index 6694affc8f5421..6c6aae668bd97b 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,4 +1,4 @@ -.TH "SCOPE" "7" "January 2020" "" "" +.TH "SCOPE" "7" "February 2020" "" "" .SH "NAME" \fBscope\fR \- Scoped packages .SS Description diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7 index c9ba92e8c111b2..b9103a3f2de47d 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,101 +1,88 @@ -.TH "SCRIPTS" "7" "January 2020" "" "" +.TH "SCRIPTS" "7" "February 2020" "" "" .SH "NAME" \fBscripts\fR \- How npm handles the "scripts" field .SS Description .P -npm supports the "scripts" property of the package\.json file, for the -following scripts: +The \fB"scripts"\fP property of of your \fBpackage\.json\fP file supports a number of built\-in scripts and their preset life cycle events as well as arbitrary scripts\. These all can be executed by running \fBnpm run\-script \fP or \fBnpm run \fP for short\. \fIPre\fR and \fIpost\fR commands with matching names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, \fBpostmyscript\fP)\. Scripts from dependencies can be run with \fBnpm explore \-\- npm run \fP\|\. +.SS Pre & Post Scripts +.P +To create "pre" or "post" scripts for any scripts defined in the \fB"scripts"\fP section of the \fBpackage\.json\fP, simply create another script \fIwith a matching name\fR and add "pre" or "post" to the beginning of them\. +.P +.RS 2 +.nf +{ + "scripts": { + "precompress": "{{ executes BEFORE the `compress` script }}", + "compress": "{{ run command to compress files }}", + "postcompress": "{{ executes AFTER `compress` script }}" + } +} +.fi +.RE +.SS Life Cycle Scripts +.P +There are some special life cycle scripts that happen only in certain situations\. These scripts happen in addtion to the "pre" and "post" script\. .RS 0 .IP \(bu 2 -\fBprepublish\fR (\fIas of npm@5, \fBprepublish\fP is deprecated\. Use \fBprepare\fP for build steps and \fBprepublishOnly\fP for upload\-only\.\fR): -Run BEFORE the package is packed and published, as well as on local \fBnpm -install\fP without any arguments\. (See below) -.IP \(bu 2 -\fBprepare\fR: -Run both BEFORE the package is packed and published, on local \fBnpm -install\fP without any arguments, and when installing git dependencies (See -below)\. This is run AFTER \fBprepublish\fP, but BEFORE \fBprepublishOnly\fP\|\. -.IP \(bu 2 -\fBprepublishOnly\fR: -Run BEFORE the package is prepared and packed, ONLY on \fBnpm publish\fP\|\. (See -below\.) -.IP \(bu 2 -\fBprepack\fR: -run BEFORE a tarball is packed (on \fBnpm pack\fP, \fBnpm publish\fP, and when -installing git dependencies) -.IP \(bu 2 -\fBpostpack\fR: -Run AFTER the tarball has been generated and moved to its final destination\. -.IP \(bu 2 -\fBpublish\fR, \fBpostpublish\fR: -Run AFTER the package is published\. -.IP \(bu 2 -\fBpreinstall\fR: -Run BEFORE the package is installed -.IP \(bu 2 -\fBinstall\fR, \fBpostinstall\fR: -Run AFTER the package is installed\. +\fBprepare\fP, \fBprepublish\fP, \fBprepublishOnly\fP, \fBprepack\fP, \fBpostpack\fP + +.RE +.P +\fBprepare\fR (since \fBnpm@4\.0\.0\fP) +.RS 0 .IP \(bu 2 -\fBpreuninstall\fR, \fBuninstall\fR: -Run BEFORE the package is uninstalled\. +Runs BEFORE the package is packed .IP \(bu 2 -\fBpostuninstall\fR: -Run AFTER the package is uninstalled\. +Runs BEFORE the package is published .IP \(bu 2 -\fBpreversion\fR: -Run BEFORE bumping the package version\. +Runs on local \fBnpm install\fP without any arguments .IP \(bu 2 -\fBversion\fR: -Run AFTER bumping the package version, but BEFORE commit\. +Run AFTER \fBprepublish\fP, but BEFORE \fBprepublishOnly\fP .IP \(bu 2 -\fBpostversion\fR: -Run AFTER bumping the package version, and AFTER commit\. +NOTE: If a package being installed through git contains a \fBprepare\fP script, its \fBdependencies\fP and \fBdevDependencies\fP will be installed, and the prepare script will be run, before the package is packaged and installed\. + +.RE +.P +\fBprepublish\fR (DEPRECATED) +.RS 0 .IP \(bu 2 -\fBpretest\fR, \fBtest\fR, \fBposttest\fR: -Run by the \fBnpm test\fP command\. +Same as \fBprepare\fP + +.RE +.P +\fBprepublishOnly\fR +.RS 0 .IP \(bu 2 -\fBprestop\fR, \fBstop\fR, \fBpoststop\fR: -Run by the \fBnpm stop\fP command\. +Runs BEFORE the package is prepared and packed, ONLY on \fBnpm publish\fP\|\. + +.RE +.P +\fBprepack\fR +.RS 0 .IP \(bu 2 -\fBprestart\fR, \fBstart\fR, \fBpoststart\fR: -Run by the \fBnpm start\fP command\. +Runs BEFORE a tarball is packed (on "\fBnpm pack\fP", "\fBnpm publish\fP", and when installing a git dependencies)\. .IP \(bu 2 -\fBprerestart\fR, \fBrestart\fR, \fBpostrestart\fR: -Run by the \fBnpm restart\fP command\. Note: \fBnpm restart\fP will run the -stop and start scripts if no \fBrestart\fP script is provided\. +NOTE: "\fBnpm run pack\fP" is NOT the same as "\fBnpm pack\fP"\. "\fBnpm run pack\fP" is an arbitrary user defined script name, where as, "\fBnpm pack\fP" is a CLI defined command\. + +.RE +.P +\fBpostpack\fR +.RS 0 .IP \(bu 2 -\fBpreshrinkwrap\fR, \fBshrinkwrap\fR, \fBpostshrinkwrap\fR: -Run by the \fBnpm shrinkwrap\fP command\. +Runs AFTER the tarball has been generated and moved to its final destination\. .RE +.SS Prepare and Prepublish .P -Additionally, arbitrary scripts can be executed by running \fBnpm -run\-script \fP\|\. \fIPre\fR and \fIpost\fR commands with matching -names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, -\fBpostmyscript\fP)\. Scripts from dependencies can be run with -\fBnpm explore \-\- npm run \fP\|\. -.SS Prepublish and Prepare -.SS Deprecation Note -.P -Since \fBnpm@1\.1\.71\fP, the npm CLI has run the \fBprepublish\fP script for both \fBnpm -publish\fP and \fBnpm install\fP, because it's a convenient way to prepare a package -for use (some common use cases are described in the section below)\. It has -also turned out to be, in practice, very -confusing \fIhttps://github\.com/npm/npm/issues/10074\fR\|\. As of \fBnpm@4\.0\.0\fP, a new -event has been introduced, \fBprepare\fP, that preserves this existing behavior\. A -\fInew\fR event, \fBprepublishOnly\fP has been added as a transitional strategy to -allow users to avoid the confusing behavior of existing npm versions and only -run on \fBnpm publish\fP (for instance, running the tests one last time to ensure -they're in good shape)\. -.P -See https://github\.com/npm/npm/issues/10074 for a much lengthier -justification, with further reading, for this change\. -.SS Use Cases -.P -If you need to perform operations on your package before it is used, in a way -that is not dependent on the operating system or architecture of the -target system, use a \fBprepublish\fP script\. This includes -tasks such as: +\fBDeprecation Note: prepublish\fR +.P +Since \fBnpm@1\.1\.71\fP, the npm CLI has run the \fBprepublish\fP script for both \fBnpm publish\fP and \fBnpm install\fP, because it's a convenient way to prepare a package for use (some common use cases are described in the section below)\. It has also turned out to be, in practice, very confusing \fIhttps://github\.com/npm/npm/issues/10074\fR\|\. As of \fBnpm@4\.0\.0\fP, a new event has been introduced, \fBprepare\fP, that preserves this existing behavior\. A \fInew\fR event, \fBprepublishOnly\fP has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on \fBnpm publish\fP (for instance, running the tests one last time to ensure they're in good shape)\. +.P +See https://github\.com/npm/npm/issues/10074 for a much lengthier justification, with further reading, for this change\. +.P +\fBUse Cases\fR +.P +If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a \fBprepublish\fP script\. This includes tasks such as: .RS 0 .IP \(bu 2 Compiling CoffeeScript source code into JavaScript\. @@ -106,9 +93,7 @@ Fetching remote resources that your package will use\. .RE .P -The advantage of doing these things at \fBprepublish\fP time is that they can be done once, in a -single place, thus reducing complexity and variability\. -Additionally, this means that: +The advantage of doing these things at \fBprepublish\fP time is that they can be done once, in a single place, thus reducing complexity and variability\. Additionally, this means that: .RS 0 .IP \(bu 2 You can depend on \fBcoffee\-script\fP as a \fBdevDependency\fP, and thus @@ -120,6 +105,60 @@ the size for your users\. You don't need to rely on your users having \fBcurl\fP or \fBwget\fP or other system tools on the target machines\. +.RE +.SS Life Cycle Operation Order +.SS npm help \fBpublish\fP +.RS 0 +.IP \(bu 2 +\fBprepublishOnly\fP +.IP \(bu 2 +\fBprepare\fP +.IP \(bu 2 +\fBprepublish\fP +.IP \(bu 2 +\fBpublish\fP +.IP \(bu 2 +\fBpostpublish\fP + +.RE +.SS npm help \fBpack\fP +.RS 0 +.IP \(bu 2 +\fBprepack\fP +.IP \(bu 2 +\fBpostpack\fP + +.RE +.SS npm help \fBinstall\fP +.RS 0 +.IP \(bu 2 +\fBpreinstall\fP +.IP \(bu 2 +\fBinstall\fP +.IP \(bu 2 +\fBpostinstall\fP + +.RE +.P +Also triggers +.RS 0 +.IP \(bu 2 +\fBprepublish\fP (when on local) +.IP \(bu 2 +\fBprepare\fP (when on local) + +.RE +.SS npm help \fBstart\fP +.P +\fBnpm run start\fP has an \fBnpm start\fP shorthand\. +.RS 0 +.IP \(bu 2 +\fBprestart\fP +.IP \(bu 2 +\fBstart\fP +.IP \(bu 2 +\fBpoststart\fP + .RE .SS Default Values .P @@ -230,7 +269,7 @@ For example, if your package\.json contains this: .nf { "scripts" : { "install" : "scripts/install\.js" - , "postinstall" : "scripts/install\.js" + , "postinstall" : "scripts/postinstall\.js" , "uninstall" : "scripts/uninstall\.js" } } diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index e168c10e473714..85623a5000adaa 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "January 2020" "" "" +.TH "SEMVER" "7" "February 2020" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Install diff --git a/deps/npm/node_modules/chownr/chownr.js b/deps/npm/node_modules/chownr/chownr.js index 9f04393b7f498a..0d409321696540 100644 --- a/deps/npm/node_modules/chownr/chownr.js +++ b/deps/npm/node_modules/chownr/chownr.js @@ -7,10 +7,30 @@ const LCHOWN = fs.lchown ? 'lchown' : 'chown' /* istanbul ignore next */ const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' +/* istanbul ignore next */ const needEISDIRHandled = fs.lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/) +const lchownSync = (path, uid, gid) => { + try { + return fs[LCHOWNSYNC](path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + +/* istanbul ignore next */ +const chownSync = (path, uid, gid) => { + try { + return fs.chownSync(path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + /* istanbul ignore next */ const handleEISDIR = needEISDIRHandled ? (path, uid, gid, cb) => er => { @@ -28,14 +48,14 @@ const handleEISDIR = const handleEISDirSync = needEISDIRHandled ? (path, uid, gid) => { try { - return fs[LCHOWNSYNC](path, uid, gid) + return lchownSync(path, uid, gid) } catch (er) { if (er.code !== 'EISDIR') throw er - fs.chownSync(path, uid, gid) + chownSync(path, uid, gid) } } - : (path, uid, gid) => fs[LCHOWNSYNC](path, uid, gid) + : (path, uid, gid) => lchownSync(path, uid, gid) // fs.readdir could only accept an options object as of node v6 const nodeVersion = process.version @@ -45,11 +65,19 @@ let readdirSync = (path, options) => fs.readdirSync(path, options) if (/^v4\./.test(nodeVersion)) readdir = (path, options, cb) => fs.readdir(path, cb) +const chown = (cpath, uid, gid, cb) => { + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { + // Skip ENOENT error + cb(er && er.code !== 'ENOENT' ? er : null) + })) +} + const chownrKid = (p, child, uid, gid, cb) => { if (typeof child === 'string') return fs.lstat(path.resolve(p, child), (er, stats) => { + // Skip ENOENT error if (er) - return cb(er) + return cb(er.code !== 'ENOENT' ? er : null) stats.name = child chownrKid(p, stats, uid, gid, cb) }) @@ -59,11 +87,11 @@ const chownrKid = (p, child, uid, gid, cb) => { if (er) return cb(er) const cpath = path.resolve(p, child.name) - fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb)) + chown(cpath, uid, gid, cb) }) } else { const cpath = path.resolve(p, child.name) - fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb)) + chown(cpath, uid, gid, cb) } } @@ -72,10 +100,14 @@ const chownr = (p, uid, gid, cb) => { readdir(p, { withFileTypes: true }, (er, children) => { // any error other than ENOTDIR or ENOTSUP means it's not readable, // or doesn't exist. give up. - if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') - return cb(er) + if (er) { + if (er.code === 'ENOENT') + return cb() + else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er) + } if (er || !children.length) - return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb)) + return chown(p, uid, gid, cb) let len = children.length let errState = null @@ -85,7 +117,7 @@ const chownr = (p, uid, gid, cb) => { if (er) return cb(errState = er) if (-- len === 0) - return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb)) + return chown(p, uid, gid, cb) } children.forEach(child => chownrKid(p, child, uid, gid, then)) @@ -94,9 +126,16 @@ const chownr = (p, uid, gid, cb) => { const chownrKidSync = (p, child, uid, gid) => { if (typeof child === 'string') { - const stats = fs.lstatSync(path.resolve(p, child)) - stats.name = child - child = stats + try { + const stats = fs.lstatSync(path.resolve(p, child)) + stats.name = child + child = stats + } catch (er) { + if (er.code === 'ENOENT') + return + else + throw er + } } if (child.isDirectory()) @@ -110,12 +149,15 @@ const chownrSync = (p, uid, gid) => { try { children = readdirSync(p, { withFileTypes: true }) } catch (er) { - if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP') + if (er.code === 'ENOENT') + return + else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') return handleEISDirSync(p, uid, gid) - throw er + else + throw er } - if (children.length) + if (children && children.length) children.forEach(child => chownrKidSync(p, child, uid, gid)) return handleEISDirSync(p, uid, gid) diff --git a/deps/npm/node_modules/chownr/package.json b/deps/npm/node_modules/chownr/package.json index cc48dc912cd7ec..5c125f8447b546 100644 --- a/deps/npm/node_modules/chownr/package.json +++ b/deps/npm/node_modules/chownr/package.json @@ -1,19 +1,19 @@ { - "_from": "chownr@1.1.3", - "_id": "chownr@1.1.3", + "_from": "chownr@1.1.4", + "_id": "chownr@1.1.4", "_inBundle": false, - "_integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", + "_integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "_location": "/chownr", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "chownr@1.1.3", + "raw": "chownr@1.1.4", "name": "chownr", "escapedName": "chownr", - "rawSpec": "1.1.3", + "rawSpec": "1.1.4", "saveSpec": null, - "fetchSpec": "1.1.3" + "fetchSpec": "1.1.4" }, "_requiredBy": [ "#USER", @@ -23,10 +23,10 @@ "/pacote", "/tar" ], - "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", - "_shasum": "42d837d5239688d55f303003a508230fa6727142", - "_spec": "chownr@1.1.3", - "_where": "/Users/mperrotte/npminc/cli", + "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "_shasum": "6fc9d7b42d32a583596337666e7d08084da2cc6b", + "_spec": "chownr@1.1.4", + "_where": "/Users/darcyclarke/Documents/Repos/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -40,8 +40,8 @@ "description": "like `chown -R`", "devDependencies": { "mkdirp": "0.3", - "rimraf": "", - "tap": "^12.0.1" + "rimraf": "^2.7.1", + "tap": "^14.10.6" }, "files": [ "chownr.js" @@ -55,10 +55,13 @@ "url": "git://github.com/isaacs/chownr.git" }, "scripts": { - "postpublish": "git push origin --follow-tags", "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", "preversion": "npm test", - "test": "tap test/*.js --cov" + "test": "tap" }, - "version": "1.1.3" + "tap": { + "check-coverage": true + }, + "version": "1.1.4" } diff --git a/deps/npm/node_modules/hosted-git-info/CHANGELOG.md b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md index 479f24b6414eb7..21fe13ca652fce 100644 --- a/deps/npm/node_modules/hosted-git-info/CHANGELOG.md +++ b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md @@ -2,6 +2,22 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26) + + +### Bug Fixes + +* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62) +* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60) + + + + +## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25) + + + ## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07) diff --git a/deps/npm/node_modules/hosted-git-info/index.js b/deps/npm/node_modules/hosted-git-info/index.js index fc959cb0434c82..08fa329760d8b4 100644 --- a/deps/npm/node_modules/hosted-git-info/index.js +++ b/deps/npm/node_modules/hosted-git-info/index.js @@ -47,7 +47,7 @@ function fromUrl (giturl, opts) { var gitHostInfo = gitHosts[gitHostName] var auth = null if (parsed.auth && authProtocols[parsed.protocol]) { - auth = decodeURIComponent(parsed.auth) + auth = parsed.auth } var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null var user = null @@ -106,7 +106,30 @@ function fixupUnqualifiedGist (giturl) { function parseGitUrl (giturl) { var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) - if (!matched) return url.parse(giturl) + if (!matched) { + var legacy = url.parse(giturl) + // If we don't have url.URL, then sorry, this is just not fixable. + // This affects Node <= 6.12. + if (legacy.auth && typeof url.URL === 'function') { + // git urls can be in the form of scp-style/ssh-connect strings, like + // git+ssh://user@host.com:some/path, which the legacy url parser + // supports, but WhatWG url.URL class does not. However, the legacy + // parser de-urlencodes the username and password, so something like + // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes + // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong. + // Pull off just the auth and host, so we dont' get the confusing + // scp-style URL, then pass that to the WhatWG parser to get the + // auth properly escaped. + const authmatch = giturl.match(/[^@]+@[^:/]+/) + /* istanbul ignore else - this should be impossible */ + if (authmatch) { + var whatwg = new url.URL(authmatch[0]) + legacy.auth = whatwg.username || '' + if (whatwg.password) legacy.auth += ':' + whatwg.password + } + } + return legacy + } return { protocol: 'git+ssh:', slashes: true, diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json index 458b323a405189..7ce00ce18c551b 100644 --- a/deps/npm/node_modules/hosted-git-info/package.json +++ b/deps/npm/node_modules/hosted-git-info/package.json @@ -1,19 +1,19 @@ { - "_from": "hosted-git-info@2.8.5", - "_id": "hosted-git-info@2.8.5", + "_from": "hosted-git-info@2.8.7", + "_id": "hosted-git-info@2.8.7", "_inBundle": false, - "_integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "_integrity": "sha512-ChkjQtKJ3GI6SsI4O5jwr8q8EPrWCnxuc4Tbx+vRI5x6mDOpjKKltNo1lRlszw3xwgTOSns1ZRBiMmmwpcvLxg==", "_location": "/hosted-git-info", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "hosted-git-info@2.8.5", + "raw": "hosted-git-info@2.8.7", "name": "hosted-git-info", "escapedName": "hosted-git-info", - "rawSpec": "2.8.5", + "rawSpec": "2.8.7", "saveSpec": null, - "fetchSpec": "2.8.5" + "fetchSpec": "2.8.7" }, "_requiredBy": [ "#USER", @@ -21,9 +21,9 @@ "/normalize-package-data", "/npm-package-arg" ], - "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "_shasum": "759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c", - "_spec": "hosted-git-info@2.8.5", + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.7.tgz", + "_shasum": "4d2e0d5248e1cfabc984b0f6a6d75fe36e679511", + "_spec": "hosted-git-info@2.8.7", "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Rebecca Turner", @@ -62,11 +62,11 @@ }, "scripts": { "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", + "posttest": "standard", "prerelease": "npm t", - "pretest": "standard", "release": "standard-version -s", "test": "tap -J --100 --no-esm test/*.js", "test:coverage": "tap --coverage-report=html -J --100 --no-esm test/*.js" }, - "version": "2.8.5" + "version": "2.8.7" } diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json index c022dcef65b515..693c51b96140da 100644 --- a/deps/npm/node_modules/npm-packlist/package.json +++ b/deps/npm/node_modules/npm-packlist/package.json @@ -1,29 +1,29 @@ { - "_from": "npm-packlist@1.4.7", - "_id": "npm-packlist@1.4.7", + "_from": "npm-packlist@1.4.8", + "_id": "npm-packlist@1.4.8", "_inBundle": false, - "_integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==", + "_integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "_location": "/npm-packlist", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "npm-packlist@1.4.7", + "raw": "npm-packlist@1.4.8", "name": "npm-packlist", "escapedName": "npm-packlist", - "rawSpec": "1.4.7", + "rawSpec": "1.4.8", "saveSpec": null, - "fetchSpec": "1.4.7" + "fetchSpec": "1.4.8" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz", - "_shasum": "9e954365a06b80b18111ea900945af4f88ed4848", - "_spec": "npm-packlist@1.4.7", - "_where": "/Users/isaacs/dev/npm/cli", + "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "_shasum": "56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e", + "_spec": "npm-packlist@1.4.8", + "_where": "/Users/darcyclarke/Documents/Repos/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -35,7 +35,8 @@ "bundleDependencies": false, "dependencies": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" }, "deprecated": false, "description": "Get a list of the files to add from a folder into an npm package", @@ -71,5 +72,5 @@ "tap": { "jobs": 1 }, - "version": "1.4.7" + "version": "1.4.8" } diff --git a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md index 8eee50a4790a3c..3599c6b2fcac1b 100644 --- a/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md +++ b/deps/npm/node_modules/npm-registry-fetch/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [4.0.3](https://github.com/npm/registry-fetch/compare/v4.0.2...v4.0.3) (2020-02-13) + + +### Bug Fixes + +* always bypass cache when ?write=true ([ba8b4fe](https://github.com/npm/registry-fetch/commit/ba8b4fe)) +* use 30s default for timeout as per README ([69c2977](https://github.com/npm/registry-fetch/commit/69c2977)), closes [#20](https://github.com/npm/registry-fetch/issues/20) + + + ## [4.0.2](https://github.com/npm/registry-fetch/compare/v4.0.0...v4.0.2) (2019-10-04) diff --git a/deps/npm/node_modules/npm-registry-fetch/README.md b/deps/npm/node_modules/npm-registry-fetch/README.md index 0c3f4f9469955b..80ce64cda78efe 100644 --- a/deps/npm/node_modules/npm-registry-fetch/README.md +++ b/deps/npm/node_modules/npm-registry-fetch/README.md @@ -50,6 +50,25 @@ Happy hacking! ### API +#### Caching and `write=true` query strings + +Before performing any PUT or DELETE operation, npm clients first make a +GET request to the registry resource being updated, which includes +the query string `?write=true`. + +The semantics of this are, effectively, "I intend to write to this thing, +and need to know the latest current value, so that my write can land +cleanly". + +The public npm registry handles these `?write=true` requests by ensuring +that the cache is re-validated before sending a response. In order to +maintain the same behavior on the client, and not get tripped up by an +overeager local cache when we intend to write data to the registry, any +request that comes through `npm-registry-fetch` that contains `write=true` +in the query string will forcibly set the `prefer-online` option to `true`, +and set both `prefer-offline` and `offline` to false, so that any local +cached value will be revalidated. + #### `> fetch(url, [opts]) -> Promise` Performs a request to a given URL. @@ -391,6 +410,9 @@ Force offline mode: no network requests will be done during install. To allow This option is only really useful if you're also using [`opts.cache`](#opts-cache). +This option is set to `true` when the request includes `write=true` in the +query string. + ##### `opts.otp` * Type: Number | String @@ -402,7 +424,7 @@ account. ##### `opts.password` -* Alias: _password +* Alias: `_password` * Type: String * Default: null @@ -432,6 +454,9 @@ will be requested from the server. To force full offline mode, use This option is generally only useful if you're also using [`opts.cache`](#opts-cache). +This option is set to `false` when the request includes `write=true` in the +query string. + ##### `opts.prefer-online` * Type: Boolean @@ -443,6 +468,8 @@ for updates immediately even for fresh package data. This option is generally only useful if you're also using [`opts.cache`](#opts-cache). +This option is set to `true` when the request includes `write=true` in the +query string. ##### `opts.project-scope` @@ -606,4 +633,4 @@ See also [`opts.password`](#opts-password) * Default: null ** DEPRECATED ** This is a legacy authentication token supported only for -*compatibility. Please use [`opts.token`](#opts-token) instead. +compatibility. Please use [`opts.token`](#opts-token) instead. diff --git a/deps/npm/node_modules/npm-registry-fetch/config.js b/deps/npm/node_modules/npm-registry-fetch/config.js index 1c43b26eadd4c4..d7be3f9b38a167 100644 --- a/deps/npm/node_modules/npm-registry-fetch/config.js +++ b/deps/npm/node_modules/npm-registry-fetch/config.js @@ -75,7 +75,9 @@ module.exports = figgyPudding({ 'scope': {}, 'spec': {}, 'strict-ssl': {}, - 'timeout': {}, + 'timeout': { + default: 30 * 1000 + }, 'user-agent': { default: `${ pkg.name diff --git a/deps/npm/node_modules/npm-registry-fetch/index.js b/deps/npm/node_modules/npm-registry-fetch/index.js index c18487388b269f..9bd0ad32d7c9e9 100644 --- a/deps/npm/node_modules/npm-registry-fetch/index.js +++ b/deps/npm/node_modules/npm-registry-fetch/index.js @@ -53,26 +53,38 @@ function regFetch (uri, opts) { }) } } - if (opts.query) { - let q = opts.query + + let q = opts.query + if (q) { if (typeof q === 'string') { q = qs.parse(q) + } else if (typeof q !== 'object') { + throw new TypeError('invalid query option, must be string or object') } Object.keys(q).forEach(key => { if (q[key] === undefined) { delete q[key] } }) - if (Object.keys(q).length) { - const parsed = url.parse(uri) - parsed.search = '?' + qs.stringify( - parsed.query - ? Object.assign(qs.parse(parsed.query), q) - : q - ) - uri = url.format(parsed) + } + const parsed = url.parse(uri) + + const query = parsed.query ? Object.assign(qs.parse(parsed.query), q || {}) + : Object.keys(q || {}).length ? q + : null + + if (query) { + if (String(query.write) === 'true' && opts.method === 'GET') { + opts = opts.concat({ + offline: false, + 'prefer-offline': false, + 'prefer-online': true + }) } + parsed.search = '?' + qs.stringify(query) + uri = url.format(parsed) } + return opts.Promise.resolve(body).then(body => fetch(uri, { agent: opts.agent, algorithms: opts.algorithms, diff --git a/deps/npm/node_modules/npm-registry-fetch/package.json b/deps/npm/node_modules/npm-registry-fetch/package.json index 78e3100daa47f9..ca6c5f90c63527 100644 --- a/deps/npm/node_modules/npm-registry-fetch/package.json +++ b/deps/npm/node_modules/npm-registry-fetch/package.json @@ -1,19 +1,19 @@ { - "_from": "npm-registry-fetch@4.0.2", - "_id": "npm-registry-fetch@4.0.2", + "_from": "npm-registry-fetch@4.0.3", + "_id": "npm-registry-fetch@4.0.3", "_inBundle": false, - "_integrity": "sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A==", + "_integrity": "sha512-WGvUx0lkKFhu9MbiGFuT9nG2NpfQ+4dCJwRwwtK2HK5izJEvwDxMeUyqbuMS7N/OkpVCqDorV6rO5E4V9F8lJw==", "_location": "/npm-registry-fetch", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "npm-registry-fetch@4.0.2", + "raw": "npm-registry-fetch@4.0.3", "name": "npm-registry-fetch", "escapedName": "npm-registry-fetch", - "rawSpec": "4.0.2", + "rawSpec": "4.0.3", "saveSpec": null, - "fetchSpec": "4.0.2" + "fetchSpec": "4.0.3" }, "_requiredBy": [ "#USER", @@ -28,10 +28,10 @@ "/npm-profile", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz", - "_shasum": "2b1434f93ccbe6b6385f8e45f45db93e16921d7a", - "_spec": "npm-registry-fetch@4.0.2", - "_where": "/Users/mperrotte/npminc/cli", + "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.3.tgz", + "_shasum": "3c2179e39e04f9348b1c2979545951d36bee8766", + "_spec": "npm-registry-fetch@4.0.3", + "_where": "/Users/darcyclarke/Documents/Repos/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -86,6 +86,9 @@ "license": "ISC", "main": "index.js", "name": "npm-registry-fetch", + "publishConfig": { + "tag": "latest-v4" + }, "repository": { "type": "git", "url": "git+https://github.com/npm/registry-fetch.git" @@ -99,5 +102,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "4.0.2" + "version": "4.0.3" } diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md index 28ccae16165828..6f035ab16f29dd 100644 --- a/deps/npm/node_modules/readable-stream/README.md +++ b/deps/npm/node_modules/readable-stream/README.md @@ -15,7 +15,7 @@ npm install --save readable-stream This package is a mirror of the streams implementations in Node.js. -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.15.3/docs/api/stream.html). +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html). If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). @@ -24,10 +24,7 @@ As of version 2.0.0 **readable-stream** uses semantic versioning. ## Version 3.x.x -v3.x.x of `readable-stream` supports Node 6, 8, and 10, as well as -evergreen browsers, IE 11 and latest Safari. The breaking changes -introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) -and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: +v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: 1. Error codes: https://github.com/nodejs/node/pull/13310, https://github.com/nodejs/node/pull/13291, @@ -51,9 +48,7 @@ and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: https://github.com/nodejs/node/pull/17979 ## Version 2.x.x - -v2.x.x of `readable-stream` supports all Node.js version from 0.8, as well as -evergreen browsers and IE 10 & 11. +v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11. ### Big Thanks diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js index 33f478d7e8c25a..192d451488f208 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js @@ -80,17 +80,16 @@ var _require$codes = require('../errors').codes, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - -var _require2 = require('../experimentalWarning'), - emitExperimentalWarning = _require2.emitExperimentalWarning; // Lazy loaded to improve the startup performance. + ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance. var StringDecoder; var createReadableStreamAsyncIterator; +var from; require('inherits')(Readable, Stream); +var errorOrDestroy = destroyImpl.errorOrDestroy; var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; function prependListener(emitter, event, fn) { @@ -144,7 +143,9 @@ function ReadableState(options, stream, isDuplex) { this.resumeScheduled = false; this.paused = true; // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; // has it been destroyed + this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish') + + this.autoDestroy = !!options.autoDestroy; // has it been destroyed this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string // encoding is 'binary' so we have to make this configurable. @@ -257,16 +258,16 @@ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { if (!skipChunkCheck) er = chunkInvalid(state, chunk); if (er) { - stream.emit('error', er); + errorOrDestroy(stream, er); } else if (state.objectMode || chunk && chunk.length > 0) { if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { chunk = _uint8ArrayToBuffer(chunk); } if (addToFront) { - if (state.endEmitted) stream.emit('error', new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); } else if (state.ended) { - stream.emit('error', new ERR_STREAM_PUSH_AFTER_EOF()); + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); } else if (state.destroyed) { return false; } else { @@ -322,17 +323,32 @@ Readable.prototype.isPaused = function () { Readable.prototype.setEncoding = function (enc) { if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); // if setEncoding(null), decoder.encoding equals utf8 + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8 + + this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers: + + var p = this._readableState.buffer.head; + var content = ''; + + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + + this._readableState.buffer.clear(); - this._readableState.encoding = this._readableState.decoder.encoding; + if (content !== '') this._readableState.buffer.push(content); + this._readableState.length = content.length; return this; -}; // Don't raise the hwm > 8MB +}; // Don't raise the hwm > 1GB -var MAX_HWM = 0x800000; +var MAX_HWM = 0x40000000; function computeNewHighWaterMark(n) { if (n >= MAX_HWM) { + // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. n = MAX_HWM; } else { // Get the next highest power of 2 to prevent increasing hwm excessively in @@ -449,7 +465,7 @@ Readable.prototype.read = function (n) { if (n > 0) ret = fromList(n, state);else ret = null; if (ret === null) { - state.needReadable = true; + state.needReadable = state.length <= state.highWaterMark; n = 0; } else { state.length -= n; @@ -469,6 +485,7 @@ Readable.prototype.read = function (n) { }; function onEofChunk(stream, state) { + debug('onEofChunk'); if (state.ended) return; if (state.decoder) { @@ -503,6 +520,7 @@ function onEofChunk(stream, state) { function emitReadable(stream) { var state = stream._readableState; + debug('emitReadable', state.needReadable, state.emittedReadable); state.needReadable = false; if (!state.emittedReadable) { @@ -518,6 +536,7 @@ function emitReadable_(stream) { if (!state.destroyed && (state.length || state.ended)) { stream.emit('readable'); + state.emittedReadable = false; } // The stream needs another readable event if // 1. It is not flowing, as the flow mechanism will take // care of it. @@ -583,7 +602,7 @@ function maybeReadMore_(stream, state) { Readable.prototype._read = function (n) { - this.emit('error', new ERR_METHOD_NOT_IMPLEMENTED('_read()')); + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); }; Readable.prototype.pipe = function (dest, pipeOpts) { @@ -682,7 +701,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { debug('onerror', er); unpipe(); dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); } // Make sure our error handler is attached before userland ones. @@ -986,8 +1005,6 @@ Readable.prototype.wrap = function (stream) { if (typeof Symbol === 'function') { Readable.prototype[Symbol.asyncIterator] = function () { - emitExperimentalWarning('Readable[Symbol.asyncIterator]'); - if (createReadableStreamAsyncIterator === undefined) { createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); } @@ -1075,9 +1092,29 @@ function endReadableNT(state, stream) { state.endEmitted = true; stream.readable = false; stream.emit('end'); + + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the writable side is ready for autoDestroy as well + var wState = stream._writableState; + + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } } } +if (typeof Symbol === 'function') { + Readable.from = function (iterable, opts) { + if (from === undefined) { + from = require('./internal/streams/from'); + } + + return from(Readable, iterable, opts); + }; +} + function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) return i; diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js index b35447aedc3a95..a2634d7c24fd5e 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js @@ -94,6 +94,8 @@ var _require$codes = require('../errors').codes, ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; +var errorOrDestroy = destroyImpl.errorOrDestroy; + require('inherits')(Writable, Stream); function nop() {} @@ -173,7 +175,9 @@ function WritableState(options, stream, isDuplex) { this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; // count buffered requests + this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end') + + this.autoDestroy = !!options.autoDestroy; // count buffered requests this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always // one allocated and free to use, and we maintain at most two @@ -250,13 +254,13 @@ function Writable(options) { Writable.prototype.pipe = function () { - this.emit('error', new ERR_STREAM_CANNOT_PIPE()); + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); }; function writeAfterEnd(stream, cb) { var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); + errorOrDestroy(stream, er); process.nextTick(cb, er); } // Checks that a user-supplied chunk is valid, especially for the particular // mode the stream is in. Currently this means that `null` is never accepted @@ -273,7 +277,7 @@ function validChunk(stream, state, chunk, cb) { } if (er) { - stream.emit('error', er); + errorOrDestroy(stream, er); process.nextTick(cb, er); return false; } @@ -417,13 +421,13 @@ function onwriteError(stream, state, sync, er, cb) { process.nextTick(finishMaybe, stream, state); stream._writableState.errorEmitted = true; - stream.emit('error', er); + errorOrDestroy(stream, er); } else { // the caller expect this to happen before if // it is async cb(er); stream._writableState.errorEmitted = true; - stream.emit('error', er); // this can emit finish, but finish must + errorOrDestroy(stream, er); // this can emit finish, but finish must // always follow error finishMaybe(stream, state); @@ -587,7 +591,7 @@ function callFinal(stream, state) { state.pendingcb--; if (err) { - stream.emit('error', err); + errorOrDestroy(stream, err); } state.prefinished = true; @@ -618,6 +622,16 @@ function finishMaybe(stream, state) { if (state.pendingcb === 0) { state.finished = true; stream.emit('finish'); + + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the readable side is ready for autoDestroy as well + var rState = stream._readableState; + + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); + } + } } } diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js index ebaf5c72aa7a61..cdea425f19dd96 100644 --- a/deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/buffer_list.js @@ -1,9 +1,17 @@ 'use strict'; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + var _require = require('buffer'), Buffer = _require.Buffer; @@ -20,170 +28,183 @@ module.exports = /*#__PURE__*/ function () { function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; this.tail = null; this.length = 0; } - var _proto = BufferList.prototype; - - _proto.push = function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - _proto.unshift = function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - _proto.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - _proto.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - _proto.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - - while (p = p.next) { - ret += s + p.data; + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; } - - return ret; - }; - - _proto.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; } - - return ret; - } // Consumes a specified amount of bytes or characters from the buffered data. - ; - - _proto.consume = function consume(n, hasStrings) { - var ret; - - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); + }, { + key: "shift", + value: function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + } + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; } + }, { + key: "join", + value: function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + + while (p = p.next) { + ret += s + p.data; + } - return ret; - }; - - _proto.first = function first() { - return this.head.data; - } // Consumes a specified amount of characters from the buffered data. - ; - - _proto._getString = function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } + return ret; + } + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } - break; + return ret; + } // Consumes a specified amount of bytes or characters from the buffered data. + + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + + if (n < this.head.data.length) { + // `slice` is the same for buffers and strings. + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + // First chunk is a perfect match. + ret = this.shift(); + } else { + // Result spans more than one buffer. + ret = hasStrings ? this._getString(n) : this._getBuffer(n); } - ++c; + return ret; } + }, { + key: "first", + value: function first() { + return this.head.data; + } // Consumes a specified amount of characters from the buffered data. + + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + + break; + } - this.length -= c; - return ret; - } // Consumes a specified amount of bytes from the buffered data. - ; - - _proto._getBuffer = function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); + ++c; + } + + this.length -= c; + return ret; + } // Consumes a specified amount of bytes from the buffered data. + + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + + break; } - break; + ++c; } - ++c; + this.length -= c; + return ret; + } // Make sure the linked list only shows the minimal necessary information. + + }, { + key: custom, + value: function value(_, options) { + return inspect(this, _objectSpread({}, options, { + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + })); } - - this.length -= c; - return ret; - } // Make sure the linked list only shows the minimal necessary information. - ; - - _proto[custom] = function (_, options) { - return inspect(this, _objectSpread({}, options, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); - }; + }]); return BufferList; }(); \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js index 63ae49928dd95b..3268a16f3b6f23 100644 --- a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -9,8 +9,13 @@ function destroy(err, cb) { if (readableDestroyed || writableDestroyed) { if (cb) { cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - process.nextTick(emitErrorNT, this, err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } } return this; @@ -29,10 +34,13 @@ function destroy(err, cb) { this._destroy(err || null, function (err) { if (!cb && err) { - process.nextTick(emitErrorAndCloseNT, _this, err); - - if (_this._writableState) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err); + } else if (!_this._writableState.errorEmitted) { _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err); + } else { + process.nextTick(emitCloseNT, _this); } } else if (cb) { process.nextTick(emitCloseNT, _this); @@ -79,7 +87,19 @@ function emitErrorNT(self, err) { self.emit('error', err); } +function errorOrDestroy(stream, err) { + // We have tests that rely on errors being emitted + // in the same tick, so changing this is semver major. + // For now when you opt-in to autoDestroy we allow + // the error to be emitted nextTick. In a future + // semver major update we should change the default to this. + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); +} + module.exports = { destroy: destroy, - undestroy: undestroy + undestroy: undestroy, + errorOrDestroy: errorOrDestroy }; \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/from-browser.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/from-browser.js new file mode 100644 index 00000000000000..a4ce56f3c90f60 --- /dev/null +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/from-browser.js @@ -0,0 +1,3 @@ +module.exports = function () { + throw new Error('Readable.from is not available in the browser') +}; diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/from.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/from.js new file mode 100644 index 00000000000000..6c41284416799c --- /dev/null +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/from.js @@ -0,0 +1,64 @@ +'use strict'; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE; + +function from(Readable, iterable, opts) { + var iterator; + + if (iterable && typeof iterable.next === 'function') { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); + + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); // Reading boolean to protect against _read + // being called before last iteration completion. + + var reading = false; + + readable._read = function () { + if (!reading) { + reading = true; + next(); + } + }; + + function next() { + return _next2.apply(this, arguments); + } + + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _ref = yield iterator.next(), + value = _ref.value, + done = _ref.done; + + if (done) { + readable.push(null); + } else if (readable.push((yield value))) { + next(); + } else { + reading = false; + } + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + + return readable; +} + +module.exports = from; \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json index 67c7e602f26275..9c29e095cbd6be 100644 --- a/deps/npm/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/readable-stream/package.json @@ -1,19 +1,19 @@ { - "_from": "readable-stream@3.4.0", - "_id": "readable-stream@3.4.0", + "_from": "readable-stream@3.6.0", + "_id": "readable-stream@3.6.0", "_inBundle": false, - "_integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "_integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "_location": "/readable-stream", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "readable-stream@3.4.0", + "raw": "readable-stream@3.6.0", "name": "readable-stream", "escapedName": "readable-stream", - "rawSpec": "3.4.0", + "rawSpec": "3.6.0", "saveSpec": null, - "fetchSpec": "3.4.0" + "fetchSpec": "3.6.0" }, "_requiredBy": [ "#USER", @@ -21,15 +21,16 @@ "/bl", "/tar-stream" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "_shasum": "a51c26754658e0a3c21dbf59163bd45ba6f447fc", - "_spec": "readable-stream@3.4.0", - "_where": "/Users/isaacs/dev/npm/cli", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "_shasum": "337bbda3adc0706bd3e024426a286d4b4b2c9198", + "_spec": "readable-stream@3.6.0", + "_where": "/Users/darcyclarke/Documents/Repos/npm/cli", "browser": { "util": false, "worker_threads": false, "./errors": "./errors-browser.js", "./readable.js": "./readable-browser.js", + "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js", "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" }, "bugs": { @@ -52,6 +53,7 @@ "assert": "^1.4.0", "bl": "^2.0.0", "deep-strict-equal": "^0.2.0", + "events.once": "^2.0.2", "glob": "^7.1.2", "gunzip-maybe": "^1.4.1", "hyperquest": "^2.1.3", @@ -94,5 +96,5 @@ "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", "update-browser-errors": "babel -o errors-browser.js errors.js" }, - "version": "3.4.0" + "version": "3.6.0" } diff --git a/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/LICENSE b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/LICENSE new file mode 100644 index 00000000000000..0c068ceecbd48f --- /dev/null +++ b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/README.md b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/README.md new file mode 100644 index 00000000000000..356e3519302cfa --- /dev/null +++ b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/README.md @@ -0,0 +1,586 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +[Get supported safe-buffer with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-safe-buffer?utm_source=npm-safe-buffer&utm_medium=referral&utm_campaign=readme) + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts new file mode 100644 index 00000000000000..e9fed809a5ab51 --- /dev/null +++ b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts @@ -0,0 +1,187 @@ +declare module "safe-buffer" { + export class Buffer { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + } +} \ No newline at end of file diff --git a/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.js b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.js new file mode 100644 index 00000000000000..054c8d30ddafb4 --- /dev/null +++ b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/index.js @@ -0,0 +1,64 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.prototype = Object.create(Buffer.prototype) + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/package.json b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/package.json new file mode 100644 index 00000000000000..e7f13cb4b47ac4 --- /dev/null +++ b/deps/npm/node_modules/string_decoder/node_modules/safe-buffer/package.json @@ -0,0 +1,62 @@ +{ + "_from": "safe-buffer@~5.2.0", + "_id": "safe-buffer@5.2.0", + "_inBundle": false, + "_integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "_location": "/string_decoder/safe-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "safe-buffer@~5.2.0", + "name": "safe-buffer", + "escapedName": "safe-buffer", + "rawSpec": "~5.2.0", + "saveSpec": null, + "fetchSpec": "~5.2.0" + }, + "_requiredBy": [ + "/string_decoder" + ], + "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "_shasum": "b74daec49b1148f88c64b68d49b1e815c1f2f519", + "_spec": "safe-buffer@~5.2.0", + "_where": "/Users/darcyclarke/Documents/Repos/npm/cli/node_modules/string_decoder", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Safer Node.js Buffer API", + "devDependencies": { + "standard": "*", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "name": "safe-buffer", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + }, + "types": "index.d.ts", + "version": "5.2.0" +} diff --git a/deps/npm/node_modules/string_decoder/package.json b/deps/npm/node_modules/string_decoder/package.json index 0b704d99a1bf50..cc843b66014507 100644 --- a/deps/npm/node_modules/string_decoder/package.json +++ b/deps/npm/node_modules/string_decoder/package.json @@ -1,8 +1,8 @@ { "_from": "string_decoder@^1.1.1", - "_id": "string_decoder@1.2.0", + "_id": "string_decoder@1.3.0", "_inBundle": false, - "_integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "_integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "_location": "/string_decoder", "_phantomChildren": {}, "_requested": { @@ -18,16 +18,16 @@ "_requiredBy": [ "/readable-stream" ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "_shasum": "fe86e738b19544afe70469243b2a1ee9240eae8d", + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "_shasum": "42f114594a46cf1a8e30b0a84f56c78c3edac21e", "_spec": "string_decoder@^1.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/readable-stream", + "_where": "/Users/darcyclarke/Documents/Repos/npm/cli/node_modules/readable-stream", "bugs": { "url": "https://github.com/nodejs/string_decoder/issues" }, "bundleDependencies": false, "dependencies": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" }, "deprecated": false, "description": "The string_decoder module from Node core", @@ -58,5 +58,5 @@ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", "test": "tap test/parallel/*.js && node test/verify-dependencies" }, - "version": "1.2.0" + "version": "1.3.0" } diff --git a/deps/npm/package.json b/deps/npm/package.json index 3c37420f4c5ec2..8852d3efad18f1 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "6.13.7", + "version": "6.14.1", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -44,7 +44,7 @@ "byte-size": "^5.0.1", "cacache": "^12.0.3", "call-limit": "^1.1.1", - "chownr": "^1.1.3", + "chownr": "^1.1.4", "ci-info": "^2.0.0", "cli-columns": "^3.1.2", "cli-table3": "^0.5.1", @@ -63,7 +63,7 @@ "glob": "^7.1.4", "graceful-fs": "^4.2.3", "has-unicode": "~2.0.1", - "hosted-git-info": "^2.8.5", + "hosted-git-info": "^2.8.7", "iferr": "^1.0.2", "infer-owner": "^1.0.4", "inflight": "~1.0.6", @@ -101,10 +101,10 @@ "npm-install-checks": "^3.0.2", "npm-lifecycle": "^3.1.4", "npm-package-arg": "^6.1.1", - "npm-packlist": "^1.4.7", + "npm-packlist": "^1.4.8", "npm-pick-manifest": "^3.0.2", "npm-profile": "^4.0.2", - "npm-registry-fetch": "^4.0.2", + "npm-registry-fetch": "^4.0.3", "npm-user-validate": "~1.0.0", "npmlog": "~4.1.2", "once": "~1.4.0", @@ -121,7 +121,7 @@ "read-installed": "~4.0.3", "read-package-json": "^2.1.1", "read-package-tree": "^5.3.1", - "readable-stream": "^3.4.0", + "readable-stream": "^3.6.0", "readdir-scoped-modules": "^1.1.0", "request": "^2.88.0", "retry": "^0.12.0", @@ -307,5 +307,8 @@ "test-tap": "npm run tap -- \"test/tap/*.js\" \"test/network/*.js\"", "test-node": "tap --timeout 240 \"test/tap/*.js\" \"test/network/*.js\"" }, - "license": "Artistic-2.0" + "license": "Artistic-2.0", + "engines": { + "node": "6 >=6.2.0 || 8 || >=9.3.0" + } } diff --git a/deps/npm/scripts/update-dist-tags.js b/deps/npm/scripts/update-dist-tags.js new file mode 100644 index 00000000000000..f28bfd0b917394 --- /dev/null +++ b/deps/npm/scripts/update-dist-tags.js @@ -0,0 +1,123 @@ +'use strict' + +/** + * Usage: + * + * node scripts/update-dist-tags.js --otp + * node scripts/update-dist-tags.js --otp= + * node scripts/update-dist-tags.js --otp + */ + +const usage = ` +Usage: + +node scripts/update-dist-tags.js --otp +node scripts/update-dist-tags.js --otp= +node scripts/update-dist-tags.js --otp +` + +const { execSync } = require('child_process') +const semver = require('semver') +const path = require('path') + +const getMajorVersion = (input) => semver.parse(input).major +const getMinorVersion = (input) => semver.parse(input).minor + +// INFO: String templates to generate the tags to update +const LATEST_TAG = (strings, major) => `latest-${major}` +const NEXT_TAG = (strings, major) => `next-${major}` +const TAG_LIST = ['lts', 'next', 'latest'] +const REMOVE_TAG = (strings, major, minor) => `v${major}.${minor}-next` + +// INFO: Finds `--otp` and subsequently otp value (if present) +const PARSE_OTP_FLAG = new RegExp(/(--otp)(=|\s)?([0-9]{6})?/, 'gm') +// INFO: Used to validate otp value (if not found by other regexp) +const PARSE_OTP_VALUE = new RegExp(/^[0-9]{6}$/, 'g') + +const args = process.argv.slice(2) +const versionPath = path.resolve(__dirname, '..', 'package.json') +const { version } = require(versionPath) + +// Run Script +main() + +function main () { + const otp = parseOTP(args) + if (version) { + const major = getMajorVersion(version) + const minor = getMinorVersion(version) + const latestTag = LATEST_TAG`${major}` + const nextTag = NEXT_TAG`${major}` + const removeTag = REMOVE_TAG`${major}${minor}` + const updateList = [].concat(TAG_LIST, latestTag, nextTag) + + updateList.forEach((tag) => { + setDistTag(tag, version, otp) + }) + removeDistTag(removeTag, version, otp) + } else { + console.error('Invalid semver.') + process.exit(1) + } +} + +function parseOTP (args) { + // NOTE: making assumption first _thing_ is a string with "--otp" in it + const parsedArgs = PARSE_OTP_FLAG.exec(args[0]) + if (!parsedArgs) { + console.error('Invalid arguments supplied. Must supply --otp flag.') + console.error(usage) + process.exit(1) + } + // INFO: From the regexp, third group is the OTP code + const otp = parsedArgs[3] + switch (args.length) { + case 0: { + console.error('No arguments supplied.') + console.error(usage) + process.exit(1) + } + case 1: { + // --otp=123456 or --otp123456 + if (otp) { + return otp + } + console.error('Invalid otp value supplied. [CASE 1]') + process.exit(1) + } + case 2: { + // --otp 123456 + // INFO: validating the second argument is an otp code + const isValidOtp = PARSE_OTP_VALUE.test(args[1]) + if (isValidOtp) { + return args[1] + } + console.error('Invalid otp value supplied. [CASE 2]') + process.exit(1) + } + default: { + console.error('Invalid arguments supplied.') + process.exit(1) + } + } +} + +function setDistTag (tag, version, otp) { + try { + const result = execSync(`npm dist-tag set npm@${version} ${tag} --otp=${otp}`, { encoding: 'utf-8' }) + console.log('Result:', result) + } catch (err) { + console.error('Bad dist-tag command.') + process.exit(1) + } +} + +function removeDistTag (tag, version, otp) { + try { + const result = execSync(`npm dist-tag rm npm ${tag} --otp=${otp}`, { encoding: 'utf-8' }) + console.log('Result:', result) + } catch (err) { + console.error('Bad dist-tag command.') + process.exit(1) + } +} diff --git a/deps/npm/tap-snapshots/test-tap-fund.js-TAP.test.js b/deps/npm/tap-snapshots/test-tap-fund.js-TAP.test.js index eb3183a27d7b41..963c59f3e12861 100644 --- a/deps/npm/tap-snapshots/test-tap-fund.js-TAP.test.js +++ b/deps/npm/tap-snapshots/test-tap-fund.js-TAP.test.js @@ -7,13 +7,12 @@ 'use strict' exports[`test/tap/fund.js TAP fund containing multi-level nested deps with no funding > should omit dependencies with no funding declared 1`] = ` nested-no-funding-packages@1.0.0 -+-- lorem@1.0.0 -| \`-- url: https://example.com/lorem -\`-- bar@1.0.0 - +-- type: individual - +-- url: http://example.com/donate ++-- https://example.com/lorem +| \`-- lorem@1.0.0 ++-- http://example.com/donate +| \`-- bar@1.0.0 +\`-- https://example.com/sponsor \`-- sub-bar@1.0.0 - \`-- url: https://example.com/sponsor ` @@ -24,20 +23,34 @@ exports[`test/tap/fund.js TAP fund does not support global > should throw EFUNDG exports[`test/tap/fund.js TAP fund does not support global > should write error msgs to stderr 1`] = ` npm ERR! code EFUNDGLOBAL -npm ERR! \`npm fund\` does not support globals +npm ERR! \`npm fund\` does not support global packages ` exports[`test/tap/fund.js TAP fund does not support global, using --json option > should write error msgs to stderr 1`] = ` npm ERR! code EFUNDGLOBAL -npm ERR! \`npm fund\` does not support globals +npm ERR! \`npm fund\` does not support global packages ` exports[`test/tap/fund.js TAP fund in which same maintainer owns all its deps > should print stack packages together 1`] = ` -maintainer-owns-all-deps@1.0.0, dep-bar@1.0.0, dep-sub-foo@1.0.0, dep-foo@1.0.0 -+-- type: individual -\`-- url: http://example.com/donate +maintainer-owns-all-deps@1.0.0 +\`-- http://example.com/donate + \`-- dep-bar@1.0.0, dep-foo@1.0.0, dep-sub-foo@1.0.0 +` + +exports[`test/tap/fund.js TAP fund using nested packages with multiple sources > should prompt with all available URLs 1`] = ` +1: Funding available at the following URL: https://one.example.com +2: Funding available at the following URL: https://two.example.com +Run \`npm fund [<@scope>/] --which=1\`, for example, to open the first funding URL listed in that package + +` + +exports[`test/tap/fund.js TAP fund using nested packages with multiple sources, with a source number > should open the numbered URL 1`] = ` +Funding available at the following URL: + +https://one.example.com + ` exports[`test/tap/fund.js TAP fund using package argument with no browser > should open funding url 1`] = ` diff --git a/deps/npm/test/fixtures/config/userconfig-with-gc b/deps/npm/test/fixtures/config/userconfig-with-gc index a3a837eb78dd47..cf774bb883d966 100644 --- a/deps/npm/test/fixtures/config/userconfig-with-gc +++ b/deps/npm/test/fixtures/config/userconfig-with-gc @@ -1,4 +1,4 @@ -globalconfig = /Users/mperrotte/npminc/cli/test/fixtures/config/globalconfig +globalconfig = /Users/isaacs/dev/npm/cli/test/fixtures/config/globalconfig email = i@izs.me env-thing = ${random_env_var} init.author.name = Isaac Z. Schlueter diff --git a/deps/npm/test/tap/access.js b/deps/npm/test/tap/access.js index 4183c46b538c0e..f537db2586409a 100644 --- a/deps/npm/test/tap/access.js +++ b/deps/npm/test/tap/access.js @@ -217,6 +217,33 @@ test('npm access grant read-write', function (t) { ) }) +test('npm access grant read-write on unscoped package', function (t) { + server.filteringRequestBody((body) => { + const data = JSON.parse(body) + t.deepEqual(data, { + permissions: 'read-write', + package: 'another' + }, 'got the right body') + return true + }) + server.put('/-/team/myorg/myteam/package', true).reply(201) + common.npm( + [ + 'access', + 'grant', 'read-write', + 'myorg:myteam', + 'another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access grant') + t.equal(code, 0, 'exited with Error') + t.end() + } + ) +}) + test('npm access grant others', function (t) { common.npm( [ diff --git a/deps/npm/test/tap/fund.js b/deps/npm/test/tap/fund.js index 97b414bf6e0173..48d903f9897f6f 100644 --- a/deps/npm/test/tap/fund.js +++ b/deps/npm/test/tap/fund.js @@ -14,6 +14,7 @@ const base = common.pkg const noFunding = path.join(base, 'no-funding-package') const maintainerOwnsAllDeps = path.join(base, 'maintainer-owns-all-deps') const nestedNoFundingPackages = path.join(base, 'nested-no-funding-packages') +const nestedMultipleFundingPackages = path.join(base, 'nested-multiple-funding-packages') const fundingStringShorthand = path.join(base, 'funding-string-shorthand') function getFixturePackage ({ name, version, dependencies, funding }, extras) { @@ -113,6 +114,37 @@ const fixture = new Tacks(Dir({ } }) }) + }), + 'nested-multiple-funding-packages': getFixturePackage({ + name: 'nested-multiple-funding-packages', + funding: [ + 'https://one.example.com', + 'https://two.example.com' + ], + dependencies: { + foo: '*' + }, + devDependencies: { + bar: '*' + } + }, { + node_modules: Dir({ + foo: getFixturePackage({ + name: 'foo', + funding: [ + 'http://example.com', + { url: 'http://sponsors.example.com/me' }, + 'http://collective.example.com' + ] + }), + bar: getFixturePackage({ + name: 'bar', + funding: [ + 'http://collective.example.com', + { url: 'http://sponsors.example.com/you' } + ] + }) + }) }) })) @@ -224,6 +256,54 @@ testFundCmd({ } }) +testFundCmd({ + title: 'fund containing multi-level nested deps with multiple funding sources, using --json option', + assertionMsg: 'should omit dependencies with no funding declared', + args: ['--json'], + opts: { cwd: nestedMultipleFundingPackages }, + assertion: jsonTest, + expected: { + length: 2, + name: 'nested-multiple-funding-packages', + version: '1.0.0', + funding: [ + { + url: 'https://one.example.com' + }, + { + url: 'https://two.example.com' + } + ], + dependencies: { + bar: { + version: '1.0.0', + funding: [ + { + url: 'http://collective.example.com' + }, + { + url: 'http://sponsors.example.com/you' + } + ] + }, + foo: { + version: '1.0.0', + funding: [ + { + url: 'http://example.com' + }, + { + url: 'http://sponsors.example.com/me' + }, + { + url: 'http://collective.example.com' + } + ] + } + } + } +}) + testFundCmd({ title: 'fund does not support global', assertionMsg: 'should throw EFUNDGLOBAL error', @@ -248,7 +328,7 @@ testFundCmd({ expected: { error: { code: 'EFUNDGLOBAL', - summary: '`npm fund` does not support globals', + summary: '`npm fund` does not support global packages', detail: '' } } @@ -268,6 +348,20 @@ testFundCmd({ opts: { cwd: fundingStringShorthand } }) +testFundCmd({ + title: 'fund using nested packages with multiple sources', + assertionMsg: 'should prompt with all available URLs', + args: ['.'], + opts: { cwd: nestedMultipleFundingPackages } +}) + +testFundCmd({ + title: 'fund using nested packages with multiple sources, with a source number', + assertionMsg: 'should open the numbered URL', + args: ['.', '--which=1', '--no-browser'], + opts: { cwd: nestedMultipleFundingPackages } +}) + testFundCmd({ title: 'fund using package argument with no browser, using --json option', assertionMsg: 'should open funding url', diff --git a/deps/npm/test/tap/unsupported.js b/deps/npm/test/tap/unsupported.js index deae8d3c034c19..2ebbd2d6542e2b 100644 --- a/deps/npm/test/tap/unsupported.js +++ b/deps/npm/test/tap/unsupported.js @@ -30,7 +30,8 @@ var versions = [ ['v9.3.0', false, false], ['v10.0.0-0', false, false], ['v11.0.0-0', false, false], - ['v12.0.0-0', false, false] + ['v12.0.0-0', false, false], + ['v13.0.0-0', false, false] ] test('versions', function (t) { diff --git a/deps/npm/test/tap/utils.funding.js b/deps/npm/test/tap/utils.funding.js index 709762eacb7bb2..4276f3e43a5cfe 100644 --- a/deps/npm/test/tap/utils.funding.js +++ b/deps/npm/test/tap/utils.funding.js @@ -612,3 +612,46 @@ test('retrieve funding info string shorthand', (t) => { ) t.end() }) + +test('retrieve funding info from an array', (t) => { + t.deepEqual( + retrieveFunding([ + 'http://example.com', + { + url: 'http://two.example.com' + }, + 'http://three.example.com', + { + url: 'http://three.example.com', + type: 'dos' + }, + { + url: 'http://three.example.com', + type: 'third copy!', + extra: 'extra metadata!' + } + ]), + [ + { + url: 'http://example.com' + }, + { + url: 'http://two.example.com' + }, + { + url: 'http://three.example.com' + }, + { + url: 'http://three.example.com', + type: 'dos' + }, + { + url: 'http://three.example.com', + type: 'third copy!', + extra: 'extra metadata!' + } + ], + 'should accept and normalize multiple funding sources' + ) + t.end() +})