From 00842604483e4c2e622dfdb3a97440e07646158f Mon Sep 17 00:00:00 2001
From: Rebecca Turner
+Nate Goldman
+Ted Yavuzkurt
If that's not fancy enough for you, then you can fetch the code with git, and mess with it directly.
Add a registry user account
npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
+npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
aliases: login, add-user
DESCRIPTION
@@ -52,6 +52,14 @@ private registries where metadata and package tarballs are stored on hosts with
different hostnames. See always-auth in npm-config(7) for more details on
always-auth. Registry-specific configuration of always-auth takes precedence
over any global configuration.
+auth-type
+
+- Default:
'legacy'
+- Type:
'legacy', 'sso', 'saml', 'oauth'
+
+What authentication strategy to use with adduser/login. Some npm registries
+(for example, npmE) might support alternative auth strategies besides classic
+username/password entry in legacy npm.
SEE ALSO
- npm-registry(7)
@@ -73,5 +81,5 @@ over any global configuration.
-
+
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index 2eec18bdd35..195a104ea09 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -35,5 +35,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index 41f5d9b2cf6..f0dbb42cd55 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -55,5 +55,5 @@ a package.json in the current folder and use the name
-
+
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index e78f351deca..56819cfee6d 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -40,5 +40,5 @@ directly, run:
-
+
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index c45d3b09afe..fb949b64fe7 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -31,5 +31,5 @@ install packages into the local space.
-
+
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index 0aed55fca5a..3d9b2cb087c 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -82,5 +82,5 @@ they do not make an HTTP request to the registry.
-
+
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index d6f553a4534..4e409caffef 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -43,5 +43,5 @@ completions based on the arguments.
-
+
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index 2aa0f880ac2..ac198d75ab1 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -67,5 +67,5 @@ global config.
-
+
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index e1ca0d1628f..633430e48ff 100644
--- a/deps/npm/html/doc/cli/npm-dedupe.html
+++ b/deps/npm/html/doc/cli/npm-dedupe.html
@@ -61,5 +61,5 @@ result in new modules being installed.
-
+
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index 557e12086be..294cce0666d 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -38,5 +38,5 @@ something like this:
-
+
diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html
index 68aabf0fdde..6273b955424 100644
--- a/deps/npm/html/doc/cli/npm-dist-tag.html
+++ b/deps/npm/html/doc/cli/npm-dist-tag.html
@@ -86,5 +86,5 @@ begin with a number or the letter v.
-
+
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index c15d6b3ceb8..48b0fef0dfc 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -56,5 +56,5 @@ the current folder and use the name property.
-
+
diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html
index f5cce1cf988..28d409b32e0 100644
--- a/deps/npm/html/doc/cli/npm-doctor.html
+++ b/deps/npm/html/doc/cli/npm-doctor.html
@@ -103,4 +103,4 @@ cache, you should probably run npm cache clean and reset the cache.
-
+
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index 0d8732ce7a1..0954d6417a0 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -49,5 +49,5 @@ or "notepad" on Windows.
-
+
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index 62acbee3fb1..077d6f6b3bd 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -49,5 +49,5 @@ Windows
-
+
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index 733d7156514..97a92627bbe 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -45,5 +45,5 @@ where the terms were found in the documentation.
-
+
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index 722a9e45e78..8ab25aef3b9 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -50,5 +50,5 @@ matches are equivalent to specifying a topic name.
-
+
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index 1569d2b75f1..367621b5cd5 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -48,5 +48,5 @@ defaults and not prompt you for any options.
-
+
diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html
index 1939b4e5846..978dcda9a7e 100644
--- a/deps/npm/html/doc/cli/npm-install-test.html
+++ b/deps/npm/html/doc/cli/npm-install-test.html
@@ -42,5 +42,5 @@ takes exactly the same arguments as npm install.
-
+
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 20e5a75a3f3..31588304102 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -316,5 +316,5 @@ affects a real use-case, it will be investigated.
-
+
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index befca7eac94..fae09d42276 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -74,5 +74,5 @@ include that scope, e.g.
-
+
diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html
index f7e890c480a..2c735288d8a 100644
--- a/deps/npm/html/doc/cli/npm-logout.html
+++ b/deps/npm/html/doc/cli/npm-logout.html
@@ -51,5 +51,5 @@ it takes precedence.
-
+
diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html
index 5293f35ef34..528bd80bdde 100644
--- a/deps/npm/html/doc/cli/npm-ls.html
+++ b/deps/npm/html/doc/cli/npm-ls.html
@@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.
limit the results to only the paths to the packages named. Note that
nested packages will also show the paths to the specified packages.
For example, running npm ls promzard in npm's source tree will show:
-
npm@4.2.0 /path/to/npm
+npm@4.5.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
It will print out extraneous, missing, and invalid packages.
@@ -104,5 +104,5 @@ project.
-
+
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index de59123cff2..5edd415e71e 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -116,5 +116,5 @@ project.
-
+
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index b1270f7a7fe..5e422e34d51 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -51,5 +51,5 @@ that is not implemented at this time.
-
+
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index d74b2defb83..8443721fe9d 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -41,5 +41,5 @@ overwritten the second time.
-
+
diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html
index 3c4ff700fe9..300e7f294f6 100644
--- a/deps/npm/html/doc/cli/npm-ping.html
+++ b/deps/npm/html/doc/cli/npm-ping.html
@@ -32,5 +32,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index ba0ddb12810..7b2520e0741 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -38,5 +38,5 @@ to contain a package.json file unless -g is also specified.
-
+
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 60b5c173cdd..7aea579d70c 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -40,5 +40,5 @@ negate NODE_ENV being set to production.
-
+
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 3f137577f96..1ec867fb803 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -76,5 +76,5 @@ packs them into a tarball to be uploaded to the registry.
-
+
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index c4174bf810b..c3d5e6b7028 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -35,5 +35,5 @@ the new binary.
-
+
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index ad2adc55138..26fc99c11e8 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -41,5 +41,5 @@ a package.json in the current folder and use the name
-
+
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index 4e085fd070e..2117ccd5229 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number
-
+
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index 6bc996a3b09..d90558dc69d 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -35,5 +35,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index c1221878f6b..ab33c6e393a 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -66,5 +66,5 @@ you will be given a warning to run npm install, just in case you
-
+
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index 7b142d53fe5..33c102506e6 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -109,5 +109,5 @@ setting.
-
+
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 3c3edc39bfd..ba9b4b59cfa 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -180,5 +180,5 @@ contents rather than versions.
-
+
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index a29e01f68b6..39ddbf2d7c6 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -36,5 +36,5 @@ a vaguely positive way to show that you care.
-
+
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index e528841db2f..d461a3cca23 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -36,5 +36,5 @@ you will most certainly enjoy this command.
-
+
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index 7b0a14e6fef..dda116689c4 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -39,5 +39,5 @@ more details.
-
+
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 780a2320086..79186a5c9e8 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -34,5 +34,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html
index 0cb0689e7de..32515cd0c1a 100644
--- a/deps/npm/html/doc/cli/npm-team.html
+++ b/deps/npm/html/doc/cli/npm-team.html
@@ -67,5 +67,5 @@ use the npm access command to grant or revoke the appropriate permi
-
+
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index 42686910750..ee1585a3ee1 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -36,5 +36,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index eda627104f2..03f527a66d2 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -60,5 +60,5 @@ npm uninstall dtrace-provider --save-optional
-
+
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index 296b5279ec1..41b7649f744 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -26,6 +26,10 @@ the root package entry is removed from the registry entirely.
Even if a package version is unpublished, that specific name and
version combination can never be reused. In order to publish the
package again, a new version number must be used.
+With the default registry (registry.npmjs.org), unpublish is
+only allowed with versions published in the last 24 hours. If you
+are trying to unpublish a version published longer ago than that,
+contact support@npmjs.com.
The scope is optional and follows the usual rules for npm-scope(7).
SEE ALSO
@@ -47,5 +51,5 @@ package again, a new version number must be used.
-
+
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index 805232b0d30..825af505d3c 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -118,5 +118,5 @@ be downgraded.
-
+
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index c40e6632932..04e25b6b3bb 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -107,5 +107,5 @@ and tag up to the server, and deletes the build/temp directory.
-
+
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index 13747400041..40461e17910 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -86,5 +86,5 @@ the field name.
-
+
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index ac8c1c6bc3c..04182e9fcf8 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -33,5 +33,5 @@
-
+
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index e1e53c2018a..81b42767e32 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -13,7 +13,7 @@
SYNOPSIS
npm <command> [args]
VERSION
-4.2.0
+4.5.0
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
@@ -126,7 +126,7 @@ will no doubt tell you to put the output in a gist or email.
Isaac Z. Schlueter ::
isaacs ::
@izs ::
-i@izs.me
+i@izs.me
SEE ALSO
- npm-help(1)
@@ -150,5 +150,5 @@ will no doubt tell you to put the output in a gist or email.
-
+
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index 4b809307c10..f59bb594a8d 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -182,5 +182,5 @@ cannot be found elsewhere. See packa
-
+
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index 4b809307c10..f59bb594a8d 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -182,5 +182,5 @@ cannot be found elsewhere. See packa
-
+
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index 70a1022c3c9..11a741c2356 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -586,5 +586,5 @@ ignored.
-
+
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index a9c0dddf33c..2e4f347aa1d 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -85,5 +85,5 @@ manner.
-
+
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index 70a1022c3c9..11a741c2356 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -586,5 +586,5 @@ ignored.
-
+
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index b6c448f05a6..fb7b4c3d84d 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -162,5 +162,5 @@
-
+
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index 840d6274b1f..b10b4459142 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -153,5 +153,5 @@ set to anything."
-
+
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index 666f6d4b01d..e1707bc0d71 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -119,6 +119,12 @@ even for GET requests.
When "dev" or "development" and running local npm shrinkwrap,
npm outdated, or npm update, is an alias for --dev.
+auth-type
+
+- Default:
'legacy'
+- Type:
'legacy', 'sso', 'saml', 'oauth'
+
+What authentication strategy to use with adduser/login.
bin-links
- Default:
true
@@ -525,7 +531,7 @@ combination). Passed to the http Agent used to make th
Any "%s" in the message will be replaced with the version number.
metrics-registry
-- Default: "https://registry.npmjs.org/"
+- Default: The value of
registry (which defaults to "https://registry.npmjs.org/")
- Type: String
The registry you want to send cli metrics to if send-metrics is true.
@@ -774,6 +780,19 @@ installing.
using -s to add a signature.
Note that git requires you to have set up GPG keys in your git configs
for this to work properly.
+sso-poll-frequency
+
+- Default: 500
+- Type: Number
+
+When used with SSO-enabled auth-types, configures how regularly the registry
+should be polled while the user is completing authentication.
+sso-type
+
+- Default: 'oauth'
+- Type: 'oauth', 'saml', or null
+
+If --auth-type=sso, the type of SSO type to use.
strict-ssl
- Default: true
@@ -901,5 +920,5 @@ exit successfully.
-
+
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index 13b0c3d14f6..24df9632e25 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -194,5 +194,5 @@ from a fresh checkout.
-
+
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index 731f73ff1d7..4d21dfc1f10 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -20,7 +20,7 @@ Conduct.
TL;DR
- Get the author email with
npm owner ls <pkgname>
-- Email the author, CC support@npmjs.com
+- Email the author, CC support@npmjs.com
- After a few weeks, if there's no resolution, we'll sort it out.
Don't squat on package names. Publish code or move out of the way.
@@ -55,12 +55,12 @@ because Yusuf's foo is in the way.
- Alice emails Yusuf, explaining the situation as respectfully as possible,
and what she would like to do with the module name. She adds the npm support
-staff support@npmjs.com to the CC list of the email. Mention in the email
+staff support@npmjs.com to the CC list of the email. Mention in the email
that Yusuf can run npm owner
add alice foo to add Alice as an owner of the
foo package.
- After a reasonable amount of time, if Yusuf has not responded, or if Yusuf
and Alice can't come to any sort of resolution, email support
-support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least
+support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least
4 weeks.)
REASONING
@@ -96,12 +96,12 @@ application database or otherwise putting non-packagey things into it.
Code of Conduct such as hateful
language, pornographic content, or harassment.
-If you see bad behavior like this, please report it to abuse@npmjs.com right
+
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.
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
+using a confusingly similar package name, email abuse@npmjs.com with a link to
the package or user account on https://npmjs.com. Attach a
copy of your trademark registration certificate.
If we see that the package's publisher is intentionally misleading others by
@@ -134,5 +134,5 @@ License.
-
+
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index c3a177c3b05..23f111f8efa 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -162,5 +162,5 @@
-
+
diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html
index 295839e289b..93a6a4f1e9f 100644
--- a/deps/npm/html/doc/misc/npm-orgs.html
+++ b/deps/npm/html/doc/misc/npm-orgs.html
@@ -86,5 +86,5 @@
-
+
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index 79eb492303d..51182dede1c 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -90,5 +90,5 @@ effectively implement the entire CouchDB API anyway.
-
+
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index eab13e7bebe..d0672ff6e77 100644
--- a/deps/npm/html/doc/misc/npm-scope.html
+++ b/deps/npm/html/doc/misc/npm-scope.html
@@ -99,5 +99,5 @@ that registry instead.
-
+
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index 3b37178494b..461a8964a67 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -237,5 +237,5 @@ scripts is for compilation which must be done on the target architecture.
-
+
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index aeaea468d1b..d6cc76f23f9 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -57,5 +57,5 @@ modules. To track those down, you can do the following:
-
+
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index 48dee7d64b0..1250143bf63 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -325,5 +325,5 @@ range, use the satisfies(version, range) function.
-
+
diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js
index 7f3975175ad..0aac6b7fbb4 100644
--- a/deps/npm/lib/adduser.js
+++ b/deps/npm/lib/adduser.js
@@ -2,11 +2,7 @@ module.exports = adduser
var log = require('npmlog')
var npm = require('./npm.js')
-var read = require('read')
-var userValidate = require('npm-user-validate')
-var output = require('./utils/output')
var usage = require('./utils/usage')
-var chain = require('slide').chain
var crypto
try {
@@ -15,7 +11,7 @@ try {
adduser.usage = usage(
'adduser',
- 'npm adduser [--registry=url] [--scope=@orgname] [--always-auth]'
+ 'npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy] [--always-auth]'
)
function adduser (args, cb) {
@@ -25,154 +21,29 @@ function adduser (args, cb) {
))
}
- var creds = npm.config.getCredentialsByURI(npm.config.get('registry'))
- var c = {
- u: creds.username || '',
- p: creds.password || '',
- e: creds.email || ''
- }
- var u = {}
-
- log.disableProgress()
- chain([
- [readUsername, c, u],
- [readPassword, c, u],
- [readEmail, c, u],
- [save, c, u]
- ], cb)
-}
-
-function readUsername (c, u, cb) {
- var v = userValidate.username
- read({prompt: 'Username: ', default: c.u || ''}, function (er, un) {
- if (er) {
- return cb(er.message === 'cancelled' ? er.message : er)
- }
-
- // make sure it's valid. we have to do this here, because
- // couchdb will only ever say "bad password" with a 401 when
- // you try to PUT a _users record that the validate_doc_update
- // rejects for *any* reason.
-
- if (!un) {
- return readUsername(c, u, cb)
- }
-
- var error = v(un)
- if (error) {
- log.warn(error.message)
- return readUsername(c, u, cb)
- }
-
- c.changed = c.u !== un
- u.u = un
- cb(er)
- })
-}
-
-function readPassword (c, u, cb) {
- var v = userValidate.pw
-
- var prompt
- if (c.p && !c.changed) {
- prompt = 'Password: (or leave unchanged) '
- } else {
- prompt = 'Password: '
- }
-
- read({prompt: prompt, silent: true}, function (er, pw) {
- if (er) {
- return cb(er.message === 'cancelled' ? er.message : er)
- }
-
- if (!c.changed && pw === '') {
- // when the username was not changed,
- // empty response means "use the old value"
- pw = c.p
- }
-
- if (!pw) {
- return readPassword(c, u, cb)
- }
-
- var error = v(pw)
- if (error) {
- log.warn(error.message)
- return readPassword(c, u, cb)
- }
-
- c.changed = c.changed || c.p !== pw
- u.p = pw
- cb(er)
- })
-}
-
-function readEmail (c, u, cb) {
- var v = userValidate.email
- var r = { prompt: 'Email: (this IS public) ', default: c.e || '' }
- read(r, function (er, em) {
- if (er) {
- return cb(er.message === 'cancelled' ? er.message : er)
- }
-
- if (!em) {
- return readEmail(c, u, cb)
- }
-
- var error = v(em)
- if (error) {
- log.warn(error.message)
- return readEmail(c, u, cb)
- }
-
- u.e = em
- cb(er)
- })
-}
-
-function save (c, u, cb) {
- // save existing configs, but yank off for this PUT
- var uri = npm.config.get('registry')
+ var registry = npm.config.get('registry')
var scope = npm.config.get('scope')
+ var creds = npm.config.getCredentialsByURI(npm.config.get('registry'))
- // there may be a saved scope and no --registry (for login)
if (scope) {
var scopedRegistry = npm.config.get(scope + ':registry')
var cliRegistry = npm.config.get('registry', 'cli')
- if (scopedRegistry && !cliRegistry) uri = scopedRegistry
- }
-
- var params = {
- auth: {
- username: u.u,
- password: u.p,
- email: u.e
- }
+ if (scopedRegistry && !cliRegistry) registry = scopedRegistry
}
- npm.registry.adduser(uri, params, function (er, doc) {
- if (er) return cb(er)
-
- // don't want this polluting the configuration
- npm.config.del('_token', 'user')
- if (scope) npm.config.set(scope + ':registry', uri, 'user')
+ log.disableProgress()
- if (doc && doc.token) {
- npm.config.setCredentialsByURI(uri, {
- token: doc.token
- })
- } else {
- npm.config.setCredentialsByURI(uri, {
- username: u.u,
- password: u.p,
- email: u.e,
- alwaysAuth: npm.config.get('always-auth')
- })
- }
+ try {
+ var auth = require('./auth/' + npm.config.get('auth-type'))
+ } catch (e) {
+ return cb(new Error('no such auth module'))
+ }
+ auth.login(creds, registry, scope, function (err, newCreds) {
+ if (err) return cb(err)
- log.info('adduser', 'Authorized user %s', u.u)
- var scopeMessage = scope ? ' to scope ' + scope : ''
- output('Logged in as %s%s on %s.', u.u, scopeMessage, uri)
+ npm.config.del('_token', 'user') // prevent legacy pollution
+ if (scope) npm.config.set(scope + ':registry', registry, 'user')
+ npm.config.setCredentialsByURI(registry, newCreds)
npm.config.save('user', cb)
})
}
diff --git a/deps/npm/lib/auth/legacy.js b/deps/npm/lib/auth/legacy.js
new file mode 100644
index 00000000000..2fa4a26e358
--- /dev/null
+++ b/deps/npm/lib/auth/legacy.js
@@ -0,0 +1,142 @@
+var log = require('npmlog')
+var npm = require('../npm.js')
+var read = require('read')
+var userValidate = require('npm-user-validate')
+var output = require('../utils/output')
+var chain = require('slide').chain
+
+module.exports.login = function login (creds, registry, scope, cb) {
+ var c = {
+ u: creds.username || '',
+ p: creds.password || '',
+ e: creds.email || ''
+ }
+ var u = {}
+
+ chain([
+ [readUsername, c, u],
+ [readPassword, c, u],
+ [readEmail, c, u],
+ [save, c, u, registry, scope]
+ ], function (err, res) {
+ cb(err, res && res[res.length - 1])
+ })
+}
+
+function readUsername (c, u, cb) {
+ var v = userValidate.username
+ read({prompt: 'Username: ', default: c.u || ''}, function (er, un) {
+ if (er) {
+ return cb(er.message === 'cancelled' ? er.message : er)
+ }
+
+ // make sure it's valid. we have to do this here, because
+ // couchdb will only ever say "bad password" with a 401 when
+ // you try to PUT a _users record that the validate_doc_update
+ // rejects for *any* reason.
+
+ if (!un) {
+ return readUsername(c, u, cb)
+ }
+
+ var error = v(un)
+ if (error) {
+ log.warn(error.message)
+ return readUsername(c, u, cb)
+ }
+
+ c.changed = c.u !== un
+ u.u = un
+ cb(er)
+ })
+}
+
+function readPassword (c, u, cb) {
+ var v = userValidate.pw
+
+ var prompt
+ if (c.p && !c.changed) {
+ prompt = 'Password: (or leave unchanged) '
+ } else {
+ prompt = 'Password: '
+ }
+
+ read({prompt: prompt, silent: true}, function (er, pw) {
+ if (er) {
+ return cb(er.message === 'cancelled' ? er.message : er)
+ }
+
+ if (!c.changed && pw === '') {
+ // when the username was not changed,
+ // empty response means "use the old value"
+ pw = c.p
+ }
+
+ if (!pw) {
+ return readPassword(c, u, cb)
+ }
+
+ var error = v(pw)
+ if (error) {
+ log.warn(error.message)
+ return readPassword(c, u, cb)
+ }
+
+ c.changed = c.changed || c.p !== pw
+ u.p = pw
+ cb(er)
+ })
+}
+
+function readEmail (c, u, cb) {
+ var v = userValidate.email
+ var r = { prompt: 'Email: (this IS public) ', default: c.e || '' }
+ read(r, function (er, em) {
+ if (er) {
+ return cb(er.message === 'cancelled' ? er.message : er)
+ }
+
+ if (!em) {
+ return readEmail(c, u, cb)
+ }
+
+ var error = v(em)
+ if (error) {
+ log.warn(error.message)
+ return readEmail(c, u, cb)
+ }
+
+ u.e = em
+ cb(er)
+ })
+}
+
+function save (c, u, registry, scope, cb) {
+ var params = {
+ auth: {
+ username: u.u,
+ password: u.p,
+ email: u.e
+ }
+ }
+ npm.registry.adduser(registry, params, function (er, doc) {
+ if (er) return cb(er)
+
+ var newCreds = (doc && doc.token)
+ ? {
+ token: doc.token
+ }
+ : {
+ username: u.u,
+ password: u.p,
+ email: u.e,
+ alwaysAuth: npm.config.get('always-auth')
+ }
+
+ log.info('adduser', 'Authorized user %s', u.u)
+ var scopeMessage = scope ? ' to scope ' + scope : ''
+ output('Logged in as %s%s on %s.', u.u, scopeMessage, registry)
+
+ cb(null, newCreds)
+ })
+}
diff --git a/deps/npm/lib/auth/oauth.js b/deps/npm/lib/auth/oauth.js
new file mode 100644
index 00000000000..1cb3ffec6f9
--- /dev/null
+++ b/deps/npm/lib/auth/oauth.js
@@ -0,0 +1,7 @@
+var ssoAuth = require('./sso')
+var npm = require('../npm')
+
+module.exports.login = function login () {
+ npm.config.set('sso-type', 'oauth')
+ ssoAuth.login.apply(this, arguments)
+}
diff --git a/deps/npm/lib/auth/saml.js b/deps/npm/lib/auth/saml.js
new file mode 100644
index 00000000000..ae92ea5bbfb
--- /dev/null
+++ b/deps/npm/lib/auth/saml.js
@@ -0,0 +1,7 @@
+var ssoAuth = require('./sso')
+var npm = require('../npm')
+
+module.exports.login = function login () {
+ npm.config.set('sso-type', 'saml')
+ ssoAuth.login.apply(this, arguments)
+}
diff --git a/deps/npm/lib/auth/sso.js b/deps/npm/lib/auth/sso.js
new file mode 100644
index 00000000000..faffe2fa595
--- /dev/null
+++ b/deps/npm/lib/auth/sso.js
@@ -0,0 +1,59 @@
+var log = require('npmlog')
+var npm = require('../npm.js')
+var output = require('../utils/output')
+var opener = require('opener')
+
+module.exports.login = function login (creds, registry, scope, cb) {
+ var ssoType = npm.config.get('sso-type')
+ if (!ssoType) { return cb(new Error('Missing option: sso-type')) }
+
+ var params = {
+ // We're reusing the legacy login endpoint, so we need some dummy
+ // stuff here to pass validation. They're never used.
+ auth: {
+ username: 'npm_' + ssoType + '_auth_dummy_user',
+ password: 'placeholder',
+ email: 'support@npmjs.com',
+ authType: ssoType
+ }
+ }
+ npm.registry.adduser(registry, params, function (er, doc) {
+ if (er) return cb(er)
+ if (!doc || !doc.token) return cb(new Error('no SSO token returned'))
+ if (!doc.sso) return cb(new Error('no SSO URL returned by services'))
+
+ output('If your browser doesn\'t open, visit ' +
+ doc.sso +
+ ' to complete authentication')
+ opener(doc.sso, { command: npm.config.get('browser') }, function () {
+ pollForSession(registry, doc.token, function (err, username) {
+ if (err) return cb(err)
+
+ log.info('adduser', 'Authorized user %s', username)
+ var scopeMessage = scope ? ' to scope ' + scope : ''
+ output('Logged in as %s%s on %s.', username, scopeMessage, registry)
+
+ cb(null, { token: doc.token })
+ })
+ })
+ })
+}
+
+function pollForSession (registry, token, cb) {
+ log.info('adduser', 'Polling for validated SSO session')
+ npm.registry.whoami(registry, {
+ auth: {
+ token: token
+ }
+ }, function (er, username) {
+ if (er && er.statusCode !== 401) {
+ cb(er)
+ } else if (!username) {
+ setTimeout(function () {
+ pollForSession(registry, token, cb)
+ }, npm.config.get('sso-poll-frequency'))
+ } else {
+ cb(null, username)
+ }
+ })
+}
diff --git a/deps/npm/lib/bugs.js b/deps/npm/lib/bugs.js
index 003ce7f8cb0..5f166c33f6f 100644
--- a/deps/npm/lib/bugs.js
+++ b/deps/npm/lib/bugs.js
@@ -19,7 +19,7 @@ bugs.completion = function (opts, cb) {
function bugs (args, cb) {
var n = args.length ? args[0] : '.'
- fetchPackageMetadata(n, '.', function (er, d) {
+ fetchPackageMetadata(n, '.', {fullMetadata: true}, function (er, d) {
if (er) return cb(er)
var url = d.bugs && ((typeof d.bugs === 'string') ? d.bugs : d.bugs.url)
diff --git a/deps/npm/lib/config/core.js b/deps/npm/lib/config/core.js
index b833b754095..15a1674b3da 100644
--- a/deps/npm/lib/config/core.js
+++ b/deps/npm/lib/config/core.js
@@ -208,7 +208,7 @@ inherits(Conf, CC)
function Conf (base) {
if (!(this instanceof Conf)) return new Conf(base)
- CC.apply(this)
+ CC.call(this)
if (base) {
if (base instanceof Conf) {
diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
index a79c8a0fa07..96499d1718c 100644
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -108,6 +108,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
access: null,
'always-auth': false,
also: null,
+ 'auth-type': 'legacy',
'bin-links': true,
browser: null,
@@ -148,6 +149,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
'global-style': false,
group: process.platform === 'win32' ? 0
: process.env.SUDO_GID || (process.getgid && process.getgid()),
+ 'ham-it-up': false,
heading: 'npm',
'if-present': false,
'ignore-scripts': false,
@@ -168,7 +170,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
long: false,
maxsockets: 50,
message: '%s',
- 'metrics-registry': 'https://registry.npmjs.org/',
+ 'metrics-registry': null,
'node-version': process.version,
'onload-script': false,
only: null,
@@ -203,6 +205,8 @@ Object.defineProperty(exports, 'defaults', {get: function () {
shell: osenv.shell(),
shrinkwrap: true,
'sign-git-tag': false,
+ 'sso-poll-frequency': 500,
+ 'sso-type': 'oauth',
'strict-ssl': true,
tag: 'latest',
'tag-version-prefix': 'v',
@@ -231,6 +235,7 @@ exports.types = {
access: [null, 'restricted', 'public'],
'always-auth': Boolean,
also: [null, 'dev', 'development'],
+ 'auth-type': ['legacy', 'sso', 'saml', 'oauth'],
'bin-links': Boolean,
browser: [null, String],
ca: [null, String, Array],
@@ -262,6 +267,7 @@ exports.types = {
group: [Number, String],
'https-proxy': [null, url],
'user-agent': String,
+ 'ham-it-up': Boolean,
'heading': String,
'if-present': Boolean,
'ignore-scripts': Boolean,
@@ -284,7 +290,7 @@ exports.types = {
long: Boolean,
maxsockets: Number,
message: String,
- 'metrics-registry': String,
+ 'metrics-registry': [null, String],
'node-version': [null, semver],
'onload-script': [null, String],
only: [null, 'dev', 'development', 'prod', 'production'],
@@ -314,6 +320,8 @@ exports.types = {
shell: String,
shrinkwrap: Boolean,
'sign-git-tag': Boolean,
+ 'sso-poll-frequency': Number,
+ 'sso-type': [null, 'oauth', 'saml'],
'strict-ssl': Boolean,
tag: String,
tmp: path,
diff --git a/deps/npm/lib/docs.js b/deps/npm/lib/docs.js
index 19dcce163c6..2248702a461 100644
--- a/deps/npm/lib/docs.js
+++ b/deps/npm/lib/docs.js
@@ -33,7 +33,7 @@ function docs (args, cb) {
function getDoc (project, cb) {
log.silly('getDoc', project)
- fetchPackageMetadata(project, '.', function (er, d) {
+ fetchPackageMetadata(project, '.', {fullMetadata: true}, function (er, d) {
if (er) return cb(er)
var url = d.homepage
if (!url) url = 'https://www.npmjs.org/package/' + d.name
diff --git a/deps/npm/lib/doctor/check-files-permission.js b/deps/npm/lib/doctor/check-files-permission.js
index ac3bb40bc6d..74393596f6c 100644
--- a/deps/npm/lib/doctor/check-files-permission.js
+++ b/deps/npm/lib/doctor/check-files-permission.js
@@ -34,7 +34,7 @@ function checkFilesPermission (root, mask, cb) {
function checkFile (f, next) {
var file = path.join(root, f)
tracker.silly('checkFilePermissions', f)
- fs.stat(file, function (e, stat) {
+ fs.lstat(file, function (e, stat) {
tracker.completeWork(1)
if (e) return next(e)
if (!stat.isFile()) return next()
diff --git a/deps/npm/lib/doctor/get-latest-npm-version.js b/deps/npm/lib/doctor/get-latest-npm-version.js
index 4df0fee0fa3..aba9b773cd8 100644
--- a/deps/npm/lib/doctor/get-latest-npm-version.js
+++ b/deps/npm/lib/doctor/get-latest-npm-version.js
@@ -4,7 +4,7 @@ var fetchPackageMetadata = require('../fetch-package-metadata')
function getLatestNpmVersion (cb) {
var tracker = log.newItem('getLatestNpmVersion', 1)
tracker.info('getLatestNpmVersion', 'Getting npm package information')
- fetchPackageMetadata('npm@latest', '.', function (e, d) {
+ fetchPackageMetadata('npm@latest', '.', {fullMetadata: true}, function (e, d) {
tracker.finish()
cb(e, d.version)
})
diff --git a/deps/npm/lib/fetch-package-metadata.js b/deps/npm/lib/fetch-package-metadata.js
index bd6e47e17c1..ae22004e5bb 100644
--- a/deps/npm/lib/fetch-package-metadata.js
+++ b/deps/npm/lib/fetch-package-metadata.js
@@ -16,6 +16,7 @@ var clone = require('lodash.clonedeep')
var validate = require('aproba')
var unpipe = require('unpipe')
var normalizePackageData = require('normalize-package-data')
+var limit = require('call-limit')
var npm = require('./npm.js')
var mapToRegistry = require('./utils/map-to-registry.js')
@@ -39,12 +40,16 @@ function andLogAndFinish (spec, tracker, done) {
}
}
-module.exports = function fetchPackageMetadata (spec, where, tracker, done) {
+module.exports = limit(fetchPackageMetadata, npm.limit.fetch)
+
+function fetchPackageMetadata (spec, where, opts, done) {
+ validate('SSOF|SSFZ|OSOF|OSFZ', [spec, where, opts, done])
+
if (!done) {
- done = tracker || where
- tracker = null
- if (done === where) where = null
+ done = opts
+ opts = {}
}
+ var tracker = opts.tracker
if (typeof spec === 'object') {
var dep = spec
spec = dep.raw
@@ -53,11 +58,11 @@ module.exports = function fetchPackageMetadata (spec, where, tracker, done) {
if (!dep) {
log.silly('fetchPackageMetaData', spec)
return realizePackageSpecifier(spec, where, iferr(logAndFinish, function (dep) {
- fetchPackageMetadata(dep, where, tracker, done)
+ fetchPackageMetadata(dep, where, {tracker: tracker}, done)
}))
}
if (dep.type === 'version' || dep.type === 'range' || dep.type === 'tag') {
- fetchNamedPackageData(dep, addRequestedAndFinish)
+ fetchNamedPackageData(dep, opts, addRequestedAndFinish)
} else if (dep.type === 'directory') {
fetchDirectoryPackageData(dep, where, addRequestedAndFinish)
} else {
@@ -105,14 +110,15 @@ function fetchDirectoryPackageData (dep, where, next) {
var regCache = {}
-function fetchNamedPackageData (dep, next) {
- validate('OF', arguments)
+function fetchNamedPackageData (dep, opts, next) {
+ validate('OOF', arguments)
log.silly('fetchNamedPackageData', dep.name || dep.rawSpec)
mapToRegistry(dep.name || dep.rawSpec, npm.config, iferr(next, function (url, auth) {
if (regCache[url]) {
pickVersionFromRegistryDocument(clone(regCache[url]))
} else {
- npm.registry.get(url, {auth: auth}, pulseTillDone('fetchMetadata', iferr(next, pickVersionFromRegistryDocument)))
+ var fullMetadata = opts.fullMetadata == null ? true : opts.fullMetadata
+ npm.registry.get(url, {auth: auth, fullMetadata: fullMetadata}, pulseTillDone('fetchMetadata', iferr(next, pickVersionFromRegistryDocument)))
}
function thenAddMetadata (pkg) {
pkg._from = dep.raw
@@ -180,6 +186,10 @@ function retryWithCached (pkg, asserter, next) {
module.exports.addShrinkwrap = function addShrinkwrap (pkg, next) {
validate('OF', arguments)
if (pkg._shrinkwrap !== undefined) return next(null, pkg)
+ if (pkg._hasShrinkwrap === false) {
+ pkg._shrinkwrap = null
+ return next(null, pkg)
+ }
if (retryWithCached(pkg, addShrinkwrap, next)) return
pkg._shrinkwrap = null
// FIXME: cache the shrinkwrap directly
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index 1b0601d9f45..43ba4366304 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/lib/install.js
@@ -508,7 +508,7 @@ Installer.prototype.rollbackFailedOptional = function (staging, actionsToRun, cb
}).filter(function (pkg) {
return pkg.failed && pkg.rollback
})
- var top = this.currentTree.path
+ var top = this.currentTree && this.currentTree.path
asyncMap(failed, function (pkg, next) {
asyncMap(pkg.rollback, function (rollback, done) {
rollback(top, staging, pkg, done)
diff --git a/deps/npm/lib/install/action/extract.js b/deps/npm/lib/install/action/extract.js
index 2c8a995af63..fd9562c1849 100644
--- a/deps/npm/lib/install/action/extract.js
+++ b/deps/npm/lib/install/action/extract.js
@@ -3,7 +3,8 @@ var path = require('path')
var iferr = require('iferr')
var asyncMap = require('slide').asyncMap
var fs = require('graceful-fs')
-var rename = require('../../utils/rename.js')
+var mkdirp = require('mkdirp')
+var move = require('../../utils/move.js')
var gentlyRm = require('../../utils/gently-rm.js')
var updatePackageJson = require('../update-package-json')
var npm = require('../../npm.js')
@@ -11,6 +12,7 @@ var moduleName = require('../../utils/module-name.js')
var packageId = require('../../utils/package-id.js')
var cache = require('../../cache.js')
var moduleStagingPath = require('../module-staging-path.js')
+var readPackageJson = require('read-package-json')
module.exports = function (staging, pkg, log, next) {
log.silly('extract', packageId(pkg))
@@ -19,31 +21,45 @@ module.exports = function (staging, pkg, log, next) {
var group = up ? null : npm.config.get('group')
var extractTo = moduleStagingPath(staging, pkg)
cache.unpack(pkg.package.name, pkg.package.version, extractTo, null, null, user, group,
- andUpdatePackageJson(pkg, staging, extractTo, andStageBundledChildren(pkg, staging, extractTo, log, next)))
+ andUpdatePackageJson(pkg, staging, extractTo,
+ andStageBundledChildren(pkg, staging, extractTo, log,
+ andRemoveExtraneousBundles(extractTo, next))))
}
function andUpdatePackageJson (pkg, staging, extractTo, next) {
return iferr(next, function () {
- updatePackageJson(pkg, extractTo, next)
+ readPackageJson(path.join(extractTo, 'package.json'), false, function (err, metadata) {
+ if (!err) {
+ // Copy _ keys (internal to npm) and any missing keys from the possibly incomplete
+ // registry metadata over to the full package metadata read off of disk.
+ Object.keys(pkg.package).forEach(function (key) {
+ if (key[0] === '_' || !(key in metadata)) metadata[key] = pkg.package[key]
+ })
+ metadata.name = pkg.package.name // things go wrong if these don't match
+ pkg.package = metadata
+ }
+ updatePackageJson(pkg, extractTo, next)
+ })
})
}
function andStageBundledChildren (pkg, staging, extractTo, log, next) {
return iferr(next, function () {
- for (var i = 0; i < pkg.children.length; ++i) {
- var c = pkg.children[i]
- if (!c.package.name) return next(c.error)
- }
+ if (!pkg.package.bundleDependencies) return next()
- asyncMap(pkg.children, andStageBundledModule(pkg, staging, extractTo), cleanupBundled)
+ asyncMap(pkg.children, andStageBundledModule(pkg, staging, extractTo), next)
})
- function cleanupBundled () {
+}
+
+function andRemoveExtraneousBundles (extractTo, next) {
+ return iferr(next, function () {
gentlyRm(path.join(extractTo, 'node_modules'), next)
- }
+ })
}
function andStageBundledModule (bundler, staging, parentPath) {
return function (child, next) {
+ if (child.error) return next(child.error)
stageBundledModule(bundler, child, staging, parentPath, next)
}
}
@@ -64,25 +80,36 @@ function stageBundledModule (bundler, child, staging, parentPath, next) {
var stageFrom = path.join(parentPath, 'node_modules', child.package.name)
var stageTo = moduleStagingPath(staging, child)
- asyncMap(child.children, andStageBundledModule(bundler, staging, stageFrom), iferr(next, moveModule))
+ return asyncMap(child.children, andStageBundledModule(bundler, staging, stageFrom), iferr(next, finishModule))
- function moveModule () {
- if (child.fromBundle) {
- return rename(stageFrom, stageTo, iferr(next, updateMovedPackageJson))
+ function finishModule () {
+ // If we were the one's who bundled this module…
+ if (child.fromBundle === bundler) {
+ return moveModule()
} else {
- return fs.stat(stageFrom, function (notExists, exists) {
- if (exists) {
- warn(bundler, 'EBUNDLEOVERRIDE', 'In ' + packageId(bundler) +
- ' replacing bundled version of ' + moduleName(child) +
- ' with ' + packageId(child))
- return gentlyRm(stageFrom, next)
- } else {
- return next()
- }
- })
+ return checkForReplacement()
}
}
+ function moveModule () {
+ return mkdirp(path.dirname(stageTo), iferr(next, function () {
+ return move(stageFrom, stageTo, iferr(next, updateMovedPackageJson))
+ }))
+ }
+
+ function checkForReplacement () {
+ return fs.stat(stageFrom, function (notExists, exists) {
+ if (exists) {
+ warn(bundler, 'EBUNDLEOVERRIDE', 'In ' + packageId(bundler) +
+ ' replacing bundled version of ' + moduleName(child) +
+ ' with ' + packageId(child))
+ return gentlyRm(stageFrom, next)
+ } else {
+ return next()
+ }
+ })
+ }
+
function updateMovedPackageJson () {
updatePackageJson(child, stageTo, next)
}
diff --git a/deps/npm/lib/install/action/finalize.js b/deps/npm/lib/install/action/finalize.js
index acc11cc4a77..03a71f4cc03 100644
--- a/deps/npm/lib/install/action/finalize.js
+++ b/deps/npm/lib/install/action/finalize.js
@@ -4,7 +4,7 @@ var rimraf = require('rimraf')
var fs = require('graceful-fs')
var mkdirp = require('mkdirp')
var asyncMap = require('slide').asyncMap
-var rename = require('../../utils/rename.js')
+var move = require('../../utils/move.js')
var gentlyRm = require('../../utils/gently-rm')
var moduleStagingPath = require('../module-staging-path.js')
@@ -26,31 +26,31 @@ module.exports = function (staging, pkg, log, next) {
function destStatted (doesNotExist) {
if (doesNotExist) {
- rename(extractedTo, pkg.path, whenMoved)
+ move(extractedTo, pkg.path, whenMoved)
} else {
moveAway()
}
}
- function whenMoved (renameEr) {
- if (!renameEr) return next()
- if (renameEr.code !== 'ENOTEMPTY') return next(renameEr)
+ function whenMoved (moveEr) {
+ if (!moveEr) return next()
+ if (moveEr.code !== 'ENOTEMPTY' && moveEr.code !== 'EEXIST') return next(moveEr)
moveAway()
}
function moveAway () {
- rename(pkg.path, delpath, whenOldMovedAway)
+ move(pkg.path, delpath, whenOldMovedAway)
}
- function whenOldMovedAway (renameEr) {
- if (renameEr) return next(renameEr)
- rename(extractedTo, pkg.path, whenConflictMoved)
+ function whenOldMovedAway (moveEr) {
+ if (moveEr) return next(moveEr)
+ move(extractedTo, pkg.path, whenConflictMoved)
}
- function whenConflictMoved (renameEr) {
+ function whenConflictMoved (moveEr) {
// if we got an error we'll try to put back the original module back,
// succeed or fail though we want the original error that caused this
- if (renameEr) return rename(delpath, pkg.path, function () { next(renameEr) })
+ if (moveEr) return move(delpath, pkg.path, function () { next(moveEr) })
fs.readdir(path.join(delpath, 'node_modules'), makeTarget)
}
@@ -65,7 +65,7 @@ module.exports = function (staging, pkg, log, next) {
asyncMap(files, function (file, done) {
var from = path.join(delpath, 'node_modules', file)
var to = path.join(pkg.path, 'node_modules', file)
- rename(from, to, done)
+ move(from, to, done)
}, cleanup)
}
diff --git a/deps/npm/lib/install/action/move.js b/deps/npm/lib/install/action/move.js
index 3f29379f2bd..07649c35569 100644
--- a/deps/npm/lib/install/action/move.js
+++ b/deps/npm/lib/install/action/move.js
@@ -8,7 +8,7 @@ var mkdirp = require('mkdirp')
var rmStuff = require('../../unbuild.js').rmStuff
var lifecycle = require('../../utils/lifecycle.js')
var updatePackageJson = require('../update-package-json.js')
-var rename = require('../../utils/rename.js')
+var move = require('../../utils/move.js')
/*
Move a module from one point in the node_modules tree to another.
@@ -46,7 +46,7 @@ function moveModuleOnly (from, to, log, done) {
log.silly('move', 'move existing destination node_modules away', toModules)
- rename(toModules, tempToModules, removeDestination(done))
+ move(toModules, tempToModules, removeDestination(done))
function removeDestination (next) {
return function (er) {
@@ -62,7 +62,7 @@ function moveModuleOnly (from, to, log, done) {
function moveToModulesBack (next) {
return function () {
log.silly('move', 'move existing destination node_modules back', toModules)
- rename(tempToModules, toModules, iferr(done, next))
+ move(tempToModules, toModules, iferr(done, next))
}
}
@@ -76,14 +76,14 @@ function moveModuleOnly (from, to, log, done) {
function moveNodeModules (next) {
return function () {
log.silly('move', 'move source node_modules away', fromModules)
- rename(fromModules, tempFromModules, iferr(doMove(next), doMove(moveNodeModulesBack(next))))
+ move(fromModules, tempFromModules, iferr(doMove(next), doMove(moveNodeModulesBack(next))))
}
}
function doMove (next) {
return function () {
log.silly('move', 'move module dir to final dest', from, to)
- rename(from, to, iferr(done, next))
+ move(from, to, iferr(done, next))
}
}
@@ -91,7 +91,7 @@ function moveModuleOnly (from, to, log, done) {
return function () {
mkdirp(from, iferr(done, function () {
log.silly('move', 'put source node_modules back', fromModules)
- rename(tempFromModules, fromModules, iferr(done, next))
+ move(tempFromModules, fromModules, iferr(done, next))
}))
}
}
diff --git a/deps/npm/lib/install/action/remove.js b/deps/npm/lib/install/action/remove.js
index 47d5b766f7d..9fe77c35e05 100644
--- a/deps/npm/lib/install/action/remove.js
+++ b/deps/npm/lib/install/action/remove.js
@@ -6,7 +6,7 @@ var asyncMap = require('slide').asyncMap
var mkdirp = require('mkdirp')
var npm = require('../../npm.js')
var andIgnoreErrors = require('../and-ignore-errors.js')
-var rename = require('../../utils/rename.js')
+var move = require('../../utils/move.js')
// This is weird because we want to remove the module but not it's node_modules folder
// allowing for this allows us to not worry about the order of operations
@@ -26,11 +26,11 @@ function removeLink (pkg, next) {
function removeDir (pkg, log, next) {
var modpath = path.join(path.dirname(pkg.path), '.' + path.basename(pkg.path) + '.MODULES')
- rename(path.join(pkg.path, 'node_modules'), modpath, unbuildPackage)
+ move(path.join(pkg.path, 'node_modules'), modpath, unbuildPackage)
- function unbuildPackage (renameEr) {
+ function unbuildPackage (moveEr) {
npm.commands.unbuild(pkg.path, true, function () {
- rimraf(pkg.path, renameEr ? andRemoveEmptyParents(pkg.path) : moveModulesBack)
+ rimraf(pkg.path, moveEr ? andRemoveEmptyParents(pkg.path) : moveModulesBack)
})
}
@@ -58,7 +58,7 @@ function removeDir (pkg, log, next) {
var to = path.join(pkg.path, 'node_modules', file)
// we ignore errors here, because they can legitimately happen, for instance,
// bundled modules will be in both node_modules folders
- rename(from, to, andIgnoreErrors(done))
+ move(from, to, andIgnoreErrors(done))
}, cleanup)
}
diff --git a/deps/npm/lib/install/action/test.js b/deps/npm/lib/install/action/test.js
deleted file mode 100644
index 29f26f3ecfc..00000000000
--- a/deps/npm/lib/install/action/test.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict'
-var lifecycle = require('../../utils/lifecycle.js')
-var packageId = require('../../utils/package-id.js')
-
-module.exports = function (staging, pkg, log, next) {
- log.silly('test', packageId(pkg))
- lifecycle(pkg.package, 'test', pkg.path, false, false, next)
-}
diff --git a/deps/npm/lib/install/actions.js b/deps/npm/lib/install/actions.js
index 6e9c1a0b65c..cb41217c028 100644
--- a/deps/npm/lib/install/actions.js
+++ b/deps/npm/lib/install/actions.js
@@ -2,7 +2,9 @@
var validate = require('aproba')
var chain = require('slide').chain
var asyncMap = require('slide').asyncMap
+var limit = require('call-limit')
var iferr = require('iferr')
+var npm = require('../npm.js')
var andFinishTracker = require('./and-finish-tracker.js')
var andAddParentToErrors = require('./and-add-parent-to-errors.js')
var failedDependency = require('./deps.js').failedDependency
@@ -15,7 +17,6 @@ var actions = {}
actions.fetch = require('./action/fetch.js')
actions.extract = require('./action/extract.js')
actions.build = require('./action/build.js')
-actions.test = require('./action/test.js')
actions.preinstall = require('./action/preinstall.js')
actions.install = require('./action/install.js')
actions.postinstall = require('./action/postinstall.js')
@@ -32,7 +33,7 @@ actions['global-link'] = require('./action/global-link.js')
Object.keys(actions).forEach(function (actionName) {
var action = actions[actionName]
- actions[actionName] = function (staging, pkg, log, next) {
+ actions[actionName] = limit(function (staging, pkg, log, next) {
// top, buildpath, pkg, log
validate('SOOF', arguments)
// refuse to run actions for failed packages
@@ -62,7 +63,7 @@ Object.keys(actions).forEach(function (actionName) {
function andDone (cb) {
return andFinishTracker(log, andAddParentToErrors(pkg.parent, andHandleOptionalDepErrors(pkg, cb)))
}
- }
+ }, npm.limit.action)
})
function markAsFailed (pkg) {
diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js
index a31976a50d7..d1feb6cd4bc 100644
--- a/deps/npm/lib/install/deps.js
+++ b/deps/npm/lib/install/deps.js
@@ -462,7 +462,7 @@ function addDependency (name, versionSpec, tree, log, done) {
}
}))
} else {
- fetchPackageMetadata(req, packageRelativePath(tree), log.newItem('fetchMetadata'), iferr(next, function (pkg) {
+ fetchPackageMetadata(req, packageRelativePath(tree), {tracker: log.newItem('fetchMetadata')}, iferr(next, function (pkg) {
resolveWithNewModule(pkg, tree, log, next)
}))
}
@@ -547,7 +547,7 @@ function resolveWithNewModule (pkg, tree, log, next) {
if (tree.parent && parent !== tree) updatePhantomChildren(tree.parent, child)
if (hasBundled) {
- inflateBundled(child, child.children)
+ inflateBundled(child, child, child.children)
}
if (pkg._shrinkwrap && pkg._shrinkwrap.dependencies) {
diff --git a/deps/npm/lib/install/inflate-bundled.js b/deps/npm/lib/install/inflate-bundled.js
index f91e9112b9c..56948412906 100644
--- a/deps/npm/lib/install/inflate-bundled.js
+++ b/deps/npm/lib/install/inflate-bundled.js
@@ -3,15 +3,15 @@ var validate = require('aproba')
var childPath = require('../utils/child-path.js')
var reset = require('./node.js').reset
-module.exports = function inflateBundled (parent, children) {
- validate('OA', arguments)
+module.exports = function inflateBundled (bundler, parent, children) {
+ validate('OOA', arguments)
children.forEach(function (child) {
reset(child)
- child.fromBundle = true
+ child.fromBundle = bundler
child.parent = parent
child.path = childPath(parent.path, child)
child.realpath = childPath(parent.path, child)
child.isLink = child.isLink || parent.isLink || parent.target
- inflateBundled(child, child.children)
+ inflateBundled(bundler, child, child.children)
})
}
diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js
index 497bbe33483..aca42049302 100644
--- a/deps/npm/lib/install/inflate-shrinkwrap.js
+++ b/deps/npm/lib/install/inflate-shrinkwrap.js
@@ -89,7 +89,7 @@ function inflateShrinkwrap (topPath, tree, swdeps, finishInflating) {
tree.children.push(child)
if (pkg._bundled) {
delete pkg._bundled
- inflateBundled(child, child.children)
+ inflateBundled(child, child, child.children)
}
inflateShrinkwrap(topPath, child, dependencies || {}, next)
}
diff --git a/deps/npm/lib/install/validate-tree.js b/deps/npm/lib/install/validate-tree.js
index e89cd6fdd2d..ccd4e2e310c 100644
--- a/deps/npm/lib/install/validate-tree.js
+++ b/deps/npm/lib/install/validate-tree.js
@@ -26,7 +26,8 @@ module.exports = function (idealTree, log, next) {
], done)
}],
[thenValidateAllPeerDeps, idealTree],
- [thenCheckTop, idealTree]
+ [thenCheckTop, idealTree],
+ [thenCheckDuplicateDeps, idealTree]
], andFinishTracker(log, next))
}
@@ -73,5 +74,22 @@ function thenCheckTop (idealTree, next) {
warnObj.code = 'ENODEPRE'
idealTree.warnings.push(warnObj)
}
+
+ next()
+}
+
+// check for deps duplciated between devdeps and regular deps
+function thenCheckDuplicateDeps (idealTree, next) {
+ var deps = idealTree.package.dependencies || {}
+ var devDeps = idealTree.package.devDependencies || {}
+
+ for (var pkg in devDeps) {
+ if (pkg in deps) {
+ var warnObj = new Error('The package ' + pkg + ' is included as both a dev and production dependency.')
+ warnObj.code = 'EDUPLICATEDEP'
+ idealTree.warnings.push(warnObj)
+ }
+ }
+
next()
}
diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js
index ba5ab16e51e..3c0e4384dde 100644
--- a/deps/npm/lib/ls.js
+++ b/deps/npm/lib/ls.js
@@ -15,6 +15,8 @@ var semver = require('semver')
var color = require('ansicolors')
var npa = require('npm-package-arg')
var iferr = require('iferr')
+var sortedObject = require('sorted-object')
+var extend = Object.assign || require('util')._extend
var npm = require('./npm.js')
var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js')
var recalculateMetadata = require('./install/deps.js').recalculateMetadata
@@ -76,8 +78,8 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) {
pruneNestedExtraneous(data)
filterByEnv(data)
- var bfs = filterFound(bfsify(data), args)
- var lite = getLite(bfs)
+ var unlooped = filterFound(unloop(data), args)
+ var lite = getLite(unlooped)
if (silent) return cb(null, data, lite)
@@ -86,7 +88,7 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) {
var out
if (json) {
var seen = []
- var d = long ? bfs : lite
+ var d = long ? unlooped : lite
// the raw data can be circular
out = JSON.stringify(d, function (k, o) {
if (typeof o === 'object') {
@@ -96,9 +98,9 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) {
return o
}, 2)
} else if (npm.config.get('parseable')) {
- out = makeParseable(bfs, long, dir)
+ out = makeParseable(unlooped, long, dir)
} else if (data) {
- out = makeArchy(bfs, long, dir)
+ out = makeArchy(unlooped, long, dir)
}
output(out)
@@ -247,18 +249,10 @@ function getLite (data, noname, depth) {
return lite
}
-function bfsify (root) {
- // walk over the data, and turn it from this:
- // +-- a
- // | `-- b
- // | `-- a (truncated)
- // `--b (truncated)
- // into this:
- // +-- a
- // `-- b
- // which looks nicer
+function unloop (root) {
var queue = [root]
- var seen = [root]
+ var seen = {}
+ seen[root.path] = true
while (queue.length) {
var current = queue.shift()
@@ -266,17 +260,14 @@ function bfsify (root) {
Object.keys(deps).forEach(function (d) {
var dep = deps[d]
if (dep.missing) return
- if (inList(seen, dep)) {
- if (npm.config.get('parseable') || !npm.config.get('long')) {
- delete deps[d]
- return
- } else {
- dep = deps[d] = Object.create(dep)
- dep.dependencies = {}
- }
+ if (dep.path && seen[dep.path]) {
+ dep = deps[d] = extend({}, dep)
+ dep.dependencies = {}
+ dep._deduped = path.relative(root.path, dep.path).replace(/node_modules\//g, '')
+ return
}
+ seen[dep.path] = true
queue.push(dep)
- seen.push(dep)
})
}
@@ -285,18 +276,23 @@ function bfsify (root) {
function filterFound (root, args) {
if (!args.length) return root
- var deps = root.dependencies
- if (deps) {
- Object.keys(deps).forEach(function (depName) {
- var dep = filterFound(deps[depName], args)
+ if (!root.dependencies) return root
+
+ // Mark all deps
+ var toMark = [root]
+ while (toMark.length) {
+ var markPkg = toMark.shift()
+ var markDeps = markPkg.dependencies
+ if (!markDeps) continue
+ Object.keys(markDeps).forEach(function (depName) {
+ var dep = markDeps[depName]
if (dep.peerMissing) return
-
- // see if this one itself matches
- var found = false
- for (var ii = 0; !found && ii < args.length; ii++) {
+ dep._parent = markPkg
+ for (var ii = 0; ii < args.length; ii++) {
var argName = args[ii][0]
var argVersion = args[ii][1]
var argRaw = args[ii][2]
+ var found
if (depName === argName && argVersion) {
found = semver.satisfies(dep.version, argVersion, true)
} else if (depName === argName) {
@@ -305,16 +301,33 @@ function filterFound (root, args) {
} else if (dep.path === argRaw) {
found = true
}
+ if (found) {
+ dep._found = 'explicit'
+ var parent = dep._parent
+ while (parent && !parent._found && !parent._deduped) {
+ parent._found = 'implicit'
+ parent = parent._parent
+ }
+ break
+ }
}
- // included explicitly
- if (found) dep._found = true
- // included because a child was included
- if (dep._found && !root._found) root._found = 1
- // not included
- if (!dep._found) delete deps[depName]
+ toMark.push(dep)
+ })
+ }
+ var toTrim = [root]
+ while (toTrim.length) {
+ var trimPkg = toTrim.shift()
+ var trimDeps = trimPkg.dependencies
+ if (!trimDeps) continue
+ trimPkg.dependencies = {}
+ Object.keys(trimDeps).forEach(function (name) {
+ var dep = trimDeps[name]
+ if (!dep._found) return
+ if (dep._found === 'implicit' && dep._deduped) return
+ trimPkg.dependencies[name] = dep
+ toTrim.push(dep)
})
}
- if (!root._found) root._found = false
return root
}
@@ -345,7 +358,7 @@ function makeArchy_ (data, long, dir, depth, parent, d) {
var out = {}
// the top level is a bit special.
out.label = data._id || ''
- if (data._found === true && data._id) {
+ if (data._found === 'explicit' && data._id) {
if (npm.color) {
out.label = color.bgBlack(color.yellow(out.label.trim())) + ' '
} else {
@@ -354,6 +367,14 @@ function makeArchy_ (data, long, dir, depth, parent, d) {
}
if (data.link) out.label += ' -> ' + data.link
+ if (data._deduped) {
+ if (npm.color) {
+ out.label += ' ' + color.brightBlack('deduped')
+ } else {
+ out.label += ' deduped'
+ }
+ }
+
if (data.invalid) {
if (data.realName !== data.name) out.label += ' (' + data.realName + ')'
var invalid = 'invalid'
@@ -369,6 +390,7 @@ function makeArchy_ (data, long, dir, depth, parent, d) {
if (data.peerMissing) {
var peerMissing = 'UNMET PEER DEPENDENCY'
+
if (npm.color) peerMissing = color.bgBlack(color.red(peerMissing))
out.label = peerMissing + ' ' + out.label
}
@@ -415,7 +437,7 @@ function makeArchy_ (data, long, dir, depth, parent, d) {
.sort(alphasort).filter(function (d) {
return !isCruft(data.dependencies[d])
}).map(function (d) {
- return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d)
+ return makeArchy_(sortedObject(data.dependencies[d]), long, dir, depth + 1, data, d)
})
}
@@ -444,19 +466,20 @@ function getExtras (data) {
}
function makeParseable (data, long, dir, depth, parent, d) {
+ if (data._deduped) return []
depth = depth || 0
if (depth > npm.config.get('depth')) return [ makeParseable_(data, long, dir, depth, parent, d) ]
return [ makeParseable_(data, long, dir, depth, parent, d) ]
- .concat(Object.keys(data.dependencies || {})
- .sort(alphasort).map(function (d) {
- return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d)
- }))
- .filter(function (x) { return x })
- .join('\n')
+ .concat(Object.keys(data.dependencies || {})
+ .sort(alphasort).map(function (d) {
+ return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d)
+ }))
+ .filter(function (x) { return x })
+ .join('\n')
}
function makeParseable_ (data, long, dir, depth, parent, d) {
- if (data.hasOwnProperty('_found') && data._found !== true) return ''
+ if (data.hasOwnProperty('_found') && data._found !== 'explicit') return ''
if (data.missing) {
if (depth < npm.config.get('depth')) {
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 890c369cc6c..f852886433e 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -31,7 +31,7 @@
var which = require('which')
var glob = require('glob')
var rimraf = require('rimraf')
- var CachingRegClient = require('./cache/caching-client.js')
+ var lazyProperty = require('lazy-property')
var parseJSON = require('./utils/parse-json.js')
var aliases = require('./config/cmd-list').aliases
var cmdList = require('./config/cmd-list').cmdList
@@ -51,6 +51,13 @@
npm.commands = {}
+ // TUNING
+ npm.limit = {
+ fetch: 10,
+ action: 10
+ }
+ // ***
+
npm.rollbacks = []
try {
@@ -79,6 +86,9 @@
return littleGuys.indexOf(c) === -1
})
+ var registryRefer
+ var registryLoaded
+
Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
Object.defineProperty(npm.commands, c, { get: function () {
if (!loaded) {
@@ -112,9 +122,8 @@
}
})
- npm.registry.version = npm.version
- if (!npm.registry.refer) {
- npm.registry.refer = [a].concat(args[0]).map(function (arg) {
+ if (!registryRefer) {
+ registryRefer = [a].concat(args[0]).map(function (arg) {
// exclude anything that might be a URL, path, or private module
// Those things will always have a slash in them somewhere
if (arg && arg.match && arg.match(/\/|\\/)) {
@@ -125,6 +134,7 @@
}).filter(function (arg) {
return arg && arg.match
}).join(' ')
+ if (registryLoaded) npm.registry.refer = registryRefer
}
cmd.apply(npm, args)
@@ -253,6 +263,10 @@
ua = ua.replace(/\{arch\}/gi, process.arch)
config.set('user-agent', ua)
+ if (config.get('metrics-registry') == null) {
+ config.set('metrics-registry', config.get('registry'))
+ }
+
var color = config.get('color')
log.level = config.get('loglevel')
@@ -299,10 +313,6 @@
log.resume()
- // at this point the configs are all set.
- // go ahead and spin up the registry client.
- npm.registry = new CachingRegClient(npm.config)
-
var umask = npm.config.get('umask')
npm.modes = {
exec: parseInt('0777', 8) & (~umask),
@@ -322,7 +332,14 @@
// at this point the configs are all set.
// go ahead and spin up the registry client.
- npm.registry = new CachingRegClient(npm.config)
+ lazyProperty(npm, 'registry', function () {
+ registryLoaded = true
+ var CachingRegClient = require('./cache/caching-client.js')
+ var registry = new CachingRegClient(npm.config)
+ registry.version = npm.version
+ registry.refer = registryRefer
+ return registry
+ })
startMetrics()
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index a4a0d15abbf..546d14b1347 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -357,7 +357,7 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) {
}
}
- if (curr.version !== wanted) {
+ if (!curr || curr.version !== wanted) {
doIt(wanted, latest)
} else {
skip()
diff --git a/deps/npm/lib/repo.js b/deps/npm/lib/repo.js
index caaf422cfee..d7e79d76ab6 100644
--- a/deps/npm/lib/repo.js
+++ b/deps/npm/lib/repo.js
@@ -16,7 +16,7 @@ repo.completion = function (opts, cb) {
function repo (args, cb) {
var n = args.length ? args[0] : '.'
- fetchPackageMetadata(n, '.', function (er, d) {
+ fetchPackageMetadata(n, '.', {fullMetadata: true}, function (er, d) {
if (er) return cb(er)
getUrlAndOpen(d, cb)
})
diff --git a/deps/npm/lib/search/format-package-stream.js b/deps/npm/lib/search/format-package-stream.js
index caa46cb8987..a312e3f4837 100644
--- a/deps/npm/lib/search/format-package-stream.js
+++ b/deps/npm/lib/search/format-package-stream.js
@@ -161,7 +161,7 @@ function normalizePackage (data, opts) {
: typeof data.keywords === 'string'
? data.keywords.replace(/[,\s]+/, ' ')
: '',
- version: Object.keys(data.versions || {})[0] || [],
+ version: data.version,
date: data.date &&
(data.date.toISOString() // remove time
.split('T').join(' ')
diff --git a/deps/npm/lib/utils/completion.sh b/deps/npm/lib/utils/completion.sh
index 25bef2c17b4..c549b31c964 100755
--- a/deps/npm/lib/utils/completion.sh
+++ b/deps/npm/lib/utils/completion.sh
@@ -11,7 +11,7 @@ if type complete &>/dev/null; then
_npm_completion () {
local words cword
if type _get_comp_words_by_ref &>/dev/null; then
- _get_comp_words_by_ref -n = -n @ -w words -i cword
+ _get_comp_words_by_ref -n = -n @ -n : -w words -i cword
else
cword="$COMP_CWORD"
words=("${COMP_WORDS[@]}")
@@ -24,6 +24,9 @@ if type complete &>/dev/null; then
npm completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
+ if type __ltrim_colon_completions &>/dev/null; then
+ __ltrim_colon_completions "${words[cword]}"
+ fi
}
complete -o default -F _npm_completion npm
elif type compdef &>/dev/null; then
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index a2911a101aa..12139028869 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -4,17 +4,16 @@ module.exports = errorHandler
var cbCalled = false
var log = require('npmlog')
var npm = require('../npm.js')
-var rm = require('rimraf')
var itWorked = false
var path = require('path')
var wroteLogFile = false
var exitCode = 0
var rollbacks = npm.rollbacks
var chain = require('slide').chain
-var writeStreamAtomic = require('fs-write-stream-atomic')
+var writeFileAtomic = require('write-file-atomic')
var errorMessage = require('./error-message.js')
var stopMetrics = require('./metrics.js').stop
-var mkdir = require('mkdirp')
+var mkdirp = require('mkdirp')
var logFileName
function getLogFile () {
@@ -32,10 +31,15 @@ process.on('exit', function (code) {
stopMetrics()
if (code) itWorked = false
- if (itWorked) log.info('ok')
- else {
+ if (itWorked) {
+ log.info('ok')
+ } else {
if (!cbCalled) {
log.error('', 'cb() never called!')
+ console.error('')
+ log.error('', 'This is an error with npm itself. Please report this error at:')
+ log.error('', ' ')
+ writeLogFile()
}
if (wroteLogFile) {
@@ -45,7 +49,7 @@ process.on('exit', function (code) {
log.error(
'',
[
- 'Please include the following file with any support request:',
+ 'A complete log of this run can be found in:',
' ' + getLogFile()
].join('\n')
)
@@ -83,19 +87,22 @@ function exit (code, noLog) {
}), function (er) {
if (er) {
log.error('error rolling back', er)
- if (!code) errorHandler(er)
- else if (noLog) rm('npm-debug.log', reallyExit.bind(null, er))
- else writeLogFile(reallyExit.bind(this, er))
+ if (!code) {
+ errorHandler(er)
+ } else {
+ if (!noLog) writeLogFile()
+ reallyExit(er)
+ }
} else {
- if (!noLog && code) writeLogFile(reallyExit)
- else rm(getLogFile(), reallyExit)
+ if (!noLog && code) writeLogFile()
+ reallyExit()
}
})
rollbacks.length = 0
} else if (code && !noLog) {
writeLogFile(reallyExit)
} else {
- rm('npm-debug.log', reallyExit)
+ reallyExit()
}
function reallyExit (er) {
@@ -115,7 +122,6 @@ function exit (code, noLog) {
function errorHandler (er) {
log.disableProgress()
- // console.error('errorHandler', er)
if (!npm.config || !npm.config.loaded) {
// logging won't work unless we pretend that it's ready
er = er || new Error('Exit prior to config file resolving.')
@@ -163,14 +169,10 @@ function errorHandler (er) {
log.verbose('cwd', process.cwd())
var os = require('os')
- // log.error('System', os.type() + ' ' + os.release())
- // log.error('command', process.argv.map(JSON.stringify).join(' '))
- // log.error('node -v', process.version)
- // log.error('npm -v', npm.version)
- log.error('', os.type() + ' ' + os.release())
- log.error('argv', process.argv.map(JSON.stringify).join(' '))
- log.error('node', process.version)
- log.error('npm ', 'v' + npm.version)
+ log.verbose('', os.type() + ' ' + os.release())
+ log.verbose('argv', process.argv.map(JSON.stringify).join(' '))
+ log.verbose('node', process.version)
+ log.verbose('npm ', 'v' + npm.version)
;[
'file',
@@ -183,9 +185,6 @@ function errorHandler (er) {
if (v) log.error(k, v)
})
- // just a line break
- if (log.levels[log.level] <= log.levels.error) console.error('')
-
var msg = errorMessage(er)
msg.summary.concat(msg.detail).forEach(function (errline) {
log.error.apply(log, errline)
@@ -194,20 +193,15 @@ function errorHandler (er) {
exit(typeof er.errno === 'number' ? er.errno : 1)
}
-var writingLogFile = false
-function writeLogFile (cb) {
- if (writingLogFile) return cb()
- writingLogFile = true
+function writeLogFile () {
+ if (wroteLogFile) return
wroteLogFile = true
var os = require('os')
- mkdir(path.resolve(npm.config.get('cache'), '_logs'), function (er) {
- if (er) {
- cb(er)
- return
- }
- var fstr = writeStreamAtomic(getLogFile())
+ try {
+ mkdirp.sync(path.resolve(npm.config.get('cache'), '_logs'))
+ var logOutput = ''
log.record.forEach(function (m) {
var pref = [m.id, m.level]
if (m.prefix) pref.push(m.prefix)
@@ -216,10 +210,11 @@ function writeLogFile (cb) {
m.message.trim().split(/\r?\n/).map(function (line) {
return (pref + ' ' + line).trim()
}).forEach(function (line) {
- fstr.write(line + os.EOL)
+ logOutput += line + os.EOL
})
})
- fstr.end()
- fstr.on('close', cb)
- })
+ writeFileAtomic.sync(getLogFile(), logOutput)
+ } catch (ex) {
+ return
+ }
}
diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js
index 5c7ce15bf1b..f19d0bf6d30 100644
--- a/deps/npm/lib/utils/error-message.js
+++ b/deps/npm/lib/utils/error-message.js
@@ -268,7 +268,6 @@ function errorMessage (er) {
detail.push([
'enoent',
[
- er.message,
'This is most likely not a problem with npm itself',
'and is related to npm not being able to find a file.',
er.file ? "\nCheck if the file '" + er.file + "' is present." : ''
@@ -304,14 +303,6 @@ function errorMessage (er) {
default:
short.push(['', er.message || er])
- detail.push([
- '',
- [
- '',
- 'If you need help, you may report this error at:',
- ' '
- ].join('\n')
- ])
break
}
if (er.optional) {
diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js
index f48d5e2a3bd..4ab5e0979a0 100644
--- a/deps/npm/lib/utils/lifecycle.js
+++ b/deps/npm/lib/utils/lifecycle.js
@@ -282,6 +282,7 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
procError(er)
})
process.once('SIGTERM', procKill)
+ process.once('SIGINT', procInterupt)
function procError (er) {
if (er) {
@@ -302,11 +303,20 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
er.pkgname = pkg.name
}
process.removeListener('SIGTERM', procKill)
+ process.removeListener('SIGTERM', procInterupt)
+ process.removeListener('SIGINT', procKill)
return cb(er)
}
function procKill () {
proc.kill()
}
+ function procInterupt () {
+ proc.kill('SIGINT')
+ proc.on('exit', function () {
+ process.exit()
+ })
+ process.once('SIGINT', procKill)
+ }
}
function runHookLifecycle (pkg, env, wd, unsafe, cb) {
diff --git a/deps/npm/lib/utils/move.js b/deps/npm/lib/utils/move.js
new file mode 100644
index 00000000000..242e87d37fc
--- /dev/null
+++ b/deps/npm/lib/utils/move.js
@@ -0,0 +1,19 @@
+'use strict'
+module.exports = wrappedMove
+
+var fs = require('graceful-fs')
+var move = require('move-concurrently')
+var Bluebird = require('bluebird')
+
+function wrappedMove (from, to, cb) {
+ var movePromise = move(from, to, {fs: fs, Promise: Bluebird, maxConcurrency: 4})
+ if (cb) {
+ return movePromise.then(function (value) {
+ cb(value)
+ }, function (err) {
+ cb(err)
+ })
+ } else {
+ return movePromise
+ }
+}
diff --git a/deps/npm/lib/utils/rename.js b/deps/npm/lib/utils/rename.js
index 8a444289844..43a2f7e104d 100644
--- a/deps/npm/lib/utils/rename.js
+++ b/deps/npm/lib/utils/rename.js
@@ -1,16 +1,9 @@
-'use strict'
-var fs = require('graceful-fs')
-var SaveStack = require('./save-stack.js')
+/*
-module.exports = rename
+This is a stub file to ensure that the following hack doesn't break. This can be removed w/ npm@5.
-function rename (from, to, cb) {
- var saved = new SaveStack(rename)
- fs.rename(from, to, function (er) {
- if (er) {
- return cb(saved.completeWith(er))
- } else {
- return cb()
- }
- })
-}
+# Fix bug https://github.com/npm/npm/issues/9863
+RUN cd $(npm root -g)/npm \
+ && npm install fs-extra \
+ && sed -i -e s/graceful-fs/fs-extra/ -e s/fs\.rename/fs.move/ ./lib/utils/rename.js
+*/
diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js
index f580c8e05de..88cfc6b8059 100644
--- a/deps/npm/lib/utils/tar.js
+++ b/deps/npm/lib/utils/tar.js
@@ -136,8 +136,10 @@ BundledPacker.prototype.applyIgnores = function (entry, partial, entryObj) {
// the package root.
var p = this.parent
- // the package before this one.
+ // the directory before this one.
var pp = p && p.parent
+ // the directory before that (if this is scoped)
+ if (pp && pp.basename[0] === '@') pp = pp && pp.parent
// if this entry has already been bundled, and is a symlink,
// and it is the *same* symlink as this one, then exclude it.
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index 1af9c6a0bd5..3da142d834c 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "February 2017" "" ""
+.TH "NPM" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
@@ -85,7 +85,7 @@ experience if you run a recent version of npm\. To upgrade, either use Microsoft
upgrade tool \fIhttps://github\.com/felixrieseberg/npm\-windows\-upgrade\fR,
download a new version of Node \fIhttps://nodejs\.org/en/download/\fR,
or follow the Windows upgrade instructions in the
-npm Troubleshooting Guide \fIhttps://github\.com/npm/npm/wiki/Troubleshooting#upgrading\-on\-windows\fR\|\.
+npm Troubleshooting Guide \fI\|\./TROUBLESHOOTING\.md\fR\|\.
.P
If that's not fancy enough for you, then you can fetch the code with
git, and mess with it directly\.
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index 61f97269bca..2159bda133a 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" "February 2017" "" ""
+.TH "NPM\-ACCESS" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index 23862636365..05292d84386 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,11 +1,11 @@
-.TH "NPM\-ADDUSER" "1" "February 2017" "" ""
+.TH "NPM\-ADDUSER" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
.P
.RS 2
.nf
-npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth]
+npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth] [\-\-auth\-type=legacy]
aliases: login, add\-user
.fi
@@ -72,6 +72,18 @@ private registries where metadata and package tarballs are stored on hosts with
different hostnames\. See \fBalways\-auth\fP in npm help 7 \fBnpm\-config\fP for more details on
always\-auth\. Registry\-specific configuration of \fBalways\-auth\fP takes precedence
over any global configuration\.
+.SS auth\-type
+.RS 0
+.IP \(bu 2
+Default: \fB\|'legacy'\fP
+.IP \(bu 2
+Type: \fB\|'legacy'\fP, \fB\|'sso'\fP, \fB\|'saml'\fP, \fB\|'oauth'\fP
+
+.RE
+.P
+What authentication strategy to use with \fBadduser\fP/\fBlogin\fP\|\. Some npm registries
+(for example, npmE) might support alternative auth strategies besides classic
+username/password entry in legacy npm\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index fb6e29c0b97..f3e72259c07 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" "February 2017" "" ""
+.TH "NPM\-BIN" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 6c023dddd95..74cba492306 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" "February 2017" "" ""
+.TH "NPM\-BUGS" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1
index b3a3d984a6e..ecfb4b00a3a 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" "February 2017" "" ""
+.TH "NPM\-BUILD" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1
index 84fdac2677b..e785c481706 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" "February 2017" "" ""
+.TH "NPM\-BUNDLE" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SH DESCRIPTION
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index c44e1081fc9..badbbe4bfde 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" "February 2017" "" ""
+.TH "NPM\-CACHE" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index a861d751e31..afc7cce99b9 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" "February 2017" "" ""
+.TH "NPM\-COMPLETION" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index 6667aebb77a..fbb957b5319 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" "February 2017" "" ""
+.TH "NPM\-CONFIG" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index 317dac0523d..fa45c9104fb 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" "February 2017" "" ""
+.TH "NPM\-DEDUPE" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index 19293be079f..77ad822e188 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" "February 2017" "" ""
+.TH "NPM\-DEPRECATE" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index 31b287fa6f3..3bef22ba905 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIST\-TAG" "1" "February 2017" "" ""
+.TH "NPM\-DIST\-TAG" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index b8595d8c799..8c516318e24 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" "February 2017" "" ""
+.TH "NPM\-DOCS" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1
index d6fe7261a74..1b00a96f943 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" "February 2017" "" ""
+.TH "NPM\-DOCTOR" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-doctor\fR \- Check your environments
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index bb46a86b5a3..506c165a04b 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" "February 2017" "" ""
+.TH "NPM\-EDIT" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index 2716637d346..c0488214e42 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "1" "February 2017" "" ""
+.TH "NPM\-EXPLORE" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index a4337630fed..fd0cfad9962 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" "February 2017" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index 7997c03b2fc..052ceac7183 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" "February 2017" "" ""
+.TH "NPM\-HELP" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 7a89ee32f48..cbe48422b09 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" "February 2017" "" ""
+.TH "NPM\-INIT" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index b10135c3b0b..0c31b351a37 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" "" "February 2017" "" ""
+.TH "NPM" "" "April 2017" "" ""
.SH "NAME"
\fBnpm\fR
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index ef483c88a1d..f7a4648220c 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" "February 2017" "" ""
+.TH "NPM\-INSTALL" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 8c071ae7b49..63479c57183 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" "February 2017" "" ""
+.TH "NPM\-LINK" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 634ce0970e5..d1005f52eac 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" "February 2017" "" ""
+.TH "NPM\-LOGOUT" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 9d96de5afc8..8cffc7ac4cb 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" "February 2017" "" ""
+.TH "NPM\-LS" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@4.2.0 /path/to/npm
+npm@4.5.0 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index 4304a4ed1b2..45f05cd7f6d 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" "February 2017" "" ""
+.TH "NPM\-OUTDATED" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index cf48a32062b..b00a1ac85e6 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" "February 2017" "" ""
+.TH "NPM\-OWNER" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 5e9b3eee5b3..2013d0818fa 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" "February 2017" "" ""
+.TH "NPM\-PACK" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1
index 518e76f0577..ae9c1f2303c 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" "February 2017" "" ""
+.TH "NPM\-PING" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index 2f34f8cc535..d85a0a54d16 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" "February 2017" "" ""
+.TH "NPM\-PREFIX" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index eb25bc604f5..397c722c957 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" "February 2017" "" ""
+.TH "NPM\-PRUNE" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index f2bde252780..864418d645f 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" "February 2017" "" ""
+.TH "NPM\-PUBLISH" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index c708c0b9848..f40096009cf 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" "February 2017" "" ""
+.TH "NPM\-REBUILD" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 1aa5e949be8..d26c658c62b 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" "February 2017" "" ""
+.TH "NPM\-REPO" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index 13748d1d580..f59c08f4f72 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" "February 2017" "" ""
+.TH "NPM\-RESTART" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index a3469bbb921..c11be4f0678 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" "February 2017" "" ""
+.TH "NPM\-ROOT" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 5328771582b..d5e32a8ad35 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" "February 2017" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index b5b35c7f686..f80384b9459 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" "February 2017" "" ""
+.TH "NPM\-SEARCH" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index 96205fd6c06..7448d31e685 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" "February 2017" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index 222e12d4a01..02b39fc097f 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" "February 2017" "" ""
+.TH "NPM\-STAR" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index daad14a186c..4cf4defdae4 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" "February 2017" "" ""
+.TH "NPM\-STARS" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index 466ad399481..2c956427867 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" "February 2017" "" ""
+.TH "NPM\-START" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 6646abc28ad..aa0f66aa246 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" "February 2017" "" ""
+.TH "NPM\-STOP" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index 5e349fc4f99..54b7d507329 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" "February 2017" "" ""
+.TH "NPM\-TEAM" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-team\fR \- Manage organization teams and team memberships
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index 46adee17dba..daf33e3208e 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" "February 2017" "" ""
+.TH "NPM\-TEST" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 25d1e0f8ef3..934f8d7d853 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" "February 2017" "" ""
+.TH "NPM\-UNINSTALL" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- Remove a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 0d116aace92..e152c80b771 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" "February 2017" "" ""
+.TH "NPM\-UNPUBLISH" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
@@ -29,6 +29,11 @@ Even if a package version is unpublished, that specific name and
version combination can never be reused\. In order to publish the
package again, a new version number must be used\.
.P
+With the default registry (\fBregistry\.npmjs\.org\fP), unpublish is
+only allowed with versions published in the last 24 hours\. If you
+are trying to unpublish a version published longer ago than that,
+contact support@npmjs\.com\.
+.P
The scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fP\|\.
.SH SEE ALSO
.RS 0
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index c0232918c8f..3787f996160 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" "February 2017" "" ""
+.TH "NPM\-UPDATE" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index 498abaaa2fc..755e7ac0418 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" "February 2017" "" ""
+.TH "NPM\-VERSION" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 065050a24a4..944766b2bef 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" "February 2017" "" ""
+.TH "NPM\-VIEW" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index e21e8144583..4086a692a27 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" "February 2017" "" ""
+.TH "NPM\-WHOAMI" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index e473ee6d7ad..de4cef6862e 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "February 2017" "" ""
+.TH "NPM" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -10,7 +10,7 @@ npm [args]
.RE
.SH VERSION
.P
-4.2.0
+4.5.0
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5
index b96a5b44e2f..9eeeb342317 100644
--- a/deps/npm/man/man5/npm-folders.5
+++ b/deps/npm/man/man5/npm-folders.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "February 2017" "" ""
+.TH "NPM\-FOLDERS" "5" "April 2017" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5
index b96a5b44e2f..9eeeb342317 100644
--- a/deps/npm/man/man5/npm-global.5
+++ b/deps/npm/man/man5/npm-global.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "February 2017" "" ""
+.TH "NPM\-FOLDERS" "5" "April 2017" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index 004ff000949..9d5739ba93d 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "February 2017" "" ""
+.TH "PACKAGE\.JSON" "5" "April 2017" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index 5649907f750..02ce7d4ad2b 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "February 2017" "" ""
+.TH "NPMRC" "5" "April 2017" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5
index 004ff000949..9d5739ba93d 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" "February 2017" "" ""
+.TH "PACKAGE\.JSON" "5" "April 2017" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7
index 93caeb1fc22..6394eb53266 100644
--- a/deps/npm/man/man7/npm-coding-style.7
+++ b/deps/npm/man/man7/npm-coding-style.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CODING\-STYLE" "7" "February 2017" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-coding-style\fR \- npm's "funny" coding style
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7
index 23d3ca56ffa..dd6b7550319 100644
--- a/deps/npm/man/man7/npm-config.7
+++ b/deps/npm/man/man7/npm-config.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "7" "February 2017" "" ""
+.TH "NPM\-CONFIG" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
@@ -189,6 +189,16 @@ Type: String
.P
When "dev" or "development" and running local \fBnpm shrinkwrap\fP,
\fBnpm outdated\fP, or \fBnpm update\fP, is an alias for \fB\-\-dev\fP\|\.
+.SS auth\-type
+.RS 0
+.IP \(bu 2
+Default: \fB\|'legacy'\fP
+.IP \(bu 2
+Type: \fB\|'legacy'\fP, \fB\|'sso'\fP, \fB\|'saml'\fP, \fB\|'oauth'\fP
+
+.RE
+.P
+What authentication strategy to use with \fBadduser\fP/\fBlogin\fP\|\.
.SS bin\-links
.RS 0
.IP \(bu 2
@@ -844,7 +854,7 @@ Any "%s" in the message will be replaced with the version number\.
.SS metrics\-registry
.RS 0
.IP \(bu 2
-Default: "https://registry\.npmjs\.org/"
+Default: The value of \fBregistry\fP (which defaults to "https://registry\.npmjs\.org/")
.IP \(bu 2
Type: String
@@ -1232,6 +1242,27 @@ using \fB\-s\fP to add a signature\.
.P
Note that git requires you to have set up GPG keys in your git configs
for this to work properly\.
+.SS sso\-poll\-frequency
+.RS 0
+.IP \(bu 2
+Default: 500
+.IP \(bu 2
+Type: Number
+
+.RE
+.P
+When used with SSO\-enabled \fBauth\-type\fPs, configures how regularly the registry
+should be polled while the user is completing authentication\.
+.SS sso\-type
+.RS 0
+.IP \(bu 2
+Default: 'oauth'
+.IP \(bu 2
+Type: 'oauth', 'saml', or null
+
+.RE
+.P
+If \fB\-\-auth\-type=sso\fP, the type of SSO type to use\.
.SS strict\-ssl
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7
index 9e908846a2f..c8fdf0056ed 100644
--- a/deps/npm/man/man7/npm-developers.7
+++ b/deps/npm/man/man7/npm-developers.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DEVELOPERS" "7" "February 2017" "" ""
+.TH "NPM\-DEVELOPERS" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-developers\fR \- Developer Guide
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7
index f347da46f07..f623c6a79e9 100644
--- a/deps/npm/man/man7/npm-disputes.7
+++ b/deps/npm/man/man7/npm-disputes.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DISPUTES" "7" "February 2017" "" ""
+.TH "NPM\-DISPUTES" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-disputes\fR \- Handling Module Name Disputes
.P
diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7
index 36a1e2d12a0..48e1c36750e 100644
--- a/deps/npm/man/man7/npm-index.7
+++ b/deps/npm/man/man7/npm-index.7
@@ -1,4 +1,4 @@
-.TH "NPM\-INDEX" "7" "February 2017" "" ""
+.TH "NPM\-INDEX" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-index\fR \- Index of all npm documentation
.SS npm help README
diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7
index 278b766a9e9..9c5cf42a571 100644
--- a/deps/npm/man/man7/npm-orgs.7
+++ b/deps/npm/man/man7/npm-orgs.7
@@ -1,4 +1,4 @@
-.TH "NPM\-ORGS" "7" "February 2017" "" ""
+.TH "NPM\-ORGS" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-orgs\fR \- Working with Teams & Orgs
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7
index 83fcd4beeb0..a1d3186f386 100644
--- a/deps/npm/man/man7/npm-registry.7
+++ b/deps/npm/man/man7/npm-registry.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REGISTRY" "7" "February 2017" "" ""
+.TH "NPM\-REGISTRY" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-registry\fR \- The JavaScript Package Registry
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7
index be3a322b5cb..be15431be00 100644
--- a/deps/npm/man/man7/npm-scope.7
+++ b/deps/npm/man/man7/npm-scope.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCOPE" "7" "February 2017" "" ""
+.TH "NPM\-SCOPE" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7
index d28e9a1b53d..77ffee6d7a4 100644
--- a/deps/npm/man/man7/npm-scripts.7
+++ b/deps/npm/man/man7/npm-scripts.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCRIPTS" "7" "February 2017" "" ""
+.TH "NPM\-SCRIPTS" "7" "April 2017" "" ""
.SH "NAME"
\fBnpm-scripts\fR \- How npm handles the "scripts" field
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7
index fcc488d3898..e3993d07abf 100644
--- a/deps/npm/man/man7/removing-npm.7
+++ b/deps/npm/man/man7/removing-npm.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REMOVAL" "1" "February 2017" "" ""
+.TH "NPM\-REMOVAL" "1" "April 2017" "" ""
.SH "NAME"
\fBnpm-removal\fR \- Cleaning the Slate
.SH SYNOPSIS
diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7
index 1c452d2bb75..e443f8fc896 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,4 +1,4 @@
-.TH "SEMVER" "7" "February 2017" "" ""
+.TH "SEMVER" "7" "April 2017" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Usage
diff --git a/deps/npm/node_modules/JSONStream/.travis.yml b/deps/npm/node_modules/JSONStream/.travis.yml
index 56c2d586565..2f60c363d24 100644
--- a/deps/npm/node_modules/JSONStream/.travis.yml
+++ b/deps/npm/node_modules/JSONStream/.travis.yml
@@ -3,3 +3,4 @@ node_js:
- 4
- 5
- 6
+sudo: false
diff --git a/deps/npm/node_modules/JSONStream/index.js b/deps/npm/node_modules/JSONStream/index.js
index 86ad5c74436..2cc9fff0713 100755
--- a/deps/npm/node_modules/JSONStream/index.js
+++ b/deps/npm/node_modules/JSONStream/index.js
@@ -94,6 +94,12 @@ exports.parse = function (path, map) {
}
}
+
+ // emit header
+ if (header) {
+ stream.emit('header', header);
+ header = false;
+ }
if (j !== this.stack.length) return
count ++
@@ -115,12 +121,6 @@ exports.parse = function (path, map) {
for(var k in this.stack)
if (!Object.isFrozen(this.stack[k]))
this.stack[k].value = null
-
- // emit header
- if (header) {
- stream.emit('header', header);
- header = false;
- }
}
parser._onToken = parser.onToken;
diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js
index 92365f6a4e0..26752d4a1b5 100644
--- a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js
+++ b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js
@@ -40,13 +40,24 @@ var KEY = C.KEY = 0x72;
// Parser Modes
var OBJECT = C.OBJECT = 0x81;
var ARRAY = C.ARRAY = 0x82;
+// Character constants
+var BACK_SLASH = "\\".charCodeAt(0);
+var FORWARD_SLASH = "\/".charCodeAt(0);
+var BACKSPACE = "\b".charCodeAt(0);
+var FORM_FEED = "\f".charCodeAt(0);
+var NEWLINE = "\n".charCodeAt(0);
+var CARRIAGE_RETURN = "\r".charCodeAt(0);
+var TAB = "\t".charCodeAt(0);
+var STRING_BUFFER_SIZE = 64 * 1024;
function Parser() {
this.tState = START;
this.value = undefined;
this.string = undefined; // string data
+ this.stringBuffer = Buffer.alloc ? Buffer.alloc(STRING_BUFFER_SIZE) : new Buffer(STRING_BUFFER_SIZE);
+ this.stringBufferOffset = 0;
this.unicode = undefined; // unicode escapes
this.key = undefined;
@@ -77,6 +88,41 @@ proto.charError = function (buffer, i) {
this.tState = STOP;
this.onError(new Error("Unexpected " + JSON.stringify(String.fromCharCode(buffer[i])) + " at position " + i + " in state " + Parser.toknam(this.tState)));
};
+proto.appendStringChar = function (char) {
+ if (this.stringBufferOffset >= STRING_BUFFER_SIZE) {
+ this.string += this.stringBuffer.toString('utf8');
+ this.stringBufferOffset = 0;
+ }
+
+ this.stringBuffer[this.stringBufferOffset++] = char;
+};
+proto.appendStringBuf = function (buf, start, end) {
+ var size = buf.length;
+ if (typeof start === 'number') {
+ if (typeof end === 'number') {
+ if (end < 0) {
+ // adding a negative end decreeses the size
+ size = buf.length - start + end;
+ } else {
+ size = end - start;
+ }
+ } else {
+ size = buf.length - start;
+ }
+ }
+
+ if (size < 0) {
+ size = 0;
+ }
+
+ if (this.stringBufferOffset + size > STRING_BUFFER_SIZE) {
+ this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);
+ this.stringBufferOffset = 0;
+ }
+
+ buf.copy(this.stringBuffer, this.stringBufferOffset, start, end);
+ this.stringBufferOffset += size;
+};
proto.write = function (buffer) {
if (typeof buffer === "string") buffer = new Buffer(buffer);
var n;
@@ -93,7 +139,10 @@ proto.write = function (buffer) {
}else if(n === 0x74){ this.tState = TRUE1; // t
}else if(n === 0x66){ this.tState = FALSE1; // f
}else if(n === 0x6e){ this.tState = NULL1; // n
- }else if(n === 0x22){ this.string = ""; this.tState = STRING1; // "
+ }else if(n === 0x22){ // "
+ this.string = "";
+ this.stringBufferOffset = 0;
+ this.tState = STRING1;
}else if(n === 0x2d){ this.string = "-"; this.tState = NUMBER1; // -
}else{
if (n >= 0x30 && n < 0x40) { // 1-9
@@ -112,7 +161,8 @@ proto.write = function (buffer) {
for (var j = 0; j < this.bytes_remaining; j++) {
this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + j] = buffer[j];
}
- this.string += this.temp_buffs[this.bytes_in_sequence].toString();
+
+ this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]);
this.bytes_in_sequence = this.bytes_remaining = 0;
i = i + j - 1;
} else if (this.bytes_remaining === 0 && n >= 128) { // else if no remainder bytes carried over, parse multi byte (>=128) chars one at a time
@@ -129,25 +179,34 @@ proto.write = function (buffer) {
this.bytes_remaining = (i + this.bytes_in_sequence) - buffer.length;
i = buffer.length - 1;
} else {
- this.string += buffer.slice(i, (i + this.bytes_in_sequence)).toString();
+ this.appendStringBuf(buffer, i, i + this.bytes_in_sequence);
i = i + this.bytes_in_sequence - 1;
}
- } else if (n === 0x22) { this.tState = START; this.onToken(STRING, this.string); this.offset += Buffer.byteLength(this.string, 'utf8') + 1; this.string = undefined; }
- else if (n === 0x5c) { this.tState = STRING2; }
- else if (n >= 0x20) { this.string += String.fromCharCode(n); }
+ } else if (n === 0x22) {
+ this.tState = START;
+ this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);
+ this.stringBufferOffset = 0;
+ this.onToken(STRING, this.string);
+ this.offset += Buffer.byteLength(this.string, 'utf8') + 1;
+ this.string = undefined;
+ }
+ else if (n === 0x5c) {
+ this.tState = STRING2;
+ }
+ else if (n >= 0x20) { this.appendStringChar(n); }
else {
return this.charError(buffer, i);
}
}else if (this.tState === STRING2){ // After backslash
n = buffer[i];
- if(n === 0x22){ this.string += "\""; this.tState = STRING1;
- }else if(n === 0x5c){ this.string += "\\"; this.tState = STRING1;
- }else if(n === 0x2f){ this.string += "\/"; this.tState = STRING1;
- }else if(n === 0x62){ this.string += "\b"; this.tState = STRING1;
- }else if(n === 0x66){ this.string += "\f"; this.tState = STRING1;
- }else if(n === 0x6e){ this.string += "\n"; this.tState = STRING1;
- }else if(n === 0x72){ this.string += "\r"; this.tState = STRING1;
- }else if(n === 0x74){ this.string += "\t"; this.tState = STRING1;
+ if(n === 0x22){ this.appendStringChar(n); this.tState = STRING1;
+ }else if(n === 0x5c){ this.appendStringChar(BACK_SLASH); this.tState = STRING1;
+ }else if(n === 0x2f){ this.appendStringChar(FORWARD_SLASH); this.tState = STRING1;
+ }else if(n === 0x62){ this.appendStringChar(BACKSPACE); this.tState = STRING1;
+ }else if(n === 0x66){ this.appendStringChar(FORM_FEED); this.tState = STRING1;
+ }else if(n === 0x6e){ this.appendStringChar(NEWLINE); this.tState = STRING1;
+ }else if(n === 0x72){ this.appendStringChar(CARRIAGE_RETURN); this.tState = STRING1;
+ }else if(n === 0x74){ this.appendStringChar(TAB); this.tState = STRING1;
}else if(n === 0x75){ this.unicode = ""; this.tState = STRING3;
}else{
return this.charError(buffer, i);
@@ -158,7 +217,7 @@ proto.write = function (buffer) {
if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) {
this.unicode += String.fromCharCode(n);
if (this.tState++ === STRING6) {
- this.string += String.fromCharCode(parseInt(this.unicode, 16));
+ this.appendStringBuf(Buffer(String.fromCharCode(parseInt(this.unicode, 16))));
this.unicode = undefined;
this.tState = STRING1;
}
diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json
index 65e97dd8672..f60aa1ef704 100644
--- a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json
+++ b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/package.json
@@ -14,14 +14,19 @@
]
],
"_from": "jsonparse@>=1.2.0 <2.0.0",
- "_id": "jsonparse@1.2.0",
+ "_id": "jsonparse@1.3.0",
"_inCache": true,
"_location": "/JSONStream/jsonparse",
+ "_nodeVersion": "4.1.1",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/jsonparse-1.3.0.tgz_1484597944748_0.925271877553314"
+ },
"_npmUser": {
"name": "creationix",
"email": "tim@creationix.com"
},
- "_npmVersion": "1.4.28",
+ "_npmVersion": "2.14.4",
"_phantomChildren": {},
"_requested": {
"raw": "jsonparse@^1.2.0",
@@ -35,8 +40,8 @@
"_requiredBy": [
"/JSONStream"
],
- "_resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.2.0.tgz",
- "_shasum": "5c0c5685107160e72fe7489bddea0b44c2bc67bd",
+ "_resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.0.tgz",
+ "_shasum": "85fc245b1d9259acc6941960b905adf64e7de0e8",
"_shrinkwrap": null,
"_spec": "jsonparse@^1.2.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/JSONStream",
@@ -55,14 +60,14 @@
},
"directories": {},
"dist": {
- "shasum": "5c0c5685107160e72fe7489bddea0b44c2bc67bd",
- "tarball": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.2.0.tgz"
+ "shasum": "85fc245b1d9259acc6941960b905adf64e7de0e8",
+ "tarball": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.0.tgz"
},
"engines": [
"node >= 0.2.0"
],
- "gitHead": "b3f4dc7b49300a549aea19a628d712009ca84ced",
- "homepage": "https://github.com/creationix/jsonparse",
+ "gitHead": "69f02ca615aeeb4cbbe786ab42ce0592b44dc217",
+ "homepage": "https://github.com/creationix/jsonparse#readme",
"license": "MIT",
"main": "jsonparse.js",
"maintainers": [
@@ -89,5 +94,5 @@
"json",
"stream"
],
- "version": "1.2.0"
+ "version": "1.3.0"
}
diff --git a/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js
new file mode 100644
index 00000000000..36046317ee9
--- /dev/null
+++ b/deps/npm/node_modules/JSONStream/node_modules/jsonparse/test/big-token.js
@@ -0,0 +1,24 @@
+var stream = require('stream');
+var JsonParse = require('../jsonparse');
+var test = require('tape');
+
+test('can handle large tokens without running out of memory', function (t) {
+ var parser = new JsonParse();
+ var chunkSize = 1024;
+ var chunks = 1024 * 200; // 200mb
+ var quote = Buffer.from ? Buffer.from('"') : new Buffer('"');
+ t.plan(1);
+
+ parser.onToken = function (type, value) {
+ t.equal(value.length, chunkSize * chunks, 'token should be size of input json');
+ t.end();
+ };
+
+ parser.write(quote);
+ for (var i = 0; i < chunks; ++i) {
+ var buf = Buffer.alloc ? Buffer.alloc(chunkSize) : new Buffer(chunkSize);
+ buf.fill('a');
+ parser.write(buf);
+ }
+ parser.write(quote);
+});
diff --git a/deps/npm/node_modules/JSONStream/package.json b/deps/npm/node_modules/JSONStream/package.json
index 75eacb3b0f6..91907f21cf9 100644
--- a/deps/npm/node_modules/JSONStream/package.json
+++ b/deps/npm/node_modules/JSONStream/package.json
@@ -2,50 +2,50 @@
"_args": [
[
{
- "raw": "JSONStream@1.3.0",
+ "raw": "JSONStream@latest",
"scope": null,
"escapedName": "JSONStream",
"name": "JSONStream",
- "rawSpec": "1.3.0",
- "spec": "1.3.0",
- "type": "version"
+ "rawSpec": "latest",
+ "spec": "latest",
+ "type": "tag"
},
- "/Users/rebecca/code/npm"
+ "/Users/zkat/Documents/code/npm"
]
],
- "_from": "JSONStream@1.3.0",
- "_id": "JSONStream@1.3.0",
+ "_from": "JSONStream@latest",
+ "_id": "JSONStream@1.3.1",
"_inCache": true,
"_location": "/JSONStream",
- "_nodeVersion": "6.5.0",
+ "_nodeVersion": "6.9.4",
"_npmOperationalInternal": {
- "host": "packages-18-east.internal.npmjs.com",
- "tmp": "tmp/JSONStream-1.3.0.tgz_1481845260408_0.7681232686154544"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/JSONStream-1.3.1.tgz_1487992062630_0.4616028449963778"
},
"_npmUser": {
"name": "dominictarr",
"email": "dominic.tarr@gmail.com"
},
- "_npmVersion": "3.10.3",
+ "_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
- "raw": "JSONStream@1.3.0",
+ "raw": "JSONStream@latest",
"scope": null,
"escapedName": "JSONStream",
"name": "JSONStream",
- "rawSpec": "1.3.0",
- "spec": "1.3.0",
- "type": "version"
+ "rawSpec": "latest",
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.0.tgz",
- "_shasum": "680ab9ac6572a8a1a207e0b38721db1c77b215e5",
+ "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
+ "_shasum": "707f761e01dae9e16f1bcf93703b78c70966579a",
"_shrinkwrap": null,
- "_spec": "JSONStream@1.3.0",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "JSONStream@latest",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Dominic Tarr",
"email": "dominic.tarr@gmail.com",
@@ -72,13 +72,13 @@
},
"directories": {},
"dist": {
- "shasum": "680ab9ac6572a8a1a207e0b38721db1c77b215e5",
- "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.0.tgz"
+ "shasum": "707f761e01dae9e16f1bcf93703b78c70966579a",
+ "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz"
},
"engines": {
"node": "*"
},
- "gitHead": "3d5d3283d79e23da81fa6fc4b76bc1f44ff0047d",
+ "gitHead": "71ab5610d272bb47e64957e2191df6662ee64a90",
"homepage": "http://github.com/dominictarr/JSONStream",
"keywords": [
"json",
@@ -109,5 +109,5 @@
"scripts": {
"test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done"
},
- "version": "1.3.0"
+ "version": "1.3.1"
}
diff --git a/deps/npm/node_modules/JSONStream/test/header_footer.js b/deps/npm/node_modules/JSONStream/test/header_footer.js
index ef0187940ed..f18fc59e7e4 100644
--- a/deps/npm/node_modules/JSONStream/test/header_footer.js
+++ b/deps/npm/node_modules/JSONStream/test/header_footer.js
@@ -38,6 +38,7 @@ parser.on('data', function (data) {
value: {rev: it.typeof('string')},
key:it.typeof('string')
})
+ it(headerCalled).equal(1)
parsed.push(data)
})
diff --git a/deps/npm/node_modules/abbrev/abbrev.js b/deps/npm/node_modules/abbrev/abbrev.js
index 69cfeac5218..7b1dc5d6769 100644
--- a/deps/npm/node_modules/abbrev/abbrev.js
+++ b/deps/npm/node_modules/abbrev/abbrev.js
@@ -1,4 +1,3 @@
-
module.exports = exports = abbrev.abbrev = abbrev
abbrev.monkeyPatch = monkeyPatch
diff --git a/deps/npm/node_modules/abbrev/package.json b/deps/npm/node_modules/abbrev/package.json
index 17ac1cad323..5d637efee71 100644
--- a/deps/npm/node_modules/abbrev/package.json
+++ b/deps/npm/node_modules/abbrev/package.json
@@ -2,50 +2,51 @@
"_args": [
[
{
- "raw": "abbrev@1.0.9",
+ "raw": "abbrev@latest",
"scope": null,
+ "escapedName": "abbrev",
"name": "abbrev",
- "rawSpec": "1.0.9",
- "spec": "1.0.9",
- "type": "version"
+ "rawSpec": "latest",
+ "spec": "latest",
+ "type": "tag"
},
"/Users/rebecca/code/npm"
]
],
- "_from": "abbrev@1.0.9",
- "_id": "abbrev@1.0.9",
+ "_from": "abbrev@latest",
+ "_id": "abbrev@1.1.0",
"_inCache": true,
- "_installable": true,
"_location": "/abbrev",
- "_nodeVersion": "4.4.4",
+ "_nodeVersion": "8.0.0-pre",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/abbrev-1.0.9.tgz_1466016055839_0.7825860097073019"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/abbrev-1.1.0.tgz_1487054000015_0.9229173036292195"
},
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
- "_npmVersion": "3.9.1",
+ "_npmVersion": "4.3.0",
"_phantomChildren": {},
"_requested": {
- "raw": "abbrev@1.0.9",
+ "raw": "abbrev@latest",
"scope": null,
+ "escapedName": "abbrev",
"name": "abbrev",
- "rawSpec": "1.0.9",
- "spec": "1.0.9",
- "type": "version"
+ "rawSpec": "latest",
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
"#USER",
"/",
- "/nopt",
- "/tap/nyc/istanbul"
+ "/node-gyp/nopt",
+ "/nopt"
],
- "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
- "_shasum": "91b4792588a7738c25f35dd6f63752a2f8776135",
+ "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
+ "_shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f",
"_shrinkwrap": null,
- "_spec": "abbrev@1.0.9",
+ "_spec": "abbrev@latest",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
@@ -57,17 +58,17 @@
"dependencies": {},
"description": "Like ruby's abbrev module, but in js",
"devDependencies": {
- "tap": "^5.7.2"
+ "tap": "^10.1"
},
"directories": {},
"dist": {
- "shasum": "91b4792588a7738c25f35dd6f63752a2f8776135",
- "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz"
+ "shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f",
+ "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz"
},
"files": [
"abbrev.js"
],
- "gitHead": "c386cd9dbb1d8d7581718c54d4ba944cc9298d6f",
+ "gitHead": "7136d4d95449dc44115d4f78b80ec907724f64e0",
"homepage": "https://github.com/isaacs/abbrev-js#readme",
"license": "ISC",
"main": "abbrev.js",
@@ -85,7 +86,10 @@
"url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
},
"scripts": {
- "test": "tap test.js --cov"
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test.js --100"
},
- "version": "1.0.9"
+ "version": "1.1.0"
}
diff --git a/deps/npm/node_modules/aproba/README.md b/deps/npm/node_modules/aproba/README.md
index 8246a9cc6e1..a9d38222a7d 100644
--- a/deps/npm/node_modules/aproba/README.md
+++ b/deps/npm/node_modules/aproba/README.md
@@ -29,7 +29,8 @@ N | typeof == number
F | typeof == function
O | typeof == object and not type A and not type E
B | typeof == boolean
-E | instanceof Error OR null
+E | instanceof Error OR null **(special: see below)**
+Z | == null
Validation failures throw one of three exception types, distinguished by a
`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
@@ -37,8 +38,37 @@ Validation failures throw one of three exception types, distinguished by a
If you pass in an invalid type then it will throw with a code of
`EUNKNOWNTYPE`.
-If an error argument is found and is not null then the remaining arguments
-will not be validated.
+If an **error** argument is found and is not null then the remaining
+arguments are optional. That is, if you say `ESO` then that's like using a
+non-magical `E` in: `E|ESO|ZSO`.
+
+### But I have optional arguments?!
+
+You can provide more than one signature by separating them with pipes `|`.
+If any signature matches the arguments then they'll be considered valid.
+
+So for example, say you wanted to write a signature for
+`fs.createWriteStream`. The docs for it describe it thusly:
+
+```
+fs.createWriteStream(path[, options])
+```
+
+This would be a signature of `SO|S`. That is, a string and and object, or
+just a string.
+
+Now, if you read the full `fs` docs, you'll see that actually path can ALSO
+be a buffer. And options can be a string, that is:
+```
+path |
+options |