From 05d40d9573f357d4c8d45a8a61ec324161a8667c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kat=20March=C3=A1n?= This is just enough info to get you up and running. Much more info available via You need node v0.8 or higher to run this program. You need node v0.10 or higher to run this program. To install an old and unsupported version of npm that works on node 0.3
and prior, clone the git repo and dig through the old tags and branches. npm is configured to use npm, Inc.'s public package registry at
@@ -127,5 +127,5 @@ 2.15.9 2.15.11 This is the API documentation for npm.
To find documentation of the command line
@@ -109,5 +109,5 @@ Package linking is a two-step process. First, SYNOPSIS
npm help
once it's installed.IMPORTANT
-SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html
index 4456ea971c1b8c..1d14cf8082c3d8 100644
--- a/deps/npm/html/doc/api/npm-bin.html
+++ b/deps/npm/html/doc/api/npm-bin.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html
index 90c3d80c6b3232..4e0bcd7a26e021 100644
--- a/deps/npm/html/doc/api/npm-bugs.html
+++ b/deps/npm/html/doc/api/npm-bugs.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html
index 30011ec9da614c..bee4834fd83560 100644
--- a/deps/npm/html/doc/api/npm-cache.html
+++ b/deps/npm/html/doc/api/npm-cache.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html
index d0afcdd5909c83..7fd7f6f9d591c0 100644
--- a/deps/npm/html/doc/api/npm-commands.html
+++ b/deps/npm/html/doc/api/npm-commands.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html
index ac101cc478bcbe..e6503c6e8e1f54 100644
--- a/deps/npm/html/doc/api/npm-config.html
+++ b/deps/npm/html/doc/api/npm-config.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html
index 09d878d0126567..d637471ddb50de 100644
--- a/deps/npm/html/doc/api/npm-deprecate.html
+++ b/deps/npm/html/doc/api/npm-deprecate.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html
index 97ae21f3423651..feea848f307ac2 100644
--- a/deps/npm/html/doc/api/npm-docs.html
+++ b/deps/npm/html/doc/api/npm-docs.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html
index 38c256b7fad7ff..be2072a5784b8e 100644
--- a/deps/npm/html/doc/api/npm-edit.html
+++ b/deps/npm/html/doc/api/npm-edit.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html
index 78c0e3facc5605..33a2e0a25d6b8a 100644
--- a/deps/npm/html/doc/api/npm-explore.html
+++ b/deps/npm/html/doc/api/npm-explore.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html
index 6a13dec92875cc..150775cb99b937 100644
--- a/deps/npm/html/doc/api/npm-help-search.html
+++ b/deps/npm/html/doc/api/npm-help-search.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html
index 0108a97dcdf2d5..8df7483f5a9ee6 100644
--- a/deps/npm/html/doc/api/npm-init.html
+++ b/deps/npm/html/doc/api/npm-init.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html
index 921fe327a47dd9..0f06ab65f17aa1 100644
--- a/deps/npm/html/doc/api/npm-install.html
+++ b/deps/npm/html/doc/api/npm-install.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html
index 5545d89b8bf488..f46140f2527c63 100644
--- a/deps/npm/html/doc/api/npm-link.html
+++ b/deps/npm/html/doc/api/npm-link.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html
index 77c9a1beb4349d..4df8bcbbf42a92 100644
--- a/deps/npm/html/doc/api/npm-load.html
+++ b/deps/npm/html/doc/api/npm-load.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html
index ffbb723c1f7b8e..631321a2385b25 100644
--- a/deps/npm/html/doc/api/npm-ls.html
+++ b/deps/npm/html/doc/api/npm-ls.html
@@ -1,7 +1,7 @@
global
-
+
diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html
index 1df82f605815a4..27482726be7d4e 100644
--- a/deps/npm/html/doc/api/npm-outdated.html
+++ b/deps/npm/html/doc/api/npm-outdated.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html
index dd9ccbd875070e..ad72f0511ab3ee 100644
--- a/deps/npm/html/doc/api/npm-owner.html
+++ b/deps/npm/html/doc/api/npm-owner.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html
index ad4b795c9438e5..a4bed4a12dab29 100644
--- a/deps/npm/html/doc/api/npm-pack.html
+++ b/deps/npm/html/doc/api/npm-pack.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-ping.html b/deps/npm/html/doc/api/npm-ping.html
index 177bbe60eddf56..9244fb92ba2643 100644
--- a/deps/npm/html/doc/api/npm-ping.html
+++ b/deps/npm/html/doc/api/npm-ping.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html
index e9df478dbabe38..d01ab2ae48915e 100644
--- a/deps/npm/html/doc/api/npm-prefix.html
+++ b/deps/npm/html/doc/api/npm-prefix.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html
index fbddc75e1ccb2c..3cace3e72cd72c 100644
--- a/deps/npm/html/doc/api/npm-prune.html
+++ b/deps/npm/html/doc/api/npm-prune.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html
index e3ae971db1add3..3a8c2b29f228e6 100644
--- a/deps/npm/html/doc/api/npm-publish.html
+++ b/deps/npm/html/doc/api/npm-publish.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html
index f2a0d1c5ea3796..a7edebfcdce47c 100644
--- a/deps/npm/html/doc/api/npm-rebuild.html
+++ b/deps/npm/html/doc/api/npm-rebuild.html
@@ -1,7 +1,7 @@
CONFIGURATION
-
+
diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html
index 7d4d9965599b35..367518ce6c2038 100644
--- a/deps/npm/html/doc/api/npm-repo.html
+++ b/deps/npm/html/doc/api/npm-repo.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html
index a8900dbf25c5b1..401335bf6099c9 100644
--- a/deps/npm/html/doc/api/npm-restart.html
+++ b/deps/npm/html/doc/api/npm-restart.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html
index c37b2ab538b8a9..c78cd7fc007148 100644
--- a/deps/npm/html/doc/api/npm-root.html
+++ b/deps/npm/html/doc/api/npm-root.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html
index b43bb099969e31..ceb77f93a6ee5c 100644
--- a/deps/npm/html/doc/api/npm-run-script.html
+++ b/deps/npm/html/doc/api/npm-run-script.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html
index 7123c67bd490e8..794a089b4d94b6 100644
--- a/deps/npm/html/doc/api/npm-search.html
+++ b/deps/npm/html/doc/api/npm-search.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html
index 85c90268706859..861dd876b9ec9b 100644
--- a/deps/npm/html/doc/api/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/api/npm-shrinkwrap.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html
index dde471134f06ec..fcb3bc5dfbb520 100644
--- a/deps/npm/html/doc/api/npm-start.html
+++ b/deps/npm/html/doc/api/npm-start.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html
index bac79bc1d97f6a..b533b0f8a4eb5e 100644
--- a/deps/npm/html/doc/api/npm-stop.html
+++ b/deps/npm/html/doc/api/npm-stop.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html
index d0435f9ab23088..88b52279745a21 100644
--- a/deps/npm/html/doc/api/npm-tag.html
+++ b/deps/npm/html/doc/api/npm-tag.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html
index 7d830b1d346729..58f9938226589e 100644
--- a/deps/npm/html/doc/api/npm-test.html
+++ b/deps/npm/html/doc/api/npm-test.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html
index 8bda3f68ff5f4e..2e9b67124a2e23 100644
--- a/deps/npm/html/doc/api/npm-uninstall.html
+++ b/deps/npm/html/doc/api/npm-uninstall.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html
index 37353624dfe179..f1365e9adb2771 100644
--- a/deps/npm/html/doc/api/npm-unpublish.html
+++ b/deps/npm/html/doc/api/npm-unpublish.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html
index 40c985fead30f3..ebae0f91a8d0b2 100644
--- a/deps/npm/html/doc/api/npm-update.html
+++ b/deps/npm/html/doc/api/npm-update.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html
index d93a7387951e3d..50b2a15f8670e0 100644
--- a/deps/npm/html/doc/api/npm-version.html
+++ b/deps/npm/html/doc/api/npm-version.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html
index e461b1b33eeff6..a34dad393cdd87 100644
--- a/deps/npm/html/doc/api/npm-view.html
+++ b/deps/npm/html/doc/api/npm-view.html
@@ -1,7 +1,7 @@
RETURN VALUE
-
+
diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html
index b01568f77ca0b0..dc9d7e6a8a7561 100644
--- a/deps/npm/html/doc/api/npm-whoami.html
+++ b/deps/npm/html/doc/api/npm-whoami.html
@@ -1,7 +1,7 @@
SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html
index 3877da952373e4..f4307be3657d11 100644
--- a/deps/npm/html/doc/api/npm.html
+++ b/deps/npm/html/doc/api/npm.html
@@ -1,7 +1,7 @@
SYNOPSIS
npm.commands.install(["package"], cb)
})
VERSION
-DESCRIPTION
ABBREVS
-
+
diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html
index cf1dd5945481fa..e702859b61742c 100644
--- a/deps/npm/html/doc/cli/npm-access.html
+++ b/deps/npm/html/doc/cli/npm-access.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html
index 15ad53cecdff08..6ef0d86fcc6c92 100644
--- a/deps/npm/html/doc/cli/npm-adduser.html
+++ b/deps/npm/html/doc/cli/npm-adduser.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index eca87952fc268b..ba9f48abb395d2 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index fd9d0ac8f683aa..9641719d214909 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index 5215950fce0e95..1952dff0af967f 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -1,7 +1,7 @@
DESCRIPTION
-
+
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index c9dbab12e77d80..9f60d3080770ca 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index d9dd8ee57db699..71ce4b2a80de55 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index e306f34d1a2402..7bc38fd7de4037 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index c2e61e190f6d43..5ebcbc80f58a0f 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index c4c1e4f6de9026..15e2884ef51ca3 100644
--- a/deps/npm/html/doc/cli/npm-dedupe.html
+++ b/deps/npm/html/doc/cli/npm-dedupe.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index 4c00a9f4f704fd..92daebf5b9f902 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html
index 8fd7f17a4b3558..9821bda52063f0 100644
--- a/deps/npm/html/doc/cli/npm-dist-tag.html
+++ b/deps/npm/html/doc/cli/npm-dist-tag.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 46c13e4323cfdb..75e7b0db40b109 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index bdfc4d9c09e54a..a8748879f162ee 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index 465557bed71c64..b4aa0941128b91 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index 60f730f69f24df..80325ed1a7b5ed 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index 30d5c681f50e81..e03c2fa624666c 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index 178d746bdd86ba..0c2a2cacebd659 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -1,7 +1,7 @@
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 2bd724bcfad9dc..622a5b3eabff83 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -1,7 +1,7 @@
SYNOPSIS
to the environment when running git:
GIT_ASKPASS
GIT_EXEC_PATH
GIT_PROXY_COMMAND
GIT_SSH
GIT_SSH_COMMAND
SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index 9d2834d9ac86a4..9572f9b65b44b9 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -1,7 +1,7 @@
SYNOPSIS
npm link
in a package folder will create a symlink in the global folder
{prefix}/lib/node_modules/<package>
that links to the package where the npm
-link
command was executed. (see npm-config(7)
for the value of prefix
).npm-config(7)
for the value of prefix
). It
+will also link any bins in the package to {prefix}/bin/{name}
.
Next, in some other location, npm link package-name
will create a
symbolic link from globally-installed package-name
to node_modules/
of the current folder.
npm ls promzard
in npm's source tree will show:
-npm@2.15.9 /path/to/npm
+npm@2.15.11 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
It will print out extraneous, missing, and invalid packages.
@@ -97,5 +97,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index 54c8b4d9f9e1f9..0bb8477453ab69 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -1,7 +1,7 @@
npm-outdated
-
+
@@ -116,5 +116,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index eedd6793b0fbcf..1d240e405a21c1 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -1,7 +1,7 @@
npm-owner
-
+
@@ -51,5 +51,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index 36577d5d51224f..aee55311b554da 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -1,7 +1,7 @@
npm-pack
-
+
@@ -41,5 +41,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html
index 20f21507207cae..a178b5a166e9db 100644
--- a/deps/npm/html/doc/cli/npm-ping.html
+++ b/deps/npm/html/doc/cli/npm-ping.html
@@ -1,7 +1,7 @@
npm-ping
-
+
@@ -32,4 +32,4 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index f33e394d260509..6b0d4b1bdadcbd 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -1,7 +1,7 @@
npm-prefix
-
+
@@ -38,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 37fe97fee30428..30001bfb6f197c 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -1,7 +1,7 @@
npm-prune
-
+
@@ -41,5 +41,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 4068a8dd0ddb89..69afb261cebecf 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -1,7 +1,7 @@
npm-publish
-
+
@@ -69,5 +69,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index 27f49f3d155fc5..d96e0b5fa51276 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -1,7 +1,7 @@
npm-rebuild
-
+
@@ -38,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 54049ad9575810..b8ba0deaf8ebda 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -1,7 +1,7 @@
npm-repo
-
+
@@ -42,5 +42,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index 44c99c923b3fae..c638f8a9015575 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -1,7 +1,7 @@
npm-restart
-
+
@@ -53,5 +53,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html
index a2b966703369df..3093834bca5c04 100644
--- a/deps/npm/html/doc/cli/npm-rm.html
+++ b/deps/npm/html/doc/cli/npm-rm.html
@@ -1,7 +1,7 @@
npm-rm
-
+
@@ -39,5 +39,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index a41cf59af3b932..85475818433a28 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -1,7 +1,7 @@
npm-root
-
+
@@ -35,5 +35,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index 0f3bf5e9ec3cce..5a5d481e2371dd 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -1,7 +1,7 @@
npm-run-script
-
+
@@ -57,5 +57,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index 82f1837cd1aec1..b8fa93ec5b50ba 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -1,7 +1,7 @@
npm-search
-
+
@@ -57,5 +57,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 8e1b2e9cf4c412..2986737edd6fef 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -1,7 +1,7 @@
npm-shrinkwrap
-
+
@@ -168,5 +168,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index 25c483d2bc16c2..dfed3c97438f6f 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -1,7 +1,7 @@
npm-star
-
+
@@ -36,5 +36,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index 054b8341d76a13..d2d4088d15aec3 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -1,7 +1,7 @@
npm-stars
-
+
@@ -37,5 +37,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index cd6d6085e8d3c4..ac79e10e2d0203 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -1,7 +1,7 @@
npm-start
-
+
@@ -39,5 +39,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 81172d71fbe6cf..b1250c58c426f7 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -1,7 +1,7 @@
npm-stop
-
+
@@ -34,5 +34,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html
index ccbb95741491a0..e8ec4eccdc2212 100644
--- a/deps/npm/html/doc/cli/npm-tag.html
+++ b/deps/npm/html/doc/cli/npm-tag.html
@@ -1,7 +1,7 @@
npm-tag
-
+
@@ -62,5 +62,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html
index 947e5d770e3d58..6aebb079dd06d2 100644
--- a/deps/npm/html/doc/cli/npm-team.html
+++ b/deps/npm/html/doc/cli/npm-team.html
@@ -1,7 +1,7 @@
npm-team
-
+
@@ -67,4 +67,4 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index c6c465d741861e..6a5ff404e87107 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -1,7 +1,7 @@
npm-test
-
+
@@ -38,5 +38,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index 58b18e9543927a..6b7245afa02af6 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -1,7 +1,7 @@
npm-uninstall
-
+
@@ -57,5 +57,5 @@ SYNOPSIS
-
+
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index 7938d7c7a39296..d4e6ee141a793d 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -1,7 +1,7 @@
npm-unpublish
-
+
@@ -47,5 +47,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index ae91bfb10833d0..e0e5bf51c4c99b 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -1,7 +1,7 @@
npm-update
-
+
@@ -117,5 +117,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index 43e6b9fb4c78d5..115965f706cb3a 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -1,7 +1,7 @@
npm-version
-
+
@@ -95,5 +95,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index 96c13e9313f9e7..8806b7ca227f24 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -1,7 +1,7 @@
npm-view
-
+
@@ -85,5 +85,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index d91c8da38422e5..8a9ecc98c4a06a 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -1,7 +1,7 @@
npm-whoami
-
+
@@ -33,5 +33,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index dcc4cdd0a571e3..41bb04b694fe51 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -1,7 +1,7 @@
npm
-
+
@@ -13,7 +13,7 @@ npm
javascript package manager
SYNOPSIS
npm <command> [args]
VERSION
-2.15.9
+2.15.11
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 @@
AUTHOR
Isaac Z. Schlueter ::
isaacs ::
@izs ::
-i@izs.me
+i@izs.me
SEE ALSO
- npm-help(1)
@@ -152,5 +152,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index f347f9ccef21d6..ff8d023810f0a3 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -1,7 +1,7 @@
npm-folders
-
+
@@ -183,5 +183,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index f347f9ccef21d6..ff8d023810f0a3 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -1,7 +1,7 @@
npm-folders
-
+
@@ -183,5 +183,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index bb657115978f6c..8d6cf977695d4a 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -1,7 +1,7 @@
package.json
-
+
@@ -191,7 +191,10 @@ bin
{ "name": "my-program"
, "version": "1.2.5"
, "bin" : { "my-program" : "./path/to/program" } }
-
man
+
Please make sure that your file(s) referenced in bin
starts with
+#!/usr/bin/env node
, otherwise the scripts are started without the node
+executable!
Specify either a single file or an array of filenames to put in place for the
man
program to find.
If only a single file is provided, then it's installed such that it is the @@ -582,5 +585,5 @@
0600
), otherwise they will be ignored by
npm!
-Lines in .npmrc
files are interpreted as comments when they begin with a ;
or #
character. .npmrc
files are parsed by npm/ini, which specifies this comment syntax.
For example:
+# last modified: 01 Jan 2016
+; Set a new registry for a scoped package
+@myscope:registry=https://mycustomregistry.example.org
+
When working locally in a project, a .npmrc
file in the root of the
project (ie, a sibling of node_modules
and package.json
) will set
config values specific to this project.
{ "name": "my-program"
, "version": "1.2.5"
, "bin" : { "my-program" : "./path/to/program" } }
-
Please make sure that your file(s) referenced in bin
starts with
+#!/usr/bin/env node
, otherwise the scripts are started without the node
+executable!
Specify either a single file or an array of filenames to put in place for the
man
program to find.
If only a single file is provided, then it's installed such that it is the @@ -582,5 +585,5 @@
The four relevant files are:
/path/to/my/project/.npmrc
)$HOME/.npmrc
; configurable via CLI
+option --userconfig
or environment variable $NPM_CONF_USERCONFIG
)$PREFIX/etc/npmrc
; configurable via
+CLI option --globalconfig
or environment variable $NPM_CONF_GLOBALCONFIG
)/path/to/npm/npmrc
)See npmrc(5) for more details.
Handling Module
npm owner ls <pkgname>
Don't squat on package names. Publish code or move out of the way.
@@ -51,12 +51,12 @@npm owner add
joe foo
to add Joe as an owner of the foo
package.@somescope/somepackagename
Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package.
-Scoped packages are supported by the public npm registry. The npm -client is backwards-compatible with un-scoped registries, so it can be -used to work with scoped and un-scoped registries at the same time.
+Scoped packages can be published and installed as of npm@2
and are supported
+by the primary npm registry. The npm client is backwards-compatible with
+un-scoped registries, so it can be used to work with scoped and un-scoped
+registries at the same time.
Scoped packages are installed to a sub-folder of the regular installation
folder, e.g. if your other packages are installed in node_modules/packagename
,
@@ -43,12 +44,13 @@
There is nothing special about the way Node treats scope folders, this is
just specifying to require the module mypackage
in the folder called @myorg
.
Scoped packages can be published to any registry that supports them, including -the public npm registry.
-(As of 2015-04-19, and with npm 2.0 or newer, the public npm registry does +
Scoped packages can be published from the CLI as of npm@2
and can be
+published to any registry that supports them, including the primary npm
+registry.
(As of 2015-04-19, and with npm 2.0 or newer, the primary npm registry does support scoped packages)
If you wish, you may associate a scope with a registry; see below.
-To publish a public scoped package, you must specify --access public
with
the initial publication. This will publish the package and set access
to public
as if you had run npm access public
after publishing.
npm access
or on the npmjs.com website.
Scopes can be associated with a separate registry. This allows you to -seamlessly use a mix of packages from the public npm registry and one or more +seamlessly use a mix of packages from the primary npm registry and one or more private registries, such as npm Enterprise.
You can associate a scope with a registry at login, e.g.
npm login --registry=http://reg.example.com --scope=@myco
@@ -92,5 +94,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index 4f8a9374613c9d..9b44bbde9a6460 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -1,7 +1,7 @@
npm-scripts
-
+
@@ -28,9 +28,9 @@ DESCRIPTION
postuninstall:
Run AFTER the package is uninstalled.
preversion, version:
-Run BEFORE bump the package version.
+Run BEFORE bumping the package version.
postversion:
-Run AFTER bump the package version.
+Run AFTER bumping the package version.
pretest, test, posttest:
Run by the npm test
command.
prestop, stop, poststop:
@@ -209,5 +209,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index 93b08f8864b291..6cce997545a2fe 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -1,7 +1,7 @@
removing-npm
-
+
@@ -57,5 +57,5 @@ SEE ALSO
-
+
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index d778cd23bae0b6..c854e7ee572054 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -1,7 +1,7 @@
semver
-
+
@@ -302,5 +302,5 @@ Ranges
-
+
diff --git a/deps/npm/html/dochead.html b/deps/npm/html/dochead.html
index e2f0e83d78ee49..26602b2b8af684 100644
--- a/deps/npm/html/dochead.html
+++ b/deps/npm/html/dochead.html
@@ -1,7 +1,7 @@
@NAME@
-
+
diff --git a/deps/npm/lib/cache/add-local.js b/deps/npm/lib/cache/add-local.js
index e7d286e4fb5d40..405867691c96b8 100644
--- a/deps/npm/lib/cache/add-local.js
+++ b/deps/npm/lib/cache/add-local.js
@@ -18,7 +18,7 @@ module.exports = addLocal
function addLocal (p, pkgData, cb_) {
assert(typeof p === "object", "must have spec info")
- assert(typeof cb === "function", "must have callback")
+ assert(typeof cb_ === "function", "must have callback")
pkgData = pkgData || {}
@@ -89,17 +89,20 @@ function addLocalDirectory (p, pkgData, shasum, cb) {
getCacheStat(function (er, cs) {
mkdir(path.dirname(pj), function (er, made) {
- if (er) return cb(er)
+ if (er) return wrapped(er)
var fancy = !pathIsInside(p, npm.tmp)
tar.pack(tgz, p, data, fancy, function (er) {
if (er) {
log.error("addLocalDirectory", "Could not pack", p, "to", tgz)
- return cb(er)
+ return wrapped(er)
}
- if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) wrapped()
+ if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) return wrapped()
- chownr(made || tgz, cs.uid, cs.gid, wrapped)
+ chownr(made || tgz, cs.uid, cs.gid, function (er) {
+ if (er && er.code === 'ENOENT') return wrapped()
+ wrapped(er)
+ })
})
})
})
diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js
index d3ecccdce9af81..112e841917441a 100644
--- a/deps/npm/lib/cache/add-remote-git.js
+++ b/deps/npm/lib/cache/add-remote-git.js
@@ -25,6 +25,7 @@ var templates = path.join(remotes, '_templates')
var VALID_VARIABLES = [
'GIT_ASKPASS',
+ 'GIT_EXEC_PATH',
'GIT_PROXY_COMMAND',
'GIT_SSH',
'GIT_SSH_COMMAND',
diff --git a/deps/npm/lib/utils/correct-mkdir.js b/deps/npm/lib/utils/correct-mkdir.js
index c0a31bdc58a10a..68c4a4ad79ae2e 100644
--- a/deps/npm/lib/utils/correct-mkdir.js
+++ b/deps/npm/lib/utils/correct-mkdir.js
@@ -43,8 +43,13 @@ function calculateOwner () {
if (!effectiveOwner) {
effectiveOwner = { uid: 0, gid: 0 }
- if (process.getuid) effectiveOwner.uid = +process.getuid()
- if (process.getgid) effectiveOwner.gid = +process.getgid()
+ // Pretty much only on windows
+ if (!process.getuid) {
+ return effectiveOwner
+ }
+
+ effectiveOwner.uid = +process.getuid()
+ effectiveOwner.gid = +process.getgid()
if (effectiveOwner.uid === 0) {
if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID
@@ -112,6 +117,7 @@ function makeDirectory (path, cb) {
function setPermissions (path, st, cb) {
chownr(path, st.uid, st.gid, function (er) {
+ if (er && er.code === 'ENOENT') return cb(null, st)
return cb(er, st)
})
}
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index 6017bf13b4c42d..fffb23708d5b5a 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "July 2016" "" ""
+.TH "NPM" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
@@ -10,7 +10,7 @@ This is just enough info to get you up and running\.
Much more info available via \fBnpm help\fP once it's installed\.
.SH IMPORTANT
.P
-\fBYou need node v0\.8 or higher to run this program\.\fR
+\fBYou need node v0\.10 or higher to run this program\.\fR
.P
To install an old \fBand unsupported\fR version of npm that works on node 0\.3
and prior, clone the git repo and dig through the old tags and branches\.
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index b286750f75738a..01fa5151e42b9d 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" "July 2016" "" ""
+.TH "NPM\-ACCESS" "1" "October 2016" "" ""
.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 d5ab3388dbade7..e6b501c0fedae3 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ADDUSER" "1" "July 2016" "" ""
+.TH "NPM\-ADDUSER" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index d4a40045419953..67bf68a7034991 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" "July 2016" "" ""
+.TH "NPM\-BIN" "1" "October 2016" "" ""
.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 33809816294456..f4f76c518eb459 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" "July 2016" "" ""
+.TH "NPM\-BUGS" "1" "October 2016" "" ""
.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 500e0f8dc11ece..b1a279d0f8709d 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" "July 2016" "" ""
+.TH "NPM\-BUILD" "1" "October 2016" "" ""
.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 a5a155afef5a86..685969cd5a018b 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" "July 2016" "" ""
+.TH "NPM\-BUNDLE" "1" "October 2016" "" ""
.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 d398aec675d311..16a092c555d36e 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" "July 2016" "" ""
+.TH "NPM\-CACHE" "1" "October 2016" "" ""
.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 a5ce04c8f2b7d2..7d39b608a242a8 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" "July 2016" "" ""
+.TH "NPM\-COMPLETION" "1" "October 2016" "" ""
.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 cca8373711ba71..d85183720e80f7 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" "July 2016" "" ""
+.TH "NPM\-CONFIG" "1" "October 2016" "" ""
.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 3c77120ae74ba6..9239bff66b8ec1 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" "July 2016" "" ""
+.TH "NPM\-DEDUPE" "1" "October 2016" "" ""
.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 2f42db01047b22..15572821a79755 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" "July 2016" "" ""
+.TH "NPM\-DEPRECATE" "1" "October 2016" "" ""
.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 1e76f9ddb90afb..aaa58bea8ed5f3 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" "July 2016" "" ""
+.TH "NPM\-DIST\-TAG" "1" "October 2016" "" ""
.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 217a0d130d7808..e3c9e3bce82195 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" "July 2016" "" ""
+.TH "NPM\-DOCS" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index bc345f50a74a76..87ff810f2e1d06 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" "July 2016" "" ""
+.TH "NPM\-EDIT" "1" "October 2016" "" ""
.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 0d35bfca724457..1830460476ac84 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" "July 2016" "" ""
+.TH "NPM\-EXPLORE" "1" "October 2016" "" ""
.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 cb7bc227e53119..c52da52b04438d 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" "July 2016" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "October 2016" "" ""
.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 de8326c0d78438..1241d4aec48ac5 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" "July 2016" "" ""
+.TH "NPM\-HELP" "1" "October 2016" "" ""
.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 5bf262a91cd1d8..1f1337a0ef4a1c 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" "July 2016" "" ""
+.TH "NPM\-INIT" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 71856a88245818..8188b35ccb5b5b 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" "July 2016" "" ""
+.TH "NPM\-INSTALL" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
@@ -200,6 +200,8 @@ fetch the package by name if it is not valid\.
.IP \(bu 2
\fBGIT_ASKPASS\fP
.IP \(bu 2
+\fBGIT_EXEC_PATH\fP
+.IP \(bu 2
\fBGIT_PROXY_COMMAND\fP
.IP \(bu 2
\fBGIT_SSH\fP
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 0928fb561293ec..4478c360b25587 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" "July 2016" "" ""
+.TH "NPM\-LINK" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
@@ -16,7 +16,8 @@ Package linking is a two\-step process\.
.P
First, \fBnpm link\fP in a package folder will create a symlink in the global folder
\fB{prefix}/lib/node_modules/\fP that links to the package where the \fBnpm
-link\fP command was executed\. (see npm help 7 \fBnpm\-config\fP for the value of \fBprefix\fP)\.
+link\fP command was executed\. (see npm help 7 \fBnpm\-config\fP for the value of \fBprefix\fP)\. It
+will also link any bins in the package to \fB{prefix}/bin/{name}\fP\|\.
.P
Next, in some other location, \fBnpm link package\-name\fP will create a
symbolic link from globally\-installed \fBpackage\-name\fP to \fBnode_modules/\fP
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 5b53cb121e6229..3b88cfddeb47a3 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" "July 2016" "" ""
+.TH "NPM\-LOGOUT" "1" "October 2016" "" ""
.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 c65a14fc458fb2..822d187965f1fc 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" "July 2016" "" ""
+.TH "NPM\-LS" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@2.15.9 /path/to/npm
+npm@2.15.11 /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 960108af7c7c58..499214485b4bc6 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" "July 2016" "" ""
+.TH "NPM\-OUTDATED" "1" "October 2016" "" ""
.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 86f86b02ce9c2c..8e6189cedf906b 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" "July 2016" "" ""
+.TH "NPM\-OWNER" "1" "October 2016" "" ""
.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 9c75b331dbcc5f..3325efa2bca356 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" "July 2016" "" ""
+.TH "NPM\-PACK" "1" "October 2016" "" ""
.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 737d3589ff5975..8681cd81184059 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" "July 2016" "" ""
+.TH "NPM\-PING" "1" "October 2016" "" ""
.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 fb11988956d9f4..c8c4fda0aaeb66 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" "July 2016" "" ""
+.TH "NPM\-PREFIX" "1" "October 2016" "" ""
.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 02fc884d36907d..db1e47af509695 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" "July 2016" "" ""
+.TH "NPM\-PRUNE" "1" "October 2016" "" ""
.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 279d242457a90b..95a2dba7ccdd88 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" "July 2016" "" ""
+.TH "NPM\-PUBLISH" "1" "October 2016" "" ""
.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 ca6ad5b1803b69..cde8faeb9b9aa3 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" "July 2016" "" ""
+.TH "NPM\-REBUILD" "1" "October 2016" "" ""
.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 65a2c496b2cbde..fa01553e88a56c 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" "July 2016" "" ""
+.TH "NPM\-REPO" "1" "October 2016" "" ""
.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 d47e17f6474f31..88ec6716e26861 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" "July 2016" "" ""
+.TH "NPM\-RESTART" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1
index 91c43d4f07e959..83e3d75c97184f 100644
--- a/deps/npm/man/man1/npm-rm.1
+++ b/deps/npm/man/man1/npm-rm.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RM" "1" "July 2016" "" ""
+.TH "NPM\-RM" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index ebad197cd8fc7f..03095fd2d62029 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" "July 2016" "" ""
+.TH "NPM\-ROOT" "1" "October 2016" "" ""
.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 c32bed36b5a8aa..9971cb2bea1fde 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" "July 2016" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "October 2016" "" ""
.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 ee9b07cfe014ab..a604aed22442ef 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" "July 2016" "" ""
+.TH "NPM\-SEARCH" "1" "October 2016" "" ""
.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 4b4ee519224cba..7a97e1d1dc99ea 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" "July 2016" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "October 2016" "" ""
.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 fbabda27c0d322..bbe0a0b5167bf5 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" "July 2016" "" ""
+.TH "NPM\-STAR" "1" "October 2016" "" ""
.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 dc021cbe57a0c6..e833f94668f49c 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" "July 2016" "" ""
+.TH "NPM\-STARS" "1" "October 2016" "" ""
.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 096c072065f3bb..fbfc1f30c62987 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" "July 2016" "" ""
+.TH "NPM\-START" "1" "October 2016" "" ""
.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 b00d2033ce9fc2..671d037a1a44db 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" "July 2016" "" ""
+.TH "NPM\-STOP" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1
index 49823e735eacf4..024f981e2ccd06 100644
--- a/deps/npm/man/man1/npm-tag.1
+++ b/deps/npm/man/man1/npm-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TAG" "1" "July 2016" "" ""
+.TH "NPM\-TAG" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index 40116a3336778c..dcf4e082462912 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" "July 2016" "" ""
+.TH "NPM\-TEAM" "1" "October 2016" "" ""
.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 2635d70ebe7773..277107521c231b 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" "July 2016" "" ""
+.TH "NPM\-TEST" "1" "October 2016" "" ""
.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 3020d30bcaa4bb..7ba45a5ad7d1fd 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" "July 2016" "" ""
+.TH "NPM\-UNINSTALL" "1" "October 2016" "" ""
.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 5c360906a68033..a63f3868ab4566 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" "July 2016" "" ""
+.TH "NPM\-UNPUBLISH" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index 36ec623c9561ce..a6f65e796f3fed 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" "July 2016" "" ""
+.TH "NPM\-UPDATE" "1" "October 2016" "" ""
.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 b116b60707925e..6fca5685823f38 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" "July 2016" "" ""
+.TH "NPM\-VERSION" "1" "October 2016" "" ""
.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 ef2fd356f3bcd6..16ec3af7a4ee67 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" "July 2016" "" ""
+.TH "NPM\-VIEW" "1" "October 2016" "" ""
.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 d3c9d5fb05f9e7..c6217a7086f64e 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" "July 2016" "" ""
+.TH "NPM\-WHOAMI" "1" "October 2016" "" ""
.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 378bde9f09cccf..3c9328fa846c4f 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "July 2016" "" ""
+.TH "NPM" "1" "October 2016" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -10,7 +10,7 @@ npm [args]
.RE
.SH VERSION
.P
-2.15.9
+2.15.11
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man3/npm-bin.3 b/deps/npm/man/man3/npm-bin.3
index eb308be310cdfe..b96267bc90ca30 100644
--- a/deps/npm/man/man3/npm-bin.3
+++ b/deps/npm/man/man3/npm-bin.3
@@ -1,4 +1,4 @@
-.TH "NPM\-BIN" "3" "July 2016" "" ""
+.TH "NPM\-BIN" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-bugs.3 b/deps/npm/man/man3/npm-bugs.3
index 0f35ae2f434bfa..65656cd27c04f9 100644
--- a/deps/npm/man/man3/npm-bugs.3
+++ b/deps/npm/man/man3/npm-bugs.3
@@ -1,4 +1,4 @@
-.TH "NPM\-BUGS" "3" "July 2016" "" ""
+.TH "NPM\-BUGS" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-cache.3 b/deps/npm/man/man3/npm-cache.3
index e3f7cf26a8737b..a9f1ef159cc7b4 100644
--- a/deps/npm/man/man3/npm-cache.3
+++ b/deps/npm/man/man3/npm-cache.3
@@ -1,4 +1,4 @@
-.TH "NPM\-CACHE" "3" "July 2016" "" ""
+.TH "NPM\-CACHE" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-cache\fR \- manage the npm cache programmatically
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-commands.3 b/deps/npm/man/man3/npm-commands.3
index 1c022655f1b1a1..a2caf64993c65f 100644
--- a/deps/npm/man/man3/npm-commands.3
+++ b/deps/npm/man/man3/npm-commands.3
@@ -1,4 +1,4 @@
-.TH "NPM\-COMMANDS" "3" "July 2016" "" ""
+.TH "NPM\-COMMANDS" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-commands\fR \- npm commands
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-config.3 b/deps/npm/man/man3/npm-config.3
index edec95057aa79f..adf644c994a9b3 100644
--- a/deps/npm/man/man3/npm-config.3
+++ b/deps/npm/man/man3/npm-config.3
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "3" "July 2016" "" ""
+.TH "NPM\-CONFIG" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-deprecate.3 b/deps/npm/man/man3/npm-deprecate.3
index 1687ac646e1bee..f10de76a26b060 100644
--- a/deps/npm/man/man3/npm-deprecate.3
+++ b/deps/npm/man/man3/npm-deprecate.3
@@ -1,4 +1,4 @@
-.TH "NPM\-DEPRECATE" "3" "July 2016" "" ""
+.TH "NPM\-DEPRECATE" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-docs.3 b/deps/npm/man/man3/npm-docs.3
index bc4cdcf3e9a26e..04c6e54d407cf6 100644
--- a/deps/npm/man/man3/npm-docs.3
+++ b/deps/npm/man/man3/npm-docs.3
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCS" "3" "July 2016" "" ""
+.TH "NPM\-DOCS" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-edit.3 b/deps/npm/man/man3/npm-edit.3
index 2302945e7160b3..777fc40ed5963c 100644
--- a/deps/npm/man/man3/npm-edit.3
+++ b/deps/npm/man/man3/npm-edit.3
@@ -1,4 +1,4 @@
-.TH "NPM\-EDIT" "3" "July 2016" "" ""
+.TH "NPM\-EDIT" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-explore.3 b/deps/npm/man/man3/npm-explore.3
index 65c35b629e0ad1..e7d57aeac012cc 100644
--- a/deps/npm/man/man3/npm-explore.3
+++ b/deps/npm/man/man3/npm-explore.3
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "3" "July 2016" "" ""
+.TH "NPM\-EXPLORE" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-help-search.3 b/deps/npm/man/man3/npm-help-search.3
index a3257102bb4efd..d9ff3c21f5a09e 100644
--- a/deps/npm/man/man3/npm-help-search.3
+++ b/deps/npm/man/man3/npm-help-search.3
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP\-SEARCH" "3" "July 2016" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search the help pages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-init.3 b/deps/npm/man/man3/npm-init.3
index e2e066cc03a5f7..82820198594c08 100644
--- a/deps/npm/man/man3/npm-init.3
+++ b/deps/npm/man/man3/npm-init.3
@@ -1,4 +1,4 @@
-.TH "NPM" "" "July 2016" "" ""
+.TH "NPM" "" "October 2016" "" ""
.SH "NAME"
\fBnpm\fR
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-install.3 b/deps/npm/man/man3/npm-install.3
index e553d385ee730a..65526a624cd6ec 100644
--- a/deps/npm/man/man3/npm-install.3
+++ b/deps/npm/man/man3/npm-install.3
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL" "3" "July 2016" "" ""
+.TH "NPM\-INSTALL" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-install\fR \- install a package programmatically
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-link.3 b/deps/npm/man/man3/npm-link.3
index 792896cf6aaa02..56b70de0785135 100644
--- a/deps/npm/man/man3/npm-link.3
+++ b/deps/npm/man/man3/npm-link.3
@@ -1,4 +1,4 @@
-.TH "NPM\-LINK" "3" "July 2016" "" ""
+.TH "NPM\-LINK" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-load.3 b/deps/npm/man/man3/npm-load.3
index 405f0552a6b2bf..b5b7c9eaf6fbee 100644
--- a/deps/npm/man/man3/npm-load.3
+++ b/deps/npm/man/man3/npm-load.3
@@ -1,4 +1,4 @@
-.TH "NPM\-LOAD" "3" "July 2016" "" ""
+.TH "NPM\-LOAD" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-load\fR \- Load config settings
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-ls.3 b/deps/npm/man/man3/npm-ls.3
index 85114bc0544f63..454dfd454a9558 100644
--- a/deps/npm/man/man3/npm-ls.3
+++ b/deps/npm/man/man3/npm-ls.3
@@ -1,4 +1,4 @@
-.TH "NPM\-LS" "3" "July 2016" "" ""
+.TH "NPM\-LS" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-outdated.3 b/deps/npm/man/man3/npm-outdated.3
index 19b001b8c0620f..3ded0b0b541a77 100644
--- a/deps/npm/man/man3/npm-outdated.3
+++ b/deps/npm/man/man3/npm-outdated.3
@@ -1,4 +1,4 @@
-.TH "NPM\-OUTDATED" "3" "July 2016" "" ""
+.TH "NPM\-OUTDATED" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-owner.3 b/deps/npm/man/man3/npm-owner.3
index 0298d1ad382ff9..ecae974698b726 100644
--- a/deps/npm/man/man3/npm-owner.3
+++ b/deps/npm/man/man3/npm-owner.3
@@ -1,4 +1,4 @@
-.TH "NPM\-OWNER" "3" "July 2016" "" ""
+.TH "NPM\-OWNER" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-pack.3 b/deps/npm/man/man3/npm-pack.3
index 789cd7b157c4da..88caa99952c55c 100644
--- a/deps/npm/man/man3/npm-pack.3
+++ b/deps/npm/man/man3/npm-pack.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PACK" "3" "July 2016" "" ""
+.TH "NPM\-PACK" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-ping.3 b/deps/npm/man/man3/npm-ping.3
index 0be859ec0a0feb..52d377c7307081 100644
--- a/deps/npm/man/man3/npm-ping.3
+++ b/deps/npm/man/man3/npm-ping.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PING" "3" "July 2016" "" ""
+.TH "NPM\-PING" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-prefix.3 b/deps/npm/man/man3/npm-prefix.3
index 0668a7f8e28c11..71ad8efb53a7e2 100644
--- a/deps/npm/man/man3/npm-prefix.3
+++ b/deps/npm/man/man3/npm-prefix.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PREFIX" "3" "July 2016" "" ""
+.TH "NPM\-PREFIX" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-prune.3 b/deps/npm/man/man3/npm-prune.3
index 1d1e3948ccae8b..e5228f36227681 100644
--- a/deps/npm/man/man3/npm-prune.3
+++ b/deps/npm/man/man3/npm-prune.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PRUNE" "3" "July 2016" "" ""
+.TH "NPM\-PRUNE" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-publish.3 b/deps/npm/man/man3/npm-publish.3
index 3b101c454a1d14..89d103352ccf7a 100644
--- a/deps/npm/man/man3/npm-publish.3
+++ b/deps/npm/man/man3/npm-publish.3
@@ -1,4 +1,4 @@
-.TH "NPM\-PUBLISH" "3" "July 2016" "" ""
+.TH "NPM\-PUBLISH" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-rebuild.3 b/deps/npm/man/man3/npm-rebuild.3
index d68c08c20264ee..e956548a8bc437 100644
--- a/deps/npm/man/man3/npm-rebuild.3
+++ b/deps/npm/man/man3/npm-rebuild.3
@@ -1,4 +1,4 @@
-.TH "NPM\-REBUILD" "3" "July 2016" "" ""
+.TH "NPM\-REBUILD" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-repo.3 b/deps/npm/man/man3/npm-repo.3
index d8f759736bd238..bba8d38e4288e8 100644
--- a/deps/npm/man/man3/npm-repo.3
+++ b/deps/npm/man/man3/npm-repo.3
@@ -1,4 +1,4 @@
-.TH "NPM\-REPO" "3" "July 2016" "" ""
+.TH "NPM\-REPO" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-restart.3 b/deps/npm/man/man3/npm-restart.3
index 21e4bd76cc30df..fda16aa89e2d69 100644
--- a/deps/npm/man/man3/npm-restart.3
+++ b/deps/npm/man/man3/npm-restart.3
@@ -1,4 +1,4 @@
-.TH "NPM\-RESTART" "3" "July 2016" "" ""
+.TH "NPM\-RESTART" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-root.3 b/deps/npm/man/man3/npm-root.3
index 019e70e65ff090..0d13b3e41913fa 100644
--- a/deps/npm/man/man3/npm-root.3
+++ b/deps/npm/man/man3/npm-root.3
@@ -1,4 +1,4 @@
-.TH "NPM\-ROOT" "3" "July 2016" "" ""
+.TH "NPM\-ROOT" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-run-script.3 b/deps/npm/man/man3/npm-run-script.3
index f0fc31dea0d6b3..f12a9ef05b70e8 100644
--- a/deps/npm/man/man3/npm-run-script.3
+++ b/deps/npm/man/man3/npm-run-script.3
@@ -1,4 +1,4 @@
-.TH "NPM\-RUN\-SCRIPT" "3" "July 2016" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-search.3 b/deps/npm/man/man3/npm-search.3
index 527b96960e57f5..be294ea9f7e944 100644
--- a/deps/npm/man/man3/npm-search.3
+++ b/deps/npm/man/man3/npm-search.3
@@ -1,4 +1,4 @@
-.TH "NPM\-SEARCH" "3" "July 2016" "" ""
+.TH "NPM\-SEARCH" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-shrinkwrap.3 b/deps/npm/man/man3/npm-shrinkwrap.3
index f6c4ec32d66046..682e0e455b36d3 100644
--- a/deps/npm/man/man3/npm-shrinkwrap.3
+++ b/deps/npm/man/man3/npm-shrinkwrap.3
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP" "3" "July 2016" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-start.3 b/deps/npm/man/man3/npm-start.3
index 0bc52890308196..0490c08a684541 100644
--- a/deps/npm/man/man3/npm-start.3
+++ b/deps/npm/man/man3/npm-start.3
@@ -1,4 +1,4 @@
-.TH "NPM\-START" "3" "July 2016" "" ""
+.TH "NPM\-START" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-stop.3 b/deps/npm/man/man3/npm-stop.3
index 674106e7a8d8ff..8e23d5c97827c8 100644
--- a/deps/npm/man/man3/npm-stop.3
+++ b/deps/npm/man/man3/npm-stop.3
@@ -1,4 +1,4 @@
-.TH "NPM\-STOP" "3" "July 2016" "" ""
+.TH "NPM\-STOP" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-tag.3 b/deps/npm/man/man3/npm-tag.3
index af810c08620838..0ad363760d6d2f 100644
--- a/deps/npm/man/man3/npm-tag.3
+++ b/deps/npm/man/man3/npm-tag.3
@@ -1,4 +1,4 @@
-.TH "NPM\-TAG" "3" "July 2016" "" ""
+.TH "NPM\-TAG" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-test.3 b/deps/npm/man/man3/npm-test.3
index 5b78534fe7cd52..5141919fc76a0b 100644
--- a/deps/npm/man/man3/npm-test.3
+++ b/deps/npm/man/man3/npm-test.3
@@ -1,4 +1,4 @@
-.TH "NPM\-TEST" "3" "July 2016" "" ""
+.TH "NPM\-TEST" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-uninstall.3 b/deps/npm/man/man3/npm-uninstall.3
index 7ec1c60d3881ff..b0154b1ae83472 100644
--- a/deps/npm/man/man3/npm-uninstall.3
+++ b/deps/npm/man/man3/npm-uninstall.3
@@ -1,4 +1,4 @@
-.TH "NPM\-UNINSTALL" "3" "July 2016" "" ""
+.TH "NPM\-UNINSTALL" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- uninstall a package programmatically
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-unpublish.3 b/deps/npm/man/man3/npm-unpublish.3
index fbce95f963dfe8..ffb50d8b78e0b4 100644
--- a/deps/npm/man/man3/npm-unpublish.3
+++ b/deps/npm/man/man3/npm-unpublish.3
@@ -1,4 +1,4 @@
-.TH "NPM\-UNPUBLISH" "3" "July 2016" "" ""
+.TH "NPM\-UNPUBLISH" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-update.3 b/deps/npm/man/man3/npm-update.3
index 94444afc58b3e1..3981108f18b6bb 100644
--- a/deps/npm/man/man3/npm-update.3
+++ b/deps/npm/man/man3/npm-update.3
@@ -1,4 +1,4 @@
-.TH "NPM\-UPDATE" "3" "July 2016" "" ""
+.TH "NPM\-UPDATE" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
@@ -8,7 +8,7 @@
npm\.commands\.update(packages, callback)
.fi
.RE
-.TH "DESCRIPTION" "" "July 2016" "" ""
+.TH "DESCRIPTION" "" "October 2016" "" ""
.SH "NAME"
\fBDESCRIPTION\fR
.P
diff --git a/deps/npm/man/man3/npm-version.3 b/deps/npm/man/man3/npm-version.3
index daf86f8078368a..63991f9dd7705a 100644
--- a/deps/npm/man/man3/npm-version.3
+++ b/deps/npm/man/man3/npm-version.3
@@ -1,4 +1,4 @@
-.TH "NPM\-VERSION" "3" "July 2016" "" ""
+.TH "NPM\-VERSION" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-view.3 b/deps/npm/man/man3/npm-view.3
index b6d8d6da62d818..439856d42c5794 100644
--- a/deps/npm/man/man3/npm-view.3
+++ b/deps/npm/man/man3/npm-view.3
@@ -1,4 +1,4 @@
-.TH "NPM\-VIEW" "3" "July 2016" "" ""
+.TH "NPM\-VIEW" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm-whoami.3 b/deps/npm/man/man3/npm-whoami.3
index 97efbb37065c13..413039623ef3b7 100644
--- a/deps/npm/man/man3/npm-whoami.3
+++ b/deps/npm/man/man3/npm-whoami.3
@@ -1,4 +1,4 @@
-.TH "NPM\-WHOAMI" "3" "July 2016" "" ""
+.TH "NPM\-WHOAMI" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3
index e7b56632c4b06b..32dbc2474ad310 100644
--- a/deps/npm/man/man3/npm.3
+++ b/deps/npm/man/man3/npm.3
@@ -1,4 +1,4 @@
-.TH "NPM" "3" "July 2016" "" ""
+.TH "NPM" "3" "October 2016" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) {
.RE
.SH VERSION
.P
-2.15.9
+2.15.11
.SH DESCRIPTION
.P
This is the API documentation for npm\.
diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5
index bfe4cb7389a5ff..9b57fef9930911 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" "July 2016" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2016" "" ""
.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 bfe4cb7389a5ff..9b57fef9930911 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" "July 2016" "" ""
+.TH "NPM\-FOLDERS" "5" "October 2016" "" ""
.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 75036d6c2541e6..01c1178ed85bda 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" "July 2016" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2016" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -317,6 +317,10 @@ would be the same as this:
, "bin" : { "my\-program" : "\./path/to/program" } }
.fi
.RE
+.P
+Please make sure that your file(s) referenced in \fBbin\fP starts with
+\fB#!/usr/bin/env node\fP, otherwise the scripts are started without the node
+executable!
.SH man
.P
Specify either a single file or an array of filenames to put in place for the
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index 3bcab8e76b1f14..8d745e32a8dcd7 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "July 2016" "" ""
+.TH "NPMRC" "5" "October 2016" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SH DESCRIPTION
@@ -53,6 +53,19 @@ key[] = "second value"
sensitive credentials, they must be readable and writable \fIonly\fR by your user
account (i\.e\. must have a mode of \fB0600\fP), otherwise they \fIwill be ignored by
npm!\fR
+.SS Comments
+.P
+Lines in \fB\|\.npmrc\fP files are interpreted as comments when they begin with a \fB;\fP or \fB#\fP character\. \fB\|\.npmrc\fP files are parsed by npm/ini \fIhttps://github\.com/npm/ini\fR, which specifies this comment syntax\.
+.P
+For example:
+.P
+.RS 2
+.nf
+# last modified: 01 Jan 2016
+; Set a new registry for a scoped package
+@myscope:registry=https://mycustomregistry\.example\.org
+.fi
+.RE
.SS Per\-project config file
.P
When working locally in a project, a \fB\|\.npmrc\fP file in the root of the
diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5
index 75036d6c2541e6..01c1178ed85bda 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" "July 2016" "" ""
+.TH "PACKAGE\.JSON" "5" "October 2016" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -317,6 +317,10 @@ would be the same as this:
, "bin" : { "my\-program" : "\./path/to/program" } }
.fi
.RE
+.P
+Please make sure that your file(s) referenced in \fBbin\fP starts with
+\fB#!/usr/bin/env node\fP, otherwise the scripts are started without the node
+executable!
.SH man
.P
Specify either a single file or an array of filenames to put in place for the
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7
index df3aba176856d6..119985aa424057 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" "July 2016" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "October 2016" "" ""
.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 5b2209c1d77c0e..aa02cf3de86c8b 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" "July 2016" "" ""
+.TH "NPM\-CONFIG" "7" "October 2016" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
@@ -24,13 +24,15 @@ same\.
The four relevant files are:
.RS 0
.IP \(bu 2
-per\-project config file (/path/to/my/project/\.npmrc)
+per\-project configuration file (\fB/path/to/my/project/\.npmrc\fP)
.IP \(bu 2
-per\-user config file (~/\.npmrc)
+per\-user configuration file (defaults to \fB$HOME/\.npmrc\fP; configurable via CLI
+option \fB\-\-userconfig\fP or environment variable \fB$NPM_CONF_USERCONFIG\fP)
.IP \(bu 2
-global config file ($PREFIX/npmrc)
+global configuration file (defaults to \fB$PREFIX/etc/npmrc\fP; configurable via
+CLI option \fB\-\-globalconfig\fP or environment variable \fB$NPM_CONF_GLOBALCONFIG\fP)
.IP \(bu 2
-npm builtin config file (/path/to/npm/npmrc)
+npm's built\-in configuration file (\fB/path/to/npm/npmrc\fP)
.RE
.P
diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7
index 83ec0d6690be6b..9285ebb75d8d27 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" "July 2016" "" ""
+.TH "NPM\-DEVELOPERS" "7" "October 2016" "" ""
.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 b8d8f854759141..2a091216c22609 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" "July 2016" "" ""
+.TH "NPM\-DISPUTES" "7" "October 2016" "" ""
.SH "NAME"
\fBnpm-disputes\fR \- Handling Module Name Disputes
.SH SYNOPSIS
diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7
index f2091aee4faed2..e7c9f42d96d3ef 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" "July 2016" "" ""
+.TH "NPM\-INDEX" "7" "October 2016" "" ""
.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 bbea89569d1cf3..788228df52d9a9 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" "July 2016" "" ""
+.TH "NPM\-ORGS" "7" "October 2016" "" ""
.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 62b7d770098148..c168fec47090b2 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" "July 2016" "" ""
+.TH "NPM\-REGISTRY" "7" "October 2016" "" ""
.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 58e347c6084592..585f689eab3246 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" "July 2016" "" ""
+.TH "NPM\-SCOPE" "7" "October 2016" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
@@ -17,9 +17,10 @@ followed by a slash, e\.g\.
Scopes are a way of grouping related packages together, and also affect a few
things about the way npm treats the package\.
.P
-Scoped packages are supported by the public npm registry\. The npm
-client is backwards\-compatible with un\-scoped registries, so it can be
-used to work with scoped and un\-scoped registries at the same time\.
+Scoped packages can be published and installed as of \fBnpm@2\fP and are supported
+by the primary npm registry\. The npm client is backwards\-compatible with
+un\-scoped registries, so it can be used to work with scoped and un\-scoped
+registries at the same time\.
.SH Installing scoped packages
.P
Scoped packages are installed to a sub\-folder of the regular installation
@@ -64,14 +65,15 @@ There is nothing special about the way Node treats scope folders, this is
just specifying to require the module \fBmypackage\fP in the folder called \fB@myorg\fP\|\.
.SH Publishing scoped packages
.P
-Scoped packages can be published to any registry that supports them, including
-the public npm registry\.
+Scoped packages can be published from the CLI as of \fBnpm@2\fP and can be
+published to any registry that supports them, including the primary npm
+registry\.
.P
-(As of 2015\-04\-19, and with npm 2\.0 or newer, the public npm registry \fBdoes\fR
+(As of 2015\-04\-19, and with npm 2\.0 or newer, the primary npm registry \fBdoes\fR
support scoped packages)
.P
If you wish, you may associate a scope with a registry; see below\.
-.SS Publishing public scoped packages to the public npm registry
+.SS Publishing public scoped packages to the primary npm registry
.P
To publish a public scoped package, you must specify \fB\-\-access public\fP with
the initial publication\. This will publish the package and set access
@@ -89,7 +91,7 @@ desired, with \fBnpm access\fP or on the npmjs\.com website\.
.SH Associating a scope with a registry
.P
Scopes can be associated with a separate registry\. This allows you to
-seamlessly use a mix of packages from the public npm registry and one or more
+seamlessly use a mix of packages from the primary npm registry and one or more
private registries, such as npm Enterprise\.
.P
You can associate a scope with a registry at login, e\.g\.
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7
index 72970307e7f8d8..3eeaed71a5d991 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" "July 2016" "" ""
+.TH "NPM\-SCRIPTS" "7" "October 2016" "" ""
.SH "NAME"
\fBnpm-scripts\fR \- How npm handles the "scripts" field
.SH DESCRIPTION
@@ -27,10 +27,10 @@ postuninstall:
Run AFTER the package is uninstalled\.
.IP \(bu 2
preversion, version:
-Run BEFORE bump the package version\.
+Run BEFORE bumping the package version\.
.IP \(bu 2
postversion:
-Run AFTER bump the package version\.
+Run AFTER bumping the package version\.
.IP \(bu 2
pretest, test, posttest:
Run by the \fBnpm test\fP command\.
diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7
index 9cfaae2aac45fa..2565ce29e09d75 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" "July 2016" "" ""
+.TH "NPM\-REMOVAL" "1" "October 2016" "" ""
.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 dd46a2e314750d..95c05ffa65cce1 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,4 +1,4 @@
-.TH "SEMVER" "7" "July 2016" "" ""
+.TH "SEMVER" "7" "October 2016" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Usage
diff --git a/deps/npm/node_modules/fstream-npm/fstream-npm.js b/deps/npm/node_modules/fstream-npm/fstream-npm.js
index 8f8114fe89a123..554b98fec25522 100644
--- a/deps/npm/node_modules/fstream-npm/fstream-npm.js
+++ b/deps/npm/node_modules/fstream-npm/fstream-npm.js
@@ -78,6 +78,29 @@ Packer.prototype.readBundledLinks = function () {
list.forEach(function (pkg) {
if (pkg.charAt(0) === '.') return then()
var pd = this.path + '/node_modules/' + pkg
+
+ // scoped packages
+ if (pkg.charAt(0) === '@') {
+ fs.readdir(pd, function (er, slist) {
+ var sl = slist && slist.length
+ if (er || sl === 0) return then(er)
+
+ l += sl
+ slist.forEach(function (spkg) {
+ if (spkg.charAt(0) === '.') return then()
+ var spd = pd + '/' + spkg
+ fs.realpath(spd, function (er, rp) {
+ if (er) return then()
+ this.bundleLinks = this.bundleLinks || {}
+ this.bundleLinks[pkg + '/' + spkg] = rp
+ then()
+ }.bind(this))
+ }, this)
+ then()
+ }.bind(this))
+ return
+ }
+
fs.realpath(pd, function (er, rp) {
if (er) return then()
this.bundleLinks = this.bundleLinks || {}
@@ -99,6 +122,9 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
// license files should never be ignored.
if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true
+ // copyright notice files should never be ignored.
+ if (entry.match(/^(notice)(\.[^\.]*)?$/i)) return true
+
// changelogs should never be ignored.
if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true
}
@@ -138,8 +164,16 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
// linked with npm link, even in a bundle, deps are only bundled
// if they're not already present at a higher level.
if (this.bundleMagic) {
+ if (entry.charAt(0) === '@') {
+ var firstSlash = entry.indexOf('/')
+ // continue to list the packages in this scope
+ if (firstSlash === -1) return true
+
+ // bubbling up. stop here and allow anything the bundled pkg allows
+ if (entry.indexOf('/', firstSlash + 1) !== -1) return true
+ }
// bubbling up. stop here and allow anything the bundled pkg allows
- if (entry.indexOf('/') !== -1) return true
+ else if (entry.indexOf('/') !== -1) return true
// never include the .bin. It's typically full of platform-specific
// stuff like symlinks and .cmd files anyway.
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
deleted file mode 100644
index a843dc44a1976c..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-test/fixtures
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
deleted file mode 100644
index ff4534289c2f57..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Ignore = require("../")
-Ignore({ path: __dirname
- , ignoreFiles: [".ignore", ".gitignore"]
- })
- .on("child", function (c) {
- console.error(c.path.substr(c.root.path.length + 1))
- c.on("ignoreFile", onIgnoreFile)
- })
- .on("ignoreFile", onIgnoreFile)
-
-function onIgnoreFile (e) {
- console.error("adding ignore file", e.path)
-}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
index ad55dd41f1ac02..72dd342141c253 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
@@ -6,14 +6,14 @@
},
"name": "fstream-ignore",
"description": "A thing for ignoring files based on globs",
- "version": "1.0.3",
+ "version": "1.0.5",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream-ignore.git"
},
"main": "ignore.js",
"scripts": {
- "test": "tap test/*.js"
+ "test": "tap test/*.js --cov"
},
"dependencies": {
"fstream": "^1.0.0",
@@ -23,38 +23,49 @@
"devDependencies": {
"mkdirp": "",
"rimraf": "",
- "tap": "^2.2.0"
+ "tap": "^5.7.1"
},
"license": "ISC",
- "gitHead": "86c835eef61049496003f6b90c1e6c1236c92d6a",
+ "files": [
+ "ignore.js"
+ ],
+ "gitHead": "1438a1a2c25fee71327c36c86de787a14a53ffd4",
"bugs": {
"url": "https://github.com/isaacs/fstream-ignore/issues"
},
"homepage": "https://github.com/isaacs/fstream-ignore#readme",
- "_id": "fstream-ignore@1.0.3",
- "_shasum": "4c74d91fa88b22b42f4f86a18a2820dd79d8fcdd",
+ "_id": "fstream-ignore@1.0.5",
+ "_shasum": "9c31dae34767018fe1d249b24dada67d092da105",
"_from": "fstream-ignore@>=1.0.0 <2.0.0",
- "_npmVersion": "2.14.8",
- "_nodeVersion": "4.2.1",
+ "_npmVersion": "3.9.1",
+ "_nodeVersion": "5.10.1",
"_npmUser": {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
},
"dist": {
- "shasum": "4c74d91fa88b22b42f4f86a18a2820dd79d8fcdd",
- "tarball": "http://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.3.tgz"
+ "shasum": "9c31dae34767018fe1d249b24dada67d092da105",
+ "tarball": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz"
},
"maintainers": [
{
"name": "isaacs",
- "email": "isaacs@npmjs.com"
+ "email": "i@izs.me"
},
{
"name": "othiym23",
"email": "ogd@aoaioxxysz.net"
+ },
+ {
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
}
],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/fstream-ignore-1.0.5.tgz_1463518095640_0.10221575922332704"
+ },
"directories": {},
- "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.3.tgz",
+ "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore
deleted file mode 100644
index 773679d45edec4..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.gitignore
-.*.swp
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore
deleted file mode 100644
index 1b26d0de599836..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-*/a
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js
deleted file mode 100644
index 7d7e4a1b784c23..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// The test fixtures work like this:
-// These dirs are all created: {a,b,c}/{a,b,c}/{a,b,c}/
-// in each one, these files are created:
-// {.,}{a,b,c}{a,b,c}{a,b,c}
-//
-// So, there'll be a/b/c/abc, a/b/c/aba, etc., and dot-versions of each.
-//
-// Each test then writes their own ignore file rules for their purposes,
-// and is responsible for removing them afterwards.
-
-var mkdirp = require("mkdirp")
-var path = require("path")
-var i = 0
-var tap = require("tap")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var fixtures = path.resolve(__dirname, "fixtures")
-
-var chars = ['a', 'b', 'c']
-var dirs = []
-
-for (var i = 0; i < 3; i ++) {
- for (var j = 0; j < 3; j ++) {
- for (var k = 0; k < 3; k ++) {
- dirs.push(chars[i] + '/' + chars[j] + '/' + chars[k])
- }
- }
-}
-
-var files = []
-
-for (var i = 0; i < 3; i ++) {
- for (var j = 0; j < 3; j ++) {
- for (var k = 0; k < 3; k ++) {
- files.push(chars[i] + chars[j] + chars[k])
- files.push('.' + chars[i] + chars[j] + chars[k])
- }
- }
-}
-
-tap.test("remove fixtures", function (t) {
- rimraf(path.resolve(__dirname, "fixtures"), function (er) {
- t.ifError(er, "remove fixtures")
- t.end()
- })
-})
-
-tap.test("create fixtures", function (t) {
- dirs.forEach(function (dir) {
- dir = path.resolve(fixtures, dir)
- t.test("mkdir "+dir, function (t) {
- mkdirp(dir, function (er) {
- t.ifError(er, "mkdir "+dir)
- if (er) return t.end()
-
- files.forEach(function (file) {
- file = path.resolve(dir, file)
- t.test("writeFile "+file, function (t) {
- fs.writeFile(file, path.basename(file), function (er) {
- t.ifError(er, "writing "+file)
- t.end()
- })
- })
- })
- t.end()
- })
- })
- })
- t.end()
-})
-
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js
deleted file mode 100644
index 3718076eedf5b3..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ "a/.basic-ignore": ["b/", "aca"] })
-
-// the files that we expect to not see
-var notAllowed =
- [ /^\/a\/b\/.*/
- , /^\/a\/.*\/aca$/ ]
-
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".basic-ignore"] })
- .on("ignoreFile", function (e) {
- console.error("ignore file!", e)
- })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- notAllowed.forEach(function (na) {
- t.dissimilar(p, na)
- })
- })
- .on("close", t.end.bind(t))
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js
deleted file mode 100644
index 79470eba617344..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js
+++ /dev/null
@@ -1,40 +0,0 @@
-if (require.main === module) {
- console.log("1..1")
- console.log("ok 1 trivial pass")
- return
-}
-
-var fs = require("fs")
-var path = require("path")
-var rimraf = require("rimraf")
-
-exports.ignores = ignores
-exports.writeIgnoreFile = writeIgnoreFile
-exports.writeIgnores = writeIgnores
-exports.clearIgnores = clearIgnores
-
-function writeIgnoreFile (file, rules) {
- file = path.resolve(__dirname, "fixtures", file)
- if (Array.isArray(rules)) {
- rules = rules.join("\n")
- }
- fs.writeFileSync(file, rules)
- console.error(file, rules)
-}
-
-function writeIgnores (set) {
- Object.keys(set).forEach(function (f) {
- writeIgnoreFile(f, set[f])
- })
-}
-
-function clearIgnores (set) {
- Object.keys(set).forEach(function (file) {
- fs.unlinkSync(path.resolve(__dirname, "fixtures", file))
- })
-}
-
-function ignores (set) {
- writeIgnores(set)
- process.on("exit", clearIgnores.bind(null, set))
-}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js
deleted file mode 100644
index 43eec4b54631b2..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// ignore most things
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ ".ignore": ["*", "!a/b/c/.abc", "!/c/b/a/cba"] })
-
-// the only files we expect to see
-var expected =
- [ "/a/b/c/.abc"
- , "/a"
- , "/a/b"
- , "/a/b/c"
- , "/c/b/a/cba"
- , "/c"
- , "/c/b"
- , "/c/b/a" ]
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".ignore"] })
- .on("ignoreFile", function (e) {
- console.error("ignore file!", e)
- })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- t.fail("unexpected file found", {file: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- t.notOk(expected.length, "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js
deleted file mode 100644
index a9ede59ca7d0aa..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// ignore most things
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores(
- { ".ignore": ["*", "a", "c", "!a/b/c/.abc", "!/c/b/a/cba"]
- , "a/.ignore": [ "!*", ".ignore" ] // unignore everything
- , "a/a/.ignore": [ "*" ] // re-ignore everything
- , "a/b/.ignore": [ "*", "!/c/.abc" ] // original unignore
- , "a/c/.ignore": [ "*" ] // ignore everything again
- , "c/b/a/.ignore": [ "!cba", "!.cba", "!/a{bc,cb}" ]
- })
-
-// the only files we expect to see
-var expected =
- [ "/a"
- , "/a/a"
- , "/a/b"
- , "/a/b/c"
- , "/a/b/c/.abc"
- , "/a/c"
- , "/c"
- , "/c/b"
- , "/c/b/a"
- , "/c/b/a/cba"
- , "/c/b/a/.cba"
- , "/c/b/a/abc"
- , "/c/b/a/acb" ]
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".ignore"] })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- console.log("not ok "+p)
- t.fail("unexpected file found", {found: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- t.deepEqual(expected, [], "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js
deleted file mode 100644
index 0d851164f2f2ca..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js
+++ /dev/null
@@ -1,81 +0,0 @@
-var IgnoreFile = require("../")
-, fs = require('fs')
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ ".gitignore": ["a/b/c/abc"] })
-c.ignores({ ".ignore": ["*", "!a/b/c/abc"] })
-
-// the only files we expect to see
-var expected =
- [ "/a"
- , "/a/b"
- , "/a/b/c"
- , "/a/b/c/abc" ]
-
-var originalReadFile = fs.readFile
-, parallelCount = 0
-, firstCall
-
-// Overwrite fs.readFile so that when .gitignore and .ignore are read in
-// parallel, .ignore will always be read first.
-fs.readFile = function (filename, options, callback) {
- if (typeof options === 'function') {
- callback = options
- options = false
- }
-
- parallelCount++
-
- process.nextTick(function () {
- if (parallelCount > 1) {
- if (!firstCall) {
- return firstCall = function (cb) {
- originalReadFile(filename, options, function (err, data) {
- callback(err, data)
- if (cb) cb()
- })
- }
- }
-
- if (filename.indexOf('.gitignore') !== -1) {
- firstCall(function () {
- originalReadFile(filename, options, callback)
- })
- } else {
- originalReadFile(filename, options, function (err, data) {
- callback(err, data)
- firstCall()
- })
- }
- } else {
- originalReadFile(filename, options, callback)
- parallelCount = 0
- }
- })
-}
-
-require("tap").test("read file order", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".gitignore", ".ignore"] })
- .on("ignoreFile", function (e) {
- console.error("ignore file!", e)
- })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- t.fail("unexpected file found", {f: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- fs.readFile = originalReadFile
- t.notOk(expected.length, "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js
deleted file mode 100644
index 5812354df7684c..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// ignore most things
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ ".ignore": ["*", "a", "c", "!a/b/c/.abc", "!/c/b/a/cba"] })
-
-// the only files we expect to see
-var expected =
- [ "/a/b/c/.abc"
- , "/a"
- , "/a/b"
- , "/a/b/c"
- , "/c/b/a/cba"
- , "/c"
- , "/c/b"
- , "/c/b/a" ]
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".ignore"] })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- t.fail("unexpected file found", {f: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- t.notOk(expected.length, "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js
deleted file mode 100644
index 82f064a421fc44..00000000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var tap = require("tap")
-, rimraf = require("rimraf")
-, path = require("path")
-
-tap.test("remove fixtures", function (t) {
- rimraf(path.resolve(__dirname, "fixtures"), function (er) {
- t.ifError(er, "remove fixtures")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/package.json b/deps/npm/node_modules/fstream-npm/package.json
index 7b5da94c0440d3..35af47883ce63a 100644
--- a/deps/npm/node_modules/fstream-npm/package.json
+++ b/deps/npm/node_modules/fstream-npm/package.json
@@ -6,7 +6,7 @@
},
"name": "fstream-npm",
"description": "fstream class for creating npm packages",
- "version": "1.0.7",
+ "version": "1.1.1",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/fstream-npm.git"
@@ -27,14 +27,46 @@
"tap": "^1.3.2"
},
"license": "ISC",
- "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n",
- "readmeFilename": "README.md",
- "gitHead": "d57b6b24f91156067f73417dd8785c6312bfc75f",
+ "gitHead": "434415a678c4759c997207f974b25c7492d39127",
"bugs": {
"url": "https://github.com/npm/fstream-npm/issues"
},
"homepage": "https://github.com/npm/fstream-npm#readme",
- "_id": "fstream-npm@1.0.7",
- "_shasum": "7ed0d1ac13d7686dd9e1bf6ceb8be273bf6d2f86",
- "_from": "fstream-npm@>=1.0.7 <1.1.0"
+ "_id": "fstream-npm@1.1.1",
+ "_shasum": "6b9175db6239a83d8209e232426c494dbb29690c",
+ "_from": "fstream-npm@1.1.1",
+ "_npmVersion": "3.10.6",
+ "_nodeVersion": "5.10.1",
+ "_npmUser": {
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
+ },
+ "dist": {
+ "shasum": "6b9175db6239a83d8209e232426c494dbb29690c",
+ "tarball": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.1.1.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ },
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
+ {
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/fstream-npm-1.1.1.tgz_1470163716583_0.04285589815117419"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.1.1.tgz"
}
diff --git a/deps/npm/node_modules/fstream-npm/test/scoped.js b/deps/npm/node_modules/fstream-npm/test/scoped.js
new file mode 100644
index 00000000000000..c001c1b333d6ec
--- /dev/null
+++ b/deps/npm/node_modules/fstream-npm/test/scoped.js
@@ -0,0 +1,94 @@
+var fs = require('graceful-fs')
+var join = require('path').join
+
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var Packer = require('..')
+
+var pkg = join(__dirname, 'test-package-scoped')
+
+var elfJS = function () {/*
+module.exports = function () {
+ console.log("i'm a elf")
+}
+*/}.toString().split('\n').slice(1, -1).join()
+
+var json = {
+ 'name': 'test-package-scoped',
+ 'version': '3.1.4',
+ 'main': 'elf.js',
+ 'bundledDependencies': [
+ '@npmwombat/scoped'
+ ]
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+var included = [
+ 'package.json',
+ 'elf.js',
+ join('node_modules', '@npmwombat', 'scoped', 'index.js')
+]
+
+test('includes bundledDependencies', function (t) {
+ var subject = new Packer({ path: pkg, type: 'Directory', isDirectory: true })
+ var filenames = []
+ subject.on('entry', function (entry) {
+ t.equal(entry.type, 'File', 'only files in this package')
+
+ // include relative path in filename
+ var filename = entry._path.slice(entry.root._path.length + 1)
+
+ filenames.push(filename)
+ })
+ // need to do this so fstream doesn't explode when files are removed from
+ // under it
+ subject.on('end', function () {
+ // ensure we get *exactly* the results we expect by comparing in both
+ // directions
+ filenames.forEach(function (filename) {
+ t.ok(
+ included.indexOf(filename) > -1,
+ filename + ' is included'
+ )
+ })
+ included.forEach(function (filename) {
+ t.ok(
+ filenames.indexOf(filename) > -1,
+ filename + ' is not included'
+ )
+ })
+ t.end()
+ })
+})
+
+test('cleanup', function (t) {
+ // rimraf.sync chokes here for some reason
+ rimraf(pkg, function () { t.end() })
+})
+
+function setup () {
+ rimraf.sync(pkg)
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ fs.writeFileSync(
+ join(pkg, 'elf.js'),
+ elfJS
+ )
+
+ var scopedDir = join(pkg, 'node_modules', '@npmwombat', 'scoped')
+ mkdirp.sync(scopedDir)
+ fs.writeFileSync(
+ join(scopedDir, 'index.js'),
+ "console.log('hello wombat')"
+ )
+}
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md
similarity index 99%
rename from deps/npm/node_modules/rimraf/node_modules/glob/README.md
rename to deps/npm/node_modules/glob/README.md
index 6960483bac63c6..9dd9384fa143c3 100644
--- a/deps/npm/node_modules/rimraf/node_modules/glob/README.md
+++ b/deps/npm/node_modules/glob/README.md
@@ -11,6 +11,12 @@ library to do its matching.
## Usage
+Install with npm
+
+```
+npm i glob
+```
+
```javascript
var glob = require("glob")
diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js
index 02d15b755dd84e..9eca910bb05ec6 100644
--- a/deps/npm/node_modules/glob/glob.js
+++ b/deps/npm/node_modules/glob/glob.js
@@ -100,6 +100,10 @@ glob.hasMagic = function (pattern, options_) {
var g = new Glob(pattern, options)
var set = g.minimatch.set
+
+ if (!pattern)
+ return false
+
if (set.length > 1)
return true
diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json b/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json
index 55b5aa84f39881..7db74629818754 100644
--- a/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json
+++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json
@@ -56,5 +56,6 @@
"tmp": "tmp/fs.realpath-1.0.0.tgz_1466015941059_0.3332864767871797"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
+ "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json
index d8c68bca383fc8..b7e69be96217a8 100644
--- a/deps/npm/node_modules/glob/package.json
+++ b/deps/npm/node_modules/glob/package.json
@@ -6,7 +6,7 @@
},
"name": "glob",
"description": "a little globber",
- "version": "7.0.4",
+ "version": "7.0.6",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -24,7 +24,7 @@
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
- "minimatch": "2 || 3",
+ "minimatch": "^3.0.2",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
@@ -44,23 +44,23 @@
"benchclean": "node benchclean.js"
},
"license": "ISC",
- "gitHead": "3f883c43fec4f8046cbea9497add3b8ba4ef0a37",
+ "gitHead": "98327d8def195b1ba200217952df8ea829426038",
"bugs": {
"url": "https://github.com/isaacs/node-glob/issues"
},
"homepage": "https://github.com/isaacs/node-glob#readme",
- "_id": "glob@7.0.4",
- "_shasum": "3b44afa0943bdc31b2037b934791e2e084bcb7f6",
- "_from": "glob@>=7.0.4 <7.1.0",
- "_npmVersion": "3.9.3",
- "_nodeVersion": "6.2.1",
+ "_id": "glob@7.0.6",
+ "_shasum": "211bafaf49e525b8cd93260d14ab136152b3f57a",
+ "_from": "glob@7.0.6",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "4.5.0",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"dist": {
- "shasum": "3b44afa0943bdc31b2037b934791e2e084bcb7f6",
- "tarball": "https://registry.npmjs.org/glob/-/glob-7.0.4.tgz"
+ "shasum": "211bafaf49e525b8cd93260d14ab136152b3f57a",
+ "tarball": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz"
},
"maintainers": [
{
@@ -69,9 +69,10 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/glob-7.0.4.tgz_1466098181857_0.6043217403348535"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/glob-7.0.6.tgz_1472074762911_0.47247025789693"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.4.tgz"
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/graceful-fs/README.md b/deps/npm/node_modules/graceful-fs/README.md
index d0dcd492549537..5273a50ad6a52c 100644
--- a/deps/npm/node_modules/graceful-fs/README.md
+++ b/deps/npm/node_modules/graceful-fs/README.md
@@ -7,7 +7,7 @@ The improvements are meant to normalize behavior across different
platforms and environments, and to make filesystem access more
resilient to errors.
-## Improvements over [fs module](http://api.nodejs.org/fs.html)
+## Improvements over [fs module](https://nodejs.org/api/fs.html)
* Queues up `open` and `readdir` calls, and retries them once
something closes if there is an EMFILE error from too many file
diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json
index 4f195d647cded0..2a19d2cb03f924 100644
--- a/deps/npm/node_modules/graceful-fs/package.json
+++ b/deps/npm/node_modules/graceful-fs/package.json
@@ -1,7 +1,7 @@
{
"name": "graceful-fs",
"description": "A drop-in replacement for fs, making various improvements.",
- "version": "4.1.4",
+ "version": "4.1.6",
"repository": {
"type": "git",
"url": "git+https://github.com/isaacs/node-graceful-fs.git"
@@ -44,23 +44,23 @@
"legacy-streams.js",
"polyfills.js"
],
- "gitHead": "fe8f05ccc2779d1dfa6db6173f3ed64f1e9aa72c",
+ "gitHead": "cfe3ba80e37af542f02e445c89aa59482aa32a63",
"bugs": {
"url": "https://github.com/isaacs/node-graceful-fs/issues"
},
"homepage": "https://github.com/isaacs/node-graceful-fs#readme",
- "_id": "graceful-fs@4.1.4",
- "_shasum": "ef089d2880f033b011823ce5c8fae798da775dbd",
- "_from": "graceful-fs@4.1.4",
- "_npmVersion": "3.8.9",
- "_nodeVersion": "5.6.0",
+ "_id": "graceful-fs@4.1.6",
+ "_shasum": "514c38772b31bee2e08bedc21a0aeb3abf54c19e",
+ "_from": "graceful-fs@>=4.1.5 <4.2.0",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "4.4.4",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"dist": {
- "shasum": "ef089d2880f033b011823ce5c8fae798da775dbd",
- "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz"
+ "shasum": "514c38772b31bee2e08bedc21a0aeb3abf54c19e",
+ "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz"
},
"maintainers": [
{
@@ -70,8 +70,8 @@
],
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/graceful-fs-4.1.4.tgz_1462474854900_0.9423982477746904"
+ "tmp": "tmp/graceful-fs-4.1.6.tgz_1471616320359_0.39477095939219"
},
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz",
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/graceful-fs/polyfills.js b/deps/npm/node_modules/graceful-fs/polyfills.js
index 5e4f4804618d17..2798050604be2f 100644
--- a/deps/npm/node_modules/graceful-fs/polyfills.js
+++ b/deps/npm/node_modules/graceful-fs/polyfills.js
@@ -44,28 +44,28 @@ function patch (fs) {
fs.fchown = chownFix(fs.fchown)
fs.lchown = chownFix(fs.lchown)
- fs.chmod = chownFix(fs.chmod)
- fs.fchmod = chownFix(fs.fchmod)
- fs.lchmod = chownFix(fs.lchmod)
+ fs.chmod = chmodFix(fs.chmod)
+ fs.fchmod = chmodFix(fs.fchmod)
+ fs.lchmod = chmodFix(fs.lchmod)
fs.chownSync = chownFixSync(fs.chownSync)
fs.fchownSync = chownFixSync(fs.fchownSync)
fs.lchownSync = chownFixSync(fs.lchownSync)
- fs.chmodSync = chownFix(fs.chmodSync)
- fs.fchmodSync = chownFix(fs.fchmodSync)
- fs.lchmodSync = chownFix(fs.lchmodSync)
+ fs.chmodSync = chmodFixSync(fs.chmodSync)
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync)
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync)
// if lchmod/lchown do not exist, then make them no-ops
if (!fs.lchmod) {
fs.lchmod = function (path, mode, cb) {
- process.nextTick(cb)
+ if (cb) process.nextTick(cb)
}
fs.lchmodSync = function () {}
}
if (!fs.lchown) {
fs.lchown = function (path, uid, gid, cb) {
- process.nextTick(cb)
+ if (cb) process.nextTick(cb)
}
fs.lchownSync = function () {}
}
@@ -121,20 +121,19 @@ function patch (fs) {
function patchLchmod (fs) {
fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
fs.open( path
, constants.O_WRONLY | constants.O_SYMLINK
, mode
, function (err, fd) {
if (err) {
- callback(err)
+ if (callback) callback(err)
return
}
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
fs.fchmod(fd, mode, function (err) {
fs.close(fd, function(err2) {
- callback(err || err2)
+ if (callback) callback(err || err2)
})
})
})
@@ -167,11 +166,13 @@ function patchLutimes (fs) {
if (constants.hasOwnProperty("O_SYMLINK")) {
fs.lutimes = function (path, at, mt, cb) {
fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
+ if (er) {
+ if (cb) cb(er)
+ return
+ }
fs.futimes(fd, at, mt, function (er) {
fs.close(fd, function (er2) {
- return cb(er || er2)
+ if (cb) cb(er || er2)
})
})
})
@@ -197,17 +198,39 @@ function patchLutimes (fs) {
}
} else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+ fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
fs.lutimesSync = function () {}
}
}
+function chmodFix (orig) {
+ if (!orig) return orig
+ return function (target, mode, cb) {
+ return orig.call(fs, target, mode, function (er) {
+ if (chownErOk(er)) er = null
+ if (cb) cb.apply(this, arguments)
+ })
+ }
+}
+
+function chmodFixSync (orig) {
+ if (!orig) return orig
+ return function (target, mode) {
+ try {
+ return orig.call(fs, target, mode)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+}
+
+
function chownFix (orig) {
if (!orig) return orig
return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
+ return orig.call(fs, target, uid, gid, function (er) {
if (chownErOk(er)) er = null
- cb(er, res)
+ if (cb) cb.apply(this, arguments)
})
}
}
diff --git a/deps/npm/node_modules/hosted-git-info/.npmignore b/deps/npm/node_modules/hosted-git-info/.npmignore
index 58e97a78753be0..efab07fb1bb740 100644
--- a/deps/npm/node_modules/hosted-git-info/.npmignore
+++ b/deps/npm/node_modules/hosted-git-info/.npmignore
@@ -1,3 +1,2 @@
-*~
-.#
-node_modules
+test
+.travis.yml
diff --git a/deps/npm/node_modules/hosted-git-info/.travis.yml b/deps/npm/node_modules/hosted-git-info/.travis.yml
deleted file mode 100644
index 7dc6619174eee5..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.11"
- - "0.10"
-script: "npm test"
diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json
index 8d34aca2d72223..3bf8cbce8ec51d 100644
--- a/deps/npm/node_modules/hosted-git-info/package.json
+++ b/deps/npm/node_modules/hosted-git-info/package.json
@@ -1,6 +1,6 @@
{
"name": "hosted-git-info",
- "version": "2.1.4",
+ "version": "2.1.5",
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"main": "index.js",
"repository": {
@@ -30,19 +30,19 @@
"standard": "^3.3.2",
"tap": "^0.4.13"
},
- "gitHead": "9e1a36df8eb050a663713c79e56d89dadba2bd8d",
- "_id": "hosted-git-info@2.1.4",
- "_shasum": "d9e953b26988be88096c46e926494d9604c300f8",
- "_from": "hosted-git-info@>=2.1.2 <2.2.0",
- "_npmVersion": "2.10.1",
- "_nodeVersion": "2.0.2",
+ "gitHead": "4e6bb323a97a57c18e6b4b891527e26154d04fbe",
+ "_id": "hosted-git-info@2.1.5",
+ "_shasum": "0ba81d90da2e25ab34a332e6ec77936e1598118b",
+ "_from": "hosted-git-info@>=2.1.4 <2.2.0",
+ "_npmVersion": "3.9.1",
+ "_nodeVersion": "5.10.1",
"_npmUser": {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
},
"dist": {
- "shasum": "d9e953b26988be88096c46e926494d9604c300f8",
- "tarball": "http://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz"
+ "shasum": "0ba81d90da2e25ab34a332e6ec77936e1598118b",
+ "tarball": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz"
},
"maintainers": [
{
@@ -52,8 +52,17 @@
{
"name": "othiym23",
"email": "ogd@aoaioxxysz.net"
+ },
+ {
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
}
],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/hosted-git-info-2.1.5.tgz_1463518889246_0.20443619322031736"
+ },
"directories": {},
- "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz"
+ "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/hosted-git-info/test/basic.js b/deps/npm/node_modules/hosted-git-info/test/basic.js
deleted file mode 100644
index 0b93f50e209a1f..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/basic.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('basic', function (t) {
- t.is(HostedGit.fromUrl('https://google.com'), undefined, 'null on failure')
- t.is(HostedGit.fromUrl('https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match https urls')
- t.is(HostedGit.fromUrl('ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh urls')
- t.is(HostedGit.fromUrl('git+ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match git+ssh urls')
- t.is(HostedGit.fromUrl('git+https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match git+https urls')
- t.is(HostedGit.fromUrl('git@github.com:abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh connect strings')
- t.is(HostedGit.fromUrl('git://github.com/abc/def').getDefaultRepresentation(), 'git', 'match git urls')
- t.is(HostedGit.fromUrl('github:abc/def').getDefaultRepresentation(), 'shortcut', 'match shortcuts')
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js b/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js
deleted file mode 100644
index a2feb2f0e18acb..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('Bitbucket HTTPS URLs with embedded auth', function (t) {
- t.is(
- HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo.git').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.is(
- HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.is(
- HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo.git').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.is(
- HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/bitbucket.js b/deps/npm/node_modules/hosted-git-info/test/bitbucket.js
deleted file mode 100644
index 72e4ba113ddc57..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/bitbucket.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(bitbucket url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://bitbucket.org/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.browse(), 'https://bitbucket.org/111/222' + (branch ? '/src/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.docs(), 'https://bitbucket.org/111/222' + (branch ? '/src/' + branch : '') + '#readme', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@bitbucket.org:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@bitbucket.org/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'bitbucket:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://bitbucket.org/111/222/raw/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- require('./lib/standard-tests')(verify, 'bitbucket.org', 'bitbucket')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/gist.js b/deps/npm/node_modules/hosted-git-info/test/gist.js
deleted file mode 100644
index cf36d3c8ddb4f8..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/gist.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(gist url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://gist.github.com/222.git' + hash, label + ' -> https')
- t.is(hostinfo.git(), 'git://gist.github.com/222.git' + hash, label + ' -> git')
- t.is(hostinfo.browse(), 'https://gist.github.com/222' + (branch ? '/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.bugs(), 'https://gist.github.com/222', label + ' -> bugs')
- t.is(hostinfo.docs(), 'https://gist.github.com/222' + (branch ? '/' + branch : ''), label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@gist.github.com:/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@gist.github.com/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'gist:222' + hash, label + ' -> shortcut')
- if (hostinfo.user) {
- t.is(hostinfo.file('C'), 'https://gist.githubusercontent.com/111/222/raw/' + (branch ? branch + '/' : '') + 'C', label + ' -> file')
- }
- }
-
- verify('git@gist.github.com:222.git', 'git@')
- var hostinfo = HostedGit.fromUrl('git@gist.github.com:/ef860c7z5e0de3179341.git')
- if (t.ok(hostinfo, 'git@hex')) {
- t.is(hostinfo.https(), 'git+https://gist.github.com/ef860c7z5e0de3179341.git', 'git@hex -> https')
- }
- verify('git@gist.github.com:/222.git', 'git@/')
- verify('git://gist.github.com/222', 'git')
- verify('git://gist.github.com/222.git', 'git.git')
- verify('git://gist.github.com/222#branch', 'git#branch', 'branch')
- verify('git://gist.github.com/222.git#branch', 'git.git#branch', 'branch')
-
- require('./lib/standard-tests')(verify, 'gist.github.com', 'gist')
-
- verify(HostedGit.fromUrl('gist:111/222').toString(), 'round-tripped shortcut')
- verify('gist:222', 'shortened shortcut')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/github.js b/deps/npm/node_modules/hosted-git-info/test/github.js
deleted file mode 100644
index 56098a3e39188d..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/github.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(github url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://github.com/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.git(), 'git://github.com/111/222.git' + hash, label + ' -> git')
- t.is(hostinfo.browse(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.bugs(), 'https://github.com/111/222/issues', label + ' -> bugs')
- t.is(hostinfo.docs(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : '') + '#readme', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@github.com:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@github.com/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'github:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://raw.githubusercontent.com/111/222/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- // github shorturls
- verify('111/222', 'github-short')
- verify('111/222#branch', 'github-short#branch', 'branch')
-
- // insecure protocols
- verify('git://github.com/111/222', 'git')
- verify('git://github.com/111/222.git', 'git.git')
- verify('git://github.com/111/222#branch', 'git#branch', 'branch')
- verify('git://github.com/111/222.git#branch', 'git.git#branch', 'branch')
-
- verify('http://github.com/111/222', 'http')
- verify('http://github.com/111/222.git', 'http.git')
- verify('http://github.com/111/222#branch', 'http#branch', 'branch')
- verify('http://github.com/111/222.git#branch', 'http.git#branch', 'branch')
-
- require('./lib/standard-tests')(verify, 'github.com', 'github')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/gitlab.js b/deps/npm/node_modules/hosted-git-info/test/gitlab.js
deleted file mode 100644
index 315c9085bd6fba..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/gitlab.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(gitlab url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://gitlab.com/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.browse(), 'https://gitlab.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.docs(), 'https://gitlab.com/111/222' + (branch ? '/tree/' + branch : '') + '#README', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@gitlab.com:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@gitlab.com/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'gitlab:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://gitlab.com/111/222/raw/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- require('./lib/standard-tests')(verify, 'gitlab.com', 'gitlab')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js b/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js
deleted file mode 100644
index 5e2f5b5a387217..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('HTTPS GitHub URL with embedded auth -- generally not a good idea', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://user:pass@github.com/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.git(), 'git://user:pass@github.com/111/222.git' + hash, label + ' -> git')
- t.is(hostinfo.browse(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.bugs(), 'https://github.com/111/222/issues', label + ' -> bugs')
- t.is(hostinfo.docs(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : '') + '#readme', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@github.com:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@github.com/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'github:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://user:pass@raw.githubusercontent.com/111/222/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- // insecure protocols
- verify('git://user:pass@github.com/111/222', 'git')
- verify('git://user:pass@github.com/111/222.git', 'git.git')
- verify('git://user:pass@github.com/111/222#branch', 'git#branch', 'branch')
- verify('git://user:pass@github.com/111/222.git#branch', 'git.git#branch', 'branch')
-
- verify('https://user:pass@github.com/111/222', 'https')
- verify('https://user:pass@github.com/111/222.git', 'https.git')
- verify('https://user:pass@github.com/111/222#branch', 'https#branch', 'branch')
- verify('https://user:pass@github.com/111/222.git#branch', 'https.git#branch', 'branch')
-
- verify('http://user:pass@github.com/111/222', 'http')
- verify('http://user:pass@github.com/111/222.git', 'http.git')
- verify('http://user:pass@github.com/111/222#branch', 'http#branch', 'branch')
- verify('http://user:pass@github.com/111/222.git#branch', 'http.git#branch', 'branch')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js b/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js
deleted file mode 100644
index 929fcca42ef745..00000000000000
--- a/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-module.exports = function (verify, domain, shortname) {
- verify('https://' + domain + '/111/222', 'https')
- verify('https://' + domain + '/111/222.git', 'https.git')
- verify('https://' + domain + '/111/222#branch', 'https#branch', 'branch')
- verify('https://' + domain + '/111/222.git#branch', 'https.git#branch', 'branch')
-
- verify('git+https://' + domain + '/111/222', 'git+https')
- verify('git+https://' + domain + '/111/222.git', 'git+https.git')
- verify('git+https://' + domain + '/111/222#branch', 'git+https#branch', 'branch')
- verify('git+https://' + domain + '/111/222.git#branch', 'git+https.git#branch', 'branch')
-
- verify('git@' + domain + ':111/222', 'ssh')
- verify('git@' + domain + ':111/222.git', 'ssh.git')
- verify('git@' + domain + ':111/222#branch', 'ssh', 'branch')
- verify('git@' + domain + ':111/222.git#branch', 'ssh.git', 'branch')
-
- verify('git+ssh://git@' + domain + '/111/222', 'ssh url')
- verify('git+ssh://git@' + domain + '/111/222.git', 'ssh url.git')
- verify('git+ssh://git@' + domain + '/111/222#branch', 'ssh url#branch', 'branch')
- verify('git+ssh://git@' + domain + '/111/222.git#branch', 'ssh url.git#branch', 'branch')
-
- verify(shortname + ':111/222', 'shortcut')
- verify(shortname + ':111/222.git', 'shortcut.git')
- verify(shortname + ':111/222#branch', 'shortcut#branch', 'branch')
- verify(shortname + ':111/222.git#branch', 'shortcut.git#branch', 'branch')
-}
diff --git a/deps/npm/node_modules/inherits/inherits.js b/deps/npm/node_modules/inherits/inherits.js
index 29f5e24f57b5aa..3b94763a76eef0 100644
--- a/deps/npm/node_modules/inherits/inherits.js
+++ b/deps/npm/node_modules/inherits/inherits.js
@@ -1 +1,7 @@
-module.exports = require('util').inherits
+try {
+ var util = require('util');
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/deps/npm/node_modules/inherits/package.json b/deps/npm/node_modules/inherits/package.json
index a0cd42683614fd..092ed555db403b 100644
--- a/deps/npm/node_modules/inherits/package.json
+++ b/deps/npm/node_modules/inherits/package.json
@@ -1,7 +1,7 @@
{
"name": "inherits",
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
- "version": "2.0.1",
+ "version": "2.0.3",
"keywords": [
"inheritance",
"class",
@@ -16,36 +16,48 @@
"browser": "./inherits_browser.js",
"repository": {
"type": "git",
- "url": "git://github.com/isaacs/inherits"
+ "url": "git://github.com/isaacs/inherits.git"
},
"license": "ISC",
"scripts": {
"test": "node test"
},
- "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n",
- "readmeFilename": "README.md",
+ "devDependencies": {
+ "tap": "^7.1.0"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ],
+ "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f",
"bugs": {
"url": "https://github.com/isaacs/inherits/issues"
},
- "_id": "inherits@2.0.1",
- "dist": {
- "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
- "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
- },
- "_from": "inherits@latest",
- "_npmVersion": "1.3.8",
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "_id": "inherits@2.0.3",
+ "_shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "_from": "inherits@2.0.3",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.5.0",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
+ "dist": {
+ "shasum": "633c2c83e3da42a502f52466022480f4208261de",
+ "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
+ },
"maintainers": [
{
"name": "isaacs",
"email": "i@izs.me"
}
],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
+ },
"directories": {},
- "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
- "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
- "homepage": "https://github.com/isaacs/inherits"
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/inherits/test.js b/deps/npm/node_modules/inherits/test.js
deleted file mode 100644
index fc53012d31c0cd..00000000000000
--- a/deps/npm/node_modules/inherits/test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var inherits = require('./inherits.js')
-var assert = require('assert')
-
-function test(c) {
- assert(c.constructor === Child)
- assert(c.constructor.super_ === Parent)
- assert(Object.getPrototypeOf(c) === Child.prototype)
- assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
- assert(c instanceof Child)
- assert(c instanceof Parent)
-}
-
-function Child() {
- Parent.call(this)
- test(this)
-}
-
-function Parent() {}
-
-inherits(Child, Parent)
-
-var c = new Child
-test(c)
-
-console.log('ok')
diff --git a/deps/npm/node_modules/minimatch/README.md b/deps/npm/node_modules/minimatch/README.md
index d458bc2e0a6b03..ad72b8133eaf5e 100644
--- a/deps/npm/node_modules/minimatch/README.md
+++ b/deps/npm/node_modules/minimatch/README.md
@@ -2,7 +2,7 @@
A minimal matching utility.
-[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
+[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch)
This is the matching library used internally by npm.
@@ -37,7 +37,7 @@ See:
## Minimatch Class
-Create a minimatch object by instanting the `minimatch.Minimatch` class.
+Create a minimatch object by instantiating the `minimatch.Minimatch` class.
```javascript
var Minimatch = require("minimatch").Minimatch
@@ -82,13 +82,6 @@ var mm = new Minimatch(pattern, options)
All other methods are internal, and will be called as necessary.
-## Functions
-
-The top-level exported function has a `cache` property, which is an LRU
-cache set to store 100 items. So, calling these methods repeatedly
-with the same pattern and options will use the same Minimatch object,
-saving the cost of parsing it multiple times.
-
### minimatch(path, pattern, options)
Main export. Tests a path against the pattern using the options.
diff --git a/deps/npm/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/minimatch/minimatch.js
index ec4c05c570c52e..5b5f8cf444de21 100644
--- a/deps/npm/node_modules/minimatch/minimatch.js
+++ b/deps/npm/node_modules/minimatch/minimatch.js
@@ -9,6 +9,14 @@ try {
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
var expand = require('brace-expansion')
+var plTypes = {
+ '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
+ '?': { open: '(?:', close: ')?' },
+ '+': { open: '(?:', close: ')+' },
+ '*': { open: '(?:', close: ')*' },
+ '@': { open: '(?:', close: ')' }
+}
+
// any single thing other than /
// don't need to escape / when using new RegExp()
var qmark = '[^/]'
@@ -235,7 +243,7 @@ function braceExpand (pattern, options) {
? this.pattern : pattern
if (typeof pattern === 'undefined') {
- throw new Error('undefined pattern')
+ throw new TypeError('undefined pattern')
}
if (options.nobrace ||
@@ -261,6 +269,10 @@ function braceExpand (pattern, options) {
Minimatch.prototype.parse = parse
var SUBPARSE = {}
function parse (pattern, isSub) {
+ if (pattern.length > 1024 * 64) {
+ throw new TypeError('pattern is too long')
+ }
+
var options = this.options
// shortcuts
@@ -273,7 +285,6 @@ function parse (pattern, isSub) {
// ? => one single character
var patternListStack = []
var negativeLists = []
- var plType
var stateChar
var inClass = false
var reClassStart = -1
@@ -372,11 +383,12 @@ function parse (pattern, isSub) {
continue
}
- plType = stateChar
patternListStack.push({
- type: plType,
+ type: stateChar,
start: i - 1,
- reStart: re.length
+ reStart: re.length,
+ open: plTypes[stateChar].open,
+ close: plTypes[stateChar].close
})
// negation is (?:(?!js)[^/]*)
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
@@ -392,24 +404,14 @@ function parse (pattern, isSub) {
clearStateChar()
hasMagic = true
- re += ')'
var pl = patternListStack.pop()
- plType = pl.type
// negation is (?:(?!js)[^/]*)
// The others are (?:)
- switch (plType) {
- case '!':
- negativeLists.push(pl)
- re += ')[^/]*?)'
- pl.reEnd = re.length
- break
- case '?':
- case '+':
- case '*':
- re += plType
- break
- case '@': break // the default anyway
+ re += pl.close
+ if (pl.type === '!') {
+ negativeLists.push(pl)
}
+ pl.reEnd = re.length
continue
case '|':
@@ -516,9 +518,10 @@ function parse (pattern, isSub) {
// Go through and escape them, taking care not to double-escape any
// | chars that were already escaped.
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
- var tail = re.slice(pl.reStart + 3)
+ var tail = re.slice(pl.reStart + pl.open.length)
+ this.debug('setting tail', re, pl)
// maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
if (!$2) {
// the | isn't already escaped, so escape it.
$2 = '\\'
@@ -533,7 +536,7 @@ function parse (pattern, isSub) {
return $1 + $1 + $2 + '|'
})
- this.debug('tail=%j\n %s', tail, tail)
+ this.debug('tail=%j\n %s', tail, tail, pl, re)
var t = pl.type === '*' ? star
: pl.type === '?' ? qmark
: '\\' + pl.type
@@ -615,7 +618,15 @@ function parse (pattern, isSub) {
}
var flags = options.nocase ? 'i' : ''
- var regExp = new RegExp('^' + re + '$', flags)
+ try {
+ var regExp = new RegExp('^' + re + '$', flags)
+ } catch (er) {
+ // If it was an invalid regular expression, then it can't match
+ // anything. This trick looks for a character after the end of
+ // the string, which is of course impossible, except in multi-line
+ // mode, but it's not a /m regex.
+ return new RegExp('$.')
+ }
regExp._glob = pattern
regExp._src = re
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/.npmignore
deleted file mode 100644
index 353546af2368e1..00000000000000
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-test
-.gitignore
-.travis.yml
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/example.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/example.js
deleted file mode 100644
index 60ecfc74d41618..00000000000000
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/example.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var expand = require('./');
-
-console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html'));
-console.log(expand('http://www.numericals.com/file{1..100..10}.txt'));
-console.log(expand('http://www.letters.com/file{a..z..2}.txt'));
-console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}'));
-console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}'));
-
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js
index a23104e9550173..955f27c8177eb6 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js
@@ -66,6 +66,16 @@ function expandTop(str) {
if (!str)
return [];
+ // I don't know why Bash 4.3 does this, but it does.
+ // Anything starting with {} will have the first two bytes preserved
+ // but *only* at the top level, so {},a}b will not expand to anything,
+ // but a{},b}c will be expanded to [a}c,abc].
+ // One could argue that this is a bug in Bash, but since the goal of
+ // this module is to match Bash's rules, we escape a leading {}
+ if (str.substr(0, 2) === '{}') {
+ str = '\\{\\}' + str.substr(2);
+ }
+
return expand(escapeBraces(str), true).map(unescapeBraces);
}
@@ -99,7 +109,7 @@ function expand(str, isTop) {
var isOptions = /^(.*,)+(.+)?$/.test(m.body);
if (!isSequence && !isOptions) {
// {a},b}
- if (m.post.match(/,.*}/)) {
+ if (m.post.match(/,.*\}/)) {
str = m.pre + '{' + m.body + escClose + m.post;
return expand(str);
}
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
index fd4f2b066b339e..ae5d8c36ac6522 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
@@ -1,2 +1,5 @@
-node_modules
-.DS_Store
+test
+.gitignore
+.travis.yml
+Makefile
+example.js
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
deleted file mode 100644
index 6e5919de39a312..00000000000000
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
deleted file mode 100644
index fa5da71a6d0d34..00000000000000
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-test:
- @node_modules/.bin/tape test/*.js
-
-.PHONY: test
-
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
index 2aff0ebff4403e..08e918c0db9a62 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
@@ -1,6 +1,6 @@
# balanced-match
-Match balanced string pairs, like `{` and `}` or `` and ``.
+Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well!
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
@@ -16,6 +16,7 @@ var balanced = require('balanced-match');
console.log(balanced('{', '}', 'pre{in{nested}}post'));
console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
```
The matches are:
@@ -28,6 +29,7 @@ $ node example.js
pre: 'pre',
body: 'first',
post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
```
## API
@@ -45,7 +47,16 @@ object with those keys:
If there's no match, `undefined` will be returned.
-If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
+
+### var r = balanced.range(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+array with indexes: `[ , ]`.
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
## Installation
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
deleted file mode 100644
index c02ad348e69aec..00000000000000
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var balanced = require('./');
-
-console.log(balanced('{', '}', 'pre{in{nested}}post'));
-console.log(balanced('{', '}', 'pre{first}between{second}post'));
-
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
index d165ae8174ca82..e8d8587020ca6c 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
@@ -1,38 +1,58 @@
module.exports = balanced;
function balanced(a, b, str) {
- var bal = 0;
- var m = {};
- var ended = false;
-
- for (var i = 0; i < str.length; i++) {
- if (a == str.substr(i, a.length)) {
- if (!('start' in m)) m.start = i;
- bal++;
- }
- else if (b == str.substr(i, b.length) && 'start' in m) {
- ended = true;
- bal--;
- if (!bal) {
- m.end = i;
- m.pre = str.substr(0, m.start);
- m.body = (m.end - m.start > 1)
- ? str.substring(m.start + a.length, m.end)
- : '';
- m.post = str.slice(m.end + b.length);
- return m;
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
+ var r = range(a, b, str);
+
+ return r && {
+ start: r[0],
+ end: r[1],
+ pre: str.slice(0, r[0]),
+ body: str.slice(r[0] + a.length, r[1]),
+ post: str.slice(r[1] + b.length)
+ };
+}
+
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
+balanced.range = range;
+function range(a, b, str) {
+ var begs, beg, left, right, result;
+ var ai = str.indexOf(a);
+ var bi = str.indexOf(b, ai + 1);
+ var i = ai;
+
+ if (ai >= 0 && bi > 0) {
+ begs = [];
+ left = str.length;
+
+ while (i >= 0 && !result) {
+ if (i == ai) {
+ begs.push(i);
+ ai = str.indexOf(a, i + 1);
+ } else if (begs.length == 1) {
+ result = [ begs.pop(), bi ];
+ } else {
+ beg = begs.pop();
+ if (beg < left) {
+ left = beg;
+ right = bi;
+ }
+
+ bi = str.indexOf(b, i + 1);
}
+
+ i = ai < bi && ai >= 0 ? ai : bi;
}
- }
- // if we opened more than we closed, find the one we closed
- if (bal && ended) {
- var start = m.start + a.length;
- m = balanced(a, b, str.substr(start));
- if (m) {
- m.start += start;
- m.end += start;
- m.pre = str.slice(0, start) + m.pre;
+ if (begs.length) {
+ result = [ left, right ];
}
- return m;
}
+
+ return result;
}
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
index 898644e114cc6c..2557ddabaf28db 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
@@ -1,7 +1,7 @@
{
"name": "balanced-match",
"description": "Match balanced character pairs, like \"{\" and \"}\"",
- "version": "0.2.1",
+ "version": "0.4.2",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/balanced-match.git"
@@ -13,7 +13,7 @@
},
"dependencies": {},
"devDependencies": {
- "tape": "~1.1.1"
+ "tape": "^4.6.0"
},
"keywords": [
"match",
@@ -44,22 +44,22 @@
"android-browser/4.2..latest"
]
},
- "gitHead": "d743dd31d7376e0fcf99392a4be7227f2e99bf5d",
+ "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2",
"bugs": {
"url": "https://github.com/juliangruber/balanced-match/issues"
},
- "_id": "balanced-match@0.2.1",
- "_shasum": "7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7",
- "_from": "balanced-match@>=0.2.0 <0.3.0",
- "_npmVersion": "2.14.7",
- "_nodeVersion": "4.2.1",
+ "_id": "balanced-match@0.4.2",
+ "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
+ "_from": "balanced-match@>=0.4.1 <0.5.0",
+ "_npmVersion": "2.15.8",
+ "_nodeVersion": "4.4.7",
"_npmUser": {
"name": "juliangruber",
"email": "julian@juliangruber.com"
},
"dist": {
- "shasum": "7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7",
- "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz"
+ "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
+ "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz"
},
"maintainers": [
{
@@ -67,6 +67,11 @@
"email": "julian@juliangruber.com"
}
],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572"
+ },
"directories": {},
- "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz"
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
deleted file mode 100644
index 36bfd39954850d..00000000000000
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var test = require('tape');
-var balanced = require('..');
-
-test('balanced', function(t) {
- t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), {
- start: 3,
- end: 12,
- pre: 'pre',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), {
- start: 8,
- end: 11,
- pre: '{{{{{{{{',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body{in}post'), {
- start: 8,
- end: 11,
- pre: 'pre{body',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), {
- start: 4,
- end: 13,
- pre: 'pre}',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), {
- start: 3,
- end: 8,
- pre: 'pre',
- body: 'body',
- post: 'between{body2}post'
- });
- t.notOk(balanced('{', '}', 'nope'), 'should be notOk');
- t.deepEqual(balanced('', '', 'preinnestpost'), {
- start: 3,
- end: 19,
- pre: 'pre',
- body: 'innest',
- post: 'post'
- });
- t.deepEqual(balanced('', '', 'preinnestpost'), {
- start: 7,
- end: 23,
- pre: 'pre',
- body: 'innest',
- post: 'post'
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
index b516138098fba9..de8b785d69d5ce 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
@@ -63,7 +63,7 @@
"_id": "concat-map@0.0.1",
"dist": {
"shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
- "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
+ "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
},
"_from": "concat-map@0.0.1",
"_npmVersion": "1.3.21",
diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/package.json
index 4cb3e05d7ceb6c..e00a73ade08db9 100644
--- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/package.json
+++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/package.json
@@ -1,7 +1,7 @@
{
"name": "brace-expansion",
"description": "Brace expansion as known from sh/bash",
- "version": "1.1.1",
+ "version": "1.1.6",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/brace-expansion.git"
@@ -13,11 +13,11 @@
"gentest": "bash test/generate.sh"
},
"dependencies": {
- "balanced-match": "^0.2.0",
+ "balanced-match": "^0.4.1",
"concat-map": "0.0.1"
},
"devDependencies": {
- "tape": "^3.0.3"
+ "tape": "^4.6.0"
},
"keywords": [],
"author": {
@@ -42,19 +42,23 @@
"android-browser/4.2..latest"
]
},
- "gitHead": "f50da498166d76ea570cf3b30179f01f0f119612",
+ "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2",
"bugs": {
"url": "https://github.com/juliangruber/brace-expansion/issues"
},
- "_id": "brace-expansion@1.1.1",
- "_shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045",
+ "_id": "brace-expansion@1.1.6",
+ "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
"_from": "brace-expansion@>=1.0.0 <2.0.0",
- "_npmVersion": "2.6.1",
- "_nodeVersion": "0.10.36",
+ "_npmVersion": "2.15.8",
+ "_nodeVersion": "4.4.7",
"_npmUser": {
"name": "juliangruber",
"email": "julian@juliangruber.com"
},
+ "dist": {
+ "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
+ "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz"
+ },
"maintainers": [
{
"name": "juliangruber",
@@ -65,11 +69,11 @@
"email": "isaacs@npmjs.com"
}
],
- "dist": {
- "shasum": "da5fb78aef4c44c9e4acf525064fb3208ebab045",
- "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz"
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.1.tgz",
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json
index 66755da6ef12b0..c45db5ddaf432e 100644
--- a/deps/npm/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/minimatch/package.json
@@ -6,7 +6,7 @@
},
"name": "minimatch",
"description": "a glob matcher in javascript",
- "version": "3.0.0",
+ "version": "3.0.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
@@ -24,29 +24,29 @@
},
"devDependencies": {
"standard": "^3.7.2",
- "tap": "^1.2.0"
+ "tap": "^5.6.0"
},
"license": "ISC",
"files": [
"minimatch.js"
],
- "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20",
+ "gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13",
"bugs": {
"url": "https://github.com/isaacs/minimatch/issues"
},
"homepage": "https://github.com/isaacs/minimatch#readme",
- "_id": "minimatch@3.0.0",
- "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83",
- "_from": "minimatch@>=3.0.0 <3.1.0",
- "_npmVersion": "3.3.2",
- "_nodeVersion": "4.0.0",
+ "_id": "minimatch@3.0.3",
+ "_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
+ "_from": "minimatch@3.0.3",
+ "_npmVersion": "3.10.6",
+ "_nodeVersion": "4.4.4",
"_npmUser": {
"name": "isaacs",
- "email": "isaacs@npmjs.com"
+ "email": "i@izs.me"
},
"dist": {
- "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83",
- "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz"
+ "shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
+ "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
},
"maintainers": [
{
@@ -54,7 +54,11 @@
"email": "i@izs.me"
}
],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945"
+ },
"directories": {},
- "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz",
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/minimatch/LICENSE
deleted file mode 100644
index 19129e315fe593..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/README.md b/deps/npm/node_modules/node-gyp/node_modules/minimatch/README.md
deleted file mode 100644
index ad72b8133eaf5e..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/README.md
+++ /dev/null
@@ -1,209 +0,0 @@
-# minimatch
-
-A minimal matching utility.
-
-[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch)
-
-
-This is the matching library used internally by npm.
-
-It works by converting glob expressions into JavaScript `RegExp`
-objects.
-
-## Usage
-
-```javascript
-var minimatch = require("minimatch")
-
-minimatch("bar.foo", "*.foo") // true!
-minimatch("bar.foo", "*.bar") // false!
-minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
-```
-
-## Features
-
-Supports these glob features:
-
-* Brace Expansion
-* Extended glob matching
-* "Globstar" `**` matching
-
-See:
-
-* `man sh`
-* `man bash`
-* `man 3 fnmatch`
-* `man 5 gitignore`
-
-## Minimatch Class
-
-Create a minimatch object by instantiating the `minimatch.Minimatch` class.
-
-```javascript
-var Minimatch = require("minimatch").Minimatch
-var mm = new Minimatch(pattern, options)
-```
-
-### Properties
-
-* `pattern` The original pattern the minimatch object represents.
-* `options` The options supplied to the constructor.
-* `set` A 2-dimensional array of regexp or string expressions.
- Each row in the
- array corresponds to a brace-expanded pattern. Each item in the row
- corresponds to a single path-part. For example, the pattern
- `{a,b/c}/d` would expand to a set of patterns like:
-
- [ [ a, d ]
- , [ b, c, d ] ]
-
- If a portion of the pattern doesn't have any "magic" in it
- (that is, it's something like `"foo"` rather than `fo*o?`), then it
- will be left as a string rather than converted to a regular
- expression.
-
-* `regexp` Created by the `makeRe` method. A single regular expression
- expressing the entire pattern. This is useful in cases where you wish
- to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
-* `negate` True if the pattern is negated.
-* `comment` True if the pattern is a comment.
-* `empty` True if the pattern is `""`.
-
-### Methods
-
-* `makeRe` Generate the `regexp` member if necessary, and return it.
- Will return `false` if the pattern is invalid.
-* `match(fname)` Return true if the filename matches the pattern, or
- false otherwise.
-* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
- filename, and match it against a single row in the `regExpSet`. This
- method is mainly for internal use, but is exposed so that it can be
- used by a glob-walker that needs to avoid excessive filesystem calls.
-
-All other methods are internal, and will be called as necessary.
-
-### minimatch(path, pattern, options)
-
-Main export. Tests a path against the pattern using the options.
-
-```javascript
-var isJS = minimatch(file, "*.js", { matchBase: true })
-```
-
-### minimatch.filter(pattern, options)
-
-Returns a function that tests its
-supplied argument, suitable for use with `Array.filter`. Example:
-
-```javascript
-var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
-```
-
-### minimatch.match(list, pattern, options)
-
-Match against the list of
-files, in the style of fnmatch or glob. If nothing is matched, and
-options.nonull is set, then return a list containing the pattern itself.
-
-```javascript
-var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
-```
-
-### minimatch.makeRe(pattern, options)
-
-Make a regular expression object from the pattern.
-
-## Options
-
-All options are `false` by default.
-
-### debug
-
-Dump a ton of stuff to stderr.
-
-### nobrace
-
-Do not expand `{a,b}` and `{1..3}` brace sets.
-
-### noglobstar
-
-Disable `**` matching against multiple folder names.
-
-### dot
-
-Allow patterns to match filenames starting with a period, even if
-the pattern does not explicitly have a period in that spot.
-
-Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
-is set.
-
-### noext
-
-Disable "extglob" style patterns like `+(a|b)`.
-
-### nocase
-
-Perform a case-insensitive match.
-
-### nonull
-
-When a match is not found by `minimatch.match`, return a list containing
-the pattern itself if this option is set. When not set, an empty list
-is returned if there are no matches.
-
-### matchBase
-
-If set, then patterns without slashes will be matched
-against the basename of the path if it contains slashes. For example,
-`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
-
-### nocomment
-
-Suppress the behavior of treating `#` at the start of a pattern as a
-comment.
-
-### nonegate
-
-Suppress the behavior of treating a leading `!` character as negation.
-
-### flipNegate
-
-Returns from negate expressions the same as if they were not negated.
-(Ie, true on a hit, false on a miss.)
-
-
-## Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between minimatch and other
-implementations, and are intentional.
-
-If the pattern starts with a `!` character, then it is negated. Set the
-`nonegate` flag to suppress this behavior, and treat leading `!`
-characters normally. This is perhaps relevant if you wish to start the
-pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
-characters at the start of a pattern will negate the pattern multiple
-times.
-
-If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything. Use `\#` to match a literal `#` at the
-start of a line, or set the `nocomment` flag to suppress this behavior.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.1, where `**` only has special significance if it is the only
-thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
-`a/**b` will not.
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then minimatch.match returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
-**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
-checked for validity. Since those two are valid, matching proceeds.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/minimatch.js
deleted file mode 100644
index 830a27246cd6bd..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/minimatch.js
+++ /dev/null
@@ -1,924 +0,0 @@
-module.exports = minimatch
-minimatch.Minimatch = Minimatch
-
-var path = { sep: '/' }
-try {
- path = require('path')
-} catch (er) {}
-
-var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
-var expand = require('brace-expansion')
-
-// any single thing other than /
-// don't need to escape / when using new RegExp()
-var qmark = '[^/]'
-
-// * => any number of characters
-var star = qmark + '*?'
-
-// ** when dots are allowed. Anything goes, except .. and .
-// not (^ or / followed by one or two dots followed by $ or /),
-// followed by anything, any number of times.
-var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
-
-// not a ^ or / followed by a dot,
-// followed by anything, any number of times.
-var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
-
-// characters that need to be escaped in RegExp.
-var reSpecials = charSet('().*{}+?[]^$\\!')
-
-// "abc" -> { a:true, b:true, c:true }
-function charSet (s) {
- return s.split('').reduce(function (set, c) {
- set[c] = true
- return set
- }, {})
-}
-
-// normalizes slashes.
-var slashSplit = /\/+/
-
-minimatch.filter = filter
-function filter (pattern, options) {
- options = options || {}
- return function (p, i, list) {
- return minimatch(p, pattern, options)
- }
-}
-
-function ext (a, b) {
- a = a || {}
- b = b || {}
- var t = {}
- Object.keys(b).forEach(function (k) {
- t[k] = b[k]
- })
- Object.keys(a).forEach(function (k) {
- t[k] = a[k]
- })
- return t
-}
-
-minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return minimatch
-
- var orig = minimatch
-
- var m = function minimatch (p, pattern, options) {
- return orig.minimatch(p, pattern, ext(def, options))
- }
-
- m.Minimatch = function Minimatch (pattern, options) {
- return new orig.Minimatch(pattern, ext(def, options))
- }
-
- return m
-}
-
-Minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return Minimatch
- return minimatch.defaults(def).Minimatch
-}
-
-function minimatch (p, pattern, options) {
- if (typeof pattern !== 'string') {
- throw new TypeError('glob pattern string required')
- }
-
- if (!options) options = {}
-
- // shortcut: comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- return false
- }
-
- // "" only matches ""
- if (pattern.trim() === '') return p === ''
-
- return new Minimatch(pattern, options).match(p)
-}
-
-function Minimatch (pattern, options) {
- if (!(this instanceof Minimatch)) {
- return new Minimatch(pattern, options)
- }
-
- if (typeof pattern !== 'string') {
- throw new TypeError('glob pattern string required')
- }
-
- if (!options) options = {}
- pattern = pattern.trim()
-
- // windows support: need to use /, not \
- if (path.sep !== '/') {
- pattern = pattern.split(path.sep).join('/')
- }
-
- this.options = options
- this.set = []
- this.pattern = pattern
- this.regexp = null
- this.negate = false
- this.comment = false
- this.empty = false
-
- // make the set of regexps etc.
- this.make()
-}
-
-Minimatch.prototype.debug = function () {}
-
-Minimatch.prototype.make = make
-function make () {
- // don't do it more than once.
- if (this._made) return
-
- var pattern = this.pattern
- var options = this.options
-
- // empty patterns and comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- this.comment = true
- return
- }
- if (!pattern) {
- this.empty = true
- return
- }
-
- // step 1: figure out negation, etc.
- this.parseNegate()
-
- // step 2: expand braces
- var set = this.globSet = this.braceExpand()
-
- if (options.debug) this.debug = console.error
-
- this.debug(this.pattern, set)
-
- // step 3: now we have a set, so turn each one into a series of path-portion
- // matching patterns.
- // These will be regexps, except in the case of "**", which is
- // set to the GLOBSTAR object for globstar behavior,
- // and will not contain any / characters
- set = this.globParts = set.map(function (s) {
- return s.split(slashSplit)
- })
-
- this.debug(this.pattern, set)
-
- // glob --> regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this)
- }, this)
-
- this.debug(this.pattern, set)
-
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return s.indexOf(false) === -1
- })
-
- this.debug(this.pattern, set)
-
- this.set = set
-}
-
-Minimatch.prototype.parseNegate = parseNegate
-function parseNegate () {
- var pattern = this.pattern
- var negate = false
- var options = this.options
- var negateOffset = 0
-
- if (options.nonegate) return
-
- for (var i = 0, l = pattern.length
- ; i < l && pattern.charAt(i) === '!'
- ; i++) {
- negate = !negate
- negateOffset++
- }
-
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
- this.negate = negate
-}
-
-// Brace expansion:
-// a{b,c}d -> abd acd
-// a{b,}c -> abc ac
-// a{0..3}d -> a0d a1d a2d a3d
-// a{b,c{d,e}f}g -> abg acdfg acefg
-// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
-//
-// Invalid sets are not expanded.
-// a{2..}b -> a{2..}b
-// a{b}c -> a{b}c
-minimatch.braceExpand = function (pattern, options) {
- return braceExpand(pattern, options)
-}
-
-Minimatch.prototype.braceExpand = braceExpand
-
-function braceExpand (pattern, options) {
- if (!options) {
- if (this instanceof Minimatch) {
- options = this.options
- } else {
- options = {}
- }
- }
-
- pattern = typeof pattern === 'undefined'
- ? this.pattern : pattern
-
- if (typeof pattern === 'undefined') {
- throw new TypeError('undefined pattern')
- }
-
- if (options.nobrace ||
- !pattern.match(/\{.*\}/)) {
- // shortcut. no need to expand.
- return [pattern]
- }
-
- return expand(pattern)
-}
-
-// parse a component of the expanded set.
-// At this point, no pattern may contain "/" in it
-// so we're going to return a 2d array, where each entry is the full
-// pattern, split on '/', and then turned into a regular expression.
-// A regexp is made at the end which joins each array with an
-// escaped /, and another full one which joins each regexp with |.
-//
-// Following the lead of Bash 4.1, note that "**" only has special meaning
-// when it is the *only* thing in a path portion. Otherwise, any series
-// of * is equivalent to a single *. Globstar behavior is enabled by
-// default, and can be disabled by setting options.noglobstar.
-Minimatch.prototype.parse = parse
-var SUBPARSE = {}
-function parse (pattern, isSub) {
- if (pattern.length > 1024 * 64) {
- throw new TypeError('pattern is too long')
- }
-
- var options = this.options
-
- // shortcuts
- if (!options.noglobstar && pattern === '**') return GLOBSTAR
- if (pattern === '') return ''
-
- var re = ''
- var hasMagic = !!options.nocase
- var escaping = false
- // ? => one single character
- var patternListStack = []
- var negativeLists = []
- var plType
- var stateChar
- var inClass = false
- var reClassStart = -1
- var classStart = -1
- // . and .. never match anything that doesn't start with .,
- // even when options.dot is set.
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
- // not (start or / followed by . or .. followed by / or end)
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
- : '(?!\\.)'
- var self = this
-
- function clearStateChar () {
- if (stateChar) {
- // we had some state-tracking character
- // that wasn't consumed by this pass.
- switch (stateChar) {
- case '*':
- re += star
- hasMagic = true
- break
- case '?':
- re += qmark
- hasMagic = true
- break
- default:
- re += '\\' + stateChar
- break
- }
- self.debug('clearStateChar %j %j', stateChar, re)
- stateChar = false
- }
- }
-
- for (var i = 0, len = pattern.length, c
- ; (i < len) && (c = pattern.charAt(i))
- ; i++) {
- this.debug('%s\t%s %s %j', pattern, i, re, c)
-
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += '\\' + c
- escaping = false
- continue
- }
-
- switch (c) {
- case '/':
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false
-
- case '\\':
- clearStateChar()
- escaping = true
- continue
-
- // the various stateChar values
- // for the "extglob" stuff.
- case '?':
- case '*':
- case '+':
- case '@':
- case '!':
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
-
- // all of those are literals inside a class, except that
- // the glob [!a] means [^a] in regexp
- if (inClass) {
- this.debug(' in class')
- if (c === '!' && i === classStart + 1) c = '^'
- re += c
- continue
- }
-
- // if we already have a stateChar, then it means
- // that there was something like ** or +? in there.
- // Handle the stateChar, then proceed with this one.
- self.debug('call clearStateChar %j', stateChar)
- clearStateChar()
- stateChar = c
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
- // just clear the statechar *now*, rather than even diving into
- // the patternList stuff.
- if (options.noext) clearStateChar()
- continue
-
- case '(':
- if (inClass) {
- re += '('
- continue
- }
-
- if (!stateChar) {
- re += '\\('
- continue
- }
-
- plType = stateChar
- patternListStack.push({
- type: plType,
- start: i - 1,
- reStart: re.length
- })
- // negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
- this.debug('plType %j %j', stateChar, re)
- stateChar = false
- continue
-
- case ')':
- if (inClass || !patternListStack.length) {
- re += '\\)'
- continue
- }
-
- clearStateChar()
- hasMagic = true
- re += ')'
- var pl = patternListStack.pop()
- plType = pl.type
- // negation is (?:(?!js)[^/]*)
- // The others are (?:)
- switch (plType) {
- case '!':
- negativeLists.push(pl)
- re += ')[^/]*?)'
- pl.reEnd = re.length
- break
- case '?':
- case '+':
- case '*':
- re += plType
- break
- case '@': break // the default anyway
- }
- continue
-
- case '|':
- if (inClass || !patternListStack.length || escaping) {
- re += '\\|'
- escaping = false
- continue
- }
-
- clearStateChar()
- re += '|'
- continue
-
- // these are mostly the same in regexp and glob
- case '[':
- // swallow any state-tracking char before the [
- clearStateChar()
-
- if (inClass) {
- re += '\\' + c
- continue
- }
-
- inClass = true
- classStart = i
- reClassStart = re.length
- re += c
- continue
-
- case ']':
- // a right bracket shall lose its special
- // meaning and represent itself in
- // a bracket expression if it occurs
- // first in the list. -- POSIX.2 2.8.3.2
- if (i === classStart + 1 || !inClass) {
- re += '\\' + c
- escaping = false
- continue
- }
-
- // handle the case where we left a class open.
- // "[z-a]" is valid, equivalent to "\[z-a\]"
- if (inClass) {
- // split where the last [ was, make sure we don't have
- // an invalid re. if so, re-walk the contents of the
- // would-be class to re-translate any characters that
- // were passed through as-is
- // TODO: It would probably be faster to determine this
- // without a try/catch and a new RegExp, but it's tricky
- // to do safely. For now, this is safe and works.
- var cs = pattern.substring(classStart + 1, i)
- try {
- RegExp('[' + cs + ']')
- } catch (er) {
- // not a valid class!
- var sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
- hasMagic = hasMagic || sp[1]
- inClass = false
- continue
- }
- }
-
- // finish up the class.
- hasMagic = true
- inClass = false
- re += c
- continue
-
- default:
- // swallow any state char that wasn't consumed
- clearStateChar()
-
- if (escaping) {
- // no need
- escaping = false
- } else if (reSpecials[c]
- && !(c === '^' && inClass)) {
- re += '\\'
- }
-
- re += c
-
- } // switch
- } // for
-
- // handle the case where we left a class open.
- // "[abc" is valid, equivalent to "\[abc"
- if (inClass) {
- // split where the last [ was, and escape it
- // this is a huge pita. We now have to re-walk
- // the contents of the would-be class to re-translate
- // any characters that were passed through as-is
- cs = pattern.substr(classStart + 1)
- sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0]
- hasMagic = hasMagic || sp[1]
- }
-
- // handle the case where we had a +( thing at the *end*
- // of the pattern.
- // each pattern list stack adds 3 chars, and we need to go through
- // and escape any | chars that were passed through as-is for the regexp.
- // Go through and escape them, taking care not to double-escape any
- // | chars that were already escaped.
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
- var tail = re.slice(pl.reStart + 3)
- // maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
- if (!$2) {
- // the | isn't already escaped, so escape it.
- $2 = '\\'
- }
-
- // need to escape all those slashes *again*, without escaping the
- // one that we need for escaping the | character. As it works out,
- // escaping an even number of slashes can be done by simply repeating
- // it exactly after itself. That's why this trick works.
- //
- // I am sorry that you have to see this.
- return $1 + $1 + $2 + '|'
- })
-
- this.debug('tail=%j\n %s', tail, tail)
- var t = pl.type === '*' ? star
- : pl.type === '?' ? qmark
- : '\\' + pl.type
-
- hasMagic = true
- re = re.slice(0, pl.reStart) + t + '\\(' + tail
- }
-
- // handle trailing things that only matter at the very end.
- clearStateChar()
- if (escaping) {
- // trailing \\
- re += '\\\\'
- }
-
- // only need to apply the nodot start if the re starts with
- // something that could conceivably capture a dot
- var addPatternStart = false
- switch (re.charAt(0)) {
- case '.':
- case '[':
- case '(': addPatternStart = true
- }
-
- // Hack to work around lack of negative lookbehind in JS
- // A pattern like: *.!(x).!(y|z) needs to ensure that a name
- // like 'a.xyz.yz' doesn't match. So, the first negative
- // lookahead, has to look ALL the way ahead, to the end of
- // the pattern.
- for (var n = negativeLists.length - 1; n > -1; n--) {
- var nl = negativeLists[n]
-
- var nlBefore = re.slice(0, nl.reStart)
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
- var nlAfter = re.slice(nl.reEnd)
-
- nlLast += nlAfter
-
- // Handle nested stuff like *(*.js|!(*.json)), where open parens
- // mean that we should *not* include the ) in the bit that is considered
- // "after" the negated section.
- var openParensBefore = nlBefore.split('(').length - 1
- var cleanAfter = nlAfter
- for (i = 0; i < openParensBefore; i++) {
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
- }
- nlAfter = cleanAfter
-
- var dollar = ''
- if (nlAfter === '' && isSub !== SUBPARSE) {
- dollar = '$'
- }
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
- re = newRe
- }
-
- // if the re is not "" at this point, then we need to make sure
- // it doesn't match against an empty path part.
- // Otherwise a/* will match a/, which it should not.
- if (re !== '' && hasMagic) {
- re = '(?=.)' + re
- }
-
- if (addPatternStart) {
- re = patternStart + re
- }
-
- // parsing just a piece of a larger pattern.
- if (isSub === SUBPARSE) {
- return [re, hasMagic]
- }
-
- // skip the regexp for non-magical patterns
- // unescape anything in it, though, so that it'll be
- // an exact match against a file etc.
- if (!hasMagic) {
- return globUnescape(pattern)
- }
-
- var flags = options.nocase ? 'i' : ''
- try {
- var regExp = new RegExp('^' + re + '$', flags)
- } catch (er) {
- // If it was an invalid regular expression, then it can't match
- // anything. This trick looks for a character after the end of
- // the string, which is of course impossible, except in multi-line
- // mode, but it's not a /m regex.
- return new RegExp('$.')
- }
-
- regExp._glob = pattern
- regExp._src = re
-
- return regExp
-}
-
-minimatch.makeRe = function (pattern, options) {
- return new Minimatch(pattern, options || {}).makeRe()
-}
-
-Minimatch.prototype.makeRe = makeRe
-function makeRe () {
- if (this.regexp || this.regexp === false) return this.regexp
-
- // at this point, this.set is a 2d array of partial
- // pattern strings, or "**".
- //
- // It's better to use .match(). This function shouldn't
- // be used, really, but it's pretty convenient sometimes,
- // when you just want to work with a regex.
- var set = this.set
-
- if (!set.length) {
- this.regexp = false
- return this.regexp
- }
- var options = this.options
-
- var twoStar = options.noglobstar ? star
- : options.dot ? twoStarDot
- : twoStarNoDot
- var flags = options.nocase ? 'i' : ''
-
- var re = set.map(function (pattern) {
- return pattern.map(function (p) {
- return (p === GLOBSTAR) ? twoStar
- : (typeof p === 'string') ? regExpEscape(p)
- : p._src
- }).join('\\\/')
- }).join('|')
-
- // must match entire pattern
- // ending in a * or ** will make it less strict.
- re = '^(?:' + re + ')$'
-
- // can match anything, as long as it's not this.
- if (this.negate) re = '^(?!' + re + ').*$'
-
- try {
- this.regexp = new RegExp(re, flags)
- } catch (ex) {
- this.regexp = false
- }
- return this.regexp
-}
-
-minimatch.match = function (list, pattern, options) {
- options = options || {}
- var mm = new Minimatch(pattern, options)
- list = list.filter(function (f) {
- return mm.match(f)
- })
- if (mm.options.nonull && !list.length) {
- list.push(pattern)
- }
- return list
-}
-
-Minimatch.prototype.match = match
-function match (f, partial) {
- this.debug('match', f, this.pattern)
- // short-circuit in the case of busted things.
- // comments, etc.
- if (this.comment) return false
- if (this.empty) return f === ''
-
- if (f === '/' && partial) return true
-
- var options = this.options
-
- // windows: need to use /, not \
- if (path.sep !== '/') {
- f = f.split(path.sep).join('/')
- }
-
- // treat the test path as a set of pathparts.
- f = f.split(slashSplit)
- this.debug(this.pattern, 'split', f)
-
- // just ONE of the pattern sets in this.set needs to match
- // in order for it to be valid. If negating, then just one
- // match means that we have failed.
- // Either way, return on the first hit.
-
- var set = this.set
- this.debug(this.pattern, 'set', set)
-
- // Find the basename of the path by looking for the last non-empty segment
- var filename
- var i
- for (i = f.length - 1; i >= 0; i--) {
- filename = f[i]
- if (filename) break
- }
-
- for (i = 0; i < set.length; i++) {
- var pattern = set[i]
- var file = f
- if (options.matchBase && pattern.length === 1) {
- file = [filename]
- }
- var hit = this.matchOne(file, pattern, partial)
- if (hit) {
- if (options.flipNegate) return true
- return !this.negate
- }
- }
-
- // didn't get any hits. this is success if it's a negative
- // pattern, failure otherwise.
- if (options.flipNegate) return false
- return this.negate
-}
-
-// set partial to true to test if, for example,
-// "/a/b" matches the start of "/*/b/*/d"
-// Partial means, if you run out of file before you run
-// out of pattern, then that's fine, as long as all
-// the parts match.
-Minimatch.prototype.matchOne = function (file, pattern, partial) {
- var options = this.options
-
- this.debug('matchOne',
- { 'this': this, file: file, pattern: pattern })
-
- this.debug('matchOne', file.length, pattern.length)
-
- for (var fi = 0,
- pi = 0,
- fl = file.length,
- pl = pattern.length
- ; (fi < fl) && (pi < pl)
- ; fi++, pi++) {
- this.debug('matchOne loop')
- var p = pattern[pi]
- var f = file[fi]
-
- this.debug(pattern, p, f)
-
- // should be impossible.
- // some invalid regexp stuff in the set.
- if (p === false) return false
-
- if (p === GLOBSTAR) {
- this.debug('GLOBSTAR', [pattern, p, f])
-
- // "**"
- // a/**/b/**/c would match the following:
- // a/b/x/y/z/c
- // a/x/y/z/b/c
- // a/b/x/b/x/c
- // a/b/c
- // To do this, take the rest of the pattern after
- // the **, and see if it would match the file remainder.
- // If so, return success.
- // If not, the ** "swallows" a segment, and try again.
- // This is recursively awful.
- //
- // a/**/b/**/c matching a/b/x/y/z/c
- // - a matches a
- // - doublestar
- // - matchOne(b/x/y/z/c, b/**/c)
- // - b matches b
- // - doublestar
- // - matchOne(x/y/z/c, c) -> no
- // - matchOne(y/z/c, c) -> no
- // - matchOne(z/c, c) -> no
- // - matchOne(c, c) yes, hit
- var fr = fi
- var pr = pi + 1
- if (pr === pl) {
- this.debug('** at the end')
- // a ** at the end will just swallow the rest.
- // We have found a match.
- // however, it will not swallow /.x, unless
- // options.dot is set.
- // . and .. are *never* matched by **, for explosively
- // exponential reasons.
- for (; fi < fl; fi++) {
- if (file[fi] === '.' || file[fi] === '..' ||
- (!options.dot && file[fi].charAt(0) === '.')) return false
- }
- return true
- }
-
- // ok, let's see if we can swallow whatever we can.
- while (fr < fl) {
- var swallowee = file[fr]
-
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
-
- // XXX remove this slice. Just pass the start index.
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
- this.debug('globstar found match!', fr, fl, swallowee)
- // found a match.
- return true
- } else {
- // can't swallow "." or ".." ever.
- // can only swallow ".foo" when explicitly asked.
- if (swallowee === '.' || swallowee === '..' ||
- (!options.dot && swallowee.charAt(0) === '.')) {
- this.debug('dot detected!', file, fr, pattern, pr)
- break
- }
-
- // ** swallows a segment, and continue.
- this.debug('globstar swallow a segment, and continue')
- fr++
- }
- }
-
- // no match was found.
- // However, in partial mode, we can't say this is necessarily over.
- // If there's more *pattern* left, then
- if (partial) {
- // ran out of file
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
- if (fr === fl) return true
- }
- return false
- }
-
- // something other than **
- // non-magic patterns just have to match exactly
- // patterns with magic have been turned into regexps.
- var hit
- if (typeof p === 'string') {
- if (options.nocase) {
- hit = f.toLowerCase() === p.toLowerCase()
- } else {
- hit = f === p
- }
- this.debug('string match', p, f, hit)
- } else {
- hit = f.match(p)
- this.debug('pattern match', p, f, hit)
- }
-
- if (!hit) return false
- }
-
- // Note: ending in / means that we'll get a final ""
- // at the end of the pattern. This can only match a
- // corresponding "" at the end of the file.
- // If the file ends in /, then it can only match a
- // a pattern that ends in /, unless the pattern just
- // doesn't have any more for it. But, a/b/ should *not*
- // match "a/b/*", even though "" matches against the
- // [^/]*? pattern, except in partial mode, where it might
- // simply not be reached yet.
- // However, a/b/ should still satisfy a/*
-
- // now either we fell off the end of the pattern, or we're done.
- if (fi === fl && pi === pl) {
- // ran out of pattern and filename at the same time.
- // an exact hit!
- return true
- } else if (fi === fl) {
- // ran out of file, but still had pattern left.
- // this is ok if we're doing the match as part of
- // a glob fs traversal.
- return partial
- } else if (pi === pl) {
- // ran out of pattern, still have file left.
- // this is only acceptable if we're on the very last
- // empty segment of a file with a trailing slash.
- // a/* should match a/b/
- var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
- return emptyFileEnd
- }
-
- // should be unreachable.
- throw new Error('wtf?')
-}
-
-// replace stuff like \* with *
-function globUnescape (s) {
- return s.replace(/\\(.)/g, '$1')
-}
-
-function regExpEscape (s) {
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md
deleted file mode 100644
index b0d793ed5d9016..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# brace-expansion
-
-[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
-as known from sh/bash, in JavaScript.
-
-[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
-[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
-
-[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
-
-## Example
-
-```js
-var expand = require('brace-expansion');
-
-expand('file-{a,b,c}.jpg')
-// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
-
-expand('-v{,,}')
-// => ['-v', '-v', '-v']
-
-expand('file{0..2}.jpg')
-// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
-
-expand('file-{a..c}.jpg')
-// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
-
-expand('file{2..0}.jpg')
-// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
-
-expand('file{0..4..2}.jpg')
-// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
-
-expand('file-{a..e..2}.jpg')
-// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
-
-expand('file{00..10..5}.jpg')
-// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
-
-expand('{{A..C},{a..c}}')
-// => ['A', 'B', 'C', 'a', 'b', 'c']
-
-expand('ppp{,config,oe{,conf}}')
-// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
-```
-
-## API
-
-```js
-var expand = require('brace-expansion');
-```
-
-### var expanded = expand(str)
-
-Return an array of all possible and valid expansions of `str`. If none are
-found, `[str]` is returned.
-
-Valid expansions are:
-
-```js
-/^(.*,)+(.+)?$/
-// {a,b,...}
-```
-
-A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
-
-```js
-/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
-// {x..y[..incr]}
-```
-
-A numeric sequence from `x` to `y` inclusive, with optional increment.
-If `x` or `y` start with a leading `0`, all the numbers will be padded
-to have equal length. Negative numbers and backwards iteration work too.
-
-```js
-/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
-// {x..y[..incr]}
-```
-
-An alphabetic sequence from `x` to `y` inclusive, with optional increment.
-`x` and `y` must be exactly one character, and if given, `incr` must be a
-number.
-
-For compatibility reasons, the string `${` is not eligible for brace expansion.
-
-## Installation
-
-With [npm](https://npmjs.org) do:
-
-```bash
-npm install brace-expansion
-```
-
-## Contributors
-
-- [Julian Gruber](https://github.com/juliangruber)
-- [Isaac Z. Schlueter](https://github.com/isaacs)
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js
deleted file mode 100644
index abe535df327354..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js
+++ /dev/null
@@ -1,190 +0,0 @@
-var concatMap = require('concat-map');
-var balanced = require('balanced-match');
-
-module.exports = expandTop;
-
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
-
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
-
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
-
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
-
-
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
-
- var parts = [];
- var m = balanced('{', '}', str);
-
- if (!m)
- return str.split(',');
-
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
-
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
- }
-
- parts.push.apply(parts, p);
-
- return parts;
-}
-
-function expandTop(str) {
- if (!str)
- return [];
-
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
-
-function identity(e) {
- return e;
-}
-
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
-
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
-
-function expand(str, isTop) {
- var expansions = [];
-
- var m = balanced('{', '}', str);
- if (!m || /\$$/.test(m.pre)) return [str];
-
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = /^(.*,)+(.+)?$/.test(m.body);
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,.*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
-
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- var N;
-
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
-
- N = [];
-
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = concatMap(n, function(el) { return expand(el, false) });
- }
-
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
-
- return expansions;
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
deleted file mode 100644
index ae5d8c36ac6522..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-test
-.gitignore
-.travis.yml
-Makefile
-example.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md
deleted file mode 100644
index 2cdc8e4148cc0a..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-(MIT)
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
deleted file mode 100644
index d6880b2f36e72b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# balanced-match
-
-Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well!
-
-[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
-[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
-
-[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
-
-## Example
-
-Get the first matching pair of braces:
-
-```js
-var balanced = require('balanced-match');
-
-console.log(balanced('{', '}', 'pre{in{nested}}post'));
-console.log(balanced('{', '}', 'pre{first}between{second}post'));
-console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
-```
-
-The matches are:
-
-```bash
-$ node example.js
-{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
-{ start: 3,
- end: 9,
- pre: 'pre',
- body: 'first',
- post: 'between{second}post' }
-{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
-```
-
-## API
-
-### var m = balanced(a, b, str)
-
-For the first non-nested matching pair of `a` and `b` in `str`, return an
-object with those keys:
-
-* **start** the index of the first match of `a`
-* **end** the index of the matching `b`
-* **pre** the preamble, `a` and `b` not included
-* **body** the match, `a` and `b` not included
-* **post** the postscript, `a` and `b` not included
-
-If there's no match, `undefined` will be returned.
-
-If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.
-
-### var r = balanced.range(a, b, str)
-
-For the first non-nested matching pair of `a` and `b` in `str`, return an
-array with indexes: `[ , ]`.
-
-If there's no match, `undefined` will be returned.
-
-If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`.
-
-## Installation
-
-With [npm](https://npmjs.org) do:
-
-```bash
-npm install balanced-match
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
deleted file mode 100644
index 4670f7f79f4d2a..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
+++ /dev/null
@@ -1,58 +0,0 @@
-module.exports = balanced;
-function balanced(a, b, str) {
- if (a instanceof RegExp) a = maybeMatch(a, str);
- if (b instanceof RegExp) b = maybeMatch(b, str);
-
- var r = range(a, b, str);
-
- return r && {
- start: r[0],
- end: r[1],
- pre: str.slice(0, r[0]),
- body: str.slice(r[0] + a.length, r[1]),
- post: str.slice(r[1] + b.length)
- };
-}
-
-function maybeMatch(reg, str) {
- var m = str.match(reg);
- return m ? m[0] : null;
-}
-
-balanced.range = range;
-function range(a, b, str) {
- var begs, beg, left, right, result;
- var ai = str.indexOf(a);
- var bi = str.indexOf(b, ai + 1);
- var i = ai;
-
- if (ai >= 0 && bi > 0) {
- begs = [];
- left = str.length;
-
- while (i < str.length && i >= 0 && ! result) {
- if (i == ai) {
- begs.push(i);
- ai = str.indexOf(a, i + 1);
- } else if (begs.length == 1) {
- result = [ begs.pop(), bi ];
- } else {
- beg = begs.pop();
- if (beg < left) {
- left = beg;
- right = bi;
- }
-
- bi = str.indexOf(b, i + 1);
- }
-
- i = ai < bi && ai >= 0 ? ai : bi;
- }
-
- if (begs.length) {
- result = [ left, right ];
- }
- }
-
- return result;
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
deleted file mode 100644
index ee083b2368b43f..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "name": "balanced-match",
- "description": "Match balanced character pairs, like \"{\" and \"}\"",
- "version": "0.4.1",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/balanced-match.git"
- },
- "homepage": "https://github.com/juliangruber/balanced-match",
- "main": "index.js",
- "scripts": {
- "test": "make test"
- },
- "dependencies": {},
- "devDependencies": {
- "tape": "~4.5.0"
- },
- "keywords": [
- "match",
- "regexp",
- "test",
- "balanced",
- "parse"
- ],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT",
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "firefox/20..latest",
- "firefox/nightly",
- "chrome/25..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- },
- "gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863",
- "bugs": {
- "url": "https://github.com/juliangruber/balanced-match/issues"
- },
- "_id": "balanced-match@0.4.1",
- "_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
- "_from": "balanced-match@>=0.4.1 <0.5.0",
- "_npmVersion": "3.8.6",
- "_nodeVersion": "6.0.0",
- "_npmUser": {
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
- },
- "dist": {
- "shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
- "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz"
- },
- "maintainers": [
- {
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml
deleted file mode 100644
index f1d0f13c8a54d0..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.4
- - 0.6
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE
deleted file mode 100644
index ee27ba4b4412b0..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown
deleted file mode 100644
index 408f70a1be473c..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown
+++ /dev/null
@@ -1,62 +0,0 @@
-concat-map
-==========
-
-Concatenative mapdashery.
-
-[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)
-
-[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)
-
-example
-=======
-
-``` js
-var concatMap = require('concat-map');
-var xs = [ 1, 2, 3, 4, 5, 6 ];
-var ys = concatMap(xs, function (x) {
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
-});
-console.dir(ys);
-```
-
-***
-
-```
-[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
-```
-
-methods
-=======
-
-``` js
-var concatMap = require('concat-map')
-```
-
-concatMap(xs, fn)
------------------
-
-Return an array of concatenated elements by calling `fn(x, i)` for each element
-`x` and each index `i` in the array `xs`.
-
-When `fn(x, i)` returns an array, its result will be concatenated with the
-result array. If `fn(x, i)` returns anything else, that value will be pushed
-onto the end of the result array.
-
-install
-=======
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install concat-map
-```
-
-license
-=======
-
-MIT
-
-notes
-=====
-
-This module was written while sitting high above the ground in a tree.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js
deleted file mode 100644
index 33656217b61d8f..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var concatMap = require('../');
-var xs = [ 1, 2, 3, 4, 5, 6 ];
-var ys = concatMap(xs, function (x) {
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
-});
-console.dir(ys);
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js
deleted file mode 100644
index b29a7812e5055a..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = function (xs, fn) {
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- var x = fn(xs[i], i);
- if (isArray(x)) res.push.apply(res, x);
- else res.push(x);
- }
- return res;
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
deleted file mode 100644
index b516138098fba9..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "name": "concat-map",
- "description": "concatenative mapdashery",
- "version": "0.0.1",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/node-concat-map.git"
- },
- "main": "index.js",
- "keywords": [
- "concat",
- "concatMap",
- "map",
- "functional",
- "higher-order"
- ],
- "directories": {
- "example": "example",
- "test": "test"
- },
- "scripts": {
- "test": "tape test/*.js"
- },
- "devDependencies": {
- "tape": "~2.4.0"
- },
- "license": "MIT",
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "testling": {
- "files": "test/*.js",
- "browsers": {
- "ie": [
- 6,
- 7,
- 8,
- 9
- ],
- "ff": [
- 3.5,
- 10,
- 15
- ],
- "chrome": [
- 10,
- 22
- ],
- "safari": [
- 5.1
- ],
- "opera": [
- 12
- ]
- }
- },
- "bugs": {
- "url": "https://github.com/substack/node-concat-map/issues"
- },
- "homepage": "https://github.com/substack/node-concat-map",
- "_id": "concat-map@0.0.1",
- "dist": {
- "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
- "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
- },
- "_from": "concat-map@0.0.1",
- "_npmVersion": "1.3.21",
- "_npmUser": {
- "name": "substack",
- "email": "mail@substack.net"
- },
- "maintainers": [
- {
- "name": "substack",
- "email": "mail@substack.net"
- }
- ],
- "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
- "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js
deleted file mode 100644
index fdbd7022f6da17..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var concatMap = require('../');
-var test = require('tape');
-
-test('empty or not', function (t) {
- var xs = [ 1, 2, 3, 4, 5, 6 ];
- var ixes = [];
- var ys = concatMap(xs, function (x, ix) {
- ixes.push(ix);
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
- });
- t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
- t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
- t.end();
-});
-
-test('always something', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function (x) {
- return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
- });
- t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
- t.end();
-});
-
-test('scalars', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function (x) {
- return x === 'b' ? [ 'B', 'B', 'B' ] : x;
- });
- t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
- t.end();
-});
-
-test('undefs', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function () {});
- t.same(ys, [ undefined, undefined, undefined, undefined ]);
- t.end();
-});
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json
deleted file mode 100644
index 221689b9fd9a05..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "name": "brace-expansion",
- "description": "Brace expansion as known from sh/bash",
- "version": "1.1.5",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/brace-expansion.git"
- },
- "homepage": "https://github.com/juliangruber/brace-expansion",
- "main": "index.js",
- "scripts": {
- "test": "tape test/*.js",
- "gentest": "bash test/generate.sh"
- },
- "dependencies": {
- "balanced-match": "^0.4.1",
- "concat-map": "0.0.1"
- },
- "devDependencies": {
- "tape": "4.5.1"
- },
- "keywords": [],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT",
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "firefox/20..latest",
- "firefox/nightly",
- "chrome/25..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- },
- "gitHead": "ff31acab078f1bb696ac4c55ca56ea24e6495fb6",
- "bugs": {
- "url": "https://github.com/juliangruber/brace-expansion/issues"
- },
- "_id": "brace-expansion@1.1.5",
- "_shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526",
- "_from": "brace-expansion@>=1.0.0 <2.0.0",
- "_npmVersion": "2.15.5",
- "_nodeVersion": "4.4.5",
- "_npmUser": {
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
- },
- "dist": {
- "shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526",
- "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz"
- },
- "maintainers": [
- {
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
- },
- {
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/brace-expansion-1.1.5.tgz_1465989660138_0.34528115345165133"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json b/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json
deleted file mode 100644
index db541aec5b3604..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "name": "minimatch",
- "description": "a glob matcher in javascript",
- "version": "3.0.2",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/minimatch.git"
- },
- "main": "minimatch.js",
- "scripts": {
- "posttest": "standard minimatch.js test/*.js",
- "test": "tap test/*.js"
- },
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "brace-expansion": "^1.0.0"
- },
- "devDependencies": {
- "standard": "^3.7.2",
- "tap": "^5.6.0"
- },
- "license": "ISC",
- "files": [
- "minimatch.js"
- ],
- "gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0",
- "bugs": {
- "url": "https://github.com/isaacs/minimatch/issues"
- },
- "homepage": "https://github.com/isaacs/minimatch#readme",
- "_id": "minimatch@3.0.2",
- "_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
- "_from": "minimatch@>=3.0.2 <4.0.0",
- "_npmVersion": "3.9.1",
- "_nodeVersion": "4.4.4",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "dist": {
- "shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
- "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/d/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/d/package.json
index 03d81db13be8d9..114c94c8465f91 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/d/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/d/package.json
@@ -38,7 +38,7 @@
"_id": "d@0.1.1",
"dist": {
"shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
- "tarball": "http://registry.npmjs.org/d/-/d-0.1.1.tgz"
+ "tarball": "https://registry.npmjs.org/d/-/d-0.1.1.tgz"
},
"_from": "d@>=0.1.1 <0.2.0",
"_npmVersion": "1.4.3",
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/.travis.yml b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/.travis.yml
index e8e18ee77d88ed..39fd70e64ed706 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/.travis.yml
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/.travis.yml
@@ -4,6 +4,7 @@ node_js:
- 0.12
- 4
- 5
+ - 6
before_install:
- mkdir node_modules; ln -s ../ node_modules/es5-ext
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/CHANGES b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/CHANGES
index 92ee5f6ef64ca9..4ecc2db0753863 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/CHANGES
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/CHANGES
@@ -1,3 +1,8 @@
+v0.10.12 -- 2016.07.01
+* Ensure symbols are copied in Object.mixin
+* Prevent RangeError errors in array#flatten
+* Do not validate invalidate dates in validDate
+
v0.10.11 -- 2015.12.18
* Ensure that check for implementation of RegExp flags doesn't crash in V8 (thanks @mathiasbynens)
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/array/#/flatten.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/array/#/flatten.js
index c95407d317fd3b..4bf267f2bad8d9 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/array/#/flatten.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/array/#/flatten.js
@@ -1,12 +1,15 @@
'use strict';
-var isArray = Array.isArray, forEach = Array.prototype.forEach
- , push = Array.prototype.push;
+var isArray = Array.isArray, forEach = Array.prototype.forEach;
module.exports = function flatten() {
var r = [];
forEach.call(this, function (x) {
- push.apply(r, isArray(x) ? flatten.call(x) : [x]);
+ if (isArray(x)) {
+ r = r.concat(flatten.call(x));
+ } else {
+ r.push(x);
+ }
});
return r;
};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/date/valid-date.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/date/valid-date.js
index 7d1a9b60d4748a..d0f1b6ce2b83a6 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/date/valid-date.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/date/valid-date.js
@@ -3,6 +3,6 @@
var isDate = require('./is-date');
module.exports = function (x) {
- if (!isDate(x)) throw new TypeError(x + " is not a Date object");
+ if (!isDate(x) || isNaN(x)) throw new TypeError(x + " is not valid Date object");
return x;
};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/package.json
index 53ae9c78d55c19..16a33feeeed2c8 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-iterator/package.json
@@ -52,7 +52,7 @@
},
"dist": {
"shasum": "bd968567d61635e33c0b80727613c9cb4b096bac",
- "tarball": "http://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.lint b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.lint
deleted file mode 100644
index df1e53cd5f547e..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.lint
+++ /dev/null
@@ -1,15 +0,0 @@
-@root
-
-module
-
-tabs
-indent 2
-maxlen 100
-
-ass
-nomen
-plusplus
-newcap
-vars
-
-predef+ Symbol
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.npmignore
deleted file mode 100644
index 155e41f69142ef..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-/node_modules
-/npm-debug.log
-/.lintcache
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.travis.yml b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.travis.yml
deleted file mode 100644
index 6830765b567773..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
-language: node_js
-node_js:
- - 0.12
- - v4
- - v5
-
-notifications:
- email:
- - medikoo+es6-symbol@medikoo.com
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/CHANGES b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/CHANGES
deleted file mode 100644
index cbedd4244bc8b6..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/CHANGES
+++ /dev/null
@@ -1,46 +0,0 @@
-v3.0.2 -- 2015.12.12
-* Fix definition flow, so uneven state of Symbol implementation doesn't crash initialization of
- polyfill. See #13
-
-v3.0.1 -- 2015.10.22
-* Workaround for IE11 bug (reported in #12)
-
-v3.0.0 -- 2015.10.02
-* Reuse native symbols (e.g. iterator, toStringTag etc.) in a polyfill if they're available
- Otherwise polyfill symbols may not be recognized by other functions
-* Improve documentation
-
-v2.0.1 -- 2015.01.28
-* Fix Symbol.prototype[Symbol.isPrimitive] implementation
-* Improve validation within Symbol.prototype.toString and
- Symbol.prototype.valueOf
-
-v2.0.0 -- 2015.01.28
-* Update up to changes in specification:
- * Implement `for` and `keyFor`
- * Remove `Symbol.create` and `Symbol.isRegExp`
- * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and
- `Symbol.split`
-* Rename `validSymbol` to `validateSymbol`
-* Improve documentation
-* Remove dead test modules
-
-v1.0.0 -- 2015.01.26
-* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value)
-* Introduce initialization via hidden constructor
-* Fix isSymbol handling of polyfill values when native Symbol is present
-* Fix spelling of LICENSE
-* Configure lint scripts
-
-v0.1.1 -- 2014.10.07
-* Fix isImplemented, so it returns true in case of polyfill
-* Improve documentations
-
-v0.1.0 -- 2014.04.28
-* Assure strictly npm dependencies
-* Update to use latest versions of dependencies
-* Fix implementation detection so it doesn't crash on `String(symbol)`
-* throw on `new Symbol()` (as decided by TC39)
-
-v0.0.0 -- 2013.11.15
-* Initial (dev) version
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/LICENSE
deleted file mode 100644
index 04724a3ab1b70b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/README.md b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/README.md
deleted file mode 100644
index 0fa8978450cb4f..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# es6-symbol
-## ECMAScript 6 Symbol polyfill
-
-For more information about symbols see following links
-- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)
-- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
-- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)
-
-### Limitations
-
-Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.
-
-### Usage
-
-It’s safest to use *es6-symbol* as a [ponyfill](http://kikobeats.com/polyfill-ponyfill-and-prollyfill/) – a polyfill which doesn’t touch global objects:
-
-```javascript
-var Symbol = require('es6-symbol');
-```
-
-If you want to make sure your environment implements `Symbol` globally, do:
-
-```javascript
-require('es6-symbol/implement');
-```
-
-If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:
-
-```javascript
-var Symbol = require('es6-symbol/polyfill');
-```
-
-#### API
-
-Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:
-
-```javascript
-var Symbol = require('es6-symbol');
-
-var symbol = Symbol('My custom symbol');
-var x = {};
-
-x[symbol] = 'foo';
-console.log(x[symbol]); 'foo'
-
-// Detect iterable:
-var iterator, result;
-if (possiblyIterable[Symbol.iterator]) {
- iterator = possiblyIterable[Symbol.iterator]();
- result = iterator.next();
- while(!result.done) {
- console.log(result.value);
- result = iterator.next();
- }
-}
-```
-
-### Installation
-#### NPM
-
-In your project path:
-
- $ npm install es6-symbol
-
-##### Browser
-
-To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
-
-## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)
-
- $ npm test
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/implement.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/implement.js
deleted file mode 100644
index 153edacdbedf9b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/implement.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (!require('./is-implemented')()) {
- Object.defineProperty(require('es5-ext/global'), 'Symbol',
- { value: require('./polyfill'), configurable: true, enumerable: false,
- writable: true });
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/index.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/index.js
deleted file mode 100644
index 609f1faf551164..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./is-implemented')() ? Symbol : require('./polyfill');
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-implemented.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-implemented.js
deleted file mode 100644
index 53759f32124b1c..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-implemented.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict';
-
-module.exports = function () {
- var symbol;
- if (typeof Symbol !== 'function') return false;
- symbol = Symbol('test symbol');
- try { String(symbol); } catch (e) { return false; }
- if (typeof Symbol.iterator === 'symbol') return true;
-
- // Return 'true' for polyfills
- if (typeof Symbol.isConcatSpreadable !== 'object') return false;
- if (typeof Symbol.iterator !== 'object') return false;
- if (typeof Symbol.toPrimitive !== 'object') return false;
- if (typeof Symbol.toStringTag !== 'object') return false;
- if (typeof Symbol.unscopables !== 'object') return false;
-
- return true;
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-native-implemented.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-native-implemented.js
deleted file mode 100644
index a8cb8b8681ee69..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-native-implemented.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Exports true if environment provides native `Symbol` implementation
-
-'use strict';
-
-module.exports = (function () {
- if (typeof Symbol !== 'function') return false;
- return (typeof Symbol.iterator === 'symbol');
-}());
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-symbol.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-symbol.js
deleted file mode 100644
index beeba2cb4fa23f..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/is-symbol.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = function (x) {
- return (x && ((typeof x === 'symbol') || (x['@@toStringTag'] === 'Symbol'))) || false;
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/package.json
deleted file mode 100644
index 6c2dcc65e8cb30..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "name": "es6-symbol",
- "version": "3.0.2",
- "description": "ECMAScript 6 Symbol polyfill",
- "author": {
- "name": "Mariusz Nowak",
- "email": "medyk@medikoo.com",
- "url": "http://www.medikoo.com/"
- },
- "keywords": [
- "symbol",
- "private",
- "property",
- "es6",
- "ecmascript",
- "harmony",
- "ponyfill",
- "polyfill"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/medikoo/es6-symbol.git"
- },
- "dependencies": {
- "d": "~0.1.1",
- "es5-ext": "~0.10.10"
- },
- "devDependencies": {
- "tad": "~0.2.4",
- "xlint": "~0.2.2",
- "xlint-jslint-medikoo": "~0.1.4"
- },
- "scripts": {
- "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
- "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
- "test": "node ./node_modules/tad/bin/tad"
- },
- "license": "MIT",
- "gitHead": "b7da6b926c44e3745de69b17c98c00a5c84b4ebe",
- "bugs": {
- "url": "https://github.com/medikoo/es6-symbol/issues"
- },
- "homepage": "https://github.com/medikoo/es6-symbol#readme",
- "_id": "es6-symbol@3.0.2",
- "_shasum": "1e928878c6f5e63541625b4bb4df4af07d154219",
- "_from": "es6-symbol@>=3.0.2 <3.1.0",
- "_npmVersion": "3.3.12",
- "_nodeVersion": "5.2.0",
- "_npmUser": {
- "name": "medikoo",
- "email": "medikoo+npm@medikoo.com"
- },
- "dist": {
- "shasum": "1e928878c6f5e63541625b4bb4df4af07d154219",
- "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz"
- },
- "maintainers": [
- {
- "name": "medikoo",
- "email": "medikoo+npm@medikoo.com"
- }
- ],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/polyfill.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/polyfill.js
deleted file mode 100644
index 7c3c8fe90025ca..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/polyfill.js
+++ /dev/null
@@ -1,107 +0,0 @@
-// ES2015 Symbol polyfill for environments that do not support it (or partially support it_
-
-'use strict';
-
-var d = require('d')
- , validateSymbol = require('./validate-symbol')
-
- , create = Object.create, defineProperties = Object.defineProperties
- , defineProperty = Object.defineProperty, objPrototype = Object.prototype
- , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null);
-
-if (typeof Symbol === 'function') NativeSymbol = Symbol;
-
-var generateName = (function () {
- var created = create(null);
- return function (desc) {
- var postfix = 0, name, ie11BugWorkaround;
- while (created[desc + (postfix || '')]) ++postfix;
- desc += (postfix || '');
- created[desc] = true;
- name = '@@' + desc;
- defineProperty(objPrototype, name, d.gs(null, function (value) {
- // For IE11 issue see:
- // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
- // ie11-broken-getters-on-dom-objects
- // https://github.com/medikoo/es6-symbol/issues/12
- if (ie11BugWorkaround) return;
- ie11BugWorkaround = true;
- defineProperty(this, name, d(value));
- ie11BugWorkaround = false;
- }));
- return name;
- };
-}());
-
-// Internal constructor (not one exposed) for creating Symbol instances.
-// This one is used to ensure that `someSymbol instanceof Symbol` always return false
-HiddenSymbol = function Symbol(description) {
- if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
- return SymbolPolyfill(description);
-};
-
-// Exposed `Symbol` constructor
-// (returns instances of HiddenSymbol)
-module.exports = SymbolPolyfill = function Symbol(description) {
- var symbol;
- if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
- symbol = create(HiddenSymbol.prototype);
- description = (description === undefined ? '' : String(description));
- return defineProperties(symbol, {
- __description__: d('', description),
- __name__: d('', generateName(description))
- });
-};
-defineProperties(SymbolPolyfill, {
- for: d(function (key) {
- if (globalSymbols[key]) return globalSymbols[key];
- return (globalSymbols[key] = SymbolPolyfill(String(key)));
- }),
- keyFor: d(function (s) {
- var key;
- validateSymbol(s);
- for (key in globalSymbols) if (globalSymbols[key] === s) return key;
- }),
-
- // If there's native implementation of given symbol, let's fallback to it
- // to ensure proper interoperability with other native functions e.g. Array.from
- hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),
- isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
- SymbolPolyfill('isConcatSpreadable')),
- iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),
- match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),
- replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),
- search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),
- species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),
- split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),
- toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),
- toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),
- unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))
-});
-
-// Internal tweaks for real symbol producer
-defineProperties(HiddenSymbol.prototype, {
- constructor: d(SymbolPolyfill),
- toString: d('', function () { return this.__name__; })
-});
-
-// Proper implementation of methods exposed on Symbol.prototype
-// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
-defineProperties(SymbolPolyfill.prototype, {
- toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
- valueOf: d(function () { return validateSymbol(this); })
-});
-defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('',
- function () { return validateSymbol(this); }));
-defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
-
-// Proper implementaton of toPrimitive and toStringTag for returned symbol instances
-defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
- d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
-
-// Note: It's important to define `toPrimitive` as last one, as some implementations
-// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
-// And that may invoke error in definition flow:
-// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
-defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
- d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/implement.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/implement.js
deleted file mode 100644
index eb35c3018835c7..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/implement.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof Symbol, 'function'); };
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/index.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/index.js
deleted file mode 100644
index 62b3296df6fc5e..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-var d = require('d')
-
- , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
- var symbol = T('test'), x = {};
- defineProperty(x, symbol, d('foo'));
- a(x.test, undefined, "Name");
- a(x[symbol], 'foo', "Get");
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-implemented.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-implemented.js
deleted file mode 100644
index bb0d64536ebbae..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-implemented.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var global = require('es5-ext/global')
- , polyfill = require('../polyfill');
-
-module.exports = function (t, a) {
- var cache;
- a(typeof t(), 'boolean');
- cache = global.Symbol;
- global.Symbol = polyfill;
- a(t(), true);
- if (cache === undefined) delete global.Symbol;
- else global.Symbol = cache;
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-native-implemented.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-native-implemented.js
deleted file mode 100644
index df8ba0323f0cad..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-native-implemented.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = function (t, a) { a(typeof t, 'boolean'); };
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-symbol.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-symbol.js
deleted file mode 100644
index ac24b9abbff4e6..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/is-symbol.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
- a(t(undefined), false, "Undefined");
- a(t(null), false, "Null");
- a(t(true), false, "Primitive");
- a(t('raz'), false, "String");
- a(t({}), false, "Object");
- a(t([]), false, "Array");
- if (typeof Symbol !== 'undefined') {
- a(t(Symbol()), true, "Native");
- }
- a(t(SymbolPoly()), true, "Polyfill");
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/polyfill.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/polyfill.js
deleted file mode 100644
index 83fb5e9253677b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/polyfill.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-var d = require('d')
- , isSymbol = require('../is-symbol')
-
- , defineProperty = Object.defineProperty;
-
-module.exports = function (T, a) {
- var symbol = T('test'), x = {};
- defineProperty(x, symbol, d('foo'));
- a(x.test, undefined, "Name");
- a(x[symbol], 'foo', "Get");
- a(x instanceof T, false);
-
- a(isSymbol(symbol), true, "Symbol");
- a(isSymbol(T.iterator), true, "iterator");
- a(isSymbol(T.toStringTag), true, "toStringTag");
-
- x = {};
- x[symbol] = 'foo';
- a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false,
- value: 'foo', writable: true });
- symbol = T.for('marko');
- a(isSymbol(symbol), true);
- a(T.for('marko'), symbol);
- a(T.keyFor(symbol), 'marko');
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/validate-symbol.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/validate-symbol.js
deleted file mode 100644
index 2c8f84c8239b6e..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/test/validate-symbol.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-var SymbolPoly = require('../polyfill');
-
-module.exports = function (t, a) {
- var symbol;
- a.throws(function () { t(undefined); }, TypeError, "Undefined");
- a.throws(function () { t(null); }, TypeError, "Null");
- a.throws(function () { t(true); }, TypeError, "Primitive");
- a.throws(function () { t('raz'); }, TypeError, "String");
- a.throws(function () { t({}); }, TypeError, "Object");
- a.throws(function () { t([]); }, TypeError, "Array");
- if (typeof Symbol !== 'undefined') {
- symbol = Symbol();
- a(t(symbol), symbol, "Native");
- }
- symbol = SymbolPoly();
- a(t(symbol), symbol, "Polyfill");
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/validate-symbol.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/validate-symbol.js
deleted file mode 100644
index 42750043d4271c..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/node_modules/es6-symbol/validate-symbol.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-var isSymbol = require('./is-symbol');
-
-module.exports = function (value) {
- if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
- return value;
-};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/object/mixin.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/object/mixin.js
index 80b5df5e04b9b3..488523eea1d4ff 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/object/mixin.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/object/mixin.js
@@ -4,16 +4,24 @@ var value = require('./valid-value')
, defineProperty = Object.defineProperty
, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
- , getOwnPropertyNames = Object.getOwnPropertyNames;
+ , getOwnPropertyNames = Object.getOwnPropertyNames
+ , getOwnPropertySymbols = Object.getOwnPropertySymbols;
module.exports = function (target, source) {
- var error;
+ var error, sourceObject = Object(value(source));
target = Object(value(target));
- getOwnPropertyNames(Object(value(source))).forEach(function (name) {
+ getOwnPropertyNames(sourceObject).forEach(function (name) {
try {
defineProperty(target, name, getOwnPropertyDescriptor(source, name));
} catch (e) { error = e; }
});
+ if (typeof getOwnPropertySymbols === 'function') {
+ getOwnPropertySymbols(sourceObject).forEach(function (symbol) {
+ try {
+ defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));
+ } catch (e) { error = e; }
+ });
+ }
if (error !== undefined) throw error;
return target;
};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/package.json
index 0548e810658e8a..3bf6032143f3df 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/package.json
@@ -1,6 +1,6 @@
{
"name": "es5-ext",
- "version": "0.10.11",
+ "version": "0.10.12",
"description": "ECMAScript extensions and shims",
"author": {
"name": "Mariusz Nowak",
@@ -31,7 +31,7 @@
},
"dependencies": {
"es6-iterator": "2",
- "es6-symbol": "~3.0.2"
+ "es6-symbol": "~3.1"
},
"devDependencies": {
"tad": "~0.2.4",
@@ -44,23 +44,23 @@
"test": "node ./node_modules/tad/bin/tad"
},
"license": "MIT",
- "gitHead": "aba94140a6bf79ce1a448a2db8834e8c1842b527",
+ "gitHead": "96fddc3a327b3a28b1653af9490e3b905f127fa8",
"bugs": {
"url": "https://github.com/medikoo/es5-ext/issues"
},
"homepage": "https://github.com/medikoo/es5-ext#readme",
- "_id": "es5-ext@0.10.11",
- "_shasum": "8184c3e705a820948c2dbe043849379b1dbd0c45",
+ "_id": "es5-ext@0.10.12",
+ "_shasum": "aa84641d4db76b62abba5e45fd805ecbab140047",
"_from": "es5-ext@>=0.10.11 <0.11.0",
- "_npmVersion": "2.14.7",
- "_nodeVersion": "4.2.3",
+ "_npmVersion": "2.15.5",
+ "_nodeVersion": "4.4.5",
"_npmUser": {
"name": "medikoo",
"email": "medikoo+npm@medikoo.com"
},
"dist": {
- "shasum": "8184c3e705a820948c2dbe043849379b1dbd0c45",
- "tarball": "http://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz"
+ "shasum": "aa84641d4db76b62abba5e45fd805ecbab140047",
+ "tarball": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.12.tgz"
},
"maintainers": [
{
@@ -68,7 +68,11 @@
"email": "medikoo+npm@medikoo.com"
}
],
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/es5-ext-0.10.12.tgz_1467387765797_0.7073166444897652"
+ },
"directories": {},
- "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz",
+ "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.12.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/camel-to-hyphen.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
index 8b47a8158a29d3..64e35c03da0e9d 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/camel-to-hyphen.js
@@ -2,4 +2,6 @@
module.exports = function (t, a) {
a(t.call('razDwaTRzy4yFoo45My'), 'raz-dwa-t-rzy4y-foo45-my');
+ a(t.call('razDwaTRzy4yFoo45My-'), 'raz-dwa-t-rzy4y-foo45-my-');
+ a(t.call('razDwaTRzy4yFoo45My--'), 'raz-dwa-t-rzy4y-foo45-my--');
};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/hyphen-to-camel.js b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
index bd7ded4befbc7d..0118dd817319b7 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/string/#/hyphen-to-camel.js
@@ -2,4 +2,6 @@
module.exports = function (t, a) {
a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa'), 'razDwaTRzy4yRtr4Tiu45Pa');
+ a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa-'), 'razDwaTRzy4yRtr4Tiu45Pa-');
+ a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa--'), 'razDwaTRzy4yRtr4Tiu45Pa--');
};
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json
index 2d403b6b2f2f12..7ee8a118581791 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/package.json
@@ -52,7 +52,7 @@
],
"dist": {
"shasum": "ec56a749ee103e4e08c790b9c353df16055b97f9",
- "tarball": "http://registry.npmjs.org/array-index/-/array-index-1.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/array-index/-/array-index-1.0.0.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/array-index/-/array-index-1.0.0.tgz",
diff --git a/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json b/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json
index 974703c2eafbca..27de24ba9881a4 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json
+++ b/deps/npm/node_modules/node-gyp/node_modules/path-array/package.json
@@ -49,7 +49,7 @@
],
"dist": {
"shasum": "7e2f0f35f07a2015122b868b7eac0eb2c4fec271",
- "tarball": "http://registry.npmjs.org/path-array/-/path-array-1.0.1.tgz"
+ "tarball": "https://registry.npmjs.org/path-array/-/path-array-1.0.1.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/path-array/-/path-array-1.0.1.tgz",
diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json
index 7f74a8f64fb983..c4fb21f717e226 100644
--- a/deps/npm/node_modules/node-gyp/package.json
+++ b/deps/npm/node_modules/node-gyp/package.json
@@ -62,7 +62,7 @@
"homepage": "https://github.com/nodejs/node-gyp#readme",
"_id": "node-gyp@3.4.0",
"_shasum": "dda558393b3ecbbe24c9e6b8703c71194c63fa36",
- "_from": "node-gyp@latest",
+ "_from": "node-gyp@3.4.0",
"_npmVersion": "3.9.3",
"_nodeVersion": "6.2.1",
"_npmUser": {
diff --git a/deps/npm/node_modules/npm-registry-client/.travis.yml b/deps/npm/node_modules/npm-registry-client/.travis.yml
index 3669bc76e06c05..2993ae58c9afbe 100644
--- a/deps/npm/node_modules/npm-registry-client/.travis.yml
+++ b/deps/npm/node_modules/npm-registry-client/.travis.yml
@@ -1,9 +1,9 @@
language: node_js
node_js:
- - "0.12"
+ - "4"
+ - "6"
- "0.10"
- - "0.8"
- - iojs
+ - "0.12"
script: "npm test"
sudo: false
before_install:
diff --git a/deps/npm/node_modules/npm-registry-client/README.md b/deps/npm/node_modules/npm-registry-client/README.md
index 2caa3643708f80..9d81f4df39e0dd 100644
--- a/deps/npm/node_modules/npm-registry-client/README.md
+++ b/deps/npm/node_modules/npm-registry-client/README.md
@@ -259,6 +259,8 @@ caching logic directly.
* `etag` {String} The cached ETag. Optional.
* `lastModified` {String} The cached Last-Modified timestamp. Optional.
* `follow` {Boolean} Follow 302/301 responses. Optional (default: true).
+ * `streaming` {Boolean} Stream the request body as it comes, handling error
+ responses in a non-streaming way.
* `auth` {Credentials} Optional.
* `cb` {Function}
* `error` {Error | null}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js
index 13e61debfd4acb..9bf1c3066d1463 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/publish.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js
@@ -153,8 +153,9 @@ function putNext (registry, newVersion, root, current, auth, cb) {
case 'dist-tags':
case 'versions':
case '_attachments':
- for (var j in root[i])
+ for (var j in root[i]) {
current[i][j] = root[i][j]
+ }
break
// ignore these
diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js
index 567fc8dbe42b16..04be044d6a0e27 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/request.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/request.js
@@ -92,7 +92,16 @@ function regRequest (uri, params, cb_) {
}
function makeRequest (uri, params, cb_) {
- var cb = once(cb_)
+ var socket
+ var cb = once(function (er, parsed, raw, response) {
+ if (socket) {
+ // The socket might be returned to a pool for re-use, so don’t keep
+ // the 'error' listener from here attached.
+ socket.removeListener('error', cb)
+ }
+
+ return cb_(er, parsed, raw, response)
+ })
var parsed = url.parse(uri)
var headers = {}
@@ -146,13 +155,42 @@ function makeRequest (uri, params, cb_) {
this.log.http('request', params.method, parsed.href || '/')
var done = requestDone.call(this, params.method, uri, cb)
- var req = request(opts, decodeResponseBody(done))
+ var req = request(opts, params.streaming ? undefined : decodeResponseBody(done))
req.on('error', cb)
+
+ // This should not be necessary, as the HTTP implementation in Node
+ // passes errors occurring on the socket to the request itself. Being overly
+ // cautious comes at a low cost, though.
req.on('socket', function (s) {
- s.on('error', cb)
+ socket = s
+ socket.on('error', cb)
})
+ if (params.streaming) {
+ req.on('response', function (response) {
+ if (response.statusCode >= 400) {
+ var parts = []
+ response.on('data', function (data) {
+ parts.push(data)
+ })
+ response.on('end', function () {
+ decodeResponseBody(done)(null, response, Buffer.concat(parts))
+ })
+ } else {
+ response.on('end', function () {
+ // don't ever re-use connections that had server errors.
+ // those sockets connect to the Bad Place!
+ if (response.socket && response.statusCode > 500) {
+ response.socket.destroy()
+ }
+ })
+
+ return cb(null, response)
+ }
+ })
+ }
+
if (params.body && (params.body instanceof Stream)) {
params.body.pipe(req)
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js
index b55ae7e03dbd38..b16ad1343f560d 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/index.js
@@ -73,6 +73,10 @@ function isArrayish (arr) {
return /Array\]$/.test(Object.prototype.toString.call(arr))
}
+function isBufferish (p) {
+ return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
+}
+
function stringConcat (parts) {
var strings = []
var needsToString = false
@@ -82,8 +86,10 @@ function stringConcat (parts) {
strings.push(p)
} else if (Buffer.isBuffer(p)) {
strings.push(p)
+ } else if (isBufferish(p)) {
+ strings.push(new Buffer(p))
} else {
- strings.push(Buffer(p))
+ strings.push(new Buffer(String(p)))
}
}
if (Buffer.isBuffer(parts[0])) {
@@ -101,10 +107,11 @@ function bufferConcat (parts) {
var p = parts[i]
if (Buffer.isBuffer(p)) {
bufs.push(p)
- } else if (typeof p === 'string' || isArrayish(p)
- || (p && typeof p.subarray === 'function')) {
- bufs.push(Buffer(p))
- } else bufs.push(Buffer(String(p)))
+ } else if (isBufferish(p)) {
+ bufs.push(new Buffer(p))
+ } else {
+ bufs.push(new Buffer(String(p)))
+ }
}
return Buffer.concat(bufs)
}
@@ -121,7 +128,7 @@ function u8Concat (parts) {
var len = 0
for (var i = 0; i < parts.length; i++) {
if (typeof parts[i] === 'string') {
- parts[i] = Buffer(parts[i])
+ parts[i] = new Buffer(parts[i])
}
len += parts[i].length
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
index fd2590dddc5cbd..24d17ce396afa9 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "concat-stream",
- "version": "1.5.1",
+ "version": "1.5.2",
"description": "writable stream that concatenates strings or binary data and calls a callback with the result",
"tags": [
"stream",
@@ -54,28 +54,36 @@
"android-browser/4.2..latest"
]
},
- "gitHead": "522adc12d82f57c691a5f946fbc8ba08718dcdcb",
+ "gitHead": "731fedd137eae89d066c249fdca070f8f16afbb8",
"homepage": "https://github.com/maxogden/concat-stream#readme",
- "_id": "concat-stream@1.5.1",
- "_shasum": "f3b80acf9e1f48e3875c0688b41b6c31602eea1c",
- "_from": "concat-stream@>=1.4.6 <2.0.0",
- "_npmVersion": "2.14.2",
- "_nodeVersion": "4.0.0",
+ "_id": "concat-stream@1.5.2",
+ "_shasum": "708978624d856af41a5a741defdd261da752c266",
+ "_from": "concat-stream@>=1.5.2 <2.0.0",
+ "_npmVersion": "2.15.9",
+ "_nodeVersion": "4.4.3",
"_npmUser": {
- "name": "maxogden",
- "email": "max@maxogden.com"
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
},
"dist": {
- "shasum": "f3b80acf9e1f48e3875c0688b41b6c31602eea1c",
- "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz"
+ "shasum": "708978624d856af41a5a741defdd261da752c266",
+ "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz"
},
"maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ },
{
"name": "maxogden",
"email": "max@maxogden.com"
}
],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/concat-stream-1.5.2.tgz_1472715196934_0.010375389130786061"
+ },
"directories": {},
- "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz",
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md
index 1a16af94c40736..8ad4197c9ed9a6 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md
@@ -89,6 +89,8 @@ By default `concat-stream` will give you back the same data type as the type of
If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+If nothing is written to `writable` then `data` will be an empty array `[]`.
+
# error handling
`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md
index 09d9c8a81bf121..eee05f7bb61537 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/README.md
@@ -57,8 +57,10 @@ var operation = retry.operation({
### retry.operation([options])
-Creates a new `RetryOperation` object. See the `retry.timeouts()` function
-below for available `options`.
+Creates a new `RetryOperation` object. `options` is the same as `retry.timeouts()`'s `options`, with two additions:
+
+* `forever`: Whether to retry forever, defaults to `false`.
+* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`.
### retry.timeouts([options])
@@ -76,7 +78,7 @@ milliseconds. If `options` is an array, a copy of that array is returned.
The formula used to calculate the individual timeouts is:
```
-var Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout);
+Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout)
```
Have a look at [this article][article] for a better explanation of approach.
@@ -118,19 +120,27 @@ an array of method names which need to be wrapped.
```
retry.wrap(obj)
-retry.wrap(obj, ['method1', 'method2']);
+retry.wrap(obj, ['method1', 'method2'])
-retry.wrap(obj, {retries: 3});
+retry.wrap(obj, {retries: 3})
-retry.wrap(obj, {retries: 3}, ['method1', 'method2']);
+retry.wrap(obj, {retries: 3}, ['method1', 'method2'])
```
The `options` object can take any options that the usual call to `retry.operation` can take.
-### new RetryOperation(timeouts)
+### new RetryOperation(timeouts, [options])
Creates a new `RetryOperation` where `timeouts` is an array where each value is
a timeout given in milliseconds.
+Available options:
+* `forever`: Whether to retry forever, defaults to `false`.
+* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`.
+
+If `forever` is true, the following changes happen:
+* `RetryOperation.errors()` will only output an array of one item: the last error.
+* `RetryOperation` will repeatedly use the `timeouts` array. Once all of its timeouts have been used up, it restarts with the first timeout, then uses the second and so on.
+
#### retryOperation.errors()
Returns an array of all errors that have been passed to
@@ -157,11 +167,11 @@ Whenever your retry operation takes longer than `timeout` to execute, the timeou
#### retryOperation.try(fn)
-This is an alias for `retryOperation.attempt(fn)`. This is deprecated.
+This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead.
#### retryOperation.start(fn)
-This is an alias for `retryOperation.attempt(fn)`. This is deprecated.
+This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead.
#### retryOperation.retry(error)
@@ -171,6 +181,10 @@ has been reached.
Otherwise it returns `true`, and retries the operation after the timeout for
the current attempt number.
+#### retryOperation.stop()
+
+Allows you to stop the operation being retried. Useful for aborting the operation on a fatal error etc.
+
#### retryOperation.attempts()
Returns an int representing the number of attempts it took to call `fn` before it was successful.
@@ -180,13 +194,19 @@ Returns an int representing the number of attempts it took to call `fn` before i
retry is licensed under the MIT license.
-#Changelog
+# Changelog
+
+0.10.0 Adding `stop` functionality, thanks to @maxnachlinger.
+
+0.9.0 Adding `unref` functionality, thanks to @satazor.
+
+0.8.0 Implementing retry.wrap.
-0.7.0 Some bugfixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13).
+0.7.0 Some bug fixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13).
-0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in miliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called.
+0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in milliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called.
-0.5.0 Some minor refactorings.
+0.5.0 Some minor refactoring.
0.4.0 Changed retryOperation.try() to retryOperation.attempt(). Deprecated the aliases start() and try() for it.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js
index d6351e9d05bb33..446729b6f9af6b 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/dns.js
@@ -28,4 +28,4 @@ faultTolerantResolve('nodejs.org', function(err, errors, addresses) {
console.warn('addresses:');
console.log(addresses);
-});
+});
\ No newline at end of file
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/stop.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/stop.js
new file mode 100644
index 00000000000000..e1ceafeebafc51
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/example/stop.js
@@ -0,0 +1,40 @@
+var retry = require('../lib/retry');
+
+function attemptAsyncOperation(someInput, cb) {
+ var opts = {
+ retries: 2,
+ factor: 2,
+ minTimeout: 1 * 1000,
+ maxTimeout: 2 * 1000,
+ randomize: true
+ };
+ var operation = retry.operation(opts);
+
+ operation.attempt(function(currentAttempt) {
+ failingAsyncOperation(someInput, function(err, result) {
+
+ if (err && err.message === 'A fatal error') {
+ operation.stop();
+ return cb(err);
+ }
+
+ if (operation.retry(err)) {
+ return;
+ }
+
+ cb(operation.mainError(), operation.errors(), result);
+ });
+ });
+}
+
+attemptAsyncOperation('test input', function(err, errors, result) {
+ console.warn('err:');
+ console.log(err);
+
+ console.warn('result:');
+ console.log(result);
+});
+
+function failingAsyncOperation(input, cb) {
+ return setImmediate(cb.bind(null, new Error('A fatal error')));
+}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js
index 94685652c426fd..77428cfd0006fa 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry.js
@@ -1,10 +1,11 @@
var RetryOperation = require('./retry_operation');
exports.operation = function(options) {
- var retryForever = false;
- if (options && options.forever === true) retryForever = true;
var timeouts = exports.timeouts(options);
- return new RetryOperation(timeouts, retryForever);
+ return new RetryOperation(timeouts, {
+ forever: options && options.forever,
+ unref: options && options.unref
+ });
};
exports.timeouts = function(options) {
@@ -32,6 +33,10 @@ exports.timeouts = function(options) {
timeouts.push(this.createTimeout(i, opts));
}
+ if (options && options.forever && !timeouts.length) {
+ timeouts.push(this.createTimeout(i, opts));
+ }
+
// sort the array numerically ascending
timeouts.sort(function(a,b) {
return a - b;
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js
index 52b895544e6a58..2b3db8e1776973 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/lib/retry_operation.js
@@ -1,5 +1,11 @@
-function RetryOperation(timeouts, retryForever) {
+function RetryOperation(timeouts, options) {
+ // Compatibility for the old (timeouts, retryForever) signature
+ if (typeof options === 'boolean') {
+ options = { forever: options };
+ }
+
this._timeouts = timeouts;
+ this._options = options || {};
this._fn = null;
this._errors = [];
this._attempts = 1;
@@ -7,12 +13,21 @@ function RetryOperation(timeouts, retryForever) {
this._operationTimeoutCb = null;
this._timeout = null;
- if (!!retryForever) {
+ if (this._options.forever) {
this._cachedTimeouts = this._timeouts.slice(0);
}
}
module.exports = RetryOperation;
+RetryOperation.prototype.stop = function() {
+ if (this._timeout) {
+ clearTimeout(this._timeout);
+ }
+
+ this._timeouts = [];
+ this._cachedTimeouts = null;
+};
+
RetryOperation.prototype.retry = function(err) {
if (this._timeout) {
clearTimeout(this._timeout);
@@ -37,18 +52,26 @@ RetryOperation.prototype.retry = function(err) {
}
var self = this;
- setTimeout(function() {
+ var timer = setTimeout(function() {
self._attempts++;
if (self._operationTimeoutCb) {
self._timeout = setTimeout(function() {
self._operationTimeoutCb(self._attempts);
}, self._operationTimeout);
+
+ if (this._options.unref) {
+ self._timeout.unref();
+ }
}
self._fn(self._attempts);
}, timeout);
+ if (this._options.unref) {
+ timer.unref();
+ }
+
return true;
};
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json
index 058aefb3320608..28fc12960e99b1 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/package.json
@@ -7,7 +7,7 @@
"name": "retry",
"description": "Abstraction for exponential and custom retry strategies for failed operations.",
"license": "MIT",
- "version": "0.8.0",
+ "version": "0.10.0",
"homepage": "https://github.com/tim-kos/node-retry",
"repository": {
"type": "git",
@@ -25,16 +25,16 @@
"fake": "0.2.0",
"far": "0.0.1"
},
- "gitHead": "9446e803d6a41ae08732a4a215ae5bf1ff1ccfdd",
+ "gitHead": "0616e6a6ebc49b5a36b619c8f7c414ced8c3813b",
"bugs": {
"url": "https://github.com/tim-kos/node-retry/issues"
},
- "_id": "retry@0.8.0",
+ "_id": "retry@0.10.0",
"scripts": {},
- "_shasum": "2367628dc0edb247b1eab649dc53ac8628ac2d5f",
- "_from": "retry@>=0.8.0 <0.9.0",
+ "_shasum": "649e15ca408422d98318161935e7f7d652d435dd",
+ "_from": "retry@>=0.10.0 <0.11.0",
"_npmVersion": "2.1.7",
- "_nodeVersion": "0.10.33",
+ "_nodeVersion": "4.2.1",
"_npmUser": {
"name": "tim-kos",
"email": "tim@debuggable.com"
@@ -46,9 +46,13 @@
}
],
"dist": {
- "shasum": "2367628dc0edb247b1eab649dc53ac8628ac2d5f",
- "tarball": "https://registry.npmjs.org/retry/-/retry-0.8.0.tgz"
+ "shasum": "649e15ca408422d98318161935e7f7d652d435dd",
+ "tarball": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz"
},
- "_resolved": "https://registry.npmjs.org/retry/-/retry-0.8.0.tgz",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/retry-0.10.0.tgz_1471682099847_0.5031970851123333"
+ },
+ "_resolved": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-forever.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-forever.js
new file mode 100644
index 00000000000000..b41307cb529f12
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-forever.js
@@ -0,0 +1,24 @@
+var common = require('../common');
+var assert = common.assert;
+var retry = require(common.dir.lib + '/retry');
+
+(function testForeverUsesFirstTimeout() {
+ var operation = retry.operation({
+ retries: 0,
+ minTimeout: 100,
+ maxTimeout: 100,
+ forever: true
+ });
+
+ operation.attempt(function(numAttempt) {
+ console.log('>numAttempt', numAttempt);
+ var err = new Error("foo");
+ if (numAttempt == 10) {
+ operation.stop();
+ }
+
+ if (operation.retry(err)) {
+ return;
+ }
+ });
+})();
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js
index cecfa3b7310013..916936424f073b 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/retry/test/integration/test-retry-operation.js
@@ -104,3 +104,73 @@ var retry = require(common.dir.lib + '/retry');
fn();
})();
+
+(function testRetryForeverNoRetries() {
+ var error = new Error('some error');
+ var delay = 50
+ var operation = retry.operation({
+ retries: null,
+ forever: true,
+ minTimeout: delay,
+ maxTimeout: delay
+ });
+
+ var attempts = 0;
+ var startTime = new Date().getTime();
+
+ var finalCallback = fake.callback('finalCallback');
+ fake.expectAnytime(finalCallback);
+
+ var fn = function() {
+ operation.attempt(function(currentAttempt) {
+ attempts++;
+ assert.equal(currentAttempt, attempts);
+ if (attempts !== 4 && operation.retry(error)) {
+ return;
+ }
+
+ var endTime = new Date().getTime();
+ var minTime = startTime + (delay * 3);
+ var maxTime = minTime + 20 // add a little headroom for code execution time
+ assert(endTime > minTime)
+ assert(endTime < maxTime)
+ assert.strictEqual(attempts, 4);
+ assert.strictEqual(operation.attempts(), attempts);
+ assert.strictEqual(operation.mainError(), error);
+ finalCallback();
+ });
+ };
+
+ fn();
+})();
+
+(function testStop() {
+ var error = new Error('some error');
+ var operation = retry.operation([1, 2, 3]);
+ var attempts = 0;
+
+ var finalCallback = fake.callback('finalCallback');
+ fake.expectAnytime(finalCallback);
+
+ var fn = function() {
+ operation.attempt(function(currentAttempt) {
+ attempts++;
+ assert.equal(currentAttempt, attempts);
+
+ if (attempts === 2) {
+ operation.stop();
+
+ assert.strictEqual(attempts, 2);
+ assert.strictEqual(operation.attempts(), attempts);
+ assert.strictEqual(operation.mainError(), error);
+ finalCallback();
+ }
+
+ if (operation.retry(error)) {
+ return;
+ }
+ });
+ };
+
+ fn();
+})();
diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json
index 1eb87d056b2d5f..3a4ea7704aaa27 100644
--- a/deps/npm/node_modules/npm-registry-client/package.json
+++ b/deps/npm/node_modules/npm-registry-client/package.json
@@ -6,7 +6,7 @@
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "7.1.2",
+ "version": "7.2.1",
"repository": {
"url": "git+https://github.com/npm/npm-registry-client.git"
},
@@ -15,48 +15,46 @@
"test": "standard && tap test/*.js"
},
"dependencies": {
- "chownr": "^1.0.1",
- "concat-stream": "^1.4.6",
- "graceful-fs": "^4.1.2",
- "mkdirp": "^0.5.0",
+ "concat-stream": "^1.5.2",
+ "graceful-fs": "^4.1.6",
"normalize-package-data": "~1.0.1 || ^2.0.0",
"npm-package-arg": "^3.0.0 || ^4.0.0",
- "once": "^1.3.0",
- "request": "^2.47.0",
- "retry": "^0.8.0",
- "rimraf": "2",
+ "once": "^1.3.3",
+ "request": "^2.74.0",
+ "retry": "^0.10.0",
"semver": "2 >=2.2.1 || 3.x || 4 || 5",
"slide": "^1.1.3",
"npmlog": "~2.0.0 || ~3.1.0"
},
"devDependencies": {
- "negotiator": "^0.4.9",
- "nock": "^0.56.0",
- "readable-stream": "^2.0.2",
- "standard": "^4.0.0",
- "tap": "^1.2.0"
+ "negotiator": "^0.6.1",
+ "nock": "^8.0.0",
+ "readable-stream": "^2.1.5",
+ "rimraf": "^2.5.4",
+ "standard": "^8.0.0",
+ "tap": "^7.0.0"
},
"optionalDependencies": {
"npmlog": "~2.0.0 || ~3.1.0"
},
"license": "ISC",
- "gitHead": "0b595c4769f314a12661d537a328cf4e5658a00f",
+ "gitHead": "debec76884db8092c2c7a21ab5b4ed083f8ce2c9",
"bugs": {
"url": "https://github.com/npm/npm-registry-client/issues"
},
"homepage": "https://github.com/npm/npm-registry-client#readme",
- "_id": "npm-registry-client@7.1.2",
- "_shasum": "ddf243a2bd149d35172fe680aff40dfa20054bc3",
- "_from": "npm-registry-client@>=7.1.2 <7.2.0",
- "_npmVersion": "3.9.2",
- "_nodeVersion": "4.4.0",
+ "_id": "npm-registry-client@7.2.1",
+ "_shasum": "c792266b088cc313f8525e7e35248626c723db75",
+ "_from": "npm-registry-client@7.2.1",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.3.1",
"_npmUser": {
- "name": "iarna",
- "email": "me@re-becca.org"
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
},
"dist": {
- "shasum": "ddf243a2bd149d35172fe680aff40dfa20054bc3",
- "tarball": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.2.tgz"
+ "shasum": "c792266b088cc313f8525e7e35248626c723db75",
+ "tarball": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.2.1.tgz"
},
"maintainers": [
{
@@ -78,8 +76,9 @@
],
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/npm-registry-client-7.1.2.tgz_1466040796551_0.645394338760525"
+ "tmp": "tmp/npm-registry-client-7.2.1.tgz_1472871043942_0.2117650501895696"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.2.tgz"
+ "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.2.1.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/00-setup.js b/deps/npm/node_modules/npm-registry-client/test/00-setup.js
index 747768fb85f8c4..fb9585a4285d8f 100644
--- a/deps/npm/node_modules/npm-registry-client/test/00-setup.js
+++ b/deps/npm/node_modules/npm-registry-client/test/00-setup.js
@@ -1,8 +1,9 @@
-var tap = require('tap')
+var join = require('path').join
var rimraf = require('rimraf')
+var tap = require('tap')
tap.test('setup', function (t) {
- rimraf(__dirname + '/fixtures/cache', function (er) {
+ rimraf(join(__dirname, 'fixtures', 'cache'), function (er) {
if (er) throw er
t.pass('cache cleaned')
t.end()
diff --git a/deps/npm/node_modules/npm-registry-client/test/config-defaults.js b/deps/npm/node_modules/npm-registry-client/test/config-defaults.js
index a432da85811955..ca6983a1ba5a4a 100644
--- a/deps/npm/node_modules/npm-registry-client/test/config-defaults.js
+++ b/deps/npm/node_modules/npm-registry-client/test/config-defaults.js
@@ -33,7 +33,7 @@ test('config defaults', function (t) {
})
test('missing HTTPS proxy defaults to HTTP proxy', function (t) {
- var client = common.freshClient({ proxy: { http: 'http://proxy.npm:8088/' }})
+ var client = common.freshClient({ proxy: { http: 'http://proxy.npm:8088/' } })
t.equal(client.config.proxy.http, 'http://proxy.npm:8088/', 'HTTP proxy set')
t.equal(client.config.proxy.http, client.config.proxy.https, 'HTTP === HTTPS')
diff --git a/deps/npm/node_modules/npm-registry-client/test/fetch-streaming.js b/deps/npm/node_modules/npm-registry-client/test/fetch-streaming.js
new file mode 100644
index 00000000000000..72aeea0beb7d55
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/fetch-streaming.js
@@ -0,0 +1,58 @@
+var test = require('tap').test
+var concat = require('concat-stream')
+
+var server = require('./lib/server.js')
+var common = require('./lib/common.js')
+var client = common.freshClient()
+
+var testData = JSON.stringify({test: true})
+var errorData = JSON.stringify({error: 'it went bad'})
+
+test('streaming fetch', function (t) {
+ server.expect('/test', function (req, res) {
+ t.equal(req.method, 'GET', 'got expected method')
+
+ res.writeHead(200, {
+ 'content-type': 'application/json'
+ })
+
+ res.end(testData)
+ })
+
+ server.expect('/error', function (req, res) {
+ t.equal(req.method, 'GET', 'got expected method')
+
+ res.writeHead(401, {
+ 'content-type': 'application/json'
+ })
+
+ res.end(errorData)
+ })
+
+ client.fetch(
+ 'http://localhost:1337/test',
+ { streaming: true },
+ function (er, res) {
+ t.ifError(er, 'loaded successfully')
+
+ var sink = concat(function (data) {
+ t.deepEqual(data.toString(), testData)
+ client.fetch(
+ 'http://localhost:1337/error',
+ { streaming: true },
+ function (er, res) {
+ t.ok(er, 'got an error')
+ server.close()
+ t.end()
+ }
+ )
+ })
+
+ res.on('error', function (error) {
+ t.ifError(error, 'no errors on stream')
+ })
+
+ res.pipe(sink)
+ }
+ )
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/initialize.js b/deps/npm/node_modules/npm-registry-client/test/initialize.js
index 3856b67b45e0f8..4a97bd5fdf94c0 100644
--- a/deps/npm/node_modules/npm-registry-client/test/initialize.js
+++ b/deps/npm/node_modules/npm-registry-client/test/initialize.js
@@ -83,7 +83,7 @@ test('referer set on client', function (t) {
})
test('initializing with proxy explicitly disabled', function (t) {
- var client = new Client({ proxy: { http: false }})
+ var client = new Client({ proxy: { http: false } })
var options = client.initialize(
'http://localhost:1337/',
'GET',
@@ -96,7 +96,7 @@ test('initializing with proxy explicitly disabled', function (t) {
})
test('initializing with proxy undefined', function (t) {
- var client = new Client({ proxy: { http: undefined }})
+ var client = new Client({ proxy: { http: undefined } })
var options = client.initialize(
'http://localhost:1337/',
'GET',
diff --git a/deps/npm/node_modules/npm-registry-client/test/lib/common.js b/deps/npm/node_modules/npm-registry-client/test/lib/common.js
index 78e543f699a168..ea48d3014988ec 100644
--- a/deps/npm/node_modules/npm-registry-client/test/lib/common.js
+++ b/deps/npm/node_modules/npm-registry-client/test/lib/common.js
@@ -10,6 +10,14 @@ if (!global.setImmediate || !require('timers').setImmediate) {
}
}
+// See https://github.com/npm/npm-registry-client/pull/142 for background.
+// Note: `process.on('warning')` only works with Node >= 6.
+process.on('warning', function (warning) {
+ if (/Possible EventEmitter memory leak detected/.test(warning.message)) {
+ throw new Error('There should not be any EventEmitter memory leaks')
+ }
+})
+
module.exports = {
port: server.port,
registry: REGISTRY,
diff --git a/deps/npm/node_modules/npm-registry-client/test/zz-cleanup.js b/deps/npm/node_modules/npm-registry-client/test/zz-cleanup.js
index 35253c7acd7226..16e4ee8a1d449c 100644
--- a/deps/npm/node_modules/npm-registry-client/test/zz-cleanup.js
+++ b/deps/npm/node_modules/npm-registry-client/test/zz-cleanup.js
@@ -1,8 +1,9 @@
-var tap = require('tap')
+var join = require('path').join
var rimraf = require('rimraf')
+var tap = require('tap')
tap.test('teardown', function (t) {
- rimraf(__dirname + '/fixtures/cache', function (er) {
+ rimraf(join(__dirname, 'fixtures', 'cache'), function (er) {
if (er) throw er
t.pass('cache cleaned')
t.end()
diff --git a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js
index c9da9cd1c90f0e..3a645ec9329acd 100644
--- a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js
+++ b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js
@@ -4,7 +4,7 @@ exports.username = username
var requirements = exports.requirements = {
username: {
- length: 'Name length must be less than or equal to 576 characters long',
+ length: 'Name length must be less than or equal to 214 characters long',
lowerCase: 'Name must be lowercase',
urlSafe: 'Name may not contain non-url-safe chars',
dot: 'Name may not start with "."'
@@ -28,7 +28,7 @@ function username (un) {
return new Error(requirements.username.dot)
}
- if (un.length > 576) {
+ if (un.length > 214) {
return new Error(requirements.username.length)
}
diff --git a/deps/npm/node_modules/npm-user-validate/package.json b/deps/npm/node_modules/npm-user-validate/package.json
index 8109a38fa9549e..1b355564a0c2b7 100644
--- a/deps/npm/node_modules/npm-user-validate/package.json
+++ b/deps/npm/node_modules/npm-user-validate/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-user-validate",
- "version": "0.1.4",
+ "version": "0.1.5",
"description": "User validations for npm",
"main": "npm-user-validate.js",
"devDependencies": {
@@ -23,23 +23,23 @@
"email": "rok@kowalski.gd"
},
"license": "BSD-2-Clause",
- "gitHead": "ab804940b6846f8cc63f87692cea85b1906c967a",
+ "gitHead": "688552a47e6c22cd07206894dcd21b9d7a37ee56",
"bugs": {
"url": "https://github.com/npm/npm-user-validate/issues"
},
"homepage": "https://github.com/npm/npm-user-validate#readme",
- "_id": "npm-user-validate@0.1.4",
- "_shasum": "18fcbe53cf921eb8e6339314665b187955b1a837",
- "_from": "npm-user-validate@>=0.1.4 <0.2.0",
- "_npmVersion": "3.9.6",
+ "_id": "npm-user-validate@0.1.5",
+ "_shasum": "52465d50c2d20294a57125b996baedbf56c5004b",
+ "_from": "npm-user-validate@0.1.5",
+ "_npmVersion": "3.10.1",
"_nodeVersion": "5.11.0",
"_npmUser": {
"name": "aredridel",
"email": "aria@npmjs.com"
},
"dist": {
- "shasum": "18fcbe53cf921eb8e6339314665b187955b1a837",
- "tarball": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz"
+ "shasum": "52465d50c2d20294a57125b996baedbf56c5004b",
+ "tarball": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.5.tgz"
},
"maintainers": [
{
@@ -56,9 +56,10 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/npm-user-validate-0.1.4.tgz_1466105686124_0.06683815410360694"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/npm-user-validate-0.1.5.tgz_1466436459441_0.15483755711466074"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz"
+ "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.5.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/npm-user-validate/test/username.test.js b/deps/npm/node_modules/npm-user-validate/test/username.test.js
index 83528eec82a76d..aa0e6b33def686 100644
--- a/deps/npm/node_modules/npm-user-validate/test/username.test.js
+++ b/deps/npm/node_modules/npm-user-validate/test/username.test.js
@@ -22,15 +22,15 @@ test('username may not start with "."', function (t) {
t.end()
})
-test('username may not be longer than 576 characters', function (t) {
- var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-and-a-pickle')
+test('username may not be longer than 214 characters', function (t) {
+ var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-and-pickle')
t.type(err, 'object')
- t.match(err.message, /less than or equal to 576/)
+ t.match(err.message, /less than or equal to 214/)
t.end()
});
-test('username may be as long as 576 characters', function (t) {
- var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-beef')
+test('username may be as long as 214 characters', function (t) {
+ var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-porchetta')
t.type(err, 'null')
t.end()
});
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/LICENSE
similarity index 100%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/LICENSE
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/LICENSE
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/README.md
similarity index 100%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/README.md
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/index.js
similarity index 100%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/index.js
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/package.json
similarity index 97%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/package.json
index a8e4a8520c7ad0..46ff731bf73f14 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._baseslice/package.json
@@ -39,7 +39,7 @@
},
"_id": "lodash._baseslice@4.0.0",
"_shasum": "f5ce1df982948ecaff63f223853415b7b9763704",
- "_from": "lodash._baseslice@>=4.0.0 <4.1.0",
+ "_from": "lodash._baseslice@4.0.0",
"_npmVersion": "2.14.15",
"_nodeVersion": "5.4.0",
"_npmUser": {
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/LICENSE
similarity index 100%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/LICENSE
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/README.md
similarity index 100%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/README.md
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/index.js
similarity index 100%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/index.js
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/package.json
similarity index 97%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/package.json
index 474798f13467c2..241f9871eee5cd 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring/package.json
@@ -39,7 +39,7 @@
},
"_id": "lodash._basetostring@4.12.0",
"_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df",
- "_from": "lodash._basetostring@>=4.12.0 <4.13.0",
+ "_from": "lodash._basetostring@4.12.0",
"_npmVersion": "2.15.5",
"_nodeVersion": "5.5.0",
"_npmUser": {
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json
deleted file mode 100644
index a8e4a8520c7ad0..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "name": "lodash._baseslice",
- "version": "4.0.0",
- "description": "The internal lodash function `baseSlice` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- {
- "name": "Blaine Bublitz",
- "email": "blaine@iceddev.com",
- "url": "https://github.com/phated"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "https://mathiasbynens.be/"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "_id": "lodash._baseslice@4.0.0",
- "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704",
- "_from": "lodash._baseslice@>=4.0.0 <4.1.0",
- "_npmVersion": "2.14.15",
- "_nodeVersion": "5.4.0",
- "_npmUser": {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- "dist": {
- "shasum": "f5ce1df982948ecaff63f223853415b7b9763704",
- "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz"
- },
- "maintainers": [
- {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- },
- {
- "name": "phated",
- "email": "blaine@iceddev.com"
- }
- ],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json
deleted file mode 100644
index 474798f13467c2..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "name": "lodash._basetostring",
- "version": "4.12.0",
- "description": "The internal lodash function `baseToString` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- {
- "name": "Blaine Bublitz",
- "email": "blaine.bublitz@gmail.com",
- "url": "https://github.com/phated"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "https://mathiasbynens.be/"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "_id": "lodash._basetostring@4.12.0",
- "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df",
- "_from": "lodash._basetostring@>=4.12.0 <4.13.0",
- "_npmVersion": "2.15.5",
- "_nodeVersion": "5.5.0",
- "_npmUser": {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- "dist": {
- "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df",
- "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz"
- },
- "maintainers": [
- {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- },
- {
- "name": "phated",
- "email": "blaine@iceddev.com"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md
deleted file mode 100644
index 75aa6b0699b4df..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash.tostring v4.1.3
-
-The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.tostring
-```
-
-In Node.js:
-```js
-var toString = require('lodash.tostring');
-```
-
-See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json
deleted file mode 100644
index dca724cd869c8a..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "name": "lodash.tostring",
- "version": "4.1.3",
- "description": "The lodash method `_.toString` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": [
- "lodash-modularized",
- "tostring"
- ],
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- {
- "name": "Blaine Bublitz",
- "email": "blaine.bublitz@gmail.com",
- "url": "https://github.com/phated"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "https://mathiasbynens.be/"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "_id": "lodash.tostring@4.1.3",
- "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825",
- "_from": "lodash.tostring@>=4.0.0 <5.0.0",
- "_npmVersion": "2.15.5",
- "_nodeVersion": "5.5.0",
- "_npmUser": {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- "dist": {
- "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825",
- "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz"
- },
- "maintainers": [
- {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- },
- {
- "name": "phated",
- "email": "blaine.bublitz@gmail.com"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE
deleted file mode 100644
index b054ca5a3ac7d6..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md
deleted file mode 100644
index 8cd4181ccdc00d..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash._baseslice v4.0.0
-
-The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._baseslice
-```
-
-In Node.js:
-```js
-var baseSlice = require('lodash._baseslice');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js
deleted file mode 100644
index 59293c3d0037a8..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * lodash 4.0.0 (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
- * Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
- */
-
-/**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
-function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
-}
-
-module.exports = baseSlice;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE
deleted file mode 100644
index e0c69d56032d15..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE
+++ /dev/null
@@ -1,47 +0,0 @@
-Copyright jQuery Foundation and other contributors
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/lodash/lodash
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code displayed within the prose of the
-documentation.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-Files located in the node_modules and vendor directories are externally
-maintained libraries used by this software which have their own
-licenses; we recommend you read them, as their terms may differ from the
-terms above.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md
deleted file mode 100644
index ba060c94dadea0..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash._basetostring v4.12.0
-
-The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._basetostring
-```
-
-In Node.js:
-```js
-var baseToString = require('lodash._basetostring');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js
deleted file mode 100644
index d5848107499c34..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
-/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
-/** Detect free variable `window`. */
-var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
-/** Detect `this` as the global object. */
-var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
-/**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var Symbol = root.Symbol;
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
-/**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
-function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
-
-module.exports = baseToString;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE
deleted file mode 100644
index e0c69d56032d15..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE
+++ /dev/null
@@ -1,47 +0,0 @@
-Copyright jQuery Foundation and other contributors
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/lodash/lodash
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code displayed within the prose of the
-documentation.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-Files located in the node_modules and vendor directories are externally
-maintained libraries used by this software which have their own
-licenses; we recommend you read them, as their terms may differ from the
-terms above.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md
deleted file mode 100644
index 75aa6b0699b4df..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash.tostring v4.1.3
-
-The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash.tostring
-```
-
-In Node.js:
-```js
-var toString = require('lodash.tostring');
-```
-
-See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js
deleted file mode 100644
index 8a2cde39290e82..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
-/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
-/** Detect free variable `window`. */
-var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
-/** Detect `this` as the global object. */
-var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
-/**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var Symbol = root.Symbol;
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
-/**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
-function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
-
-/**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
-function toString(value) {
- return value == null ? '' : baseToString(value);
-}
-
-module.exports = toString;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json
deleted file mode 100644
index dca724cd869c8a..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "name": "lodash.tostring",
- "version": "4.1.3",
- "description": "The lodash method `_.toString` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "keywords": [
- "lodash-modularized",
- "tostring"
- ],
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- {
- "name": "Blaine Bublitz",
- "email": "blaine.bublitz@gmail.com",
- "url": "https://github.com/phated"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "https://mathiasbynens.be/"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "_id": "lodash.tostring@4.1.3",
- "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825",
- "_from": "lodash.tostring@>=4.0.0 <5.0.0",
- "_npmVersion": "2.15.5",
- "_nodeVersion": "5.5.0",
- "_npmUser": {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- "dist": {
- "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825",
- "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz"
- },
- "maintainers": [
- {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- },
- {
- "name": "phated",
- "email": "blaine.bublitz@gmail.com"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE
deleted file mode 100644
index b054ca5a3ac7d6..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright 2012-2016 The Dojo Foundation
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md
deleted file mode 100644
index 8cd4181ccdc00d..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash._baseslice v4.0.0
-
-The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._baseslice
-```
-
-In Node.js:
-```js
-var baseSlice = require('lodash._baseslice');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js
deleted file mode 100644
index 59293c3d0037a8..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * lodash 4.0.0 (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation
- * Based on Underscore.js 1.8.3
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license
- */
-
-/**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
-function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
-}
-
-module.exports = baseSlice;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json
deleted file mode 100644
index a8e4a8520c7ad0..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "name": "lodash._baseslice",
- "version": "4.0.0",
- "description": "The internal lodash function `baseSlice` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- {
- "name": "Blaine Bublitz",
- "email": "blaine@iceddev.com",
- "url": "https://github.com/phated"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "https://mathiasbynens.be/"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "_id": "lodash._baseslice@4.0.0",
- "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704",
- "_from": "lodash._baseslice@>=4.0.0 <4.1.0",
- "_npmVersion": "2.14.15",
- "_nodeVersion": "5.4.0",
- "_npmUser": {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- "dist": {
- "shasum": "f5ce1df982948ecaff63f223853415b7b9763704",
- "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz"
- },
- "maintainers": [
- {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- },
- {
- "name": "phated",
- "email": "blaine@iceddev.com"
- }
- ],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE
deleted file mode 100644
index e0c69d56032d15..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE
+++ /dev/null
@@ -1,47 +0,0 @@
-Copyright jQuery Foundation and other contributors
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/lodash/lodash
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code displayed within the prose of the
-documentation.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-Files located in the node_modules and vendor directories are externally
-maintained libraries used by this software which have their own
-licenses; we recommend you read them, as their terms may differ from the
-terms above.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md
deleted file mode 100644
index ba060c94dadea0..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash._basetostring v4.12.0
-
-The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._basetostring
-```
-
-In Node.js:
-```js
-var baseToString = require('lodash._basetostring');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js
deleted file mode 100644
index d5848107499c34..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
-/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
-/** Detect free variable `window`. */
-var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
-/** Detect `this` as the global object. */
-var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
-/**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var Symbol = root.Symbol;
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
-/**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
-function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
-
-module.exports = baseToString;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json
deleted file mode 100644
index 474798f13467c2..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "name": "lodash._basetostring",
- "version": "4.12.0",
- "description": "The internal lodash function `baseToString` exported as a module.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "license": "MIT",
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- },
- {
- "name": "Blaine Bublitz",
- "email": "blaine.bublitz@gmail.com",
- "url": "https://github.com/phated"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "https://mathiasbynens.be/"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "_id": "lodash._basetostring@4.12.0",
- "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df",
- "_from": "lodash._basetostring@>=4.12.0 <4.13.0",
- "_npmVersion": "2.15.5",
- "_nodeVersion": "5.5.0",
- "_npmUser": {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- "dist": {
- "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df",
- "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz"
- },
- "maintainers": [
- {
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
- },
- {
- "name": "mathias",
- "email": "mathias@qiwi.be"
- },
- {
- "name": "phated",
- "email": "blaine@iceddev.com"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE
deleted file mode 100644
index e0c69d56032d15..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE
+++ /dev/null
@@ -1,47 +0,0 @@
-Copyright jQuery Foundation and other contributors
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/lodash/lodash
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code displayed within the prose of the
-documentation.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-Files located in the node_modules and vendor directories are externally
-maintained libraries used by this software which have their own
-licenses; we recommend you read them, as their terms may differ from the
-terms above.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js
deleted file mode 100644
index 8a2cde39290e82..00000000000000
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
-/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
-/** Detect free variable `window`. */
-var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
-/** Detect `this` as the global object. */
-var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
-/**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Built-in value references. */
-var Symbol = root.Symbol;
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
-/**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
-function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
-
-/**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
-function toString(value) {
- return value == null ? '' : baseToString(value);
-}
-
-module.exports = toString;
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/LICENSE
similarity index 100%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/LICENSE
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/README.md
similarity index 80%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/README.md
index 75aa6b0699b4df..95f165b0ab08c0 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/README.md
@@ -1,4 +1,4 @@
-# lodash.tostring v4.1.3
+# lodash.tostring v4.1.4
The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var toString = require('lodash.tostring');
```
-See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details.
+See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.4-npm-packages/lodash.tostring) for more details.
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/index.js
similarity index 68%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/index.js
index 8a2cde39290e82..3dab2b4b99bf3c 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/index.js
@@ -13,54 +13,14 @@ var INFINITY = 1 / 0;
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
/** Detect free variable `global` from Node.js. */
-var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
-/** Detect free variable `window`. */
-var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-/** Detect `this` as the global object. */
-var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
-/**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -135,8 +95,7 @@ function isObjectLike(value) {
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified,
- * else `false`.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/package.json
similarity index 76%
rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json
rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/package.json
index dca724cd869c8a..2c171d1472653f 100644
--- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json
+++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.tostring/package.json
@@ -1,6 +1,6 @@
{
"name": "lodash.tostring",
- "version": "4.1.3",
+ "version": "4.1.4",
"description": "The lodash method `_.toString` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -41,18 +41,18 @@
"bugs": {
"url": "https://github.com/lodash/lodash/issues"
},
- "_id": "lodash.tostring@4.1.3",
- "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825",
- "_from": "lodash.tostring@>=4.0.0 <5.0.0",
- "_npmVersion": "2.15.5",
- "_nodeVersion": "5.5.0",
+ "_id": "lodash.tostring@4.1.4",
+ "_shasum": "560c27d1f8eadde03c2cce198fef5c031d8298fb",
+ "_from": "lodash.tostring@4.1.4",
+ "_npmVersion": "2.15.9",
+ "_nodeVersion": "4.2.4",
"_npmUser": {
"name": "jdalton",
"email": "john.david.dalton@gmail.com"
},
"dist": {
- "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825",
- "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz"
+ "shasum": "560c27d1f8eadde03c2cce198fef5c031d8298fb",
+ "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.4.tgz"
},
"maintainers": [
{
@@ -69,10 +69,9 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/lodash.tostring-4.1.4.tgz_1469458352677_0.677248232299462"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.4.tgz"
}
diff --git a/deps/npm/node_modules/once/README.md b/deps/npm/node_modules/once/README.md
index a2981ea0705196..1f1ffca9330e3c 100644
--- a/deps/npm/node_modules/once/README.md
+++ b/deps/npm/node_modules/once/README.md
@@ -49,3 +49,31 @@ function load (cb) {
})
}
```
+
+## `once.strict(func)`
+
+Throw an error if the function is called twice.
+
+Some functions are expected to be called only once. Using `once` for them would
+potentially hide logical errors.
+
+In the example below, the `greet` function has to call the callback only once:
+
+```javascript
+function greet (name, cb) {
+ // return is missing from the if statement
+ // when no name is passed, the callback is called twice
+ if (!name) cb('Hello anonymous')
+ cb('Hello ' + name)
+}
+
+function log (msg) {
+ console.log(msg)
+}
+
+// this will print 'Hello anonymous' but the logical error will be missed
+greet(null, once(msg))
+
+// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
+greet(null, once.strict(msg))
+```
diff --git a/deps/npm/node_modules/once/once.js b/deps/npm/node_modules/once/once.js
index 2e1e721bfecec3..235406736d9d94 100644
--- a/deps/npm/node_modules/once/once.js
+++ b/deps/npm/node_modules/once/once.js
@@ -1,5 +1,6 @@
var wrappy = require('wrappy')
module.exports = wrappy(once)
+module.exports.strict = wrappy(onceStrict)
once.proto = once(function () {
Object.defineProperty(Function.prototype, 'once', {
@@ -8,6 +9,13 @@ once.proto = once(function () {
},
configurable: true
})
+
+ Object.defineProperty(Function.prototype, 'onceStrict', {
+ value: function () {
+ return onceStrict(this)
+ },
+ configurable: true
+ })
})
function once (fn) {
@@ -19,3 +27,16 @@ function once (fn) {
f.called = false
return f
}
+
+function onceStrict (fn) {
+ var f = function () {
+ if (f.called)
+ throw new Error(f.onceError)
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ var name = fn.name || 'Function wrapped with `once`'
+ f.onceError = name + " shouldn't be called more than once"
+ f.called = false
+ return f
+}
diff --git a/deps/npm/node_modules/once/package.json b/deps/npm/node_modules/once/package.json
index dac31323c40212..1e957cff706387 100644
--- a/deps/npm/node_modules/once/package.json
+++ b/deps/npm/node_modules/once/package.json
@@ -1,6 +1,6 @@
{
"name": "once",
- "version": "1.3.3",
+ "version": "1.4.0",
"description": "Run a function exactly one time",
"main": "once.js",
"directories": {
@@ -10,7 +10,7 @@
"wrappy": "1"
},
"devDependencies": {
- "tap": "^1.2.0"
+ "tap": "^7.0.1"
},
"scripts": {
"test": "tap test/*.js"
@@ -34,14 +34,34 @@
"url": "http://blog.izs.me/"
},
"license": "ISC",
- "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n",
- "readmeFilename": "README.md",
+ "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6",
"bugs": {
"url": "https://github.com/isaacs/once/issues"
},
"homepage": "https://github.com/isaacs/once#readme",
- "_id": "once@1.3.3",
- "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20",
- "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
- "_from": "once@>=1.3.3 <1.4.0"
+ "_id": "once@1.4.0",
+ "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
+ "_from": "once@1.4.0",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.5.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "dist": {
+ "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
+ "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661"
+ },
+ "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/readable-stream/.travis.yml
index ae0156a9bbb156..84504c98f55d05 100644
--- a/deps/npm/node_modules/readable-stream/.travis.yml
+++ b/deps/npm/node_modules/readable-stream/.travis.yml
@@ -7,9 +7,6 @@ notifications:
email: false
matrix:
fast_finish: true
- allow_failures:
- - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
include:
- node_js: '0.8'
env: TASK=test
@@ -29,6 +26,8 @@ matrix:
env: TASK=test
- node_js: 5
env: TASK=test
+ - node_js: 6
+ env: TASK=test
- node_js: 5
env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
- node_js: 5
@@ -39,10 +38,6 @@ matrix:
env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest"
- node_js: 5
env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest"
- - node_js: 5
- env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest"
- node_js: 5
env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
- node_js: 5
diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md
index ae9e3363c8e8a3..596943f00dc773 100644
--- a/deps/npm/node_modules/readable-stream/README.md
+++ b/deps/npm/node_modules/readable-stream/README.md
@@ -1,6 +1,6 @@
# readable-stream
-***Node-core v6.1.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+***Node-core v6.3.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
diff --git a/deps/npm/node_modules/readable-stream/doc/stream.md b/deps/npm/node_modules/readable-stream/doc/stream.md
index c907ca0e7b726a..fc269c8e38f829 100644
--- a/deps/npm/node_modules/readable-stream/doc/stream.md
+++ b/deps/npm/node_modules/readable-stream/doc/stream.md
@@ -2,61 +2,123 @@
Stability: 2 - Stable
-A stream is an abstract interface implemented by various objects in
-Node.js. For example a [request to an HTTP server][http-incoming-message] is a
-stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All
-streams are instances of [`EventEmitter`][].
+A stream is an abstract interface for working with streaming data in Node.js.
+The `stream` module provides a base API that makes it easy to build objects
+that implement the stream interface.
-You can load the Stream base classes by doing `require('stream')`.
-There are base classes provided for [Readable][] streams, [Writable][]
-streams, [Duplex][] streams, and [Transform][] streams.
+There are many stream objects provided by Node.js. For instance, a
+[request to an HTTP server][http-incoming-message] and [`process.stdout`][]
+are both stream instances.
-This document is split up into 3 sections:
+Streams can be readable, writable, or both. All streams are instances of
+[`EventEmitter`][].
-1. The first section explains the parts of the API that you need to be
- aware of to use streams in your programs.
-2. The second section explains the parts of the API that you need to
- use if you implement your own custom streams yourself. The API is designed to
- make this easy for you to do.
-3. The third section goes into more depth about how streams work,
- including some of the internal mechanisms and functions that you
- should probably not modify unless you definitely know what you are
- doing.
+The `stream` module can be accessed using:
+```js
+const stream = require('stream');
+```
-## API for Stream Consumers
+While it is important for all Node.js users to understand how streams works,
+the `stream` module itself is most useful for developer's that are creating new
+types of stream instances. Developer's who are primarily *consuming* stream
+objects will rarely (if ever) have need to use the `stream` module directly.
+
+## Organization of this document
+
+This document is divided into two primary sections and third section for
+additional notes. The first section explains the elements of the stream API that
+are required to *use* streams within an application. The second section explains
+the elements of the API that are required to *implement* new types of streams.
+
+## Types of Streams
+
+There are four fundamental stream types within Node.js:
+
+* [Readable][] - streams from which data can be read (for example
+ [`fs.createReadStream()`][]).
+* [Writable][] - streams to which data can be written (for example
+ [`fs.createWriteStream()`][]).
+* [Duplex][] - streams that are both Readable and Writable (for example
+ [`net.Socket`][]).
+* [Transform][] - Duplex streams that can modify or transform the data as it
+ is written and read (for example [`zlib.createDeflate()`][]).
+
+### Object Mode
+
+All streams created by Node.js APIs operate exclusively on strings and `Buffer`
+objects. It is possible, however, for stream implementations to work with other
+types of JavaScript values (with the exception of `null` which serves a special
+purpose within streams). Such streams are considered to operate in "object
+mode".
+
+Stream instances are switched into object mode using the `objectMode` option
+when the stream is created. Attempting to switch an existing stream into
+object mode is not safe.
+
+### Buffering
-Streams can be either [Readable][], [Writable][], or both ([Duplex][]).
+Both [Writable][] and [Readable][] streams will store data in an internal
+buffer that can be retrieved using `writable._writableState.getBuffer()` or
+`readable._readableState.buffer`, respectively.
+
+The amount of data potentially buffered depends on the `highWaterMark` option
+passed into the streams constructor. For normal streams, the `highWaterMark`
+option specifies a total number of bytes. For streams operating in object mode,
+the `highWaterMark` specifies a total number of objects.
+
+Data is buffered in Readable streams when the implementation calls
+[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not
+call [`stream.read()`][stream-read], the data will sit in the internal
+queue until it is consumed.
-All streams are EventEmitters, but they also have other custom methods
-and properties depending on whether they are Readable, Writable, or
-Duplex.
+Once the total size of the internal read buffer reaches the threshold specified
+by `highWaterMark`, the stream will temporarily stop reading data from the
+underlying resource until the data currently buffered can be consumed (that is,
+the stream will stop calling the internal `readable._read()` method that is
+used to fill the read buffer).
+
+Data is buffered in Writable streams when the
+[`writable.write(chunk)`][stream-write] method is called repeatedly. While the
+total size of the internal write buffer is below the threshold set by
+`highWaterMark`, calls to `writable.write()` will return `true`. Once the
+the size of the internal buffer reaches or exceeds the `highWaterMark`, `false`
+will be returned.
+
+A key goal of the `stream` API, and in particular the [`stream.pipe()`] method,
+is to limit the buffering of data to acceptable levels such that sources and
+destinations of differing speeds will not overwhelm the available memory.
+
+Because [Duplex][] and [Transform][] streams are both Readable and Writable,
+each maintain *two* separate internal buffers used for reading and writing,
+allowing each side to operate independently of the other while maintaining an
+appropriate and efficient flow of data. For example, [`net.Socket`][] instances
+are [Duplex][] streams whose Readable side allows consumption of data received
+*from* the socket and whose Writable side allows writing data *to* the socket.
+Because data may be written to the socket at a faster or slower rate than data
+is received, it is important each side operate (and buffer) independently of
+the other.
-If a stream is both Readable and Writable, then it implements all of
-the methods and events. So, a [Duplex][] or [Transform][] stream is
-fully described by this API, though their implementation may be
-somewhat different.
+## API for Stream Consumers
-It is not necessary to implement Stream interfaces in order to consume
-streams in your programs. If you **are** implementing streaming
-interfaces in your own program, please also refer to
-[API for Stream Implementors][].
+
-Almost all Node.js programs, no matter how simple, use Streams in some
-way. Here is an example of using Streams in an Node.js program:
+Almost all Node.js applications, no matter how simple, use streams in some
+manner. The following is an example of using streams in a Node.js application
+that implements an HTTP server:
```js
const http = require('http');
-var server = http.createServer( (req, res) => {
+const server = http.createServer( (req, res) => {
// req is an http.IncomingMessage, which is a Readable Stream
// res is an http.ServerResponse, which is a Writable Stream
- var body = '';
- // we want to get the data as utf8 strings
- // If you don't set an encoding, then you'll get Buffer objects
+ let body = '';
+ // Get the data as utf8 strings.
+ // If an encoding is not set, Buffer objects will be received.
req.setEncoding('utf8');
// Readable streams emit 'data' events once a listener is added
@@ -64,10 +126,10 @@ var server = http.createServer( (req, res) => {
body += chunk;
});
- // the end event tells you that you have entire body
+ // the end event indicates that the entire body has been received
req.on('end', () => {
try {
- var data = JSON.parse(body);
+ const data = JSON.parse(body);
} catch (er) {
// uh oh! bad json!
res.statusCode = 400;
@@ -90,60 +152,308 @@ server.listen(1337);
// error: Unexpected token o
```
-### Class: stream.Duplex
+[Writable][] streams (such as `res` in the example) expose methods such as
+`write()` and `end()` that are used to write data onto the stream.
-Duplex streams are streams that implement both the [Readable][] and
-[Writable][] interfaces.
+[Readable][] streams use the [`EventEmitter`][] API for notifying application
+code when data is available to be read off the stream. That available data can
+be read from the stream in multiple ways.
-Examples of Duplex streams include:
+Both [Writable][] and [Readable][] streams use the [`EventEmitter`][] API in
+various ways to communicate the current state of the stream.
-* [TCP sockets][]
+[Duplex][] and [Transform][] streams are both [Writable][] and [Readable][].
+
+Applications that are either writing data to or consuming data from a stream
+are not required to implement the stream interfaces directly and will generally
+have no reason to call `require('stream')`.
+
+Developers wishing to implement new types of streams should refer to the
+section [API for Stream Implementers][].
+
+### Writable Streams
+
+Writable streams are an abstraction for a *destination* to which data is
+written.
+
+Examples of [Writable][] streams include:
+
+* [HTTP requests, on the client][]
+* [HTTP responses, on the server][]
+* [fs write streams][]
* [zlib streams][zlib]
* [crypto streams][crypto]
+* [TCP sockets][]
+* [child process stdin][]
+* [`process.stdout`][], [`process.stderr`][]
+
+*Note*: Some of these examples are actually [Duplex][] streams that implement
+the [Writable][] interface.
+
+All [Writable][] streams implement the interface defined by the
+`stream.Writable` class.
+
+While specific instances of [Writable][] streams may differ in various ways,
+all Writable streams follow the same fundamental usage pattern as illustrated
+in the example below:
+
+```js
+const myStream = getWritableStreamSomehow();
+myStream.write('some data');
+myStream.write('some more data');
+myStream.end('done writing data');
+```
-### Class: stream.Readable
+#### Class: stream.Writable
+
-The Readable stream interface is the abstraction for a *source* of
-data that you are reading from. In other words, data comes *out* of a
-Readable stream.
+##### Event: 'close'
+
-A Readable stream will not start emitting data until you indicate that
-you are ready to receive it.
+The `'close'` event is emitted when the stream and any of its underlying
+resources (a file descriptor, for example) have been closed. The event indicates
+that no more events will be emitted, and no further computation will occur.
-Readable streams have two "modes": a **flowing mode** and a **paused
-mode**. When in flowing mode, data is read from the underlying system
-and provided to your program as fast as possible. In paused mode, you
-must explicitly call [`stream.read()`][stream-read] to get chunks of data out.
-Streams start out in paused mode.
+Not all Writable streams will emit the `'close'` event.
-**Note**: If no data event handlers are attached, and there are no
-[`stream.pipe()`][] destinations, and the stream is switched into flowing
-mode, then data will be lost.
+##### Event: 'drain'
+
-You can switch to flowing mode by doing any of the following:
+If a call to [`stream.write(chunk)`][stream-write] returns `false`, the
+`'drain'` event will be emitted when it is appropriate to resume writing data
+to the stream.
-* Adding a [`'data'`][] event handler to listen for data.
-* Calling the [`stream.resume()`][stream-resume] method to explicitly open the
- flow.
-* Calling the [`stream.pipe()`][] method to send the data to a [Writable][].
+```js
+// Write the data to the supplied writable stream one million times.
+// Be attentive to back-pressure.
+function writeOneMillionTimes(writer, data, encoding, callback) {
+ let i = 1000000;
+ write();
+ function write() {
+ var ok = true;
+ do {
+ i--;
+ if (i === 0) {
+ // last time!
+ writer.write(data, encoding, callback);
+ } else {
+ // see if we should continue, or wait
+ // don't pass the callback, because we're not done yet.
+ ok = writer.write(data, encoding);
+ }
+ } while (i > 0 && ok);
+ if (i > 0) {
+ // had to stop early!
+ // write some more once it drains
+ writer.once('drain', write);
+ }
+ }
+}
+```
-You can switch back to paused mode by doing either of the following:
+##### Event: 'error'
+
-* If there are no pipe destinations, by calling the
- [`stream.pause()`][stream-pause] method.
-* If there are pipe destinations, by removing any [`'data'`][] event
- handlers, and removing all pipe destinations by calling the
- [`stream.unpipe()`][] method.
+* {Error}
+
+The `'error'` event is emitted if an error occurred while writing or piping
+data. The listener callback is passed a single `Error` argument when called.
+
+*Note*: The stream is not closed when the `'error'` event is emitted.
+
+##### Event: 'finish'
+
+
+The `'finish'` event is emitted after the [`stream.end()`][stream-end] method
+has been called, and all data has been flushed to the underlying system.
+
+```js
+const writer = getWritableStreamSomehow();
+for (var i = 0; i < 100; i ++) {
+ writer.write('hello, #${i}!\n');
+}
+writer.end('This is the end\n');
+writer.on('finish', () => {
+ console.error('All writes are now complete.');
+});
+```
+
+##### Event: 'pipe'
+
+
+* `src` {stream.Readable} source stream that is piping to this writable
+
+The `'pipe'` event is emitted when the [`stream.pipe()`][] method is called on
+a readable stream, adding this writable to its set of destinations.
+
+```js
+const writer = getWritableStreamSomehow();
+const reader = getReadableStreamSomehow();
+writer.on('pipe', (src) => {
+ console.error('something is piping into the writer');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+```
+
+##### Event: 'unpipe'
+
+
+* `src` {[Readable][] Stream} The source stream that
+ [unpiped][`stream.unpipe()`] this writable
+
+The `'unpipe'` event is emitted when the [`stream.unpipe()`][] method is called
+on a [Readable][] stream, removing this [Writable][] from its set of
+destinations.
+
+```js
+const writer = getWritableStreamSomehow();
+const reader = getReadableStreamSomehow();
+writer.on('unpipe', (src) => {
+ console.error('Something has stopped piping into the writer.');
+ assert.equal(src, reader);
+});
+reader.pipe(writer);
+reader.unpipe(writer);
+```
+
+##### writable.cork()
+
+
+The `writable.cork()` method forces all written data to be buffered in memory.
+The buffered data will be flushed when either the [`stream.uncork()`][] or
+[`stream.end()`][stream-end] methods are called.
+
+The primary intent of `writable.cork()` is to avoid a situation where writing
+many small chunks of data to a stream do not cause an backup in the internal
+buffer that would have an adverse impact on performance. In such situations,
+implementations that implement the `writable._writev()` method can perform
+buffered writes in a more optimized manner.
+
+##### writable.end([chunk][, encoding][, callback])
+
+
+* `chunk` {String|Buffer|any} Optional data to write. For streams not operating
+ in object mode, `chunk` must be a string or a `Buffer`. For object mode
+ streams, `chunk` may be any JavaScript value other than `null`.
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Optional callback for when the stream is finished
+
+Calling the `writable.end()` method signals that no more data will be written
+to the [Writable][]. The optional `chunk` and `encoding` arguments allow one
+final additional chunk of data to be written immediately before closing the
+stream. If provided, the optional `callback` function is attached as a listener
+for the [`'finish'`][] event.
+
+Calling the [`stream.write()`][stream-write] method after calling
+[`stream.end()`][stream-end] will raise an error.
+
+```js
+// write 'hello, ' and then end with 'world!'
+const file = fs.createWriteStream('example.txt');
+file.write('hello, ');
+file.end('world!');
+// writing more now is not allowed!
+```
+
+##### writable.setDefaultEncoding(encoding)
+
+
+* `encoding` {String} The new default encoding
+* Return: `this`
+
+The `writable.setDefaultEncoding()` method sets the default `encoding` for a
+[Writable][] stream.
+
+##### writable.uncork()
+
+
+The `writable.uncork()` method flushes all data buffered since
+[`stream.cork()`][] was called.
+
+When using `writable.cork()` and `writable.uncork()` to manage the buffering
+of writes to a stream, it is recommended that calls to `writable.uncork()` be
+deferred using `process.nextTick()`. Doing so allows batching of all
+`writable.write()` calls that occur within a given Node.js event loop phase.
+
+```js
+stream.cork();
+stream.write('some ');
+stream.write('data ');
+process.nextTick(() => stream.uncork());
+```
+
+If the `writable.cork()` method is called multiple times on a stream, the same
+number of calls to `writable.uncork()` must be called to flush the buffered
+data.
+
+```
+stream.cork();
+stream.write('some ');
+stream.cork();
+stream.write('data ');
+process.nextTick(() => {
+ stream.uncork();
+ // The data will not be flushed until uncork() is called a second time.
+ stream.uncork();
+});
+```
+
+##### writable.write(chunk[, encoding][, callback])
+
+
+* `chunk` {String|Buffer} The data to write
+* `encoding` {String} The encoding, if `chunk` is a String
+* `callback` {Function} Callback for when this chunk of data is flushed
+* Returns: {Boolean} `false` if the stream wishes for the calling code to
+ wait for the `'drain'` event to be emitted before continuing to write
+ additional data; otherwise `true`.
+
+The `writable.write()` method writes some data to the stream, and calls the
+supplied `callback` once the data has been fully handled. If an error
+occurs, the `callback` *may or may not* be called with the error as its
+first argument. To reliably detect write errors, add a listener for the
+`'error'` event.
+
+The return value indicates whether the written `chunk` was buffered internally
+and the buffer has exceeded the `highWaterMark` configured when the stream was
+created. If `false` is returned, further attempts to write data to the stream
+should be paused until the `'drain'` event is emitted.
-Note that, for backwards compatibility reasons, removing [`'data'`][]
-event handlers will **not** automatically pause the stream. Also, if
-there are piped destinations, then calling [`stream.pause()`][stream-pause] will
-not guarantee that the stream will *remain* paused once those
-destinations drain and ask for more data.
+A Writable stream in object mode will always ignore the `encoding` argument.
-Examples of readable streams include:
+### Readable Streams
+
+Readable streams are an abstraction for a *source* from which data is
+consumed.
+
+Examples of Readable streams include:
* [HTTP responses, on the client][http-incoming-message]
* [HTTP requests, on the server][http-incoming-message]
@@ -154,89 +464,208 @@ Examples of readable streams include:
* [child process stdout and stderr][]
* [`process.stdin`][]
-#### Event: 'close'
+All [Readable][] streams implement the interface defined by the
+`stream.Readable` class.
+
+#### Two Modes
+
+Readable streams effectively operate in one of two modes: flowing and paused.
+
+When in flowing mode, data is read from the underlying system automatically
+and provided to an application as quickly as possible using events via the
+[`EventEmitter`][] interface.
+
+In paused mode, the [`stream.read()`][stream-read] method must be called
+explicitly to read chunks of data from the stream.
+
+All [Readable][] streams begin in paused mode but can be switched to flowing
+mode in one of the following ways:
+
+* Adding a [`'data'`][] event handler.
+* Calling the [`stream.resume()`][stream-resume] method.
+* Calling the [`stream.pipe()`][] method to send the data to a [Writable][].
+
+The Readable can switch back to paused mode using one of the following:
+
+* If there are no pipe destinations, by calling the
+ [`stream.pause()`][stream-pause] method.
+* If there are pipe destinations, by removing any [`'data'`][] event
+ handlers, and removing all pipe destinations by calling the
+ [`stream.unpipe()`][] method.
+
+The important concept to remember is that a Readable will not generate data
+until a mechanism for either consuming or ignoring that data is provided. If
+the consuming mechanism is disabled or taken away, the Readable will *attempt*
+to stop generating the data.
+
+*Note*: For backwards compatibility reasons, removing [`'data'`][] event
+handlers will **not** automatically pause the stream. Also, if there are piped
+destinations, then calling [`stream.pause()`][stream-pause] will not guarantee
+that the stream will *remain* paused once those destinations drain and ask for
+more data.
+
+*Note*: If a [Readable][] is switched into flowing mode and there are no
+consumers available handle the data, that data will be lost. This can occur,
+for instance, when the `readable.resume()` method is called without a listener
+attached to the `'data'` event, or when a `'data'` event handler is removed
+from the stream.
+
+#### Three States
+
+The "two modes" of operation for a Readable stream are a simplified abstraction
+for the more complicated internal state management that is happening within the
+Readable stream implementation.
+
+Specifically, at any given point in time, every Readable is in one of three
+possible states:
+
+* `readable._readableState.flowing = null`
+* `readable._readableState.flowing = false`
+* `readable._readableState.flowing = true`
+
+When `readable._readableState.flowing` is `null`, no mechanism for consuming the
+streams data is provided so the stream will not generate its data.
+
+Attaching a listener for the `'data'` event, calling the `readable.pipe()`
+method, or calling the `readable.resume()` method will switch
+`readable._readableState.flowing` to `true`, causing the Readable to begin
+actively emitting events as data is generated.
+
+Calling `readable.pause()`, `readable.unpipe()`, or receiving "back pressure"
+will cause the `readable._readableState.flowing` to be set as `false`,
+temporarily halting the flowing of events but *not* halting the generation of
+data.
+
+While `readable._readableState.flowing` is `false`, data may be accumulating
+within the streams internal buffer.
+
+#### Choose One
-Emitted when the stream and any of its underlying resources (a file
-descriptor, for example) have been closed. The event indicates that
-no more events will be emitted, and no further computation will occur.
+The Readable stream API evolved across multiple Node.js versions and provides
+multiple methods of consuming stream data. In general, developers should choose
+*one* of the methods of consuming data and *should never* use multiple methods
+to consume data from a single stream.
-Not all streams will emit the `'close'` event as the `'close'` event is
-optional.
+Use of the `readable.pipe()` method is recommended for most users as it has been
+implemented to provide the easiest way of consuming stream data. Developers that
+require more fine-grained control over the transfer and generation of data can
+use the [`EventEmitter`][] and `readable.pause()`/`readable.resume()` APIs.
-#### Event: 'data'
+#### Class: stream.Readable
+
-* `chunk` {Buffer|String} The chunk of data.
+
+
+##### Event: 'close'
+
+
+The `'close'` event is emitted when the stream and any of its underlying
+resources (a file descriptor, for example) have been closed. The event indicates
+that no more events will be emitted, and no further computation will occur.
+
+Not all [Readable][] streams will emit the `'close'` event.
-Attaching a `'data'` event listener to a stream that has not been
-explicitly paused will switch the stream into flowing mode. Data will
-then be passed as soon as it is available.
+##### Event: 'data'
+
-If you just want to get all the data out of the stream as fast as
-possible, this is the best way to do so.
+* `chunk` {Buffer|String|any} The chunk of data. For streams that are not
+ operating in object mode, the chunk will be either a string or `Buffer`.
+ For streams that are in object mode, the chunk can be any JavaScript value
+ other than `null`.
+
+The `'data'` event is emitted whenever the stream is relinquishing ownership of
+a chunk of data to a consumer. This may occur whenever the stream is switched
+in flowing mode by calling `readable.pipe()`, `readable.resume()`, or by
+attaching a listener callback to the `'data'` event. The `'data'` event will
+also be emitted whenever the `readable.read()` method is called and a chunk of
+data is available to be returned.
+
+Attaching a `'data'` event listener to a stream that has not been explicitly
+paused will switch the stream into flowing mode. Data will then be passed as
+soon as it is available.
+
+The listener callback will be passed the chunk of data as a string if a default
+encoding has been specified for the stream using the
+`readable.setEncoding()` method; otherwise the data will be passed as a
+`Buffer`.
```js
-var readable = getReadableStreamSomehow();
+const readable = getReadableStreamSomehow();
readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
+ console.log(`Received ${chunk.length} bytes of data.`);
});
```
-#### Event: 'end'
+##### Event: 'end'
+
-This event fires when there will be no more data to read.
+The `'end'` event is emitted when there is no more data to be consumed from
+the stream.
-Note that the `'end'` event **will not fire** unless the data is
-completely consumed. This can be done by switching into flowing mode,
-or by calling [`stream.read()`][stream-read] repeatedly until you get to the
-end.
+*Note*: The `'end'` event **will not be emitted** unless the data is
+completely consumed. This can be accomplished by switching the stream into
+flowing mode, or by calling [`stream.read()`][stream-read] repeatedly until
+all data has been consumed.
```js
-var readable = getReadableStreamSomehow();
+const readable = getReadableStreamSomehow();
readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
+ console.log(`Received ${chunk.length} bytes of data.`);
});
readable.on('end', () => {
- console.log('there will be no more data.');
+ console.log('There will be no more data.');
});
```
-#### Event: 'error'
+##### Event: 'error'
+
* {Error}
-Emitted if there was an error receiving data.
+The `'error'` event may be emitted by a Readable implementation at any time.
+Typically, this may occur if the underlying stream in unable to generate data
+due to an underlying internal failure, or when a stream implementation attempts
+to push an invalid chunk of data.
-#### Event: 'readable'
+The listener callback will be passed a single `Error` object.
-When a chunk of data can be read from the stream, it will emit a
-`'readable'` event.
+##### Event: 'readable'
+
-In some cases, listening for a `'readable'` event will cause some data
-to be read into the internal buffer from the underlying system, if it
-hadn't already.
+The `'readable'` event is emitted when there is data available to be read from
+the stream. In some cases, attaching a listener for the `'readable'` event will
+cause some amount of data to be read into an internal buffer.
```javascript
-var readable = getReadableStreamSomehow();
+const readable = getReadableStreamSomehow();
readable.on('readable', () => {
// there is some data to read now
});
```
+The `'readable'` event will also be emitted once the end of the stream data
+has been reached but before the `'end'` event is emitted.
-Once the internal buffer is drained, a `'readable'` event will fire
-again when more data is available.
-
-The `'readable'` event is not emitted in the "flowing" mode with the
-sole exception of the last one, on end-of-stream.
-
-The `'readable'` event indicates that the stream has new information:
-either new data is available or the end of the stream has been reached.
-In the former case, [`stream.read()`][stream-read] will return that data. In the
-latter case, [`stream.read()`][stream-read] will return null. For instance, in
-the following example, `foo.txt` is an empty file:
+Effectively, the `'readable'` event indicates that the stream has new
+information: either new data is available or the end of the stream has been
+reached. In the former case, [`stream.read()`][stream-read] will return the
+available data. In the latter case, [`stream.read()`][stream-read] will return
+`null`. For instance, in the following example, `foo.txt` is an empty file:
```js
const fs = require('fs');
-var rr = fs.createReadStream('foo.txt');
+const rr = fs.createReadStream('foo.txt');
rr.on('readable', () => {
console.log('readable:', rr.read());
});
@@ -253,16 +682,23 @@ readable: null
end
```
-#### readable.isPaused()
+*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
+preferred over the use of the `'readable'` event.
+
+##### readable.isPaused()
+
* Return: {Boolean}
-This method returns whether or not the `readable` has been **explicitly**
-paused by client code (using [`stream.pause()`][stream-pause] without a
-corresponding [`stream.resume()`][stream-resume]).
+The `readable.isPaused()` method returns the current operating state of the
+Readable. This is used primarily by the mechanism that underlies the
+`readable.pipe()` method. In most typical cases, there will be no reason to
+use this method directly.
```js
-var readable = new stream.Readable
+const readable = new stream.Readable
readable.isPaused() // === false
readable.pause()
@@ -271,68 +707,71 @@ readable.resume()
readable.isPaused() // === false
```
-#### readable.pause()
+##### readable.pause()
+
* Return: `this`
-This method will cause a stream in flowing mode to stop emitting
-[`'data'`][] events, switching out of flowing mode. Any data that becomes
-available will remain in the internal buffer.
+The `readable.pause()` method will cause a stream in flowing mode to stop
+emitting [`'data'`][] events, switching out of flowing mode. Any data that
+becomes available will remain in the internal buffer.
```js
-var readable = getReadableStreamSomehow();
+const readable = getReadableStreamSomehow();
readable.on('data', (chunk) => {
- console.log('got %d bytes of data', chunk.length);
+ console.log(`Received ${chunk.length} bytes of data.`);
readable.pause();
- console.log('there will be no more data for 1 second');
+ console.log('There will be no additional data for 1 second.');
setTimeout(() => {
- console.log('now data will start flowing again');
+ console.log('Now data will start flowing again.');
readable.resume();
}, 1000);
});
```
-#### readable.pipe(destination[, options])
+##### readable.pipe(destination[, options])
+
* `destination` {stream.Writable} The destination for writing data
* `options` {Object} Pipe options
- * `end` {Boolean} End the writer when the reader ends. Default = `true`
+ * `end` {Boolean} End the writer when the reader ends. Defaults to `true`.
-This method pulls all the data out of a readable stream, and writes it
-to the supplied destination, automatically managing the flow so that
-the destination is not overwhelmed by a fast readable stream.
+The `readable.pipe()` method attaches a [Writable][] stream to the `readable`,
+causing it to switch automatically into flowing mode and push all of its data
+to the attached [Writable][]. The flow of data will be automatically managed so
+that the destination Writable stream is not overwhelmed by a faster Readable
+stream.
-Multiple destinations can be piped to safely.
+The following example pipes all of the data from the `readable` into a file
+named `file.txt`:
```js
-var readable = getReadableStreamSomehow();
-var writable = fs.createWriteStream('file.txt');
+const readable = getReadableStreamSomehow();
+const writable = fs.createWriteStream('file.txt');
// All the data from readable goes into 'file.txt'
readable.pipe(writable);
```
+It is possible to attach multiple Writable streams to a single Readable stream.
-This function returns the destination stream, so you can set up pipe
-chains like so:
+The `readable.pipe()` method returns a reference to the *destination* stream
+making it possible to set up chains of piped streams:
```js
-var r = fs.createReadStream('file.txt');
-var z = zlib.createGzip();
-var w = fs.createWriteStream('file.txt.gz');
+const r = fs.createReadStream('file.txt');
+const z = zlib.createGzip();
+const w = fs.createWriteStream('file.txt.gz');
r.pipe(z).pipe(w);
```
-For example, emulating the Unix `cat` command:
-
-```js
-process.stdin.pipe(process.stdout);
-```
-
-By default [`stream.end()`][stream-end] is called on the destination when the
-source stream emits [`'end'`][], so that `destination` is no longer writable.
-Pass `{ end: false }` as `options` to keep the destination stream open.
-
-This keeps `writer` open so that "Goodbye" can be written at the
-end.
+By default, [`stream.end()`][stream-end] is called on the destination Writable
+stream when the source Readable stream emits [`'end'`][], so that the
+destination is no longer writable. To disable this default behavior, the `end`
+option can be passed as `false`, causing the destination stream to remain open,
+as illustrated in the following example:
```js
reader.pipe(writer, { end: false });
@@ -341,88 +780,115 @@ reader.on('end', () => {
});
```
-Note that [`process.stderr`][] and [`process.stdout`][] are never closed until
-the process exits, regardless of the specified options.
+One important caveat is that if the Readable stream emits an error during
+processing, the Writable destination *is not closed* automatically. If an
+error occurs, it will be necessary to *manually* close each stream in order
+to prevent memory leaks.
+
+*Note*: The [`process.stderr`][] and [`process.stdout`][] Writable streams are
+never closed until the Node.js process exits, regardless of the specified
+options.
-#### readable.read([size])
+##### readable.read([size])
+
* `size` {Number} Optional argument to specify how much data to read.
* Return {String|Buffer|Null}
-The `read()` method pulls some data out of the internal buffer and
-returns it. If there is no data available, then it will return
-`null`.
+The `readable.read()` method pulls some data out of the internal buffer and
+returns it. If no data available to be read, `null` is returned. By default,
+the data will be returned as a `Buffer` object unless an encoding has been
+specified using the `readable.setEncoding()` method or the stream is operating
+in object mode.
-If you pass in a `size` argument, then it will return that many
-bytes. If `size` bytes are not available, then it will return `null`,
-unless we've ended, in which case it will return the data remaining
-in the buffer.
+The optional `size` argument specifies a specific number of bytes to read. If
+`size` bytes are not available to be read, `null` will be returned *unless*
+the stream has ended, in which case all of the data remaining in the internal
+buffer will be returned (*even if it exceeds `size` bytes*).
-If you do not specify a `size` argument, then it will return all the
-data in the internal buffer.
+If the `size` argument is not specified, all of the data contained in the
+internal buffer will be returned.
-This method should only be called in paused mode. In flowing mode,
-this method is called automatically until the internal buffer is
-drained.
+The `readable.read()` method should only be called on Readable streams operating
+in paused mode. In flowing mode, `readable.read()` is called automatically until
+the internal buffer is fully drained.
```js
-var readable = getReadableStreamSomehow();
+const readable = getReadableStreamSomehow();
readable.on('readable', () => {
var chunk;
while (null !== (chunk = readable.read())) {
- console.log('got %d bytes of data', chunk.length);
+ console.log(`Received ${chunk.length} bytes of data.`);
}
});
```
-If this method returns a data chunk, then it will also trigger the
-emission of a [`'data'`][] event.
+In general, it is recommended that developers avoid the use of the `'readable'`
+event and the `readable.read()` method in favor of using either
+`readable.pipe()` or the `'data'` event.
-Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][]
-event has been triggered will return `null`. No runtime error will be raised.
+A Readable stream in object mode will always return a single item from
+a call to [`readable.read(size)`][stream-read], regardless of the value of the
+`size` argument.
+
+*Note:* If the `readable.read()` method returns a chunk of data, a `'data'`
+event will also be emitted.
-#### readable.resume()
+*Note*: Calling [`stream.read([size])`][stream-read] after the [`'end'`][]
+event has been emitted will return `null`. No runtime error will be raised.
+
+##### readable.resume()
+
* Return: `this`
-This method will cause the readable stream to resume emitting [`'data'`][]
-events.
+The `readable.resume()` method causes an explicitly paused Readable stream to
+resume emitting [`'data'`][] events, switching the stream into flowing mode.
-This method will switch the stream into flowing mode. If you do *not*
-want to consume the data from a stream, but you *do* want to get to
-its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open
-the flow of data.
+The `readable.resume()` method can be used to fully consume the data from a
+stream without actually processing any of that data as illustrated in the
+following example:
```js
-var readable = getReadableStreamSomehow();
-readable.resume();
-readable.on('end', () => {
- console.log('got to the end, but did not read anything');
-});
+getReadableStreamSomehow()
+ .resume()
+ .on('end', () => {
+ console.log('Reached the end, but did not read anything.');
+ });
```
-#### readable.setEncoding(encoding)
+##### readable.setEncoding(encoding)
+
* `encoding` {String} The encoding to use.
* Return: `this`
-Call this function to cause the stream to return strings of the specified
-encoding instead of Buffer objects. For example, if you do
-`readable.setEncoding('utf8')`, then the output data will be interpreted as
-UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`,
-then the data will be encoded in hexadecimal string format.
+The `readable.setEncoding()` method sets the default character encoding for
+data read from the Readable stream.
-This properly handles multi-byte characters that would otherwise be
-potentially mangled if you simply pulled the Buffers directly and
-called [`buf.toString(encoding)`][] on them. If you want to read the data
-as strings, always use this method.
+Setting an encoding causes the stream data
+to be returned as string of the specified encoding rather than as `Buffer`
+objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+output data will be interpreted as UTF-8 data, and passed as strings. Calling
+`readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+string format.
-Also you can disable any encoding at all with `readable.setEncoding(null)`.
-This approach is very useful if you deal with binary data or with large
-multi-byte strings spread out over multiple chunks.
+The Readable stream will properly handle multi-byte characters delivered through
+the stream that would otherwise become improperly decoded if simply pulled from
+the stream as `Buffer` objects.
+
+Encoding can be disabled by calling `readable.setEncoding(null)`. This approach
+is useful when working with binary data or with large multi-byte strings spread
+out over multiple chunks.
```js
-var readable = getReadableStreamSomehow();
+const readable = getReadableStreamSomehow();
readable.setEncoding('utf8');
readable.on('data', (chunk) => {
assert.equal(typeof chunk, 'string');
@@ -430,47 +896,53 @@ readable.on('data', (chunk) => {
});
```
-#### readable.unpipe([destination])
+##### readable.unpipe([destination])
+
* `destination` {stream.Writable} Optional specific stream to unpipe
-This method will remove the hooks set up for a previous [`stream.pipe()`][]
-call.
+The `readable.unpipe()` method detaches a Writable stream previously attached
+using the [`stream.pipe()`][] method.
-If the destination is not specified, then all pipes are removed.
+If the `destination` is not specified, then *all* pipes are detached.
-If the destination is specified, but no pipe is set up for it, then
-this is a no-op.
+If the `destination` is specified, but no pipe is set up for it, then
+the method does nothing.
```js
-var readable = getReadableStreamSomehow();
-var writable = fs.createWriteStream('file.txt');
+const readable = getReadableStreamSomehow();
+const writable = fs.createWriteStream('file.txt');
// All the data from readable goes into 'file.txt',
// but only for the first second
readable.pipe(writable);
setTimeout(() => {
- console.log('stop writing to file.txt');
+ console.log('Stop writing to file.txt');
readable.unpipe(writable);
- console.log('manually close the file stream');
+ console.log('Manually close the file stream');
writable.end();
}, 1000);
```
-#### readable.unshift(chunk)
+##### readable.unshift(chunk)
+
* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue
-This is useful in certain cases where a stream is being consumed by a
-parser, which needs to "un-consume" some data that it has
-optimistically pulled out of the source, so that the stream can be
-passed on to some other party.
+The `readable.unshift()` method pushes a chunk of data back into the internal
+buffer. This is useful in certain situations where a stream is being consumed by
+code that needs to "un-consume" some amount of data that it has optimistically
+pulled out of the source, so that the data can be passed on to some other party.
-Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event
-has been triggered; a runtime error will be raised.
+*Note*: The `stream.unshift(chunk)` method cannot be called after the
+[`'end'`][] event has been emitted or a runtime error will be thrown.
-If you find that you must often call `stream.unshift(chunk)` in your
-programs, consider implementing a [Transform][] stream instead. (See [API
-for Stream Implementors][].)
+Developers using `stream.unshift()` often should consider switching to
+use of a [Transform][] stream instead. See the [API for Stream Implementers][]
+section for more information.
```js
// Pull off a header delimited by \n\n
@@ -480,7 +952,7 @@ const StringDecoder = require('string_decoder').StringDecoder;
function parseHeader(stream, callback) {
stream.on('error', callback);
stream.on('readable', onReadable);
- var decoder = new StringDecoder('utf8');
+ const decoder = new StringDecoder('utf8');
var header = '';
function onReadable() {
var chunk;
@@ -490,8 +962,8 @@ function parseHeader(stream, callback) {
// found the header boundary
var split = str.split(/\n\n/);
header += split.shift();
- var remaining = split.join('\n\n');
- var buf = Buffer.from(remaining, 'utf8');
+ const remaining = split.join('\n\n');
+ const buf = Buffer.from(remaining, 'utf8');
if (buf.length)
stream.unshift(buf);
stream.removeListener('error', callback);
@@ -507,30 +979,34 @@ function parseHeader(stream, callback) {
}
```
-Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)`
+*Note*: Unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)`
will not end the reading process by resetting the internal reading state of the
-stream. This can cause unexpected results if `unshift()` is called during a
-read (i.e. from within a [`stream._read()`][stream-_read] implementation on a
-custom stream). Following the call to `unshift()` with an immediate
-[`stream.push('')`][stream-push] will reset the reading state appropriately,
-however it is best to simply avoid calling `unshift()` while in the process of
-performing a read.
-
-#### readable.wrap(stream)
+stream. This can cause unexpected results if `readable.unshift()` is called
+during a read (i.e. from within a [`stream._read()`][stream-_read]
+implementation on a custom stream). Following the call to `readable.unshift()`
+with an immediate [`stream.push('')`][stream-push] will reset the reading state
+appropriately, however it is best to simply avoid calling `readable.unshift()`
+while in the process of performing a read.
+
+##### readable.wrap(stream)
+
* `stream` {Stream} An "old style" readable stream
Versions of Node.js prior to v0.10 had streams that did not implement the
-entire Streams API as it is today. (See [Compatibility][] for
-more information.)
+entire `stream` module API as it is currently defined. (See [Compatibility][]
+for more information.)
-If you are using an older Node.js library that emits [`'data'`][] events and
-has a [`stream.pause()`][stream-pause] method that is advisory only, then you
-can use the `wrap()` method to create a [Readable][] stream that uses the old
-stream as its data source.
+When using an older Node.js library that emits [`'data'`][] events and has a
+[`stream.pause()`][stream-pause] method that is advisory only, the
+`readable.wrap()` method can be used to create a [Readable][] stream that uses
+the old stream as its data source.
-You will very rarely ever need to call this function, but it exists
-as a convenience for interacting with old Node.js programs and libraries.
+It will rarely be necessary to use `readable.wrap()` but the method has been
+provided as a convenience for interacting with older Node.js applications and
+libraries.
For example:
@@ -545,210 +1021,65 @@ myReader.on('readable', () => {
});
```
-### Class: stream.Transform
+### Duplex and Transform Streams
-Transform streams are [Duplex][] streams where the output is in some way
-computed from the input. They implement both the [Readable][] and
+#### Class: stream.Duplex
+
+
+
+
+Duplex streams are streams that implement both the [Readable][] and
[Writable][] interfaces.
-Examples of Transform streams include:
+Examples of Duplex streams include:
+* [TCP sockets][]
* [zlib streams][zlib]
* [crypto streams][crypto]
-### Class: stream.Writable
+#### Class: stream.Transform
+
-The Writable stream interface is an abstraction for a *destination*
-that you are writing data *to*.
+Transform streams are [Duplex][] streams where the output is in some way
+related to the input. Like all [Duplex][] streams, Transform streams
+implement both the [Readable][] and [Writable][] interfaces.
-Examples of writable streams include:
+Examples of Transform streams include:
-* [HTTP requests, on the client][]
-* [HTTP responses, on the server][]
-* [fs write streams][]
* [zlib streams][zlib]
* [crypto streams][crypto]
-* [TCP sockets][]
-* [child process stdin][]
-* [`process.stdout`][], [`process.stderr`][]
-#### Event: 'close'
-Emitted when the stream and any of its underlying resources (a file descriptor,
-for example) have been closed. The event indicates that no more events will be
-emitted, and no further computation will occur.
+## API for Stream Implementers
-Not all streams will emit the `'close'` event as the `'close'` event is
-optional.
+
-#### Event: 'drain'
+The `stream` module API has been designed to make it possible to easily
+implement streams using JavaScript's prototypical inheritance model.
-If a [`stream.write(chunk)`][stream-write] call returns `false`, then the
-`'drain'` event will indicate when it is appropriate to begin writing more data
-to the stream.
+First, a stream developer would declare a new JavaScript class that extends one
+of the four basic stream classes (`stream.Writable`, `stream.Readable`,
+`stream.Duplex`, or `stream.Transform`), making sure the call the appropriate
+parent class constructor:
```js
-// Write the data to the supplied writable stream one million times.
-// Be attentive to back-pressure.
-function writeOneMillionTimes(writer, data, encoding, callback) {
- var i = 1000000;
- write();
- function write() {
- var ok = true;
- do {
- i -= 1;
- if (i === 0) {
- // last time!
- writer.write(data, encoding, callback);
- } else {
- // see if we should continue, or wait
- // don't pass the callback, because we're not done yet.
- ok = writer.write(data, encoding);
- }
- } while (i > 0 && ok);
- if (i > 0) {
- // had to stop early!
- // write some more once it drains
- writer.once('drain', write);
- }
- }
-}
-```
-
-#### Event: 'error'
-
-* {Error}
-
-Emitted if there was an error when writing or piping data.
-
-#### Event: 'finish'
-
-When the [`stream.end()`][stream-end] method has been called, and all data has
-been flushed to the underlying system, this event is emitted.
+const Writable = require('stream').Writable;
-```javascript
-var writer = getWritableStreamSomehow();
-for (var i = 0; i < 100; i ++) {
- writer.write('hello, #${i}!\n');
+class MyWritable extends Writable {
+ constructor(options) {
+ super(options);
+ }
}
-writer.end('this is the end\n');
-writer.on('finish', () => {
- console.error('all writes are now complete.');
-});
```
-#### Event: 'pipe'
-
-* `src` {stream.Readable} source stream that is piping to this writable
-
-This is emitted whenever the [`stream.pipe()`][] method is called on a readable
-stream, adding this writable to its set of destinations.
-
-```js
-var writer = getWritableStreamSomehow();
-var reader = getReadableStreamSomehow();
-writer.on('pipe', (src) => {
- console.error('something is piping into the writer');
- assert.equal(src, reader);
-});
-reader.pipe(writer);
-```
-
-#### Event: 'unpipe'
-
-* `src` {[Readable][] Stream} The source stream that
- [unpiped][`stream.unpipe()`] this writable
-
-This is emitted whenever the [`stream.unpipe()`][] method is called on a
-readable stream, removing this writable from its set of destinations.
-
-```js
-var writer = getWritableStreamSomehow();
-var reader = getReadableStreamSomehow();
-writer.on('unpipe', (src) => {
- console.error('something has stopped piping into the writer');
- assert.equal(src, reader);
-});
-reader.pipe(writer);
-reader.unpipe(writer);
-```
-
-#### writable.cork()
-
-Forces buffering of all writes.
-
-Buffered data will be flushed either at [`stream.uncork()`][] or at
-[`stream.end()`][stream-end] call.
-
-#### writable.end([chunk][, encoding][, callback])
-
-* `chunk` {String|Buffer} Optional data to write
-* `encoding` {String} The encoding, if `chunk` is a String
-* `callback` {Function} Optional callback for when the stream is finished
-
-Call this method when no more data will be written to the stream. If supplied,
-the callback is attached as a listener on the [`'finish'`][] event.
-
-Calling [`stream.write()`][stream-write] after calling
-[`stream.end()`][stream-end] will raise an error.
-
-```js
-// write 'hello, ' and then end with 'world!'
-var file = fs.createWriteStream('example.txt');
-file.write('hello, ');
-file.end('world!');
-// writing more now is not allowed!
-```
-
-#### writable.setDefaultEncoding(encoding)
-
-* `encoding` {String} The new default encoding
-* Return: `this`
-
-Sets the default encoding for a writable stream.
-
-#### writable.uncork()
-
-Flush all data, buffered since [`stream.cork()`][] call.
-
-#### writable.write(chunk[, encoding][, callback])
-
-* `chunk` {String|Buffer} The data to write
-* `encoding` {String} The encoding, if `chunk` is a String
-* `callback` {Function} Callback for when this chunk of data is flushed
-* Returns: {Boolean} `true` if the data was handled completely.
-
-This method writes some data to the underlying system, and calls the
-supplied callback once the data has been fully handled. If an error
-occurs, the callback may or may not be called with the error as its
-first argument. To detect write errors, listen for the `'error'` event.
-
-The return value indicates if you should continue writing right now.
-If the data had to be buffered internally, then it will return
-`false`. Otherwise, it will return `true`.
-
-This return value is strictly advisory. You MAY continue to write,
-even if it returns `false`. However, writes will be buffered in
-memory, so it is best not to do this excessively. Instead, wait for
-the [`'drain'`][] event before writing more data.
-
-
-## API for Stream Implementors
-
-
-
-To implement any sort of stream, the pattern is the same:
-
-1. Extend the appropriate parent class in your own subclass. (The
- [`util.inherits()`][] method is particularly helpful for this.)
-2. Call the appropriate parent class constructor in your constructor,
- to be sure that the internal mechanisms are set up properly.
-3. Implement one or more specific methods, as detailed below.
-
-The class to extend and the method(s) to implement depend on the sort
-of stream class you are writing:
+The new stream class must then implement one or more specific methods, depending
+on the type of stream being created, as detailed in the chart below:
@@ -769,7 +1100,7 @@ of stream class you are writing:
Reading only
- [Readable](#stream_class_stream_readable_1)
+ [Readable](#stream_class_stream_readable)
[_read][stream-_read]
@@ -780,7 +1111,7 @@ of stream class you are writing:
Writing only
- [Writable](#stream_class_stream_writable_1)
+ [Writable](#stream_class_stream_writable)
[_write][stream-_write]
, [_writev][stream-_writev]
@@ -791,7 +1122,7 @@ of stream class you are writing:
Reading and writing
- [Duplex](#stream_class_stream_duplex_1)
+ [Duplex](#stream_class_stream_duplex)
[_read][stream-_read]
, [_write][stream-_write]
, [_writev][stream-_writev]
@@ -802,7 +1133,7 @@ of stream class you are writing:
Operate on written data, then read the result
- [Transform](#stream_class_stream_transform_1)
+ [Transform](#stream_class_stream_transform)
[_transform][stream-_transform]
, [_flush][stream-_flush]
@@ -810,726 +1141,731 @@ of stream class you are writing:
-In your implementation code, it is very important to never call the methods
-described in [API for Stream Consumers][]. Otherwise, you can potentially cause
-adverse side effects in programs that consume your streaming interfaces.
-
-### Class: stream.Duplex
+*Note*: The implementation code for a stream should *never* call the "public"
+methods of a stream that are intended for use by consumers (as described in
+the [API for Stream Consumers][] section). Doing so may lead to adverse
+side effects in application code consuming the stream.
-
-
-A "duplex" stream is one that is both Readable and Writable, such as a TCP
-socket connection.
+### Simplified Construction
-Note that `stream.Duplex` is an abstract class designed to be extended
-with an underlying implementation of the [`stream._read(size)`][stream-_read]
-and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you
-would with a Readable or Writable stream class.
+For many simple cases, it is possible to construct a stream without relying on
+inheritance. This can be accomplished by directly creating instances of the
+`stream.Writable`, `stream.Readable`, `stream.Duplex` or `stream.Transform`
+objects and passing appropriate methods as constructor options.
-Since JavaScript doesn't have multiple prototypal inheritance, this class
-prototypally inherits from Readable, and then parasitically from Writable. It is
-thus up to the user to implement both the low-level
-[`stream._read(n)`][stream-_read] method as well as the low-level
-[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension
-duplex classes.
+For example:
-#### new stream.Duplex(options)
+```js
+const Writable = require('stream').Writable;
-* `options` {Object} Passed to both Writable and Readable
- constructors. Also has the following fields:
- * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then
- the stream will automatically end the readable side when the
- writable side ends and vice versa.
- * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode`
- for readable side of the stream. Has no effect if `objectMode`
- is `true`.
- * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode`
- for writable side of the stream. Has no effect if `objectMode`
- is `true`.
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
-In classes that extend the Duplex class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
+### Implementing a Writable Stream
-### Class: stream.PassThrough
+The `stream.Writable` class is extended to implement a [Writable][] stream.
-This is a trivial implementation of a [Transform][] stream that simply
-passes the input bytes across to the output. Its purpose is mainly
-for examples and testing, but there are occasionally use cases where
-it can come in handy as a building block for novel sorts of streams.
+Custom Writable streams *must* call the `new stream.Writable([options])`
+constructor and implement the `writable._write()` method. The
+`writable._writev()` method *may* also be implemented.
-### Class: stream.Readable
+#### Constructor: new stream.Writable([options])
-
+* `options` {Object}
+ * `highWaterMark` {Number} Buffer level when
+ [`stream.write()`][stream-write] starts returning `false`. Defaults to
+ `16384` (16kb), or `16` for `objectMode` streams.
+ * `decodeStrings` {Boolean} Whether or not to decode strings into
+ Buffers before passing them to [`stream._write()`][stream-_write].
+ Defaults to `true`
+ * `objectMode` {Boolean} Whether or not the
+ [`stream.write(anyObj)`][stream-write] is a valid operation. When set,
+ it becomes possible to write JavaScript values other than string or
+ `Buffer` if supported by the stream implementation. Defaults to `false`
+ * `write` {Function} Implementation for the
+ [`stream._write()`][stream-_write] method.
+ * `writev` {Function} Implementation for the
+ [`stream._writev()`][stream-_writev] method.
-`stream.Readable` is an abstract class designed to be extended with an
-underlying implementation of the [`stream._read(size)`][stream-_read] method.
+For example:
-Please see [API for Stream Consumers][] for how to consume
-streams in your programs. What follows is an explanation of how to
-implement Readable streams in your programs.
+```js
+const Writable = require('stream').Writable;
-#### new stream.Readable([options])
+class MyWritable extends Writable {
+ constructor(options) {
+ // Calls the stream.Writable() constructor
+ super(options);
+ }
+}
+```
-* `options` {Object}
- * `highWaterMark` {Number} The maximum number of bytes to store in
- the internal buffer before ceasing to read from the underlying
- resource. Default = `16384` (16kb), or `16` for `objectMode` streams
- * `encoding` {String} If specified, then buffers will be decoded to
- strings using the specified encoding. Default = `null`
- * `objectMode` {Boolean} Whether this stream should behave
- as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
- a single value instead of a Buffer of size n. Default = `false`
- * `read` {Function} Implementation for the [`stream._read()`][stream-_read]
- method.
+Or, when using pre-ES6 style constructors:
-In classes that extend the Readable class, make sure to call the
-Readable constructor so that the buffering settings can be properly
-initialized.
+```js
+const Writable = require('stream').Writable;
+const util = require('util');
-#### readable.\_read(size)
+function MyWritable(options) {
+ if (!(this instanceof MyWritable))
+ return new MyWritable(options);
+ Writable.call(this, options);
+}
+util.inherits(MyWritable, Writable);
+```
-* `size` {Number} Number of bytes to read asynchronously
+Or, using the Simplified Constructor approach:
-Note: **Implement this method, but do NOT call it directly.**
-
-This method is prefixed with an underscore because it is internal to the
-class that defines it and should only be called by the internal Readable
-class methods. All Readable stream implementations must provide a \_read
-method to fetch data from the underlying resource.
-
-When `_read()` is called, if data is available from the resource, the `_read()`
-implementation should start pushing that data into the read queue by calling
-[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from
-the resource and pushing data until push returns `false`, at which point it
-should stop reading from the resource. Only when `_read()` is called again after
-it has stopped should it start reading more data from the resource and pushing
-that data onto the queue.
-
-Note: once the `_read()` method is called, it will not be called again until
-the [`stream.push()`][stream-push] method is called.
-
-The `size` argument is advisory. Implementations where a "read" is a
-single call that returns data can use this to know how much data to
-fetch. Implementations where that is not relevant, such as TCP or
-TLS, may ignore this argument, and simply provide data whenever it
-becomes available. There is no need, for example to "wait" until
-`size` bytes are available before calling [`stream.push(chunk)`][stream-push].
+```js
+const Writable = require('stream').Writable;
-#### readable.push(chunk[, encoding])
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ // ...
+ },
+ writev(chunks, callback) {
+ // ...
+ }
+});
+```
+#### writable.\_write(chunk, encoding, callback)
-* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue
-* `encoding` {String} Encoding of String chunks. Must be a valid
- Buffer encoding, such as `'utf8'` or `'ascii'`
-* return {Boolean} Whether or not more pushes should be performed
+* `chunk` {Buffer|String} The chunk to be written. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then `encoding` is the
+ character encoding of that string. If chunk is a `Buffer`, or if the
+ stream is operating in object mode, `encoding` may be ignored.
+* `callback` {Function} Call this function (optionally with an error
+ argument) when processing is complete for the supplied chunk.
-Note: **This method should be called by Readable implementors, NOT
-by consumers of Readable streams.**
+All Writable stream implementations must provide a
+[`writable._write()`][stream-_write] method to send data to the underlying
+resource.
-If a value other than null is passed, The `push()` method adds a chunk of data
-into the queue for subsequent stream processors to consume. If `null` is
-passed, it signals the end of the stream (EOF), after which no more data
-can be written.
+*Note*: [Transform][] streams provide their own implementation of the
+[`writable._write()`][stream-_write].
-The data added with `push()` can be pulled out by calling the
-[`stream.read()`][stream-read] method when the [`'readable'`][] event fires.
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Writable
+class methods only.
-This API is designed to be as flexible as possible. For example,
-you may be wrapping a lower-level source which has some sort of
-pause/resume mechanism, and a data callback. In those cases, you
-could wrap the low-level source object by doing something like this:
+The `callback` method must be called to signal either that the write completed
+successfully or failed with an error. The first argument passed to the
+`callback` must be the `Error` object if the call failed or `null` if the
+write succeeded.
-```js
-// source is an object with readStop() and readStart() methods,
-// and an `ondata` member that gets called when it has data, and
-// an `onend` member that gets called when the data is over.
+It is important to note that all calls to `writable.write()` that occur between
+the time `writable._write()` is called and the `callback` is called will cause
+the written data to be buffered. Once the `callback` is invoked, the stream will
+emit a `'drain'` event. If a stream implementation is capable of processing
+multiple chunks of data at once, the `writable._writev()` method should be
+implemented.
-util.inherits(SourceWrapper, Readable);
+If the `decodeStrings` property is set in the constructor options, then
+`chunk` may be a string rather than a Buffer, and `encoding` will
+indicate the character encoding of the string. This is to support
+implementations that have an optimized handling for certain string
+data encodings. If the `decodeStrings` property is explicitly set to `false`,
+the `encoding` argument can be safely ignored, and `chunk` will always be a
+`Buffer`.
-function SourceWrapper(options) {
- Readable.call(this, options);
+The `writable._write()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
- this._source = getLowlevelSourceObject();
+#### writable.\_writev(chunks, callback)
- // Every time there's data, we push it into the internal buffer.
- this._source.ondata = (chunk) => {
- // if push() returns false, then we need to stop reading from source
- if (!this.push(chunk))
- this._source.readStop();
- };
+* `chunks` {Array} The chunks to be written. Each chunk has following
+ format: `{ chunk: ..., encoding: ... }`.
+* `callback` {Function} A callback function (optionally with an error
+ argument) to be invoked when processing is complete for the supplied chunks.
- // When the source ends, we push the EOF-signaling `null` chunk
- this._source.onend = () => {
- this.push(null);
- };
-}
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Writable
+class methods only.
-// _read will be called when the stream wants to pull more data in
-// the advisory size argument is ignored in this case.
-SourceWrapper.prototype._read = function(size) {
- this._source.readStart();
-};
-```
+The `writable._writev()` method may be implemented in addition to
+`writable._write()` in stream implementations that are capable of processing
+multiple chunks of data at once. If implemented, the method will be called with
+all chunks of data currently buffered in the write queue.
-#### Example: A Counting Stream
+The `writable._writev()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
-
+#### Errors While Writing
-This is a basic example of a Readable stream. It emits the numerals
-from 1 to 1,000,000 in ascending order, and then ends.
+It is recommended that errors occurring during the processing of the
+`writable._write()` and `writable._writev()` methods are reported by invoking
+the callback and passing the error as the first argument. This will cause an
+`'error'` event to be emitted by the Writable. Throwing an Error from within
+`writable._write()` can result in expected and inconsistent behavior depending
+on how the stream is being used. Using the callback ensures consistent and
+predictable handling of errors.
```js
-const Readable = require('stream').Readable;
-const util = require('util');
-util.inherits(Counter, Readable);
-
-function Counter(opt) {
- Readable.call(this, opt);
- this._max = 1000000;
- this._index = 1;
-}
+const Writable = require('stream').Writable;
-Counter.prototype._read = function() {
- var i = this._index++;
- if (i > this._max)
- this.push(null);
- else {
- var str = '' + i;
- var buf = Buffer.from(str, 'ascii');
- this.push(buf);
+const myWritable = new Writable({
+ write(chunk, encoding, callback) {
+ if (chunk.toString().indexOf('a') >= 0) {
+ callback(new Error('chunk is invalid'));
+ } else {
+ callback();
+ }
}
-};
+});
```
-#### Example: SimpleProtocol v1 (Sub-optimal)
+#### An Example Writable Stream
-This is similar to the `parseHeader` function described
-[here](#stream_readable_unshift_chunk), but implemented as a custom stream.
-Also, note that this implementation does not convert the incoming data to a
-string.
-
-However, this would be better implemented as a [Transform][] stream. See
-[SimpleProtocol v2][] for a better implementation.
+The following illustrates a rather simplistic (and somewhat pointless) custom
+Writable stream implementation. While this specific Writable stream instance
+is not of any real particular usefulness, the example illustrates each of the
+required elements of a custom [Writable][] stream instance:
```js
-// A parser for a simple data protocol.
-// The "header" is a JSON object, followed by 2 \n characters, and
-// then a message body.
-//
-// NOTE: This can be done more simply as a Transform stream!
-// Using Readable directly for this is sub-optimal. See the
-// alternative example below under the Transform section.
+const Writable = require('stream').Writable;
-const Readable = require('stream').Readable;
-const util = require('util');
+class MyWritable extends Writable {
+ constructor(options) {
+ super(options);
+ }
-util.inherits(SimpleProtocol, Readable);
+ _write(chunk, encoding, callback) {
+ if (chunk.toString().indexOf('a') >= 0) {
+ callback(new Error('chunk is invalid'));
+ } else {
+ callback();
+ }
+ }
+}
+```
-function SimpleProtocol(source, options) {
- if (!(this instanceof SimpleProtocol))
- return new SimpleProtocol(source, options);
+### Implementing a Readable Stream
- Readable.call(this, options);
- this._inBody = false;
- this._sawFirstCr = false;
+The `stream.Readable` class is extended to implement a [Readable][] stream.
- // source is a readable stream, such as a socket or file
- this._source = source;
+Custom Readable streams *must* call the `new stream.Readable([options])`
+constructor and implement the `readable._read()` method.
- source.on('end', () => {
- this.push(null);
- });
+#### new stream.Readable([options])
- // give it a kick whenever the source is readable
- // read(0) will not consume any bytes
- source.on('readable', () => {
- this.read(0);
- });
+* `options` {Object}
+ * `highWaterMark` {Number} The maximum number of bytes to store in
+ the internal buffer before ceasing to read from the underlying
+ resource. Defaults to `16384` (16kb), or `16` for `objectMode` streams
+ * `encoding` {String} If specified, then buffers will be decoded to
+ strings using the specified encoding. Defaults to `null`
+ * `objectMode` {Boolean} Whether this stream should behave
+ as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
+ a single value instead of a Buffer of size n. Defaults to `false`
+ * `read` {Function} Implementation for the [`stream._read()`][stream-_read]
+ method.
- this._rawHeader = [];
- this.header = null;
-}
+For example:
-SimpleProtocol.prototype._read = function(n) {
- if (!this._inBody) {
- var chunk = this._source.read();
-
- // if the source doesn't have data, we don't have data yet.
- if (chunk === null)
- return this.push('');
-
- // check if the chunk has a \n\n
- var split = -1;
- for (var i = 0; i < chunk.length; i++) {
- if (chunk[i] === 10) { // '\n'
- if (this._sawFirstCr) {
- split = i;
- break;
- } else {
- this._sawFirstCr = true;
- }
- } else {
- this._sawFirstCr = false;
- }
- }
+```js
+const Readable = require('stream').Readable;
- if (split === -1) {
- // still waiting for the \n\n
- // stash the chunk, and try again.
- this._rawHeader.push(chunk);
- this.push('');
- } else {
- this._inBody = true;
- var h = chunk.slice(0, split);
- this._rawHeader.push(h);
- var header = Buffer.concat(this._rawHeader).toString();
- try {
- this.header = JSON.parse(header);
- } catch (er) {
- this.emit('error', new Error('invalid simple protocol data'));
- return;
- }
- // now, because we got some extra data, unshift the rest
- // back into the read queue so that our consumer will see it.
- var b = chunk.slice(split);
- this.unshift(b);
- // calling unshift by itself does not reset the reading state
- // of the stream; since we're inside _read, doing an additional
- // push('') will reset the state appropriately.
- this.push('');
-
- // and let them know that we are done parsing the header.
- this.emit('header', this.header);
- }
- } else {
- // from there on, just provide the data to our consumer.
- // careful not to push(null), since that would indicate EOF.
- var chunk = this._source.read();
- if (chunk) this.push(chunk);
+class MyReadable extends Readable {
+ constructor(options) {
+ // Calls the stream.Readable(options) constructor
+ super(options);
}
-};
-
-// Usage:
-// var parser = new SimpleProtocol(source);
-// Now parser is a readable stream that will emit 'header'
-// with the parsed header data.
+}
```
-### Class: stream.Transform
+Or, when using pre-ES6 style constructors:
-A "transform" stream is a duplex stream where the output is causally
-connected in some way to the input, such as a [zlib][] stream or a
-[crypto][] stream.
+```js
+const Readable = require('stream').Readable;
+const util = require('util');
-There is no requirement that the output be the same size as the input,
-the same number of chunks, or arrive at the same time. For example, a
-Hash stream will only ever have a single chunk of output which is
-provided when the input is ended. A zlib stream will produce output
-that is either much smaller or much larger than its input.
+function MyReadable(options) {
+ if (!(this instanceof MyReadable))
+ return new MyReadable(options);
+ Readable.call(this, options);
+}
+util.inherits(MyReadable, Readable);
+```
-Rather than implement the [`stream._read()`][stream-_read] and
-[`stream._write()`][stream-_write] methods, Transform classes must implement the
-[`stream._transform()`][stream-_transform] method, and may optionally
-also implement the [`stream._flush()`][stream-_flush] method. (See below.)
+Or, using the Simplified Constructor approach:
-#### new stream.Transform([options])
+```js
+const Readable = require('stream').Readable;
-* `options` {Object} Passed to both Writable and Readable
- constructors. Also has the following fields:
- * `transform` {Function} Implementation for the
- [`stream._transform()`][stream-_transform] method.
- * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush]
- method.
+const myReadable = new Readable({
+ read(size) {
+ // ...
+ }
+});
+```
-In classes that extend the Transform class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
+#### readable.\_read(size)
-#### Events: 'finish' and 'end'
+* `size` {Number} Number of bytes to read asynchronously
-The [`'finish'`][] and [`'end'`][] events are from the parent Writable
-and Readable classes respectively. The `'finish'` event is fired after
-[`stream.end()`][stream-end] is called and all chunks have been processed by
-[`stream._transform()`][stream-_transform], `'end'` is fired after all data has
-been output which is after the callback in [`stream._flush()`][stream-_flush]
-has been called.
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
-#### transform.\_flush(callback)
+All Readable stream implementations must provide an implementation of the
+`readable._read()` method to fetch data from the underlying resource.
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done flushing any remaining data.
+When `readable._read()` is called, if data is available from the resource, the
+implementation should begin pushing that data into the read queue using the
+[`this.push(dataChunk)`][stream-push] method. `_read()` should continue reading
+from the resource and pushing data until `readable.push()` returns `false`. Only
+when `_read()` is called again after it has stopped should it resume pushing
+additional data onto the queue.
-Note: **This function MUST NOT be called directly.** It MAY be implemented
-by child classes, and if so, will be called by the internal Transform
-class methods only.
+*Note*: Once the `readable._read()` method has been called, it will not be
+called again until the [`readable.push()`][stream-push] method is called.
-In some cases, your transform operation may need to emit a bit more
-data at the end of the stream. For example, a `Zlib` compression
-stream will store up some internal state so that it can optimally
-compress the output. At the end, however, it needs to do the best it
-can with what is left, so that the data will be complete.
+The `size` argument is advisory. For implementations where a "read" is a
+single operation that returns data can use the `size` argument to determine how
+much data to fetch. Other implementations may ignore this argument and simply
+provide data whenever it becomes available. There is no need to "wait" until
+`size` bytes are available before calling [`stream.push(chunk)`][stream-push].
-In those cases, you can implement a `_flush()` method, which will be
-called at the very end, after all the written data is consumed, but
-before emitting [`'end'`][] to signal the end of the readable side. Just
-like with [`stream._transform()`][stream-_transform], call
-`transform.push(chunk)` zero or more times, as appropriate, and call `callback`
-when the flush operation is complete.
+The `readable._read()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
+#### readable.push(chunk[, encoding])
-#### transform.\_transform(chunk, encoding, callback)
+* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue
+* `encoding` {String} Encoding of String chunks. Must be a valid
+ Buffer encoding, such as `'utf8'` or `'ascii'`
+* Returns {Boolean} `true` if additional chunks of data may continued to be
+ pushed; `false` otherwise.
-* `chunk` {Buffer|String} The chunk to be transformed. Will **always**
- be a buffer unless the `decodeStrings` option was set to `false`.
-* `encoding` {String} If the chunk is a string, then this is the
- encoding type. If chunk is a buffer, then this is the special
- value - 'buffer', ignore it in this case.
-* `callback` {Function} Call this function (optionally with an error
- argument and data) when you are done processing the supplied chunk.
+When `chunk` is a `Buffer` or `string`, the `chunk` of data will be added to the
+internal queue for users of the stream to consume. Passing `chunk` as `null`
+signals the end of the stream (EOF), after which no more data can be written.
-Note: **This function MUST NOT be called directly.** It should be
-implemented by child classes, and called by the internal Transform
-class methods only.
+When the Readable is operating in paused mode, the data added with
+`readable.push()` can be read out by calling the
+[`readable.read()`][stream-read] method when the [`'readable'`][] event is
+emitted.
-All Transform stream implementations must provide a `_transform()`
-method to accept input and produce output.
+When the Readable is operating in flowing mode, the data added with
+`readable.push()` will be delivered by emitting a `'data'` event.
-`_transform()` should do whatever has to be done in this specific
-Transform class, to handle the bytes being written, and pass them off
-to the readable portion of the interface. Do asynchronous I/O,
-process things, and so on.
+The `readable.push()` method is designed to be as flexible as possible. For
+example, when wrapping a lower-level source that provides some form of
+pause/resume mechanism, and a data callback, the low-level source can be wrapped
+by the custom Readable instance as illustrated in the following example:
-Call `transform.push(outputChunk)` 0 or more times to generate output
-from this input chunk, depending on how much data you want to output
-as a result of this chunk.
+```js
+// source is an object with readStop() and readStart() methods,
+// and an `ondata` member that gets called when it has data, and
+// an `onend` member that gets called when the data is over.
-Call the callback function only when the current chunk is completely
-consumed. Note that there may or may not be output as a result of any
-particular input chunk. If you supply a second argument to the callback
-it will be passed to the push method. In other words the following are
-equivalent:
+class SourceWrapper extends Readable {
+ constructor(options) {
+ super(options);
-```js
-transform.prototype._transform = function (data, encoding, callback) {
- this.push(data);
- callback();
-};
+ this._source = getLowlevelSourceObject();
-transform.prototype._transform = function (data, encoding, callback) {
- callback(null, data);
-};
+ // Every time there's data, push it into the internal buffer.
+ this._source.ondata = (chunk) => {
+ // if push() returns false, then stop reading from source
+ if (!this.push(chunk))
+ this._source.readStop();
+ };
+
+ // When the source ends, push the EOF-signaling `null` chunk
+ this._source.onend = () => {
+ this.push(null);
+ };
+ }
+ // _read will be called when the stream wants to pull more data in
+ // the advisory size argument is ignored in this case.
+ _read(size) {
+ this._source.readStart();
+ }
+}
```
+*Note*: The `readable.push()` method is intended be called only by Readable
+Implementers, and only from within the `readable._read()` method.
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
+#### Errors While Reading
-#### Example: `SimpleProtocol` parser v2
+It is recommended that errors occurring during the processing of the
+`readable._read()` method are emitted using the `'error'` event rather than
+being thrown. Throwing an Error from within `readable._read()` can result in
+expected and inconsistent behavior depending on whether the stream is operating
+in flowing or paused mode. Using the `'error'` event ensures consistent and
+predictable handling of errors.
-The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple
-protocol parser can be implemented simply by using the higher level
-[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol
-v1` examples.
+```js
+const Readable = require('stream').Readable;
-In this example, rather than providing the input as an argument, it
-would be piped into the parser, which is a more idiomatic Node.js stream
-approach.
+const myReadable = new Readable({
+ read(size) {
+ if (checkSomeErrorCondition()) {
+ process.nextTick(() => this.emit('error', err));
+ return;
+ }
+ // do some work
+ }
+});
+```
-```javascript
-const util = require('util');
-const Transform = require('stream').Transform;
-util.inherits(SimpleProtocol, Transform);
+#### An Example Counting Stream
-function SimpleProtocol(options) {
- if (!(this instanceof SimpleProtocol))
- return new SimpleProtocol(options);
+
- Transform.call(this, options);
- this._inBody = false;
- this._sawFirstCr = false;
- this._rawHeader = [];
- this.header = null;
-}
+The following is a basic example of a Readable stream that emits the numerals
+from 1 to 1,000,000 in ascending order, and then ends.
-SimpleProtocol.prototype._transform = function(chunk, encoding, done) {
- if (!this._inBody) {
- // check if the chunk has a \n\n
- var split = -1;
- for (var i = 0; i < chunk.length; i++) {
- if (chunk[i] === 10) { // '\n'
- if (this._sawFirstCr) {
- split = i;
- break;
- } else {
- this._sawFirstCr = true;
- }
- } else {
- this._sawFirstCr = false;
- }
- }
+```js
+const Readable = require('stream').Readable;
- if (split === -1) {
- // still waiting for the \n\n
- // stash the chunk, and try again.
- this._rawHeader.push(chunk);
- } else {
- this._inBody = true;
- var h = chunk.slice(0, split);
- this._rawHeader.push(h);
- var header = Buffer.concat(this._rawHeader).toString();
- try {
- this.header = JSON.parse(header);
- } catch (er) {
- this.emit('error', new Error('invalid simple protocol data'));
- return;
- }
- // and let them know that we are done parsing the header.
- this.emit('header', this.header);
+class Counter extends Readable {
+ constructor(opt) {
+ super(opt);
+ this._max = 1000000;
+ this._index = 1;
+ }
- // now, because we got some extra data, emit this first.
- this.push(chunk.slice(split));
+ _read() {
+ var i = this._index++;
+ if (i > this._max)
+ this.push(null);
+ else {
+ var str = '' + i;
+ var buf = Buffer.from(str, 'ascii');
+ this.push(buf);
}
- } else {
- // from there on, just provide the data to our consumer as-is.
- this.push(chunk);
}
- done();
-};
-
-// Usage:
-// var parser = new SimpleProtocol();
-// source.pipe(parser)
-// Now parser is a readable stream that will emit 'header'
-// with the parsed header data.
+}
```
-### Class: stream.Writable
+### Implementing a Duplex Stream
-
+A [Duplex][] stream is one that implements both [Readable][] and [Writable][],
+such as a TCP socket connection.
-`stream.Writable` is an abstract class designed to be extended with an
-underlying implementation of the
-[`stream._write(chunk, encoding, callback)`][stream-_write] method.
+Because Javascript does not have support for multiple inheritance, the
+`stream.Duplex` class is extended to implement a [Duplex][] stream (as opposed
+to extending the `stream.Readable` *and* `stream.Writable` classes).
-Please see [API for Stream Consumers][] for how to consume
-writable streams in your programs. What follows is an explanation of
-how to implement Writable streams in your programs.
+*Note*: The `stream.Duplex` class prototypically inherits from `stream.Readable`
+and parasitically from `stream.Writable`.
-#### new stream.Writable([options])
+Custom Duplex streams *must* call the `new stream.Duplex([options])`
+constructor and implement *both* the `readable._read()` and
+`writable._write()` methods.
-* `options` {Object}
- * `highWaterMark` {Number} Buffer level when
- [`stream.write()`][stream-write] starts returning `false`. Default = `16384`
- (16kb), or `16` for `objectMode` streams.
- * `decodeStrings` {Boolean} Whether or not to decode strings into
- Buffers before passing them to [`stream._write()`][stream-_write].
- Default = `true`
- * `objectMode` {Boolean} Whether or not the
- [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can
- write arbitrary data instead of only `Buffer` / `String` data.
- Default = `false`
- * `write` {Function} Implementation for the
- [`stream._write()`][stream-_write] method.
- * `writev` {Function} Implementation for the
- [`stream._writev()`][stream-_writev] method.
+#### new stream.Duplex(options)
-In classes that extend the Writable class, make sure to call the
-constructor so that the buffering settings can be properly
-initialized.
+* `options` {Object} Passed to both Writable and Readable
+ constructors. Also has the following fields:
+ * `allowHalfOpen` {Boolean} Defaults to `true`. If set to `false`, then
+ the stream will automatically end the readable side when the
+ writable side ends and vice versa.
+ * `readableObjectMode` {Boolean} Defaults to `false`. Sets `objectMode`
+ for readable side of the stream. Has no effect if `objectMode`
+ is `true`.
+ * `writableObjectMode` {Boolean} Defaults to `false`. Sets `objectMode`
+ for writable side of the stream. Has no effect if `objectMode`
+ is `true`.
-#### writable.\_write(chunk, encoding, callback)
+For example:
-* `chunk` {Buffer|String} The chunk to be written. Will **always**
- be a buffer unless the `decodeStrings` option was set to `false`.
-* `encoding` {String} If the chunk is a string, then this is the
- encoding type. If chunk is a buffer, then this is the special
- value - 'buffer', ignore it in this case.
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done processing the supplied chunk.
+```js
+const Duplex = require('stream').Duplex;
-All Writable stream implementations must provide a
-[`stream._write()`][stream-_write] method to send data to the underlying
-resource.
+class MyDuplex extends Duplex {
+ constructor(options) {
+ super(options);
+ }
+}
+```
-Note: **This function MUST NOT be called directly.** It should be
-implemented by child classes, and called by the internal Writable
-class methods only.
+Or, when using pre-ES6 style constructors:
-Call the callback using the standard `callback(error)` pattern to
-signal that the write completed successfully or with an error.
+```js
+const Duplex = require('stream').Duplex;
+const util = require('util');
-If the `decodeStrings` flag is set in the constructor options, then
-`chunk` may be a string rather than a Buffer, and `encoding` will
-indicate the sort of string that it is. This is to support
-implementations that have an optimized handling for certain string
-data encodings. If you do not explicitly set the `decodeStrings`
-option to `false`, then you can safely ignore the `encoding` argument,
-and assume that `chunk` will always be a Buffer.
+function MyDuplex(options) {
+ if (!(this instanceof MyDuplex))
+ return new MyDuplex(options);
+ Duplex.call(this, options);
+}
+util.inherits(MyDuplex, Duplex);
+```
-This method is prefixed with an underscore because it is internal to
-the class that defines it, and should not be called directly by user
-programs. However, you **are** expected to override this method in
-your own extension classes.
+Or, using the Simplified Constructor approach:
-#### writable.\_writev(chunks, callback)
+```js
+const Duplex = require('stream').Duplex;
-* `chunks` {Array} The chunks to be written. Each chunk has following
- format: `{ chunk: ..., encoding: ... }`.
-* `callback` {Function} Call this function (optionally with an error
- argument) when you are done processing the supplied chunks.
+const myDuplex = new Duplex({
+ read(size) {
+ // ...
+ },
+ write(chunk, encoding, callback) {
+ // ...
+ }
+});
+```
-Note: **This function MUST NOT be called directly.** It may be
-implemented by child classes, and called by the internal Writable
-class methods only.
+#### An Example Duplex Stream
-This function is completely optional to implement. In most cases it is
-unnecessary. If implemented, it will be called with all the chunks
-that are buffered in the write queue.
+The following illustrates a simple example of a Duplex stream that wraps a
+hypothetical lower-level source object to which data can be written, and
+from which data can be read, albeit using an API that is not compatible with
+Node.js streams.
+The following illustrates a simple example of a Duplex stream that buffers
+incoming written data via the [Writable][] interface that is read back out
+via the [Readable][] interface.
+```js
+const Duplex = require('stream').Duplex;
+const kSource = Symbol('source');
-## Simplified Constructor API
+class MyDuplex extends Duplex {
+ constructor(source, options) {
+ super(options);
+ this[kSource] = source;
+ }
-
+ _write(chunk, encoding, callback) {
+ // The underlying source only deals with strings
+ if (Buffer.isBuffer(chunk))
+ chunk = chunk.toString(encoding);
+ this[kSource].writeSomeData(chunk, encoding);
+ callback();
+ }
+
+ _read(size) {
+ this[kSource].fetchSomeData(size, (data, encoding) => {
+ this.push(Buffer.from(data, encoding));
+ });
+ }
+}
+```
-In simple cases there is now the added benefit of being able to construct a
-stream without inheritance.
+The most important aspect of a Duplex stream is that the Readable and Writable
+sides operate independently of one another despite co-existing within a single
+object instance.
-This can be done by passing the appropriate methods as constructor options:
+#### Object Mode Duplex Streams
-Examples:
+For Duplex streams, `objectMode` can be set exclusively for either the Readable
+or Writable side using the `readableObjectMode` and `writableObjectMode` options
+respectively.
-### Duplex
+In the following example, for instance, a new Transform stream (which is a
+type of [Duplex][] stream) is created that has an object mode Writable side
+that accepts JavaScript numbers that are converted to hexidecimal strings on
+the Readable side.
```js
-var duplex = new stream.Duplex({
- read: function(n) {
- // sets this._read under the hood
+const Transform = require('stream').Transform;
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- },
- write: function(chunk, encoding, next) {
- // sets this._write under the hood
+// All Transform streams are also Duplex Streams
+const myTransform = new Transform({
+ writableObjectMode: true,
+
+ transform(chunk, encoding, callback) {
+ // Coerce the chunk to a number if necessary
+ chunk |= 0;
- // An optional error can be passed as the first argument
- next()
+ // Transform the chunk into something else.
+ const data = chunk.toString(16);
+
+ // Push the data onto the readable queue.
+ callback(null, '0'.repeat(data.length % 2) + data);
}
});
-// or
+myTransform.setEncoding('ascii');
+myTransform.on('data', (chunk) => console.log(chunk));
-var duplex = new stream.Duplex({
- read: function(n) {
- // sets this._read under the hood
+myTransform.write(1);
+ // Prints: 01
+myTransform.write(10);
+ // Prints: 0a
+myTransform.write(100);
+ // Prints: 64
+```
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
- },
- writev: function(chunks, next) {
- // sets this._writev under the hood
+### Implementing a Transform Stream
- // An optional error can be passed as the first argument
- next()
- }
-});
-```
+A [Transform][] stream is a [Duplex][] stream where the output is computed
+in some way from the input. Examples include [zlib][] streams or [crypto][]
+streams that compress, encrypt, or decrypt data.
+
+*Note*: There is no requirement that the output be the same size as the input,
+the same number of chunks, or arrive at the same time. For example, a
+Hash stream will only ever have a single chunk of output which is
+provided when the input is ended. A `zlib` stream will produce output
+that is either much smaller or much larger than its input.
+
+The `stream.Transform` class is extended to implement a [Transform][] stream.
+
+The `stream.Transform` class prototypically inherits from `stream.Duplex` and
+implements its own versions of the `writable._write()` and `readable._read()`
+methods. Custom Transform implementations *must* implement the
+[`transform._transform()`][stream-_transform] method and *may* also implement
+the [`transform._flush()`][stream-_flush] method.
+
+*Note*: Care must be taken when using Transform streams in that data written
+to the stream can cause the Writable side of the stream to become paused if
+the output on the Readable side is not consumed.
+
+#### new stream.Transform([options])
+
+* `options` {Object} Passed to both Writable and Readable
+ constructors. Also has the following fields:
+ * `transform` {Function} Implementation for the
+ [`stream._transform()`][stream-_transform] method.
+ * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush]
+ method.
-### Readable
+For example:
```js
-var readable = new stream.Readable({
- read: function(n) {
- // sets this._read under the hood
+const Transform = require('stream').Transform;
- // push data onto the read queue, passing null
- // will signal the end of the stream (EOF)
- this.push(chunk);
+class MyTransform extends Transform {
+ constructor(options) {
+ super(options);
}
-});
+}
```
-### Transform
+Or, when using pre-ES6 style constructors:
```js
-var transform = new stream.Transform({
- transform: function(chunk, encoding, next) {
- // sets this._transform under the hood
+const Transform = require('stream').Transform;
+const util = require('util');
- // generate output as many times as needed
- // this.push(chunk);
+function MyTransform(options) {
+ if (!(this instanceof MyTransform))
+ return new MyTransform(options);
+ Transform.call(this, options);
+}
+util.inherits(MyTransform, Transform);
+```
- // call when the current chunk is consumed
- next();
- },
- flush: function(done) {
- // sets this._flush under the hood
+Or, using the Simplified Constructor approach:
- // generate output as many times as needed
- // this.push(chunk);
+```js
+const Transform = require('stream').Transform;
- done();
+const myTransform = new Transform({
+ transform(chunk, encoding, callback) {
+ // ...
}
});
```
-### Writable
+#### Events: 'finish' and 'end'
-```js
-var writable = new stream.Writable({
- write: function(chunk, encoding, next) {
- // sets this._write under the hood
+The [`'finish'`][] and [`'end'`][] events are from the `stream.Writable`
+and `stream.Readable` classes, respectively. The `'finish'` event is emitted
+after [`stream.end()`][stream-end] is called and all chunks have been processed
+by [`stream._transform()`][stream-_transform]. The `'end'` event is emitted
+after all data has been output, which occurs after the callback in
+[`transform._flush()`][stream-_flush] has been called.
- // An optional error can be passed as the first argument
- next()
- }
-});
+#### transform.\_flush(callback)
-// or
+* `callback` {Function} A callback function (optionally with an error
+ argument) to be called when remaining data has been flushed.
-var writable = new stream.Writable({
- writev: function(chunks, next) {
- // sets this._writev under the hood
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
- // An optional error can be passed as the first argument
- next()
- }
-});
-```
+In some cases, a transform operation may need to emit an additional bit of
+data at the end of the stream. For example, a `zlib` compression stream will
+store an amount of internal state used to optimally compress the output. When
+the stream ends, however, that additional data needs to be flushed so that the
+compressed data will be complete.
-## Streams: Under the Hood
+Custom [Transform][] implementations *may* implement the `transform._flush()`
+method. This will be called when there is no more written data to be consumed,
+but before the [`'end'`][] event is emitted signaling the end of the
+[Readable][] stream.
-
+Within the `transform._flush()` implementation, the `readable.push()` method
+may be called zero or more times, as appropriate. The `callback` function must
+be called when the flush operation is complete.
-### Buffering
+The `transform._flush()` method is prefixed with an underscore because it is
+internal to the class that defines it, and should never be called directly by
+user programs.
-
+#### transform.\_transform(chunk, encoding, callback)
-Both Writable and Readable streams will buffer data on an internal
-object which can be retrieved from `_writableState.getBuffer()` or
-`_readableState.buffer`, respectively.
+* `chunk` {Buffer|String} The chunk to be transformed. Will **always**
+ be a buffer unless the `decodeStrings` option was set to `false`.
+* `encoding` {String} If the chunk is a string, then this is the
+ encoding type. If chunk is a buffer, then this is the special
+ value - 'buffer', ignore it in this case.
+* `callback` {Function} A callback function (optionally with an error
+ argument and data) to be called after the supplied `chunk` has been
+ processed.
-The amount of data that will potentially be buffered depends on the
-`highWaterMark` option which is passed into the constructor.
+*Note*: **This function MUST NOT be called by application code directly.** It
+should be implemented by child classes, and called only by the internal Readable
+class methods only.
-Buffering in Readable streams happens when the implementation calls
-[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not
-call [`stream.read()`][stream-read], then the data will sit in the internal
-queue until it is consumed.
+All Transform stream implementations must provide a `_transform()`
+method to accept input and produce output. The `transform._transform()`
+implementation handles the bytes being written, computes an output, then passes
+that output off to the readable portion using the `readable.push()` method.
+
+The `transform.push()` method may be called zero or more times to generate
+output from a single input chunk, depending on how much is to be output
+as a result of the chunk.
-Buffering in Writable streams happens when the user calls
-[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`.
+It is possible that no output is generated from any given chunk of input data.
-The purpose of streams, especially with the [`stream.pipe()`][] method, is to
-limit the buffering of data to acceptable levels, so that sources and
-destinations of varying speed will not overwhelm the available memory.
+The `callback` function must be called only when the current chunk is completely
+consumed. The first argument passed to the `callback` must be an `Error` object
+if an error occurred while processing the input or `null` otherwise. If a second
+argument is passed to the `callback`, it will be forwarded on to the
+`readable.push()` method. In other words the following are equivalent:
+
+```js
+transform.prototype._transform = function (data, encoding, callback) {
+ this.push(data);
+ callback();
+};
+
+transform.prototype._transform = function (data, encoding, callback) {
+ callback(null, data);
+};
+```
+
+The `transform._transform()` method is prefixed with an underscore because it
+is internal to the class that defines it, and should never be called directly by
+user programs.
+
+#### Class: stream.PassThrough
+
+The `stream.PassThrough` class is a trivial implementation of a [Transform][]
+stream that simply passes the input bytes across to the output. Its purpose is
+primarily for examples and testing, but there are some use cases where
+`stream.PassThrough` is useful as a building block for novel sorts of streams.
+
+## Additional Notes
+
+
### Compatibility with Older Node.js Versions
@@ -1538,26 +1874,26 @@ destinations of varying speed will not overwhelm the available memory.
In versions of Node.js prior to v0.10, the Readable stream interface was
simpler, but also less powerful and less useful.
-* Rather than waiting for you to call the [`stream.read()`][stream-read] method,
- [`'data'`][] events would start emitting immediately. If you needed to do
- some I/O to decide how to handle data, then you had to store the chunks
- in some kind of buffer so that they would not be lost.
+* Rather than waiting for calls the [`stream.read()`][stream-read] method,
+ [`'data'`][] events would begin emitting immediately. Applications that
+ would need to perform some amount of work to decide how to handle data
+ were required to store read data into buffers so the data would not be lost.
* The [`stream.pause()`][stream-pause] method was advisory, rather than
- guaranteed. This meant that you still had to be prepared to receive
- [`'data'`][] events even when the stream was in a paused state.
-
-In Node.js v0.10, the [Readable][] class was added.
-For backwards compatibility with older Node.js programs, Readable streams
-switch into "flowing mode" when a [`'data'`][] event handler is added, or
-when the [`stream.resume()`][stream-resume] method is called. The effect is
-that, even if you are not using the new [`stream.read()`][stream-read] method
-and [`'readable'`][] event, you no longer have to worry about losing
+ guaranteed. This meant that it was still necessary to be prepared to receive
+ [`'data'`][] events *even when the stream was in a paused state*.
+
+In Node.js v0.10, the [Readable][] class was added. For backwards compatibility
+with older Node.js programs, Readable streams switch into "flowing mode" when a
+[`'data'`][] event handler is added, or when the
+[`stream.resume()`][stream-resume] method is called. The effect is that, even
+when not using the new [`stream.read()`][stream-read] method and
+[`'readable'`][] event, it is no longer necessary to worry about losing
[`'data'`][] chunks.
-Most programs will continue to function normally. However, this
-introduces an edge case in the following conditions:
+While most applications will continue to function normally, this introduces an
+edge case in the following conditions:
-* No [`'data'`][] event handler is added.
+* No [`'data'`][] event listener is added.
* The [`stream.resume()`][stream-resume] method is never called.
* The stream is not piped to any writable destination.
@@ -1570,25 +1906,25 @@ net.createServer((socket) => {
// we add an 'end' method, but never consume the data
socket.on('end', () => {
// It will never get here.
- socket.end('I got your message (but didnt read it)\n');
+ socket.end('The message was received but was not processed.\n');
});
}).listen(1337);
```
In versions of Node.js prior to v0.10, the incoming message data would be
-simply discarded. However, in Node.js v0.10 and beyond,
-the socket will remain paused forever.
+simply discarded. However, in Node.js v0.10 and beyond, the socket remains
+paused forever.
The workaround in this situation is to call the
-[`stream.resume()`][stream-resume] method to start the flow of data:
+[`stream.resume()`][stream-resume] method to begin the flow of data:
```js
// Workaround
net.createServer((socket) => {
socket.on('end', () => {
- socket.end('I got your message (but didnt read it)\n');
+ socket.end('The message was received but was not processed.\n');
});
// start the flow of data, discarding it.
@@ -1599,159 +1935,66 @@ net.createServer((socket) => {
In addition to new Readable streams switching into flowing mode,
pre-v0.10 style streams can be wrapped in a Readable class using the
-[`stream.wrap()`][] method.
-
-
-### Object Mode
-
-
-
-Normally, Streams operate on Strings and Buffers exclusively.
-
-Streams that are in **object mode** can emit generic JavaScript values
-other than Buffers and Strings.
-
-A Readable stream in object mode will always return a single item from
-a call to [`stream.read(size)`][stream-read], regardless of what the size
-argument is.
-
-A Writable stream in object mode will always ignore the `encoding`
-argument to [`stream.write(data, encoding)`][stream-write].
-
-The special value `null` still retains its special value for object
-mode streams. That is, for object mode readable streams, `null` as a
-return value from [`stream.read()`][stream-read] indicates that there is no more
-data, and [`stream.push(null)`][stream-push] will signal the end of stream data
-(`EOF`).
+[`readable.wrap()`][`stream.wrap()`] method.
-No streams in Node.js core are object mode streams. This pattern is only
-used by userland streaming libraries.
-You should set `objectMode` in your stream child class constructor on
-the options object. Setting `objectMode` mid-stream is not safe.
+### `readable.read(0)`
-For Duplex streams `objectMode` can be set exclusively for readable or
-writable side with `readableObjectMode` and `writableObjectMode`
-respectively. These options can be used to implement parsers and
-serializers with Transform streams.
-
-```js
-const util = require('util');
-const StringDecoder = require('string_decoder').StringDecoder;
-const Transform = require('stream').Transform;
-util.inherits(JSONParseStream, Transform);
-
-// Gets \n-delimited JSON string data, and emits the parsed objects
-function JSONParseStream() {
- if (!(this instanceof JSONParseStream))
- return new JSONParseStream();
-
- Transform.call(this, { readableObjectMode : true });
-
- this._buffer = '';
- this._decoder = new StringDecoder('utf8');
-}
-
-JSONParseStream.prototype._transform = function(chunk, encoding, cb) {
- this._buffer += this._decoder.write(chunk);
- // split on newlines
- var lines = this._buffer.split(/\r?\n/);
- // keep the last partial line buffered
- this._buffer = lines.pop();
- for (var l = 0; l < lines.length; l++) {
- var line = lines[l];
- try {
- var obj = JSON.parse(line);
- } catch (er) {
- this.emit('error', er);
- return;
- }
- // push the parsed object out to the readable consumer
- this.push(obj);
- }
- cb();
-};
-
-JSONParseStream.prototype._flush = function(cb) {
- // Just handle any leftover
- var rem = this._buffer.trim();
- if (rem) {
- try {
- var obj = JSON.parse(rem);
- } catch (er) {
- this.emit('error', er);
- return;
- }
- // push the parsed object out to the readable consumer
- this.push(obj);
- }
- cb();
-};
-```
-
-### `stream.read(0)`
-
-There are some cases where you want to trigger a refresh of the
+There are some cases where it is necessary to trigger a refresh of the
underlying readable stream mechanisms, without actually consuming any
-data. In that case, you can call `stream.read(0)`, which will always
-return null.
+data. In such cases, it is possible to call `readable.read(0)`, which will
+always return `null`.
If the internal read buffer is below the `highWaterMark`, and the
stream is not currently reading, then calling `stream.read(0)` will trigger
a low-level [`stream._read()`][stream-_read] call.
-There is almost never a need to do this. However, you will see some
-cases in Node.js's internals where this is done, particularly in the
+While most applications will almost never need to do this, there are
+situations within Node.js where this is done, particularly in the
Readable stream class internals.
-### `stream.push('')`
-
-Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an
-interesting side effect. Because it *is* a call to
-[`stream.push()`][stream-push], it will end the `reading` process. However, it
-does *not* add any data to the readable buffer, so there's nothing for
-a user to consume.
+### `readable.push('')`
-Very rarely, there are cases where you have no data to provide now,
-but the consumer of your stream (or, perhaps, another bit of your own
-code) will know when to check again, by calling [`stream.read(0)`][stream-read].
-In those cases, you *may* call `stream.push('')`.
+Use of `readable.push('')` is not recommended.
-So far, the only use case for this functionality is in the
-[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you
-find that you have to use `stream.push('')`, please consider another
-approach, because it almost certainly indicates that something is
-horribly wrong.
+Pushing a zero-byte string or `Buffer` to a stream that is not in object mode
+has an interesting side effect. Because it *is* a call to
+[`readable.push()`][stream-push], the call will end the reading process.
+However, because the argument is an empty string, no data is added to the
+readable buffer so there is nothing for a user to consume.
[`'data'`]: #stream_event_data
[`'drain'`]: #stream_event_drain
[`'end'`]: #stream_event_end
[`'finish'`]: #stream_event_finish
[`'readable'`]: #stream_event_readable
-[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.1.0/api/buffer.html#buffer_buf_tostring_encoding_start_end
-[`EventEmitter`]: https://nodejs.org/docs/v6.1.0/api/events.html#events_class_eventemitter
-[`process.stderr`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stderr
-[`process.stdin`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdin
-[`process.stdout`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdout
+[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.3.1/api/buffer.html#buffer_buf_tostring_encoding_start_end
+[`EventEmitter`]: https://nodejs.org/docs/v6.3.1/api/events.html#events_class_eventemitter
+[`process.stderr`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stderr
+[`process.stdin`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stdin
+[`process.stdout`]: https://nodejs.org/docs/v6.3.1/api/process.html#process_process_stdout
[`stream.cork()`]: #stream_writable_cork
[`stream.pipe()`]: #stream_readable_pipe_destination_options
[`stream.uncork()`]: #stream_writable_uncork
[`stream.unpipe()`]: #stream_readable_unpipe_destination
[`stream.wrap()`]: #stream_readable_wrap_stream
-[`tls.CryptoStream`]: https://nodejs.org/docs/v6.1.0/api/tls.html#tls_class_cryptostream
-[`util.inherits()`]: https://nodejs.org/docs/v6.1.0/api/util.html#util_util_inherits_constructor_superconstructor
+[`tls.CryptoStream`]: https://nodejs.org/docs/v6.3.1/api/tls.html#tls_class_cryptostream
[API for Stream Consumers]: #stream_api_for_stream_consumers
-[API for Stream Implementors]: #stream_api_for_stream_implementors
-[child process stdin]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdin
-[child process stdout and stderr]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdout
+[API for Stream Implementers]: #stream_api_for_stream_implementers
+[child process stdin]: https://nodejs.org/docs/v6.3.1/api/child_process.html#child_process_child_stdin
+[child process stdout and stderr]: https://nodejs.org/docs/v6.3.1/api/child_process.html#child_process_child_stdout
[Compatibility]: #stream_compatibility_with_older_node_js_versions
[crypto]: crypto.html
[Duplex]: #stream_class_stream_duplex
-[fs read streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_readstream
-[fs write streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_writestream
-[HTTP requests, on the client]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_clientrequest
-[HTTP responses, on the server]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_serverresponse
-[http-incoming-message]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_incomingmessage
+[fs read streams]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_class_fs_readstream
+[fs write streams]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_class_fs_writestream
+[`fs.createReadStream()`]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_fs_createreadstream_path_options
+[`fs.createWriteStream()`]: https://nodejs.org/docs/v6.3.1/api/fs.html#fs_fs_createwritestream_path_options
+[`net.Socket`]: https://nodejs.org/docs/v6.3.1/api/net.html#net_class_net_socket
+[`zlib.createDeflate()`]: https://nodejs.org/docs/v6.3.1/api/zlib.html#zlib_zlib_createdeflate_options
+[HTTP requests, on the client]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_clientrequest
+[HTTP responses, on the server]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_serverresponse
+[http-incoming-message]: https://nodejs.org/docs/v6.3.1/api/http.html#http_class_http_incomingmessage
[Object mode]: #stream_object_mode
[Readable]: #stream_class_stream_readable
[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2
@@ -1766,7 +2009,7 @@ horribly wrong.
[stream-read]: #stream_readable_read_size
[stream-resume]: #stream_readable_resume
[stream-write]: #stream_writable_write_chunk_encoding_callback
-[TCP sockets]: https://nodejs.org/docs/v6.1.0/api/net.html#net_class_net_socket
+[TCP sockets]: https://nodejs.org/docs/v6.3.1/api/net.html#net_class_net_socket
[Transform]: #stream_class_stream_transform
[Writable]: #stream_class_stream_writable
[zlib]: zlib.html
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
index 79914fa684cbb1..208cc65f1cca99 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
@@ -51,21 +51,21 @@ if (debugUtil && debugUtil.debuglog) {
}
/**/
+var BufferList = require('./internal/streams/BufferList');
var StringDecoder;
util.inherits(Readable, Stream);
-var hasPrependListener = typeof EE.prototype.prependListener === 'function';
-
function prependListener(emitter, event, fn) {
- if (hasPrependListener) return emitter.prependListener(event, fn);
-
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS. This is here
- // only because this code needs to continue to work with older versions
- // of Node.js that do not include the prependListener() method. The goal
- // is to eventually remove this hack.
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+ if (typeof emitter.prependListener === 'function') {
+ return emitter.prependListener(event, fn);
+ } else {
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+ }
}
var Duplex;
@@ -89,7 +89,10 @@ function ReadableState(options, stream) {
// cast to ints.
this.highWaterMark = ~ ~this.highWaterMark;
- this.buffer = [];
+ // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+ this.buffer = new BufferList();
this.length = 0;
this.pipes = null;
this.pipesCount = 0;
@@ -252,7 +255,8 @@ function computeNewHighWaterMark(n) {
if (n >= MAX_HWM) {
n = MAX_HWM;
} else {
- // Get the next highest power of 2
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
n--;
n |= n >>> 1;
n |= n >>> 2;
@@ -264,44 +268,34 @@ function computeNewHighWaterMark(n) {
return n;
}
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
function howMuchToRead(n, state) {
- if (state.length === 0 && state.ended) return 0;
-
- if (state.objectMode) return n === 0 ? 0 : 1;
-
- if (n === null || isNaN(n)) {
- // only flow one buffer at a time
- if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length;
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
}
-
- if (n <= 0) return 0;
-
- // If we're asking for more than the target buffer level,
- // then raise the water mark. Bump up to the next highest
- // power of 2, to prevent increasing it excessively in tiny
- // amounts.
+ // If we're asking for more than the current hwm, then raise the hwm.
if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
-
- // don't have that much. return null, unless we've ended.
- if (n > state.length) {
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- } else {
- return state.length;
- }
+ if (n <= state.length) return n;
+ // Don't have enough
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
}
-
- return n;
+ return state.length;
}
// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function (n) {
debug('read', n);
+ n = parseInt(n, 10);
var state = this._readableState;
var nOrig = n;
- if (typeof n !== 'number' || n > 0) state.emittedReadable = false;
+ if (n !== 0) state.emittedReadable = false;
// if we're doing read(0) to trigger a readable event, but we
// already have a bunch of data in the buffer, then just trigger
@@ -357,9 +351,7 @@ Readable.prototype.read = function (n) {
if (state.ended || state.reading) {
doRead = false;
debug('reading or ended', doRead);
- }
-
- if (doRead) {
+ } else if (doRead) {
debug('do read');
state.reading = true;
state.sync = true;
@@ -368,28 +360,29 @@ Readable.prototype.read = function (n) {
// call internal read method
this._read(state.highWaterMark);
state.sync = false;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (!state.reading) n = howMuchToRead(nOrig, state);
}
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (doRead && !state.reading) n = howMuchToRead(nOrig, state);
-
var ret;
if (n > 0) ret = fromList(n, state);else ret = null;
if (ret === null) {
state.needReadable = true;
n = 0;
+ } else {
+ state.length -= n;
}
- state.length -= n;
-
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (state.length === 0 && !state.ended) state.needReadable = true;
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true;
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended && state.length === 0) endReadable(this);
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
if (ret !== null) this.emit('data', ret);
@@ -537,11 +530,17 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
}
+ // If the user pushes more data while we're writing to dest then we'll end up
+ // in ondata again. However, we only want to increase awaitDrain once because
+ // dest will only emit one 'drain' event for the multiple writes.
+ // => Introduce a guard on increasing awaitDrain.
+ var increasedAwaitDrain = false;
src.on('data', ondata);
function ondata(chunk) {
debug('ondata');
+ increasedAwaitDrain = false;
var ret = dest.write(chunk);
- if (false === ret) {
+ if (false === ret && !increasedAwaitDrain) {
// If the user unpiped during `dest.write()`, it is possible
// to get stuck in a permanently paused state if that write
// also returned false.
@@ -549,6 +548,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
debug('false write response, pause', src._readableState.awaitDrain);
src._readableState.awaitDrain++;
+ increasedAwaitDrain = true;
}
src.pause();
}
@@ -662,18 +662,14 @@ Readable.prototype.unpipe = function (dest) {
Readable.prototype.on = function (ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
- // If listening to data, and it has not explicitly been paused,
- // then call resume to start the flow of data on the next tick.
- if (ev === 'data' && false !== this._readableState.flowing) {
- this.resume();
- }
-
- if (ev === 'readable' && !this._readableState.endEmitted) {
+ if (ev === 'data') {
+ // Start flowing on next tick if stream isn't explicitly paused
+ if (this._readableState.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
var state = this._readableState;
- if (!state.readableListening) {
- state.readableListening = true;
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
state.emittedReadable = false;
- state.needReadable = true;
if (!state.reading) {
processNextTick(nReadingNextTick, this);
} else if (state.length) {
@@ -717,6 +713,7 @@ function resume_(stream, state) {
}
state.resumeScheduled = false;
+ state.awaitDrain = 0;
stream.emit('resume');
flow(stream);
if (state.flowing && !state.reading) stream.read(0);
@@ -735,11 +732,7 @@ Readable.prototype.pause = function () {
function flow(stream) {
var state = stream._readableState;
debug('flow', state.flowing);
- if (state.flowing) {
- do {
- var chunk = stream.read();
- } while (null !== chunk && state.flowing);
- }
+ while (state.flowing && stream.read() !== null) {}
}
// wrap an old-style stream as the async data source.
@@ -810,50 +803,101 @@ Readable._fromList = fromList;
// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
function fromList(n, state) {
- var list = state.buffer;
- var length = state.length;
- var stringMode = !!state.decoder;
- var objectMode = !!state.objectMode;
- var ret;
-
- // nothing in the list, definitely empty.
- if (list.length === 0) return null;
+ // nothing buffered
+ if (state.length === 0) return null;
- if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) {
- // read it all, truncate the array.
- if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);
- list.length = 0;
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
} else {
- // read just some of it.
- if (n < list[0].length) {
- // just take a part of the first list item.
- // slice is the same for buffers and strings.
- var buf = list[0];
- ret = buf.slice(0, n);
- list[0] = buf.slice(n);
- } else if (n === list[0].length) {
- // first list is a perfect match
- ret = list.shift();
- } else {
- // complex case.
- // we have enough to cover it, but it spans past the first buffer.
- if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n);
-
- var c = 0;
- for (var i = 0, l = list.length; i < l && c < n; i++) {
- var _buf = list[0];
- var cpy = Math.min(n - c, _buf.length);
+ // read part of list
+ ret = fromListPartial(n, state.buffer, state.decoder);
+ }
- if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy);
+ return ret;
+}
- if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift();
+// Extracts only enough buffered data to satisfy the amount requested.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function fromListPartial(n, list, hasStrings) {
+ var ret;
+ if (n < list.head.data.length) {
+ // slice is the same for buffers and strings
+ ret = list.head.data.slice(0, n);
+ list.head.data = list.head.data.slice(n);
+ } else if (n === list.head.data.length) {
+ // first chunk is a perfect match
+ ret = list.shift();
+ } else {
+ // result spans more than one buffer
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
+ }
+ return ret;
+}
- c += cpy;
+// Copies a specified amount of characters from the list of buffered data
+// chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBufferString(n, list) {
+ var p = list.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = str.slice(nb);
}
+ break;
}
+ ++c;
}
+ list.length -= c;
+ return ret;
+}
+// Copies a specified amount of bytes from the list of buffered data chunks.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+function copyFromBuffer(n, list) {
+ var ret = bufferShim.allocUnsafe(n);
+ var p = list.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
+ } else {
+ list.head = p;
+ p.data = buf.slice(nb);
+ }
+ break;
+ }
+ ++c;
+ }
+ list.length -= c;
return ret;
}
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
new file mode 100644
index 00000000000000..e4bfcf02dc8bbf
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -0,0 +1,64 @@
+'use strict';
+
+var Buffer = require('buffer').Buffer;
+/**/
+var bufferShim = require('buffer-shims');
+/* */
+
+module.exports = BufferList;
+
+function BufferList() {
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+}
+
+BufferList.prototype.push = function (v) {
+ var entry = { data: v, next: null };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+};
+
+BufferList.prototype.unshift = function (v) {
+ var entry = { data: v, next: this.head };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+};
+
+BufferList.prototype.shift = function () {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+};
+
+BufferList.prototype.clear = function () {
+ this.head = this.tail = null;
+ this.length = 0;
+};
+
+BufferList.prototype.join = function (s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+ while (p = p.next) {
+ ret += s + p.data;
+ }return ret;
+};
+
+BufferList.prototype.concat = function (n) {
+ if (this.length === 0) return bufferShim.alloc(0);
+ if (this.length === 1) return this.head.data;
+ var ret = bufferShim.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+ while (p) {
+ p.data.copy(ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+ return ret;
+};
\ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json
index af4c325431dd09..8987548398b1be 100644
--- a/deps/npm/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/readable-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "readable-stream",
- "version": "2.1.4",
+ "version": "2.1.5",
"description": "Streams3, a user-land copy of the stream library from Node.js",
"main": "readable.js",
"dependencies": {
@@ -14,17 +14,17 @@
},
"devDependencies": {
"assert": "~1.4.0",
+ "babel-polyfill": "^6.9.1",
"nyc": "^6.4.0",
"tap": "~0.7.1",
"tape": "~4.5.1",
- "zuul": "~3.9.0",
- "zuul-ngrok": "^4.0.0"
+ "zuul": "~3.10.0"
},
"scripts": {
"test": "tap test/parallel/*.js test/ours/*.js",
- "browser": "npm run write-zuul && zuul -- test/browser.js",
- "write-zuul": "printf \"ui: tape\ntunnel: ngrok\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml",
- "local": "zuul --local -- test/browser.js",
+ "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js",
+ "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml",
+ "local": "zuul --local 3000 --no-coverage -- test/browser.js",
"cover": "nyc npm test",
"report": "nyc report --reporter=lcov"
},
@@ -46,22 +46,22 @@
]
},
"license": "MIT",
- "gitHead": "7752832fba237929388dea6c96911a0a6379abfc",
+ "gitHead": "758c8b3845af855fde736b6a7f58a15fba00d1e7",
"bugs": {
"url": "https://github.com/nodejs/readable-stream/issues"
},
- "_id": "readable-stream@2.1.4",
- "_shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468",
- "_from": "readable-stream@>=2.1.4 <2.2.0",
+ "_id": "readable-stream@2.1.5",
+ "_shasum": "66fa8b720e1438b364681f2ad1a63c618448c9d0",
+ "_from": "readable-stream@2.1.5",
"_npmVersion": "3.8.6",
- "_nodeVersion": "5.11.0",
+ "_nodeVersion": "5.12.0",
"_npmUser": {
"name": "cwmma",
"email": "calvin.metcalf@gmail.com"
},
"dist": {
- "shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468",
- "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz"
+ "shasum": "66fa8b720e1438b364681f2ad1a63c618448c9d0",
+ "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz"
},
"maintainers": [
{
@@ -82,11 +82,11 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/readable-stream-2.1.4.tgz_1463679605032_0.6917394688352942"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/readable-stream-2.1.5.tgz_1471463532993_0.15824943827465177"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz",
"readme": "ERROR: No README data found!",
"homepage": "https://github.com/nodejs/readable-stream#readme"
}
diff --git a/deps/npm/node_modules/request/.travis.yml b/deps/npm/node_modules/request/.travis.yml
index e5d9bde26263c5..6f2d753b615f83 100644
--- a/deps/npm/node_modules/request/.travis.yml
+++ b/deps/npm/node_modules/request/.travis.yml
@@ -1,13 +1,15 @@
+
language: node_js
node_js:
- node
+ - 4
- 0.12
- 0.10
after_script:
- npm run test-cov
- - cat ./coverage/lcov.info | codecov
+ - codecov
- cat ./coverage/lcov.info | coveralls
webhooks:
diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md
index ce6826f2f65228..2b5d17765a8c1d 100644
--- a/deps/npm/node_modules/request/CHANGELOG.md
+++ b/deps/npm/node_modules/request/CHANGELOG.md
@@ -1,5 +1,24 @@
## Change Log
+### v2.74.0 (2016/07/22)
+- [#2295](https://github.com/request/request/pull/2295) Update tough-cookie to 2.3.0 (@stash-sfdc)
+- [#2280](https://github.com/request/request/pull/2280) Update karma-tap to version 2.0.1 🚀 (@greenkeeperio-bot)
+
+### v2.73.0 (2016/07/09)
+- [#2240](https://github.com/request/request/pull/2240) Remove connectionErrorHandler to fix #1903 (@zarenner)
+- [#2251](https://github.com/request/request/pull/2251) tape@4.6.0 breaks build 🚨 (@greenkeeperio-bot)
+- [#2225](https://github.com/request/request/pull/2225) Update docs (@ArtskydJ)
+- [#2203](https://github.com/request/request/pull/2203) Update browserify to version 13.0.1 🚀 (@greenkeeperio-bot)
+- [#2275](https://github.com/request/request/pull/2275) Update karma to version 1.1.1 🚀 (@greenkeeperio-bot)
+- [#2204](https://github.com/request/request/pull/2204) Add codecov.yml and disable PR comments (@simov)
+- [#2212](https://github.com/request/request/pull/2212) Fix link to http.IncomingMessage documentation (@nazieb)
+- [#2208](https://github.com/request/request/pull/2208) Update to form-data RC4 and pass null values to it (@simov)
+- [#2207](https://github.com/request/request/pull/2207) Move aws4 require statement to the top (@simov)
+- [#2199](https://github.com/request/request/pull/2199) Update karma-coverage to version 1.0.0 🚀 (@greenkeeperio-bot)
+- [#2206](https://github.com/request/request/pull/2206) Update qs to version 6.2.0 🚀 (@greenkeeperio-bot)
+- [#2205](https://github.com/request/request/pull/2205) Use server-destory to close hanging sockets in tests (@simov)
+- [#2200](https://github.com/request/request/pull/2200) Update karma-cli to version 1.0.0 🚀 (@greenkeeperio-bot)
+
### v2.72.0 (2016/04/17)
- [#2176](https://github.com/request/request/pull/2176) Do not try to pipe Gzip responses with no body (@simov)
- [#2175](https://github.com/request/request/pull/2175) Add 'delete' alias for the 'del' API method (@simov, @MuhanZou)
@@ -53,7 +72,7 @@
- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot)
- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms)
- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot)
-- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @vladimirich, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @Bloutiouf)
+- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @vladimirich, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @KoltesDigital)
- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov)
- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot)
- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot)
@@ -64,7 +83,7 @@
- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov)
- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot)
- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov)
-- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@Bloutiouf)
+- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@KoltesDigital)
- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu)
- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot)
- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot)
@@ -114,8 +133,7 @@
- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews)
### v2.59.0 (2015/07/20)
-- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options.
- Forever option defaults to using http(s).Agent in node 0.12+ (@simov)
+- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options.
Forever option defaults to using http(s).Agent in node 0.12+ (@simov)
- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman)
- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme)
- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov)
@@ -182,7 +200,7 @@
- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139)
- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy, @demohi)
- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal)
-- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimonz)
+- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimon)
- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen)
- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky)
- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack)
@@ -310,7 +328,7 @@
- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott)
- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen)
- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund)
-- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@cappslock)
+- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@slimelabs)
- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey)
- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott)
- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom)
@@ -479,28 +497,20 @@
- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath)
- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK)
- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko)
-
-### v2.23.0 (2013/07/23)
- [#589](https://github.com/request/request/pull/589) Prevent setting headers after they are sent (@geek)
- [#587](https://github.com/request/request/pull/587) Global cookie jar disabled by default (@threepointone)
-
-### v2.22.0 (2013/07/05)
- [#544](https://github.com/request/request/pull/544) Update http-signature version. (@davidlehn)
- [#581](https://github.com/request/request/pull/581) Fix spelling of "ignoring." (@bigeasy)
- [#568](https://github.com/request/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette)
- [#564](https://github.com/request/request/pull/564) Fix redirections (@criloz)
- [#541](https://github.com/request/request/pull/541) The exported request function doesn't have an auth method (@tschaub)
- [#542](https://github.com/request/request/pull/542) Expose Request class (@regality)
-
-### v2.21.0 (2013/04/30)
- [#536](https://github.com/request/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando)
- [#532](https://github.com/request/request/pull/532) fix typo (@fredericosilva)
- [#497](https://github.com/request/request/pull/497) Added redirect event (@Cauldrath)
- [#503](https://github.com/request/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi)
- [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway421)
- [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka)
-
-### v2.20.0 (2013/04/22)
- [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway421)
- [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway421)
- [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun)
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index cf9072a21a229a..81ecac50999a34 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -67,7 +67,7 @@ Request can also `pipe` to itself. When doing so, `content-type` and `content-le
request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))
```
-Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage).
+Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
```js
request
@@ -601,7 +601,6 @@ var options = {
key: fs.readFileSync(keyFile),
passphrase: 'password',
ca: fs.readFileSync(caFile)
- }
};
request.get(options);
@@ -819,7 +818,7 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]).
The callback argument gets 3 arguments:
1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)
-2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object
+2. An [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object
3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)
[back to top](#table-of-contents)
diff --git a/deps/npm/node_modules/request/codecov.yml b/deps/npm/node_modules/request/codecov.yml
new file mode 100644
index 00000000000000..acd3f33ceb5d2b
--- /dev/null
+++ b/deps/npm/node_modules/request/codecov.yml
@@ -0,0 +1,2 @@
+
+comment: false
diff --git a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
index 0fe40d0b6e88b3..68572c7b1255c3 100644
--- a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
+++ b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json
@@ -41,7 +41,7 @@
],
"dist": {
"shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f",
- "tarball": "http://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz"
+ "tarball": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/aws4/aws4.js b/deps/npm/node_modules/request/node_modules/aws4/aws4.js
index 71e08bbc17c9d1..cbe5dc90494efe 100644
--- a/deps/npm/node_modules/request/node_modules/aws4/aws4.js
+++ b/deps/npm/node_modules/request/node_modules/aws4/aws4.js
@@ -2,7 +2,7 @@ var aws4 = exports,
url = require('url'),
querystring = require('querystring'),
crypto = require('crypto'),
- lru = require('lru-cache'),
+ lru = require('./lru'),
credentialsCache = lru(1000)
// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html
diff --git a/deps/npm/node_modules/request/node_modules/aws4/lru.js b/deps/npm/node_modules/request/node_modules/aws4/lru.js
new file mode 100644
index 00000000000000..333f66a4436ec4
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/aws4/lru.js
@@ -0,0 +1,96 @@
+module.exports = function(size) {
+ return new LruCache(size)
+}
+
+function LruCache(size) {
+ this.capacity = size | 0
+ this.map = Object.create(null)
+ this.list = new DoublyLinkedList()
+}
+
+LruCache.prototype.get = function(key) {
+ var node = this.map[key]
+ if (node == null) return undefined
+ this.used(node)
+ return node.val
+}
+
+LruCache.prototype.set = function(key, val) {
+ var node = this.map[key]
+ if (node != null) {
+ node.val = val
+ } else {
+ if (!this.capacity) this.prune()
+ if (!this.capacity) return false
+ node = new DoublyLinkedNode(key, val)
+ this.map[key] = node
+ this.capacity--
+ }
+ this.used(node)
+ return true
+}
+
+LruCache.prototype.used = function(node) {
+ this.list.moveToFront(node)
+}
+
+LruCache.prototype.prune = function() {
+ var node = this.list.pop()
+ if (node != null) {
+ delete this.map[node.key]
+ this.capacity++
+ }
+}
+
+
+function DoublyLinkedList() {
+ this.firstNode = null
+ this.lastNode = null
+}
+
+DoublyLinkedList.prototype.moveToFront = function(node) {
+ if (this.firstNode == node) return
+
+ this.remove(node)
+
+ if (this.firstNode == null) {
+ this.firstNode = node
+ this.lastNode = node
+ node.prev = null
+ node.next = null
+ } else {
+ node.prev = null
+ node.next = this.firstNode
+ node.next.prev = node
+ this.firstNode = node
+ }
+}
+
+DoublyLinkedList.prototype.pop = function() {
+ var lastNode = this.lastNode
+ if (lastNode != null) {
+ this.remove(lastNode)
+ }
+ return lastNode
+}
+
+DoublyLinkedList.prototype.remove = function(node) {
+ if (this.firstNode == node) {
+ this.firstNode = node.next
+ } else if (node.prev != null) {
+ node.prev.next = node.next
+ }
+ if (this.lastNode == node) {
+ this.lastNode = node.prev
+ } else if (node.next != null) {
+ node.next.prev = node.prev
+ }
+}
+
+
+function DoublyLinkedNode(key, val) {
+ this.key = key
+ this.val = val
+ this.prev = null
+ this.next = null
+}
diff --git a/deps/npm/node_modules/request/node_modules/aws4/package.json b/deps/npm/node_modules/request/node_modules/aws4/package.json
index d0c94cc307d32f..d643c933bc072b 100644
--- a/deps/npm/node_modules/request/node_modules/aws4/package.json
+++ b/deps/npm/node_modules/request/node_modules/aws4/package.json
@@ -1,6 +1,6 @@
{
"name": "aws4",
- "version": "1.3.2",
+ "version": "1.4.1",
"description": "Signs and prepares requests using AWS Signature Version 4",
"author": {
"name": "Michael Hart",
@@ -65,9 +65,6 @@
"url": "git+https://github.com/mhart/aws4.git"
},
"license": "MIT",
- "dependencies": {
- "lru-cache": "^4.0.0"
- },
"devDependencies": {
"mocha": "^2.4.5",
"should": "^8.2.2"
@@ -75,16 +72,16 @@
"scripts": {
"test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list"
},
- "gitHead": "e899db3aacbf2a034398f7dd483345dc793e8d72",
+ "gitHead": "f126d3ff80be1ddde0fc6b50bb51a7f199547e81",
"bugs": {
"url": "https://github.com/mhart/aws4/issues"
},
"homepage": "https://github.com/mhart/aws4#readme",
- "_id": "aws4@1.3.2",
- "_shasum": "d39e0bee412ced0e8ed94a23e314f313a95b9fd1",
+ "_id": "aws4@1.4.1",
+ "_shasum": "fde7d5292466d230e5ee0f4e038d9dfaab08fc61",
"_from": "aws4@>=1.2.1 <2.0.0",
- "_npmVersion": "2.14.21",
- "_nodeVersion": "4.3.1",
+ "_npmVersion": "2.15.4",
+ "_nodeVersion": "4.4.3",
"_npmUser": {
"name": "hichaelmart",
"email": "michael.hart.au@gmail.com"
@@ -96,14 +93,14 @@
}
],
"dist": {
- "shasum": "d39e0bee412ced0e8ed94a23e314f313a95b9fd1",
- "tarball": "http://registry.npmjs.org/aws4/-/aws4-1.3.2.tgz"
+ "shasum": "fde7d5292466d230e5ee0f4e038d9dfaab08fc61",
+ "tarball": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz"
},
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/aws4-1.3.2.tgz_1456871543899_0.13955276948399842"
+ "tmp": "tmp/aws4-1.4.1.tgz_1462643218465_0.6527479749638587"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.3.2.tgz",
+ "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
index ddd227e64f99f4..19fb85922bc035 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
+++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
@@ -46,7 +46,7 @@
},
"dist": {
"shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
- "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
+ "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
index 703ea43cb4d5ac..e86d232e6090f3 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
+++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
@@ -57,7 +57,7 @@
},
"dist": {
"shasum": "bb935d48582cba168c06834957a54a3e07124f11",
- "tarball": "http://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
index 0364d54ba46af6..8e8b77db7b42cd 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
+++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
@@ -46,7 +46,7 @@
],
"dist": {
"shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
- "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
+ "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
index ae0c70f6c633f1..a018135492d81f 100644
--- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
+++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
@@ -46,7 +46,7 @@
],
"dist": {
"shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
- "tarball": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
+ "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/caseless/package.json b/deps/npm/node_modules/request/node_modules/caseless/package.json
index 2cd79ea01ab69b..5ba522e077ba78 100644
--- a/deps/npm/node_modules/request/node_modules/caseless/package.json
+++ b/deps/npm/node_modules/request/node_modules/caseless/package.json
@@ -54,7 +54,7 @@
],
"dist": {
"shasum": "715b96ea9841593cc33067923f5ec60ebda4f7d7",
- "tarball": "http://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz"
+ "tarball": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json
index 8ac66b814c8162..a471728816cec0 100644
--- a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json
+++ b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json
@@ -46,7 +46,7 @@
},
"dist": {
"shasum": "df3ae199acadfb7d440aaae0b29e2272b24ec619",
- "tarball": "http://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/package.json b/deps/npm/node_modules/request/node_modules/combined-stream/package.json
index e0cd160ff6dbe5..74d35f122bb331 100644
--- a/deps/npm/node_modules/request/node_modules/combined-stream/package.json
+++ b/deps/npm/node_modules/request/node_modules/combined-stream/package.json
@@ -41,7 +41,7 @@
},
"dist": {
"shasum": "938370a57b4a51dea2c77c15d5c5fdf895164009",
- "tarball": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz"
+ "tarball": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/forever-agent/package.json b/deps/npm/node_modules/request/node_modules/forever-agent/package.json
index f57036b527b128..36c4f59445a53e 100644
--- a/deps/npm/node_modules/request/node_modules/forever-agent/package.json
+++ b/deps/npm/node_modules/request/node_modules/forever-agent/package.json
@@ -48,7 +48,7 @@
],
"dist": {
"shasum": "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91",
- "tarball": "http://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz"
+ "tarball": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
index cdcd14153b7dff..1102b34382eb58 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json
@@ -84,40 +84,11 @@
"tests"
]
},
- "gitHead": "9ab5c67b7cb3a4c3dad4a2d4552a2f6775545d6c",
+ "readme": "# Async.js\n\n[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)\n[![NPM version](http://img.shields.io/npm/v/async.svg)](https://www.npmjs.org/package/async)\n[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)\n[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [Node.js](http://nodejs.org) and installable via `npm install async`,\nit can also be used directly in the browser.\n\nAsync is also installable via:\n\n- [bower](http://bower.io/): `bower install async`\n- [component](https://github.com/component/component): `component install\n caolan/async`\n- [jam](http://jamjs.org/): `jam install async`\n- [spm](http://spmjs.io/): `spm install async`\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns\nfor asynchronous control flow (`parallel`, `series`, `waterfall`…). All these\nfunctions assume you follow the Node.js convention of providing a single\ncallback as the last argument of your `async` function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls [(StackOverflow)](http://stackoverflow.com/questions/tagged/async.js)\n### Synchronous iteration functions\n\nIf you get an error like `RangeError: Maximum call stack size exceeded.` or other stack overflow issues when using async, you are likely using a synchronous iterator. By *synchronous* we mean a function that calls its callback on the same tick in the javascript event loop, without doing any I/O or using any timers. Calling many callbacks iteratively will quickly overflow the stack. If you run into this issue, just defer your callback with `async.setImmediate` to start a new call stack on the next tick of the event loop.\n\nThis can also arise by accident if you callback early in certain cases:\n\n```js\nasync.eachSeries(hugeArray, function iterator(item, callback) {\n if (inCache(item)) {\n callback(null, cache[item]); // if many items are cached, you'll overflow\n } else {\n doSomeIO(item, callback);\n }\n}, function done() {\n //...\n});\n```\n\nJust change it to:\n\n```js\nasync.eachSeries(hugeArray, function iterator(item, callback) {\n if (inCache(item)) {\n async.setImmediate(function () {\n callback(null, cache[item]);\n });\n } else {\n doSomeIO(item, callback);\n //...\n```\n\nAsync guards against synchronous functions in some, but not all, cases. If you are still running into stack overflows, you can defer as suggested above, or wrap functions with [`async.ensureAsync`](#ensureAsync) Functions that are asynchronous by their nature do not have this problem and don't need the extra callback deferral.\n\nIf JavaScript's event loop is still a bit nebulous, check out [this article](http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/) or [this talk](http://2014.jsconf.eu/speakers/philip-roberts-what-the-heck-is-the-event-loop-anyway.html) for more detailed information about how it works.\n\n\n### Multiple callbacks\n\nMake sure to always `return` when calling a callback early, otherwise you will cause multiple callbacks and unpredictable behavior in many cases.\n\n```js\nasync.waterfall([\n function (callback) {\n getSomething(options, function (err, result) {\n if (err) {\n callback(new Error(\"failed getting something:\" + err.message));\n // we should return here\n }\n // since we did not return, this callback still will be called and\n // `processData` will be called twice\n callback(null, result);\n });\n },\n processData\n], done)\n```\n\nIt is always good practice to `return callback(err, result)` whenever a callback call is not the last statement of a function.\n\n\n### Binding a context to an iterator\n\nThis section is really about `bind`, not about `async`. If you are wondering how to\nmake `async` execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){\n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its\n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](https://github.com/caolan/async/blob/master/lib/async.js).\nAlternatively, you can install using Node Package Manager (`npm`):\n\n npm install async\n\nAs well as using Bower:\n\n bower install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.\n\nUsage:\n\n```html\n\n\n```\n\n## Documentation\n\nSome functions are also available in the following forms:\n* `Series` - the same as `` but runs only a single async operation at a time\n* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time\n\n### Collections\n\n* [`each`](#each), `eachSeries`, `eachLimit`\n* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit`\n* [`map`](#map), `mapSeries`, `mapLimit`\n* [`filter`](#filter), `filterSeries`, `filterLimit`\n* [`reject`](#reject), `rejectSeries`, `rejectLimit`\n* [`reduce`](#reduce), [`reduceRight`](#reduceRight)\n* [`detect`](#detect), `detectSeries`, `detectLimit`\n* [`sortBy`](#sortBy)\n* [`some`](#some), `someLimit`\n* [`every`](#every), `everyLimit`\n* [`concat`](#concat), `concatSeries`\n\n### Control Flow\n\n* [`series`](#seriestasks-callback)\n* [`parallel`](#parallel), `parallelLimit`\n* [`whilst`](#whilst), [`doWhilst`](#doWhilst)\n* [`until`](#until), [`doUntil`](#doUntil)\n* [`during`](#during), [`doDuring`](#doDuring)\n* [`forever`](#forever)\n* [`waterfall`](#waterfall)\n* [`compose`](#compose)\n* [`seq`](#seq)\n* [`applyEach`](#applyEach), `applyEachSeries`\n* [`queue`](#queue), [`priorityQueue`](#priorityQueue)\n* [`cargo`](#cargo)\n* [`auto`](#auto)\n* [`retry`](#retry)\n* [`iterator`](#iterator)\n* [`times`](#times), `timesSeries`, `timesLimit`\n\n### Utils\n\n* [`apply`](#apply)\n* [`nextTick`](#nextTick)\n* [`memoize`](#memoize)\n* [`unmemoize`](#unmemoize)\n* [`ensureAsync`](#ensureAsync)\n* [`constant`](#constant)\n* [`asyncify`](#asyncify)\n* [`wrapSync`](#wrapSync)\n* [`log`](#log)\n* [`dir`](#dir)\n* [`noConflict`](#noConflict)\n\n## Collections\n\n\n\n### each(arr, iterator, [callback])\n\nApplies the function `iterator` to each item in `arr`, in parallel.\nThe `iterator` is called with an item from the list, and a callback for when it\nhas finished. If the `iterator` passes an error to its `callback`, the main\n`callback` (for the `each` function) is immediately called with the error.\n\nNote, that since this function applies `iterator` to each item in parallel,\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err)` which must be called once it has\n completed. If no error has occurred, the `callback` should be run without\n arguments or with an explicit `null` argument. The array index is not passed\n to the iterator. If you need the index, use [`forEachOf`](#forEachOf).\n* `callback(err)` - *Optional* A callback which is called when all `iterator` functions\n have finished, or an error occurs.\n\n__Examples__\n\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n```js\n// assuming openFiles is an array of file names\n\nasync.each(openFiles, function(file, callback) {\n\n // Perform operation on file here.\n console.log('Processing file ' + file);\n\n if( file.length > 32 ) {\n console.log('This file name is too long');\n callback('File name too long');\n } else {\n // Do work to process file here\n console.log('File processed');\n callback();\n }\n}, function(err){\n // if any of the file processing produced an error, err would equal that error\n if( err ) {\n // One of the iterations produced an error.\n // All processing will now stop.\n console.log('A file failed to process');\n } else {\n console.log('All files have been processed successfully');\n }\n});\n```\n\n__Related__\n\n* eachSeries(arr, iterator, [callback])\n* eachLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n\n\n### forEachOf(obj, iterator, [callback])\n\nLike `each`, except that it iterates over objects, and passes the key as the second argument to the iterator.\n\n__Arguments__\n\n* `obj` - An object or array to iterate over.\n* `iterator(item, key, callback)` - A function to apply to each item in `obj`.\nThe `key` is the item's key, or index in the case of an array. The iterator is\npassed a `callback(err)` which must be called once it has completed. If no\nerror has occurred, the callback should be run without arguments or with an\nexplicit `null` argument.\n* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs.\n\n__Example__\n\n```js\nvar obj = {dev: \"/dev.json\", test: \"/test.json\", prod: \"/prod.json\"};\nvar configs = {};\n\nasync.forEachOf(obj, function (value, key, callback) {\n fs.readFile(__dirname + value, \"utf8\", function (err, data) {\n if (err) return callback(err);\n try {\n configs[key] = JSON.parse(data);\n } catch (e) {\n return callback(e);\n }\n callback();\n })\n}, function (err) {\n if (err) console.error(err.message);\n // configs is now a map of JSON data\n doSomethingWith(configs);\n})\n```\n\n__Related__\n\n* forEachOfSeries(obj, iterator, [callback])\n* forEachOfLimit(obj, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### map(arr, iterator, [callback])\n\nProduces a new array of values by mapping each value in `arr` through\nthe `iterator` function. The `iterator` is called with an item from `arr` and a\ncallback for when it has finished processing. Each of these callback takes 2 arguments:\nan `error`, and the transformed item from `arr`. If `iterator` passes an error to its\ncallback, the main `callback` (for the `map` function) is immediately called with the error.\n\nNote, that since this function applies the `iterator` to each item in parallel,\nthere is no guarantee that the `iterator` functions will complete in order.\nHowever, the results array will be in the same order as the original `arr`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, transformed)` which must be called once\n it has completed with an error (which can be `null`) and a transformed item.\n* `callback(err, results)` - *Optional* A callback which is called when all `iterator`\n functions have finished, or an error occurs. Results is an array of the\n transformed items from the `arr`.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n__Related__\n* mapSeries(arr, iterator, [callback])\n* mapLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n\n### filter(arr, iterator, [callback])\n\n__Alias:__ `select`\n\nReturns a new array of all the values in `arr` which pass an async truth test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The `iterator` is passed a `callback(truthValue)`, which must be called with a\n boolean argument once it has completed.\n* `callback(results)` - *Optional* A callback which is called after all the `iterator`\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n__Related__\n\n* filterSeries(arr, iterator, [callback])\n* filterLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### reject(arr, iterator, [callback])\n\nThe opposite of [`filter`](#filter). Removes values that pass an `async` truth test.\n\n__Related__\n\n* rejectSeries(arr, iterator, [callback])\n* rejectLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, [callback])\n\n__Aliases:__ `inject`, `foldl`\n\nReduces `arr` into a single value using an async `iterator` to return\neach successive step. `memo` is the initial state of the reduction.\nThis function only operates in series.\n\nFor performance reasons, it may make sense to split a call to this function into\na parallel map, and then use the normal `Array.prototype.reduce` on the results.\nThis function is for situations where each step in the reduction needs to be async;\nif you can get the data before reducing it, then it's probably a good idea to do so.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `memo` - The initial state of the reduction.\n* `iterator(memo, item, callback)` - A function applied to each item in the\n array to produce the next step in the reduction. The `iterator` is passed a\n `callback(err, reduction)` which accepts an optional error as its first\n argument, and the state of the reduction as the second. If an error is\n passed to the callback, the reduction is stopped and the main `callback` is\n immediately called with the error.\n* `callback(err, result)` - *Optional* A callback which is called after all the `iterator`\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, [callback])\n\n__Alias:__ `foldr`\n\nSame as [`reduce`](#reduce), only operates on `arr` in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, [callback])\n\nReturns the first value in `arr` that passes an async truth test. The\n`iterator` is applied in parallel, meaning the first iterator to return `true` will\nfire the detect `callback` with that result. That means the result might not be\nthe first item in the original `arr` (in terms of order) that passes the test.\n\nIf order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The iterator is passed a `callback(truthValue)` which must be called with a\n boolean argument once it has completed. **Note: this callback does not take an error as its first argument.**\n* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns\n `true`, or after all the `iterator` functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value `undefined` if none passed. **Note: this callback does not take an error as its first argument.**\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n__Related__\n\n* detectSeries(arr, iterator, [callback])\n* detectLimit(arr, limit, iterator, [callback])\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, [callback])\n\nSorts a list by the results of running each `arr` value through an async `iterator`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, sortValue)` which must be called once it\n has completed with an error (which can be `null`) and a value to use as the sort\n criteria.\n* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is the items from\n the original `arr` sorted by the values returned by the `iterator` calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n__Sort Order__\n\nBy modifying the callback parameter the sorting order can be influenced:\n\n```js\n//ascending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(null, x);\n}, function(err,result){\n //result callback\n} );\n\n//descending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(null, x*-1); //<- x*-1 instead of x, turns the order around\n}, function(err,result){\n //result callback\n} );\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, [callback])\n\n__Alias:__ `any`\n\nReturns `true` if at least one element in the `arr` satisfies an async test.\n_The callback for each iterator call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. Once any iterator\ncall returns `true`, the main `callback` is immediately called.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a `callback(truthValue)`` which must be\n called with a boolean argument once it has completed.\n* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns\n `true`, or after all the iterator functions have finished. Result will be\n either `true` or `false` depending on the values of the async tests.\n\n **Note: the callbacks do not take an error as their first argument.**\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n__Related__\n\n* someLimit(arr, limit, iterator, callback)\n\n---------------------------------------\n\n\n### every(arr, iterator, [callback])\n\n__Alias:__ `all`\n\nReturns `true` if every element in `arr` satisfies an async test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a `callback(truthValue)` which must be\n called with a boolean argument once it has completed.\n* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns\n `false`, or after all the iterator functions have finished. Result will be\n either `true` or `false` depending on the values of the async tests.\n\n **Note: the callbacks do not take an error as their first argument.**\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n__Related__\n\n* everyLimit(arr, limit, iterator, callback)\n\n---------------------------------------\n\n\n### concat(arr, iterator, [callback])\n\nApplies `iterator` to each item in `arr`, concatenating the results. Returns the\nconcatenated list. The `iterator`s are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of `arr` passed to the `iterator` function.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, results)` which must be called once it\n has completed with an error (which can be `null`) and an array of results.\n* `callback(err, results)` - *Optional* A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is an array containing\n the concatenated results of the `iterator` function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n__Related__\n\n* concatSeries(arr, iterator, [callback])\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun the functions in the `tasks` array in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run, and `callback` is immediately called with the value of the error.\nOtherwise, `callback` receives an array of results when `tasks` have completed.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function, and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`series`](#series).\n\n**Note** that while many implementations preserve the order of object properties, the\n[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)\nexplicitly states that\n\n> The mechanics and order of enumerating the properties is not specified.\n\nSo if you rely on the order in which your series of functions are executed, and want\nthis to work on all platforms, consider using an array.\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run, each function is passed\n a `callback(err, result)` it must call on completion with an error `err` (which can\n be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all\n the result arguments passed to the `task` callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun the `tasks` array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main `callback` is immediately called with the value of the error.\nOnce the `tasks` have completed, the results are passed to the final `callback` as an\narray.\n\n**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`parallel`](#parallel).\n\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run. Each function is passed\n a `callback(err, result)` which it must call on completion with an error `err`\n (which can be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed successfully. This function gets a results array (or object) containing all\n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n__Related__\n\n* parallelLimit(tasks, limit, [callback])\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,\nor an error occurs.\n\n__Arguments__\n\n* `test()` - synchronous truth test to perform before each execution of `fn`.\n* `fn(callback)` - A function which is called each time `test` passes. The function is\n passed a `callback(err)`, which must be called once it has completed with an\n optional `err` argument.\n* `callback(err, [results])` - A callback which is called after the test\n function has failed and repeated execution of `fn` has stopped. `callback`\n will be passed an error and any arguments passed to the final `fn`'s callback.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(function () {\n callback(null, count);\n }, 1000);\n },\n function (err, n) {\n // 5 seconds have passed, n = 5\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post-check version of [`whilst`](#whilst). To reflect the difference in\nthe order of operations, the arguments `test` and `fn` are switched.\n\n`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,\nor an error occurs. `callback` will be passed an error and any arguments passed\nto the final `fn`'s callback.\n\nThe inverse of [`whilst`](#whilst).\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### during(test, fn, callback)\n\nLike [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.during(\n function (callback) {\n return callback(null, count < 5);\n },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doDuring(fn, test, callback)\n\nThe post-check version of [`during`](#during). To reflect the difference in\nthe order of operations, the arguments `test` and `fn` are switched.\n\nAlso a version of [`doWhilst`](#doWhilst) with asynchronous `test` function.\n\n---------------------------------------\n\n\n### forever(fn, [errback])\n\nCalls the asynchronous function `fn` with a callback parameter that allows it to\ncall itself again, in series, indefinitely.\n\nIf an error is passed to the callback then `errback` is called with the\nerror, and execution stops, otherwise it will never be called.\n\n```js\nasync.forever(\n function(next) {\n // next is suitable for passing to things that need a callback(err [, whatever]);\n // it will result in this function being called again.\n },\n function(err) {\n // if next is called with a value in its first parameter, it will appear\n // in here as 'err', and execution will stop.\n }\n);\n```\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns the `tasks` array of functions in series, each passing their results to the next in\nthe array. However, if any of the `tasks` pass an error to their own callback, the\nnext function is not executed, and the main `callback` is immediately called with\nthe error.\n\n__Arguments__\n\n* `tasks` - An array of functions to run, each function is passed a\n `callback(err, result1, result2, ...)` it must call on completion. The first\n argument is an error (which can be `null`) and any further arguments will be\n passed as arguments in order to the next task.\n* `callback(err, [results])` - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback) {\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback) {\n // arg1 now equals 'one' and arg2 now equals 'two'\n callback(null, 'three');\n },\n function(arg1, callback) {\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done'\n});\n```\nOr, with named functions:\n\n```js\nasync.waterfall([\n myFirstFunction,\n mySecondFunction,\n myLastFunction,\n], function (err, result) {\n // result now equals 'done'\n});\nfunction myFirstFunction(callback) {\n callback(null, 'one', 'two');\n}\nfunction mySecondFunction(arg1, arg2, callback) {\n // arg1 now equals 'one' and arg2 now equals 'two'\n callback(null, 'three');\n}\nfunction myLastFunction(arg1, callback) {\n // arg1 now equals 'three'\n callback(null, 'done');\n}\n```\n\nOr, if you need to pass any argument to the first function:\n\n```js\nasync.waterfall([\n async.apply(myFirstFunction, 'zero'),\n mySecondFunction,\n myLastFunction,\n], function (err, result) {\n // result now equals 'done'\n});\nfunction myFirstFunction(arg1, callback) {\n // arg1 now equals 'zero'\n callback(null, 'one', 'two');\n}\nfunction mySecondFunction(arg1, arg2, callback) {\n // arg1 now equals 'one' and arg2 now equals 'two'\n callback(null, 'three');\n}\nfunction myLastFunction(arg1, callback) {\n // arg1 now equals 'three'\n callback(null, 'done');\n}\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions `f()`, `g()`, and `h()` would produce the result of\n`f(g(h()))`, only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* `functions...` - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### seq(fn1, fn2...)\n\nVersion of the compose function that is more natural to read.\nEach function consumes the return value of the previous function.\nIt is the equivalent of [`compose`](#compose) with the arguments reversed.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* `functions...` - the asynchronous functions to compose\n\n\n__Example__\n\n```js\n// Requires lodash (or underscore), express3 and dresende's orm2.\n// Part of an app, that fetches cats of the logged user.\n// This example uses `seq` function to avoid overnesting and error\n// handling clutter.\napp.get('/cats', function(request, response) {\n var User = request.models.User;\n async.seq(\n _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))\n function(user, fn) {\n user.getCats(fn); // 'getCats' has signature (callback(err, data))\n }\n )(req.session.user_id, function (err, cats) {\n if (err) {\n console.error(err);\n response.json({ status: 'error', message: err.message });\n } else {\n response.json({ status: 'ok', message: 'Cats found', data: cats });\n }\n });\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling\n`callback` after all functions have completed. If you only provide the first\nargument, then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* `fns` - the asynchronous functions to all call with the same arguments\n* `args...` - any number of separate arguments to pass to the function\n* `callback` - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n__Related__\n\n* applyEachSeries(tasks, args..., [callback])\n\n---------------------------------------\n\n\n### queue(worker, [concurrency])\n\nCreates a `queue` object with the specified `concurrency`. Tasks added to the\n`queue` are processed in parallel (up to the `concurrency` limit). If all\n`worker`s are in progress, the task is queued until one becomes available.\nOnce a `worker` completes a `task`, that `task`'s callback is called.\n\n__Arguments__\n\n* `worker(task, callback)` - An asynchronous function for processing a queued\n task, which must call its `callback(err)` argument when finished, with an\n optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`.\n* `concurrency` - An `integer` for determining how many `worker` functions should be\n run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown.\n\n__Queue objects__\n\nThe `queue` object returned by this function has the following properties and\nmethods:\n\n* `length()` - a function returning the number of items waiting to be processed.\n* `started` - a function returning whether or not any items have been pushed and processed by the queue\n* `running()` - a function returning the number of items currently being processed.\n* `workersList()` - a function returning the array of items currently being processed.\n* `idle()` - a function returning false if there are items waiting or being processed, or true if not.\n* `concurrency` - an integer for determining how many `worker` functions should be\n run in parallel. This property can be changed after a `queue` is created to\n alter the concurrency on-the-fly.\n* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once\n the `worker` has finished processing the task. Instead of a single task, a `tasks` array\n can be submitted. The respective callback is used for every task in the list.\n* `unshift(task, [callback])` - add a new task to the front of the `queue`.\n* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,\n and further tasks will be queued.\n* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.\n* `paused` - a boolean for determining whether the queue is in a paused state\n* `pause()` - a function that pauses the processing of tasks until `resume()` is called.\n* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.\n* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle.\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing item');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n\n---------------------------------------\n\n\n### priorityQueue(worker, concurrency)\n\nThe same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:\n\n* `push(task, priority, [callback])` - `priority` should be a number. If an array of\n `tasks` is given, all tasks will be assigned the same priority.\n* The `unshift` method was removed.\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a `cargo` object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the `payload` limit). If the\n`worker` is in progress, the task is queued until it becomes available. Once\nthe `worker` has completed some tasks, each callback of those tasks is called.\nCheck out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work.\n\nWhile [queue](#queue) passes only one task to one of a group of workers\nat a time, cargo passes an array of tasks to a single worker, repeating\nwhen the worker is finished.\n\n__Arguments__\n\n* `worker(tasks, callback)` - An asynchronous function for processing an array of\n queued tasks, which must call its `callback(err)` argument when finished, with\n an optional `err` argument.\n* `payload` - An optional `integer` for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe `cargo` object returned by this function has the following properties and\nmethods:\n\n* `length()` - A function returning the number of items waiting to be processed.\n* `payload` - An `integer` for determining how many tasks should be\n process per round. This property can be changed after a `cargo` is created to\n alter the payload on-the-fly.\n* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called\n once the `worker` has finished processing the task. Instead of a single task, an array of `tasks`\n can be submitted. The respective callback is used for every task in the list.\n* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.\n* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.\n* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue)\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i \n### auto(tasks, [concurrency], [callback])\n\nDetermines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied.\n\nIf any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far.\n\nNote, all functions are called with a `results` object as a second argument,\nso it is unsafe to pass functions in the `tasks` object which cannot handle the\nextra argument.\n\nFor example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling `readFile` with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to `readFile` in a function which does not forward the\n`results` object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* `tasks` - An object. Each of its properties is either a function or an array of\n requirements, with the function itself the last item in the array. The object's key\n of a property serves as the name of the task defined by that property,\n i.e. can be used when specifying requirements for other tasks.\n The function receives two arguments: (1) a `callback(err, result)` which must be\n called when finished, passing an `error` (which can be `null`) and the result of\n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions.\n* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible.\n* `callback(err, results)` - An optional callback which is called when all the\n tasks have been completed. It receives the `err` argument if any `tasks`\n pass an error to their callback. Results are always returned; however, if\n an error occurs, no further `tasks` will be performed, and the results\n object will only contain partial results.\n\n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n make_folder: function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n },\n write_file: ['get_data', 'make_folder', function(callback, results){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, 'filename');\n }],\n email_link: ['write_file', function(callback, results){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n callback(null, {'file':results.write_file, 'email':'user@example.com'});\n }]\n}, function(err, results) {\n console.log('err = ', err);\n console.log('results = ', results);\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n results.push('filename');\n callback(null);\n },\n function(callback){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n callback(null, {'file':results.pop(), 'email':'user@example.com'});\n }\n ]);\n});\n```\n\nFor a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding\nnew tasks much easier (and the code more readable).\n\n\n---------------------------------------\n\n\n### retry([opts = {times: 5, interval: 0}| 5], task, [callback])\n\nAttempts to get a successful response from `task` no more than `times` times before\nreturning an error. If the task is successful, the `callback` will be passed the result\nof the successful task. If all attempts fail, the callback will be passed the error and\nresult (if any) of the final attempt.\n\n__Arguments__\n\n* `opts` - Can be either an object with `times` and `interval` or a number.\n * `times` - The number of attempts to make before giving up. The default is `5`.\n * `interval` - The time to wait between retries, in milliseconds. The default is `0`.\n * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. \n* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`\n which must be called when finished, passing `err` (which can be `null`) and the `result` of\n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions (if nested inside another control flow).\n* `callback(err, results)` - An optional callback which is called when the\n task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.\n\nThe [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below:\n\n```js\n// try calling apiMethod 3 times\nasync.retry(3, apiMethod, function(err, result) {\n // do something with the result\n});\n```\n\n```js\n// try calling apiMethod 3 times, waiting 200 ms between each retry \nasync.retry({times: 3, interval: 200}, apiMethod, function(err, result) {\n // do something with the result\n});\n```\n\n```js\n// try calling apiMethod the default 5 times no delay between each retry \nasync.retry(apiMethod, function(err, result) {\n // do something with the result\n});\n```\n\nIt can also be embedded within other control flow functions to retry individual methods\nthat are not as reliable, like this:\n\n```js\nasync.auto({\n users: api.getUsers.bind(api),\n payments: async.retry(3, api.getPayments.bind(api))\n}, function(err, results) {\n // do something with the results\n});\n```\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the `tasks` array,\nreturning a continuation to call the next one after that. It's also possible to\n“peek” at the next iterator with `iterator.next()`.\n\nThis function is used internally by the `async` module, but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* `tasks` - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied.\n\nUseful as a shorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback), setImmediate(callback)\n\nCalls `callback` on a later loop around the event loop. In Node.js this just\ncalls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`\nif available, otherwise `setTimeout(callback, 0)`, which means other higher priority\nevents may precede the execution of `callback`.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* `callback` - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, iterator, [callback])\n\nCalls the `iterator` function `n` times, and accumulates results in the same manner\nyou would use with [`map`](#map).\n\n__Arguments__\n\n* `n` - The number of times to run the function.\n* `iterator` - The function to call `n` times.\n* `callback` - see [`map`](#map)\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n__Related__\n\n* timesSeries(n, iterator, [callback])\n* timesLimit(n, limit, iterator, [callback])\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an `async` function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nIf no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* `fn` - The function to proxy and cache results from.\n* `hasher` - An optional function for generating a custom hash for storing\n results. It has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized\nform. Handy for testing.\n\n__Arguments__\n\n* `fn` - the memoized function\n\n---------------------------------------\n\n\n### ensureAsync(fn)\n\nWrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained.\n\n__Arguments__\n\n* `fn` - an async function, one that expects a node-style callback as its last argument\n\nReturns a wrapped function with the exact same call signature as the function passed in.\n\n__Example__\n\n```js\nfunction sometimesAsync(arg, callback) {\n if (cache[arg]) {\n return callback(null, cache[arg]); // this would be synchronous!!\n } else {\n doSomeIO(arg, callback); // this IO would be asynchronous\n }\n}\n\n// this has a risk of stack overflows if many results are cached in a row\nasync.mapSeries(args, sometimesAsync, done);\n\n// this will defer sometimesAsync's callback if necessary,\n// preventing stack overflows\nasync.mapSeries(args, async.ensureAsync(sometimesAsync), done);\n\n```\n\n---------------------------------------\n\n\n### constant(values...)\n\nReturns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`.\n\n__Example__\n\n```js\nasync.waterfall([\n async.constant(42),\n function (value, next) {\n // value === 42\n },\n //...\n], callback);\n\nasync.waterfall([\n async.constant(filename, \"utf8\"),\n fs.readFile,\n function (fileData, next) {\n //...\n }\n //...\n], callback);\n\nasync.auto({\n hostname: async.constant(\"https://server.net/\"),\n port: findFreePort,\n launchServer: [\"hostname\", \"port\", function (cb, options) {\n startServer(options, cb);\n }],\n //...\n}, callback);\n\n```\n\n---------------------------------------\n\n\n\n### asyncify(func)\n\n__Alias:__ `wrapSync`\n\nTake a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback.\n\n__Example__\n\n```js\nasync.waterfall([\n async.apply(fs.readFile, filename, \"utf8\"),\n async.asyncify(JSON.parse),\n function (data, next) {\n // data is the result of parsing the text.\n // If there was a parsing error, it would have been caught.\n }\n], callback)\n```\n\nIf the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example:\n\n```js\nasync.waterfall([\n async.apply(fs.readFile, filename, \"utf8\"),\n async.asyncify(function (contents) {\n return db.model.create(contents);\n }),\n function (model, next) {\n // `model` is the instantiated model object. \n // If there was an error, this function would be skipped.\n }\n], callback)\n```\n\nThis also means you can asyncify ES2016 `async` functions.\n\n```js\nvar q = async.queue(async.asyncify(async function (file) {\n var intermediateStep = await processFile(file);\n return await somePromise(intermediateStep)\n}));\n\nq.push(files);\n```\n\n---------------------------------------\n\n\n### log(function, arguments)\n\nLogs the result of an `async` function to the `console`. Only works in Node.js or\nin browsers that support `console.log` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.log` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an `async` function to the `console` using `console.dir` to\ndisplay the properties of the resulting object. Only works in Node.js or\nin browsers that support `console.dir` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.dir` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of `async` back to its original value, returning a reference to the\n`async` object.\n",
+ "readmeFilename": "README.md",
"homepage": "https://github.com/caolan/async#readme",
"_id": "async@1.5.2",
"_shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
- "_from": "async@>=1.5.2 <2.0.0",
- "_npmVersion": "3.5.2",
- "_nodeVersion": "4.2.3",
- "_npmUser": {
- "name": "aearly",
- "email": "alexander.early@gmail.com"
- },
- "maintainers": [
- {
- "name": "caolan",
- "email": "caolan.mcmahon@gmail.com"
- },
- {
- "name": "beaugunderson",
- "email": "beau@beaugunderson.com"
- },
- {
- "name": "aearly",
- "email": "alexander.early@gmail.com"
- },
- {
- "name": "megawac",
- "email": "megawac@gmail.com"
- }
- ],
- "dist": {
- "shasum": "ec6a61ae56480c0c3cb241c95618e20892f9672a",
- "tarball": "https://registry.npmjs.org/async/-/async-1.5.2.tgz"
- },
- "directories": {},
"_resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
- "readme": "ERROR: No README data found!"
+ "_from": "async@>=1.5.2 <2.0.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json
index 95ab6c1dd6da8b..a230be3af99ae4 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/package.json
+++ b/deps/npm/node_modules/request/node_modules/form-data/package.json
@@ -57,7 +57,7 @@
"homepage": "https://github.com/form-data/form-data#readme",
"_id": "form-data@1.0.0-rc4",
"_shasum": "05ac6bc22227b43e4461f488161554699d4f8b5e",
- "_from": "form-data@>=1.0.0-rc3 <1.1.0",
+ "_from": "form-data@>=1.0.0-rc4 <1.1.0",
"_npmVersion": "2.14.9",
"_nodeVersion": "0.12.11",
"_npmUser": {
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json
index 38a1ecb3cebb2a..cf1119fe28e9a6 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json
@@ -71,7 +71,7 @@
},
"dist": {
"shasum": "535d045ce6b6363fa40117084629995e9df324c7",
- "tarball": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json
index 5b8486a16f8bc4..018563f7d021fc 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json
@@ -40,7 +40,7 @@
],
"dist": {
"shasum": "4cafad76bc62f02fa039b2f94e9a3dd3a391a725",
- "tarball": "http://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
+ "tarball": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json
index db1ac2aa364f5d..1554b2ed64311a 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json
@@ -45,7 +45,7 @@
],
"dist": {
"shasum": "6858fe7c0969b7d4e9093337647ac79f60dfbe74",
- "tarball": "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json
index 9f23619477398c..5244786db85c00 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json
@@ -52,7 +52,7 @@
],
"dist": {
"shasum": "57fe1c4e48474edd65b09911f26b1cd4095dda84",
- "tarball": "http://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz"
+ "tarball": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz"
},
"_resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"readme": "ERROR: No README data found!"
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json
index 8bc73da759fde0..8442cb17833a48 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json
@@ -43,7 +43,7 @@
],
"dist": {
"shasum": "9c0e1c40308ce804f4783618b937fa88f99d50d0",
- "tarball": "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz"
+ "tarball": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json
index 08542c5ff93b0b..cc323c6f44964f 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json
@@ -58,27 +58,10 @@
"engines": {
"node": ">=0.4"
},
- "gitHead": "23dc302a89756da89c1897bc732a752317e35390",
+ "readme": "# xtend\n\n[![browser support][3]][4]\n\n[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\n// extend returns a new object. Does not mutate arguments\nvar combination = extend({\n a: \"a\",\n b: 'c'\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n## Stability status: Locked\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n",
+ "readmeFilename": "README.md",
"_id": "xtend@4.0.1",
"_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
- "_from": "xtend@>=4.0.0 <5.0.0",
- "_npmVersion": "2.14.1",
- "_nodeVersion": "0.10.32",
- "_npmUser": {
- "name": "raynos",
- "email": "raynos2@gmail.com"
- },
- "dist": {
- "shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
- "tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz"
- },
- "maintainers": [
- {
- "name": "raynos",
- "email": "raynos2@gmail.com"
- }
- ],
- "directories": {},
"_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_from": "xtend@>=4.0.0 <5.0.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json
index 3d6fdc4ad5a1bd..89a4b67c316e64 100644
--- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json
+++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json
@@ -52,7 +52,7 @@
},
"dist": {
"shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870",
- "tarball": "http://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz"
+ "tarball": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
index c65fd094047c73..bf368d3fb7748b 100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
@@ -43,7 +43,7 @@
},
"dist": {
"shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
- "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz"
+ "tarball": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
index 8b664b60fcd738..36a4c033eeb295 100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
@@ -57,7 +57,7 @@
],
"dist": {
"shasum": "6541184cc90aeea6c6e7b35e2659082443c66198",
- "tarball": "http://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz"
+ "tarball": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
index 0be073fdccacb5..6b14225c23311c 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
@@ -66,7 +66,7 @@
},
"dist": {
"shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234",
- "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz"
+ "tarball": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
index 75bc4f025c8c32..ab3a66417a6fa6 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
@@ -4,6 +4,11 @@
None yet.
+## v1.3.0 (2016-06-22)
+
+* #14 add safer version of hasOwnProperty()
+* #15 forEachKey() should ignore inherited properties
+
## v1.2.2 (2015-10-15)
* #11 NPM package shouldn't include any code that does `require('JSV')`
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
index b502b2d3a4d7e4..7303642e016487 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
@@ -19,14 +19,23 @@ Returns whether two objects are equal.
Returns true if the given object has no properties and false otherwise. This
is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)).
+### hasKey(obj, key)
+
+Returns true if the given object has an enumerable, non-inherited property
+called `key`. [For information on enumerability and ownership of properties, see
+the MDN
+documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties)
### forEachKey(obj, callback)
-Like Array.forEach, but iterates properties of an object rather than elements
-of an array. Equivalent to:
+Like Array.forEach, but iterates enumerable, owned properties of an object
+rather than elements of an array. Equivalent to:
- for (var key in obj)
- callback(key, obj[key]);
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ callback(key, obj[key]);
+ }
+ }
### flattenObject(obj, depth)
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js
index 5ee46889223915..26c3ba1c076f3f 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js
@@ -15,6 +15,7 @@ var mod_jsonschema = require('json-schema');
exports.deepCopy = deepCopy;
exports.deepEqual = deepEqual;
exports.isEmpty = isEmpty;
+exports.hasKey = hasKey;
exports.forEachKey = forEachKey;
exports.pluck = pluck;
exports.flattenObject = flattenObject;
@@ -122,10 +123,19 @@ function isEmpty(obj)
return (true);
}
+function hasKey(obj, key)
+{
+ mod_assert.equal(typeof (key), 'string');
+ return (Object.prototype.hasOwnProperty.call(obj, key));
+}
+
function forEachKey(obj, callback)
{
- for (var key in obj)
- callback(key, obj[key]);
+ for (var key in obj) {
+ if (hasKey(obj, key)) {
+ callback(key, obj[key]);
+ }
+ }
}
function pluck(obj, key)
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
index 8be381aaccd065..ed08acb72e1169 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
@@ -13,7 +13,7 @@
"_id": "extsprintf@1.0.2",
"dist": {
"shasum": "e1080e0658e300b06294990cc70e1502235fd550",
- "tarball": "http://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
+ "tarball": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
},
"_npmVersion": "1.1.65",
"_npmUser": {
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
index e77992ef32dc8f..ab64d86274450d 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
@@ -1,6 +1,6 @@
{
"name": "jsprim",
- "version": "1.2.2",
+ "version": "1.3.0",
"description": "utilities for primitive JavaScript types",
"main": "./lib/jsprim.js",
"repository": {
@@ -16,17 +16,17 @@
"node >=0.6.0"
],
"license": "MIT",
- "gitHead": "0e709876c35eddfe4c1f95104ac3c4abfc9dab84",
+ "gitHead": "694edcb22e2291c21f6c2a23907bf02e1edbfdf4",
"bugs": {
"url": "https://github.com/davepacheco/node-jsprim/issues"
},
- "homepage": "https://github.com/davepacheco/node-jsprim",
- "_id": "jsprim@1.2.2",
+ "homepage": "https://github.com/davepacheco/node-jsprim#readme",
+ "_id": "jsprim@1.3.0",
"scripts": {},
- "_shasum": "f20c906ac92abd58e3b79ac8bc70a48832512da1",
+ "_shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650",
"_from": "jsprim@>=1.2.2 <2.0.0",
- "_npmVersion": "2.7.4",
- "_nodeVersion": "0.12.2",
+ "_npmVersion": "2.11.3",
+ "_nodeVersion": "0.12.7",
"_npmUser": {
"name": "dap",
"email": "dap@cs.brown.edu"
@@ -38,10 +38,14 @@
}
],
"dist": {
- "shasum": "f20c906ac92abd58e3b79ac8bc70a48832512da1",
- "tarball": "http://registry.npmjs.org/jsprim/-/jsprim-1.2.2.tgz"
+ "shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650",
+ "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/jsprim-1.3.0.tgz_1466708163640_0.5282344303559512"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.2.2.tgz",
+ "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md
index 403f6ac89803b4..730bbf7e739bad 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md
@@ -401,6 +401,206 @@ Parameters
Same as `this.toBuffer(format).toString('base64')`.
+## Certificates
+
+`sshpk` includes basic support for parsing certificates in X.509 (PEM) format
+and the OpenSSH certificate format. This feature is intended to be used mainly
+to access basic metadata about certificates, extract public keys from them, and
+also to generate simple self-signed certificates from an existing key.
+
+Notably, there is no implementation of CA chain-of-trust verification, and no
+support for key usage restrictions (or other kinds of restrictions). Please do
+the security world a favour, and DO NOT use this code for certificate
+verification in the traditional X.509 CA chain style.
+
+### `parseCertificate(data, format)`
+
+Parameters
+
+ - `data` -- a Buffer or String
+ - `format` -- a String, format to use, one of `'openssh'`, `'pem'` (X.509 in a
+ PEM wrapper), or `'x509'` (raw DER encoded)
+
+### `createSelfSignedCertificate(subject, privateKey[, options])`
+
+Parameters
+
+ - `subject` -- an Identity, the subject of the certificate
+ - `privateKey` -- a PrivateKey, the key of the subject: will be used both to be
+ placed in the certificate and also to sign it (since this is
+ a self-signed certificate)
+ - `options` -- optional Object, with keys:
+ - `lifetime` -- optional Number, lifetime of the certificate from now in
+ seconds
+ - `validFrom`, `validUntil` -- optional Dates, beginning and end of
+ certificate validity period. If given
+ `lifetime` will be ignored
+ - `serial` -- optional Buffer, the serial number of the certificate
+
+### `createCertificate(subject, key, issuer, issuerKey[, options])`
+
+Parameters
+
+ - `subject` -- an Identity, the subject of the certificate
+ - `key` -- a Key, the public key of the subject
+ - `issuer` -- an Identity, the issuer of the certificate who will sign it
+ - `issuerKey` -- a PrivateKey, the issuer's private key for signing
+ - `options` -- optional Object, with keys:
+ - `lifetime` -- optional Number, lifetime of the certificate from now in
+ seconds
+ - `validFrom`, `validUntil` -- optional Dates, beginning and end of
+ certificate validity period. If given
+ `lifetime` will be ignored
+ - `serial` -- optional Buffer, the serial number of the certificate
+
+### `Certificate#subjects`
+
+Array of `Identity` instances describing the subject of this certificate.
+
+### `Certificate#issuer`
+
+The `Identity` of the Certificate's issuer (signer).
+
+### `Certificate#subjectKey`
+
+The public key of the subject of the certificate, as a `Key` instance.
+
+### `Certificate#issuerKey`
+
+The public key of the signing issuer of this certificate, as a `Key` instance.
+May be `undefined` if the issuer's key is unknown (e.g. on an X509 certificate).
+
+### `Certificate#serial`
+
+The serial number of the certificate. As this is normally a 64-bit or wider
+integer, it is returned as a Buffer.
+
+### `Certificate#isExpired([when])`
+
+Tests whether the Certificate is currently expired (i.e. the `validFrom` and
+`validUntil` dates specify a range of time that does not include the current
+time).
+
+Parameters
+
+ - `when` -- optional Date, if specified, tests whether the Certificate was or
+ will be expired at the specified time instead of now
+
+Returns a Boolean.
+
+### `Certificate#isSignedByKey(key)`
+
+Tests whether the Certificate was validly signed by the given (public) Key.
+
+Parameters
+
+ - `key` -- a Key instance
+
+Returns a Boolean.
+
+### `Certificate#isSignedBy(certificate)`
+
+Tests whether this Certificate was validly signed by the subject of the given
+certificate. Also tests that the issuer Identity of this Certificate and the
+subject Identity of the other Certificate are equivalent.
+
+Parameters
+
+ - `certificate` -- another Certificate instance
+
+Returns a Boolean.
+
+### `Certificate#fingerprint([hashAlgo])`
+
+Returns the X509-style fingerprint of the entire certificate (as a Fingerprint
+instance). This matches what a web-browser or similar would display as the
+certificate fingerprint and should not be confused with the fingerprint of the
+subject's public key.
+
+Parameters
+
+ - `hashAlgo` -- an optional String, any hash function name
+
+### `Certificate#toBuffer([format])`
+
+Serializes the Certificate to a Buffer and returns it.
+
+Parameters
+
+ - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or
+ `'x509'`. Defaults to `'x509'`.
+
+Returns a Buffer.
+
+### `Certificate#toString([format])`
+
+ - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or
+ `'x509'`. Defaults to `'pem'`.
+
+Returns a String.
+
+## Certificate identities
+
+### `identityForHost(hostname)`
+
+Constructs a host-type Identity for a given hostname.
+
+Parameters
+
+ - `hostname` -- the fully qualified DNS name of the host
+
+Returns an Identity instance.
+
+### `identityForUser(uid)`
+
+Constructs a user-type Identity for a given UID.
+
+Parameters
+
+ - `uid` -- a String, user identifier (login name)
+
+Returns an Identity instance.
+
+### `identityForEmail(email)`
+
+Constructs an email-type Identity for a given email address.
+
+Parameters
+
+ - `email` -- a String, email address
+
+Returns an Identity instance.
+
+### `identityFromDN(dn)`
+
+Parses an LDAP-style DN string (e.g. `'CN=foo, C=US'`) and turns it into an
+Identity instance.
+
+Parameters
+
+ - `dn` -- a String
+
+Returns an Identity instance.
+
+### `Identity#toString()`
+
+Returns the identity as an LDAP-style DN string.
+e.g. `'CN=foo, O=bar corp, C=us'`
+
+### `Identity#type`
+
+The type of identity. One of `'host'`, `'user'`, `'email'` or `'unknown'`
+
+### `Identity#hostname`
+### `Identity#uid`
+### `Identity#email`
+
+Set when `type` is `'host'`, `'user'`, or `'email'`, respectively. Strings.
+
+### `Identity#cn`
+
+The value of the first `CN=` in the DN, if any.
+
Errors
------
@@ -433,8 +633,8 @@ The key data given could not be parsed as a valid key.
Properties
-- `keyName` -- `filename` that was given to `Key#parse`
-- `format` -- the `format` that was trying to parse the key
+- `keyName` -- `filename` that was given to `parseKey`
+- `format` -- the `format` that was trying to parse the key (see `parseKey`)
- `innerErr` -- the inner Error thrown by the format parser
### `KeyEncryptedError`
@@ -444,10 +644,21 @@ parsing operation would succeed if it was given the `passphrase` option.
Properties
-- `keyName` -- `filename` that was given to `Key#parse`
+- `keyName` -- `filename` that was given to `parseKey`
- `format` -- the `format` that was trying to parse the key (currently can only
be `"pem"`)
+### `CertificateParseError`
+
+The certificate data given could not be parsed as a valid certificate.
+
+Properties
+
+- `certName` -- `filename` that was given to `parseCertificate`
+- `format` -- the `format` that was trying to parse the key
+ (see `parseCertificate`)
+- `innerErr` -- the inner Error thrown by the format parser
+
Friends of sshpk
----------------
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/certificate.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/certificate.js
new file mode 100644
index 00000000000000..4fbe6abad451da
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/certificate.js
@@ -0,0 +1,291 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = Certificate;
+
+var assert = require('assert-plus');
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var errs = require('./errors');
+var util = require('util');
+var utils = require('./utils');
+var Key = require('./key');
+var PrivateKey = require('./private-key');
+var Identity = require('./identity');
+
+var formats = {};
+formats['openssh'] = require('./formats/openssh-cert');
+formats['x509'] = require('./formats/x509');
+formats['pem'] = require('./formats/x509-pem');
+
+var CertificateParseError = errs.CertificateParseError;
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+
+function Certificate(opts) {
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.subjects, 'options.subjects');
+ utils.assertCompatible(opts.subjects[0], Identity, [1, 0],
+ 'options.subjects');
+ utils.assertCompatible(opts.subjectKey, Key, [1, 0],
+ 'options.subjectKey');
+ utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer');
+ if (opts.issuerKey !== undefined) {
+ utils.assertCompatible(opts.issuerKey, Key, [1, 0],
+ 'options.issuerKey');
+ }
+ assert.object(opts.signatures, 'options.signatures');
+ assert.buffer(opts.serial, 'options.serial');
+ assert.date(opts.validFrom, 'options.validFrom');
+ assert.date(opts.validUntil, 'optons.validUntil');
+
+ this._hashCache = {};
+
+ this.subjects = opts.subjects;
+ this.issuer = opts.issuer;
+ this.subjectKey = opts.subjectKey;
+ this.issuerKey = opts.issuerKey;
+ this.signatures = opts.signatures;
+ this.serial = opts.serial;
+ this.validFrom = opts.validFrom;
+ this.validUntil = opts.validUntil;
+}
+
+Certificate.formats = formats;
+
+Certificate.prototype.toBuffer = function (format, options) {
+ if (format === undefined)
+ format = 'x509';
+ assert.string(format, 'format');
+ assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
+
+ return (formats[format].write(this, options));
+};
+
+Certificate.prototype.toString = function (format, options) {
+ if (format === undefined)
+ format = 'pem';
+ return (this.toBuffer(format, options).toString());
+};
+
+Certificate.prototype.fingerprint = function (algo) {
+ if (algo === undefined)
+ algo = 'sha256';
+ assert.string(algo, 'algorithm');
+ var opts = {
+ type: 'certificate',
+ hash: this.hash(algo),
+ algorithm: algo
+ };
+ return (new Fingerprint(opts));
+};
+
+Certificate.prototype.hash = function (algo) {
+ assert.string(algo, 'algorithm');
+ algo = algo.toLowerCase();
+ if (algs.hashAlgs[algo] === undefined)
+ throw (new InvalidAlgorithmError(algo));
+
+ if (this._hashCache[algo])
+ return (this._hashCache[algo]);
+
+ var hash = crypto.createHash(algo).
+ update(this.toBuffer('x509')).digest();
+ this._hashCache[algo] = hash;
+ return (hash);
+};
+
+Certificate.prototype.isExpired = function (when) {
+ if (when === undefined)
+ when = new Date();
+ return (!((when.getTime() >= this.validFrom.getTime()) &&
+ (when.getTime() < this.validUntil.getTime())));
+};
+
+Certificate.prototype.isSignedBy = function (issuerCert) {
+ utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer');
+
+ if (!this.issuer.equals(issuerCert.subjects[0]))
+ return (false);
+
+ return (this.isSignedByKey(issuerCert.subjectKey));
+};
+
+Certificate.prototype.isSignedByKey = function (issuerKey) {
+ utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey');
+
+ if (this.issuerKey !== undefined) {
+ return (this.issuerKey.
+ fingerprint('sha512').matches(issuerKey));
+ }
+
+ var fmt = Object.keys(this.signatures)[0];
+ var valid = formats[fmt].verify(this, issuerKey);
+ if (valid)
+ this.issuerKey = issuerKey;
+ return (valid);
+};
+
+Certificate.prototype.signWith = function (key) {
+ utils.assertCompatible(key, PrivateKey, [1, 2], 'key');
+ var fmts = Object.keys(formats);
+ var didOne = false;
+ for (var i = 0; i < fmts.length; ++i) {
+ if (fmts[i] !== 'pem') {
+ var ret = formats[fmts[i]].sign(this, key);
+ if (ret === true)
+ didOne = true;
+ }
+ }
+ if (!didOne) {
+ throw (new Error('Failed to sign the certificate for any ' +
+ 'available certificate formats'));
+ }
+};
+
+Certificate.createSelfSigned = function (subjectOrSubjects, key, options) {
+ var subjects;
+ if (Array.isArray(subjectOrSubjects))
+ subjects = subjectOrSubjects;
+ else
+ subjects = [subjectOrSubjects];
+
+ assert.arrayOfObject(subjects);
+ subjects.forEach(function (subject) {
+ utils.assertCompatible(subject, Identity, [1, 0], 'subject');
+ });
+
+ utils.assertCompatible(key, PrivateKey, [1, 2], 'private key');
+
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalObject(options.validFrom, 'options.validFrom');
+ assert.optionalObject(options.validUntil, 'options.validUntil');
+ var validFrom = options.validFrom;
+ var validUntil = options.validUntil;
+ if (validFrom === undefined)
+ validFrom = new Date();
+ if (validUntil === undefined) {
+ assert.optionalNumber(options.lifetime, 'options.lifetime');
+ var lifetime = options.lifetime;
+ if (lifetime === undefined)
+ lifetime = 10*365*24*3600;
+ validUntil = new Date();
+ validUntil.setTime(validUntil.getTime() + lifetime*1000);
+ }
+ assert.optionalBuffer(options.serial, 'options.serial');
+ var serial = options.serial;
+ if (serial === undefined)
+ serial = new Buffer('0000000000000001', 'hex');
+
+ var cert = new Certificate({
+ subjects: subjects,
+ issuer: subjects[0],
+ subjectKey: key.toPublic(),
+ issuerKey: key.toPublic(),
+ signatures: {},
+ serial: serial,
+ validFrom: validFrom,
+ validUntil: validUntil
+ });
+ cert.signWith(key);
+
+ return (cert);
+};
+
+Certificate.create =
+ function (subjectOrSubjects, key, issuer, issuerKey, options) {
+ var subjects;
+ if (Array.isArray(subjectOrSubjects))
+ subjects = subjectOrSubjects;
+ else
+ subjects = [subjectOrSubjects];
+
+ assert.arrayOfObject(subjects);
+ subjects.forEach(function (subject) {
+ utils.assertCompatible(subject, Identity, [1, 0], 'subject');
+ });
+
+ utils.assertCompatible(key, Key, [1, 0], 'key');
+ if (PrivateKey.isPrivateKey(key))
+ key = key.toPublic();
+ utils.assertCompatible(issuer, Identity, [1, 0], 'issuer');
+ utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key');
+
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalObject(options.validFrom, 'options.validFrom');
+ assert.optionalObject(options.validUntil, 'options.validUntil');
+ var validFrom = options.validFrom;
+ var validUntil = options.validUntil;
+ if (validFrom === undefined)
+ validFrom = new Date();
+ if (validUntil === undefined) {
+ assert.optionalNumber(options.lifetime, 'options.lifetime');
+ var lifetime = options.lifetime;
+ if (lifetime === undefined)
+ lifetime = 10*365*24*3600;
+ validUntil = new Date();
+ validUntil.setTime(validUntil.getTime() + lifetime*1000);
+ }
+ assert.optionalBuffer(options.serial, 'options.serial');
+ var serial = options.serial;
+ if (serial === undefined)
+ serial = new Buffer('0000000000000001', 'hex');
+
+ var cert = new Certificate({
+ subjects: subjects,
+ issuer: issuer,
+ subjectKey: key,
+ issuerKey: issuerKey.toPublic(),
+ signatures: {},
+ serial: serial,
+ validFrom: validFrom,
+ validUntil: validUntil
+ });
+ cert.signWith(issuerKey);
+
+ return (cert);
+};
+
+Certificate.parse = function (data, format, options) {
+ if (typeof (data) !== 'string')
+ assert.buffer(data, 'data');
+ if (format === undefined)
+ format = 'auto';
+ assert.string(format, 'format');
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
+
+ assert.object(formats[format], 'formats[format]');
+
+ try {
+ var k = formats[format].read(data, options);
+ return (k);
+ } catch (e) {
+ throw (new CertificateParseError(options.filename, format, e));
+ }
+};
+
+Certificate.isCertificate = function (obj, ver) {
+ return (utils.isCompatible(obj, Certificate, ver));
+};
+
+/*
+ * API versions for Certificate:
+ * [1,0] -- initial ver
+ */
+Certificate.prototype._sshpkApiVersion = [1, 0];
+
+Certificate._oldVersionDetect = function (obj) {
+ return ([1, 0]);
+};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js
index d984f1ac3f66eb..1cc09ec71d48db 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js
@@ -50,6 +50,18 @@ function SignatureParseError(type, format, innerErr) {
}
util.inherits(SignatureParseError, Error);
+function CertificateParseError(name, format, innerErr) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, CertificateParseError);
+ this.name = 'CertificateParseError';
+ this.format = format;
+ this.certName = name;
+ this.innerErr = innerErr;
+ this.message = 'Failed to parse ' + name + ' as a valid ' + format +
+ ' format certificate: ' + innerErr.message;
+}
+util.inherits(CertificateParseError, Error);
+
function KeyEncryptedError(name, format) {
if (Error.captureStackTrace)
Error.captureStackTrace(this, KeyEncryptedError);
@@ -67,5 +79,6 @@ module.exports = {
InvalidAlgorithmError: InvalidAlgorithmError,
KeyParseError: KeyParseError,
SignatureParseError: SignatureParseError,
- KeyEncryptedError: KeyEncryptedError
+ KeyEncryptedError: KeyEncryptedError,
+ CertificateParseError: CertificateParseError
};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js
index c607330e7f5f68..7ed7e5130467ff 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js
@@ -7,6 +7,7 @@ var algs = require('./algs');
var crypto = require('crypto');
var errs = require('./errors');
var Key = require('./key');
+var Certificate = require('./certificate');
var utils = require('./utils');
var FingerprintFormatError = errs.FingerprintFormatError;
@@ -14,6 +15,7 @@ var InvalidAlgorithmError = errs.InvalidAlgorithmError;
function Fingerprint(opts) {
assert.object(opts, 'options');
+ assert.string(opts.type, 'options.type');
assert.buffer(opts.hash, 'options.hash');
assert.string(opts.algorithm, 'options.algorithm');
@@ -22,6 +24,7 @@ function Fingerprint(opts) {
throw (new InvalidAlgorithmError(this.algorithm));
this.hash = opts.hash;
+ this.type = opts.type;
}
Fingerprint.prototype.toString = function (format) {
@@ -44,11 +47,16 @@ Fingerprint.prototype.toString = function (format) {
}
};
-Fingerprint.prototype.matches = function (key) {
- assert.object(key, 'key');
- utils.assertCompatible(key, Key, [1, 0], 'key');
+Fingerprint.prototype.matches = function (other) {
+ assert.object(other, 'key or certificate');
+ if (this.type === 'key') {
+ utils.assertCompatible(other, Key, [1, 0], 'key');
+ } else {
+ utils.assertCompatible(other, Certificate, [1, 0],
+ 'certificate');
+ }
- var theirHash = key.hash(this.algorithm);
+ var theirHash = other.hash(this.algorithm);
var theirHash2 = crypto.createHash(this.algorithm).
update(theirHash).digest('base64');
@@ -59,10 +67,19 @@ Fingerprint.prototype.matches = function (key) {
return (this.hash2 === theirHash2);
};
-Fingerprint.parse = function (fp, enAlgs) {
+Fingerprint.parse = function (fp, options) {
assert.string(fp, 'fingerprint');
- var alg, hash;
+ var alg, hash, enAlgs;
+ if (Array.isArray(options)) {
+ enAlgs = options;
+ options = {};
+ }
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ if (options.enAlgs !== undefined)
+ enAlgs = options.enAlgs;
assert.optionalArrayOfString(enAlgs, 'algorithms');
var parts = fp.split(':');
@@ -105,7 +122,11 @@ Fingerprint.parse = function (fp, enAlgs) {
throw (new InvalidAlgorithmError(alg));
}
- return (new Fingerprint({algorithm: alg, hash: hash}));
+ return (new Fingerprint({
+ algorithm: alg,
+ hash: hash,
+ type: options.type || 'key'
+ }));
};
function addColons(s) {
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/openssh-cert.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/openssh-cert.js
new file mode 100644
index 00000000000000..8ce7350fee26bb
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/openssh-cert.js
@@ -0,0 +1,289 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ verify: verify,
+ sign: sign,
+ write: write,
+
+ /* Internal private API */
+ fromBuffer: fromBuffer,
+ toBuffer: toBuffer
+};
+
+var assert = require('assert-plus');
+var SSHBuffer = require('../ssh-buffer');
+var crypto = require('crypto');
+var algs = require('../algs');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var Identity = require('../identity');
+var rfc4253 = require('./rfc4253');
+var Signature = require('../signature');
+var utils = require('../utils');
+var Certificate = require('../certificate');
+
+function verify(cert, key) {
+ /*
+ * We always give an issuerKey, so if our verify() is being called then
+ * there was no signature. Return false.
+ */
+ return (false);
+}
+
+var TYPES = {
+ 'user': 1,
+ 'host': 2
+};
+Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; });
+
+var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/;
+
+function read(buf, options) {
+ if (Buffer.isBuffer(buf))
+ buf = buf.toString('ascii');
+ var parts = buf.trim().split(/[ \t\n]+/g);
+ if (parts.length < 2 || parts.length > 3)
+ throw (new Error('Not a valid SSH certificate line'));
+
+ var algo = parts[0];
+ var data = parts[1];
+
+ data = new Buffer(data, 'base64');
+ return (fromBuffer(data, algo));
+}
+
+function fromBuffer(data, algo, partial) {
+ var sshbuf = new SSHBuffer({ buffer: data });
+ var innerAlgo = sshbuf.readString();
+ if (algo !== undefined && innerAlgo !== algo)
+ throw (new Error('SSH certificate algorithm mismatch'));
+ if (algo === undefined)
+ algo = innerAlgo;
+
+ var cert = {};
+ cert.signatures = {};
+ cert.signatures.openssh = {};
+
+ cert.signatures.openssh.nonce = sshbuf.readBuffer();
+
+ var key = {};
+ var parts = (key.parts = []);
+ key.type = getAlg(algo);
+
+ var partCount = algs.info[key.type].parts.length;
+ while (parts.length < partCount)
+ parts.push(sshbuf.readPart());
+ assert.ok(parts.length >= 1, 'key must have at least one part');
+
+ var algInfo = algs.info[key.type];
+ if (key.type === 'ecdsa') {
+ var res = ECDSA_ALGO.exec(algo);
+ assert.ok(res !== null);
+ assert.strictEqual(res[1], parts[0].data.toString());
+ }
+
+ for (var i = 0; i < algInfo.parts.length; ++i) {
+ parts[i].name = algInfo.parts[i];
+ if (parts[i].name !== 'curve' &&
+ algInfo.normalize !== false) {
+ var p = parts[i];
+ p.data = utils.mpNormalize(p.data);
+ }
+ }
+
+ cert.subjectKey = new Key(key);
+
+ cert.serial = sshbuf.readInt64();
+
+ var type = TYPES[sshbuf.readInt()];
+ assert.string(type, 'valid cert type');
+
+ cert.signatures.openssh.keyId = sshbuf.readString();
+
+ var principals = [];
+ var pbuf = sshbuf.readBuffer();
+ var psshbuf = new SSHBuffer({ buffer: pbuf });
+ while (!psshbuf.atEnd())
+ principals.push(psshbuf.readString());
+ if (principals.length === 0)
+ principals = ['*'];
+
+ cert.subjects = principals.map(function (pr) {
+ if (type === 'user')
+ return (Identity.forUser(pr));
+ else if (type === 'host')
+ return (Identity.forHost(pr));
+ throw (new Error('Unknown identity type ' + type));
+ });
+
+ cert.validFrom = int64ToDate(sshbuf.readInt64());
+ cert.validUntil = int64ToDate(sshbuf.readInt64());
+
+ cert.signatures.openssh.critical = sshbuf.readBuffer();
+ cert.signatures.openssh.exts = sshbuf.readBuffer();
+
+ /* reserved */
+ sshbuf.readBuffer();
+
+ var signingKeyBuf = sshbuf.readBuffer();
+ cert.issuerKey = rfc4253.read(signingKeyBuf);
+
+ /*
+ * OpenSSH certs don't give the identity of the issuer, just their
+ * public key. So, we use an Identity that matches anything. The
+ * isSignedBy() function will later tell you if the key matches.
+ */
+ cert.issuer = Identity.forHost('**');
+
+ var sigBuf = sshbuf.readBuffer();
+ cert.signatures.openssh.signature =
+ Signature.parse(sigBuf, cert.issuerKey.type, 'ssh');
+
+ if (partial !== undefined) {
+ partial.remainder = sshbuf.remainder();
+ partial.consumed = sshbuf._offset;
+ }
+
+ return (new Certificate(cert));
+}
+
+function int64ToDate(buf) {
+ var i = buf.readUInt32BE(0) * 4294967296;
+ i += buf.readUInt32BE(4);
+ var d = new Date();
+ d.setTime(i * 1000);
+ d.sourceInt64 = buf;
+ return (d);
+}
+
+function dateToInt64(date) {
+ if (date.sourceInt64 !== undefined)
+ return (date.sourceInt64);
+ var i = Math.round(date.getTime() / 1000);
+ var upper = Math.floor(i / 4294967296);
+ var lower = Math.floor(i % 4294967296);
+ var buf = new Buffer(8);
+ buf.writeUInt32BE(upper, 0);
+ buf.writeUInt32BE(lower, 4);
+ return (buf);
+}
+
+function sign(cert, key) {
+ if (cert.signatures.openssh === undefined)
+ cert.signatures.openssh = {};
+ try {
+ var blob = toBuffer(cert, true);
+ } catch (e) {
+ delete (cert.signatures.openssh);
+ return (false);
+ }
+ var sig = cert.signatures.openssh;
+ var hashAlgo = undefined;
+ if (key.type === 'rsa' || key.type === 'dsa')
+ hashAlgo = 'sha1';
+ var signer = key.createSign(hashAlgo);
+ signer.write(blob);
+ sig.signature = signer.sign();
+ return (true);
+}
+
+function write(cert, options) {
+ if (options === undefined)
+ options = {};
+
+ var blob = toBuffer(cert);
+ var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64');
+ if (options.comment)
+ out = out + ' ' + options.comment;
+ return (out);
+}
+
+
+function toBuffer(cert, noSig) {
+ assert.object(cert.signatures.openssh, 'signature for openssh format');
+ var sig = cert.signatures.openssh;
+
+ if (sig.nonce === undefined)
+ sig.nonce = crypto.randomBytes(16);
+ var buf = new SSHBuffer({});
+ buf.writeString(getCertType(cert.subjectKey));
+ buf.writeBuffer(sig.nonce);
+
+ var key = cert.subjectKey;
+ var algInfo = algs.info[key.type];
+ algInfo.parts.forEach(function (part) {
+ buf.writePart(key.part[part]);
+ });
+
+ buf.writeInt64(cert.serial);
+
+ var type = cert.subjects[0].type;
+ assert.notStrictEqual(type, 'unknown');
+ cert.subjects.forEach(function (id) {
+ assert.strictEqual(id.type, type);
+ });
+ type = TYPES[type];
+ buf.writeInt(type);
+
+ if (sig.keyId === undefined) {
+ sig.keyId = cert.subjects[0].type + '_' +
+ (cert.subjects[0].uid || cert.subjects[0].hostname);
+ }
+ buf.writeString(sig.keyId);
+
+ var sub = new SSHBuffer({});
+ cert.subjects.forEach(function (id) {
+ if (type === TYPES.host)
+ sub.writeString(id.hostname);
+ else if (type === TYPES.user)
+ sub.writeString(id.uid);
+ });
+ buf.writeBuffer(sub.toBuffer());
+
+ buf.writeInt64(dateToInt64(cert.validFrom));
+ buf.writeInt64(dateToInt64(cert.validUntil));
+
+ if (sig.critical === undefined)
+ sig.critical = new Buffer(0);
+ buf.writeBuffer(sig.critical);
+
+ if (sig.exts === undefined)
+ sig.exts = new Buffer(0);
+ buf.writeBuffer(sig.exts);
+
+ /* reserved */
+ buf.writeBuffer(new Buffer(0));
+
+ sub = rfc4253.write(cert.issuerKey);
+ buf.writeBuffer(sub);
+
+ if (!noSig)
+ buf.writeBuffer(sig.signature.toBuffer('ssh'));
+
+ return (buf.toBuffer());
+}
+
+function getAlg(certType) {
+ if (certType === 'ssh-rsa-cert-v01@openssh.com')
+ return ('rsa');
+ if (certType === 'ssh-dss-cert-v01@openssh.com')
+ return ('dsa');
+ if (certType.match(ECDSA_ALGO))
+ return ('ecdsa');
+ if (certType === 'ssh-ed25519-cert-v01@openssh.com')
+ return ('ed25519');
+ throw (new Error('Unsupported cert type ' + certType));
+}
+
+function getCertType(key) {
+ if (key.type === 'rsa')
+ return ('ssh-rsa-cert-v01@openssh.com');
+ if (key.type === 'dsa')
+ return ('ssh-dss-cert-v01@openssh.com');
+ if (key.type === 'ecdsa')
+ return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com');
+ if (key.type === 'ed25519')
+ return ('ssh-ed25519-cert-v01@openssh.com');
+ throw (new Error('Unsupported key type ' + key.type));
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js
index 33fb7cc475923d..4ccbefcbec2be2 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js
@@ -42,10 +42,12 @@ function readPkcs8(alg, type, der) {
}
der.readSequence();
+ var next = der.offset + der.length;
var oid = der.readOID();
switch (oid) {
case '1.2.840.113549.1.1.1':
+ der._offset = next;
if (type === 'public')
return (readPkcs8RSAPublic(der));
else
@@ -66,10 +68,6 @@ function readPkcs8(alg, type, der) {
}
function readPkcs8RSAPublic(der) {
- // Null -- XXX this probably isn't good practice
- der.readByte();
- der.readByte();
-
// bit string sequence
der.readSequence(asn1.Ber.BitString);
der.readByte();
@@ -93,9 +91,6 @@ function readPkcs8RSAPublic(der) {
}
function readPkcs8RSAPrivate(der) {
- der.readByte();
- der.readByte();
-
der.readSequence(asn1.Ber.OctetString);
der.readSequence();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509-pem.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509-pem.js
new file mode 100644
index 00000000000000..c59c7d5ff0a29a
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509-pem.js
@@ -0,0 +1,77 @@
+// Copyright 2016 Joyent, Inc.
+
+var x509 = require('./x509');
+
+module.exports = {
+ read: read,
+ verify: x509.verify,
+ sign: x509.sign,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+var Identity = require('../identity');
+var Signature = require('../signature');
+var Certificate = require('../certificate');
+
+function read(buf, options) {
+ if (typeof (buf) !== 'string') {
+ assert.buffer(buf, 'buf');
+ buf = buf.toString('ascii');
+ }
+
+ var lines = buf.trim().split(/[\r\n]+/g);
+
+ var m = lines[0].match(/*JSSTYLED*/
+ /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);
+ assert.ok(m, 'invalid PEM header');
+
+ var m2 = lines[lines.length - 1].match(/*JSSTYLED*/
+ /[-]+[ ]*END CERTIFICATE[ ]*[-]+/);
+ assert.ok(m2, 'invalid PEM footer');
+
+ var headers = {};
+ while (true) {
+ lines = lines.slice(1);
+ m = lines[0].match(/*JSSTYLED*/
+ /^([A-Za-z0-9-]+): (.+)$/);
+ if (!m)
+ break;
+ headers[m[1].toLowerCase()] = m[2];
+ }
+
+ /* Chop off the first and last lines */
+ lines = lines.slice(0, -1).join('');
+ buf = new Buffer(lines, 'base64');
+
+ return (x509.read(buf, options));
+}
+
+function write(cert, options) {
+ var dbuf = x509.write(cert, options);
+
+ var header = 'CERTIFICATE';
+ var tmp = dbuf.toString('base64');
+ var len = tmp.length + (tmp.length / 64) +
+ 18 + 16 + header.length*2 + 10;
+ var buf = new Buffer(len);
+ var o = 0;
+ o += buf.write('-----BEGIN ' + header + '-----\n', o);
+ for (var i = 0; i < tmp.length; ) {
+ var limit = i + 64;
+ if (limit > tmp.length)
+ limit = tmp.length;
+ o += buf.write(tmp.slice(i, limit), o);
+ buf[o++] = 10;
+ i = limit;
+ }
+ o += buf.write('-----END ' + header + '-----\n', o);
+
+ return (buf.slice(0, o));
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509.js
new file mode 100644
index 00000000000000..a2975404a52cdb
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509.js
@@ -0,0 +1,484 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ verify: verify,
+ sign: sign,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+var Identity = require('../identity');
+var Signature = require('../signature');
+var Certificate = require('../certificate');
+var pkcs8 = require('./pkcs8');
+
+/*
+ * This file is based on RFC5280 (X.509).
+ */
+
+/* Helper to read in a single mpint */
+function readMPInt(der, nm) {
+ assert.strictEqual(der.peek(), asn1.Ber.Integer,
+ nm + ' is not an Integer');
+ return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
+}
+
+function verify(cert, key) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ var algParts = sig.algo.split('-');
+ if (algParts[0] !== key.type)
+ return (false);
+
+ var blob = sig.cache;
+ if (blob === undefined) {
+ var der = new asn1.BerWriter();
+ writeTBSCert(cert, der);
+ blob = der.buffer;
+ }
+
+ var verifier = key.createVerify(algParts[1]);
+ verifier.write(blob);
+ return (verifier.verify(sig.signature));
+}
+
+function Local(i) {
+ return (asn1.Ber.Context | asn1.Ber.Constructor | i);
+}
+
+function Context(i) {
+ return (asn1.Ber.Context | i);
+}
+
+var SIGN_ALGS = {
+ 'rsa-md5': '1.2.840.113549.1.1.4',
+ 'rsa-sha1': '1.2.840.113549.1.1.5',
+ 'rsa-sha256': '1.2.840.113549.1.1.11',
+ 'rsa-sha384': '1.2.840.113549.1.1.12',
+ 'rsa-sha512': '1.2.840.113549.1.1.13',
+ 'dsa-sha1': '1.2.840.10040.4.3',
+ 'dsa-sha256': '2.16.840.1.101.3.4.3.2',
+ 'ecdsa-sha1': '1.2.840.10045.4.1',
+ 'ecdsa-sha256': '1.2.840.10045.4.3.2',
+ 'ecdsa-sha384': '1.2.840.10045.4.3.3',
+ 'ecdsa-sha512': '1.2.840.10045.4.3.4'
+};
+Object.keys(SIGN_ALGS).forEach(function (k) {
+ SIGN_ALGS[SIGN_ALGS[k]] = k;
+});
+SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5';
+SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1';
+
+var EXTS = {
+ 'issuerKeyId': '2.5.29.35',
+ 'altName': '2.5.29.17'
+};
+
+function read(buf, options) {
+ if (typeof (buf) === 'string') {
+ buf = new Buffer(buf, 'binary');
+ }
+ assert.buffer(buf, 'buf');
+
+ var der = new asn1.BerReader(buf);
+
+ der.readSequence();
+ if (Math.abs(der.length - der.remain) > 1) {
+ throw (new Error('DER sequence does not contain whole byte ' +
+ 'stream'));
+ }
+
+ var tbsStart = der.offset;
+ der.readSequence();
+ var sigOffset = der.offset + der.length;
+ var tbsEnd = sigOffset;
+
+ if (der.peek() === Local(0)) {
+ der.readSequence(Local(0));
+ var version = der.readInt();
+ assert.ok(version <= 3,
+ 'only x.509 versions up to v3 supported');
+ }
+
+ var cert = {};
+ cert.signatures = {};
+ var sig = (cert.signatures.x509 = {});
+ sig.extras = {};
+
+ cert.serial = readMPInt(der, 'serial');
+
+ der.readSequence();
+ var after = der.offset + der.length;
+ var certAlgOid = der.readOID();
+ var certAlg = SIGN_ALGS[certAlgOid];
+ if (certAlg === undefined)
+ throw (new Error('unknown signature algorithm ' + certAlgOid));
+
+ der._offset = after;
+ cert.issuer = Identity.parseAsn1(der);
+
+ der.readSequence();
+ cert.validFrom = readDate(der);
+ cert.validUntil = readDate(der);
+
+ cert.subjects = [Identity.parseAsn1(der)];
+
+ der.readSequence();
+ after = der.offset + der.length;
+ cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der);
+ der._offset = after;
+
+ /* issuerUniqueID */
+ if (der.peek() === Local(1)) {
+ der.readSequence(Local(1));
+ sig.extras.issuerUniqueID =
+ buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+ }
+
+ /* subjectUniqueID */
+ if (der.peek() === Local(2)) {
+ der.readSequence(Local(2));
+ sig.extras.subjectUniqueID =
+ buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+ }
+
+ /* extensions */
+ if (der.peek() === Local(3)) {
+ der.readSequence(Local(3));
+ var extEnd = der.offset + der.length;
+ der.readSequence();
+
+ while (der.offset < extEnd)
+ readExtension(cert, buf, der);
+
+ assert.strictEqual(der.offset, extEnd);
+ }
+
+ assert.strictEqual(der.offset, sigOffset);
+
+ der.readSequence();
+ after = der.offset + der.length;
+ var sigAlgOid = der.readOID();
+ var sigAlg = SIGN_ALGS[sigAlgOid];
+ if (sigAlg === undefined)
+ throw (new Error('unknown signature algorithm ' + sigAlgOid));
+ der._offset = after;
+
+ var sigData = der.readString(asn1.Ber.BitString, true);
+ if (sigData[0] === 0)
+ sigData = sigData.slice(1);
+ var algParts = sigAlg.split('-');
+
+ sig.signature = Signature.parse(sigData, algParts[0], 'asn1');
+ sig.signature.hashAlgorithm = algParts[1];
+ sig.algo = sigAlg;
+ sig.cache = buf.slice(tbsStart, tbsEnd);
+
+ return (new Certificate(cert));
+}
+
+function readDate(der) {
+ if (der.peek() === asn1.Ber.UTCTime) {
+ return (utcTimeToDate(der.readString(asn1.Ber.UTCTime)));
+ } else if (der.peek() === asn1.Ber.GeneralizedTime) {
+ return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime)));
+ } else {
+ throw (new Error('Unsupported date format'));
+ }
+}
+
+/* RFC5280, section 4.2.1.6 (GeneralName type) */
+var ALTNAME = {
+ OtherName: Local(0),
+ RFC822Name: Context(1),
+ DNSName: Context(2),
+ X400Address: Local(3),
+ DirectoryName: Local(4),
+ EDIPartyName: Local(5),
+ URI: Context(6),
+ IPAddress: Context(7),
+ OID: Context(8)
+};
+
+function readExtension(cert, buf, der) {
+ der.readSequence();
+ var after = der.offset + der.length;
+ var extId = der.readOID();
+ var id;
+ var sig = cert.signatures.x509;
+ sig.extras.exts = [];
+
+ var critical;
+ if (der.peek() === asn1.Ber.Boolean)
+ critical = der.readBoolean();
+
+ switch (extId) {
+ case (EXTS.altName):
+ der.readSequence(asn1.Ber.OctetString);
+ der.readSequence();
+ var aeEnd = der.offset + der.length;
+ while (der.offset < aeEnd) {
+ switch (der.peek()) {
+ case ALTNAME.OtherName:
+ case ALTNAME.EDIPartyName:
+ der.readSequence();
+ der._offset += der.length;
+ break;
+ case ALTNAME.OID:
+ der.readOID(ALTNAME.OID);
+ break;
+ case ALTNAME.RFC822Name:
+ /* RFC822 specifies email addresses */
+ var email = der.readString(ALTNAME.RFC822Name);
+ id = Identity.forEmail(email);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ case ALTNAME.DirectoryName:
+ der.readSequence(ALTNAME.DirectoryName);
+ id = Identity.parseAsn1(der);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ case ALTNAME.DNSName:
+ var host = der.readString(
+ ALTNAME.DNSName);
+ id = Identity.forHost(host);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ default:
+ der.readString(der.peek());
+ break;
+ }
+ }
+ sig.extras.exts.push({ oid: extId, critical: critical });
+ break;
+ default:
+ sig.extras.exts.push({
+ oid: extId,
+ critical: critical,
+ data: der.readString(asn1.Ber.OctetString, true)
+ });
+ break;
+ }
+
+ der._offset = after;
+}
+
+var UTCTIME_RE =
+ /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
+function utcTimeToDate(t) {
+ var m = t.match(UTCTIME_RE);
+ assert.ok(m, 'timestamps must be in UTC');
+ var d = new Date();
+
+ var thisYear = d.getUTCFullYear();
+ var century = Math.floor(thisYear / 100) * 100;
+
+ var year = parseInt(m[1], 10);
+ if (thisYear % 100 < 50 && year >= 60)
+ year += (century - 1);
+ else
+ year += century;
+ d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10));
+ d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
+ if (m[6] && m[6].length > 0)
+ d.setUTCSeconds(parseInt(m[6], 10));
+ return (d);
+}
+
+var GTIME_RE =
+ /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
+function gTimeToDate(t) {
+ var m = t.match(GTIME_RE);
+ assert.ok(m);
+ var d = new Date();
+
+ d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1,
+ parseInt(m[3], 10));
+ d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
+ if (m[6] && m[6].length > 0)
+ d.setUTCSeconds(parseInt(m[6], 10));
+ return (d);
+}
+
+function zeroPad(n) {
+ var s = '' + n;
+ while (s.length < 2)
+ s = '0' + s;
+ return (s);
+}
+
+function dateToUTCTime(d) {
+ var s = '';
+ s += zeroPad(d.getUTCFullYear() % 100);
+ s += zeroPad(d.getUTCMonth() + 1);
+ s += zeroPad(d.getUTCDate());
+ s += zeroPad(d.getUTCHours());
+ s += zeroPad(d.getUTCMinutes());
+ s += zeroPad(d.getUTCSeconds());
+ s += 'Z';
+ return (s);
+}
+
+function sign(cert, key) {
+ if (cert.signatures.x509 === undefined)
+ cert.signatures.x509 = {};
+ var sig = cert.signatures.x509;
+
+ sig.algo = key.type + '-' + key.defaultHashAlgorithm();
+ if (SIGN_ALGS[sig.algo] === undefined)
+ return (false);
+
+ var der = new asn1.BerWriter();
+ writeTBSCert(cert, der);
+ var blob = der.buffer;
+ sig.cache = blob;
+
+ var signer = key.createSign();
+ signer.write(blob);
+ cert.signatures.x509.signature = signer.sign();
+
+ return (true);
+}
+
+function write(cert, options) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ var der = new asn1.BerWriter();
+ der.startSequence();
+ if (sig.cache) {
+ der._ensure(sig.cache.length);
+ sig.cache.copy(der._buf, der._offset);
+ der._offset += sig.cache.length;
+ } else {
+ writeTBSCert(cert, der);
+ }
+
+ der.startSequence();
+ der.writeOID(SIGN_ALGS[sig.algo]);
+ if (sig.algo.match(/^rsa-/))
+ der.writeNull();
+ der.endSequence();
+
+ var sigData = sig.signature.toBuffer('asn1');
+ var data = new Buffer(sigData.length + 1);
+ data[0] = 0;
+ sigData.copy(data, 1);
+ der.writeBuffer(data, asn1.Ber.BitString);
+ der.endSequence();
+
+ return (der.buffer);
+}
+
+function writeTBSCert(cert, der) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ der.startSequence();
+
+ der.startSequence(Local(0));
+ der.writeInt(2);
+ der.endSequence();
+
+ der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer);
+
+ der.startSequence();
+ der.writeOID(SIGN_ALGS[sig.algo]);
+ der.endSequence();
+
+ cert.issuer.toAsn1(der);
+
+ der.startSequence();
+ der.writeString(dateToUTCTime(cert.validFrom), asn1.Ber.UTCTime);
+ der.writeString(dateToUTCTime(cert.validUntil), asn1.Ber.UTCTime);
+ der.endSequence();
+
+ var subject = cert.subjects[0];
+ var altNames = cert.subjects.slice(1);
+ subject.toAsn1(der);
+
+ pkcs8.writePkcs8(der, cert.subjectKey);
+
+ if (sig.extras && sig.extras.issuerUniqueID) {
+ der.writeBuffer(sig.extras.issuerUniqueID, Local(1));
+ }
+
+ if (sig.extras && sig.extras.subjectUniqueID) {
+ der.writeBuffer(sig.extras.subjectUniqueID, Local(2));
+ }
+
+ if (altNames.length > 0 || subject.type === 'host' ||
+ (sig.extras && sig.extras.exts)) {
+ der.startSequence(Local(3));
+ der.startSequence();
+
+ var exts = [
+ { oid: EXTS.altName }
+ ];
+ if (sig.extras && sig.extras.exts)
+ exts = sig.extras.exts;
+
+ for (var i = 0; i < exts.length; ++i) {
+ der.startSequence();
+ der.writeOID(exts[i].oid);
+
+ if (exts[i].critical !== undefined)
+ der.writeBoolean(exts[i].critical);
+
+ if (exts[i].oid === EXTS.altName) {
+ der.startSequence(asn1.Ber.OctetString);
+ der.startSequence();
+ if (subject.type === 'host') {
+ der.writeString(subject.hostname,
+ Context(2));
+ }
+ for (var j = 0; j < altNames.length; ++j) {
+ if (altNames[j].type === 'host') {
+ der.writeString(
+ altNames[j].hostname,
+ ALTNAME.DNSName);
+ } else if (altNames[j].type ===
+ 'email') {
+ der.writeString(
+ altNames[j].email,
+ ALTNAME.RFC822Name);
+ } else {
+ /*
+ * Encode anything else as a
+ * DN style name for now.
+ */
+ der.startSequence(
+ ALTNAME.DirectoryName);
+ altNames[j].toAsn1(der);
+ der.endSequence();
+ }
+ }
+ der.endSequence();
+ der.endSequence();
+ } else {
+ der.writeBuffer(exts[i].data,
+ asn1.Ber.OctetString);
+ }
+
+ der.endSequence();
+ }
+
+ der.endSequence();
+ der.endSequence();
+ }
+
+ der.endSequence();
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/identity.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/identity.js
new file mode 100644
index 00000000000000..b4f5cd73ec516d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/identity.js
@@ -0,0 +1,255 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = Identity;
+
+var assert = require('assert-plus');
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var errs = require('./errors');
+var util = require('util');
+var utils = require('./utils');
+var asn1 = require('asn1');
+
+/*JSSTYLED*/
+var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i;
+
+var oids = {};
+oids.cn = '2.5.4.3';
+oids.o = '2.5.4.10';
+oids.ou = '2.5.4.11';
+oids.l = '2.5.4.7';
+oids.s = '2.5.4.8';
+oids.c = '2.5.4.6';
+oids.sn = '2.5.4.4';
+oids.dc = '0.9.2342.19200300.100.1.25';
+oids.uid = '0.9.2342.19200300.100.1.1';
+oids.mail = '0.9.2342.19200300.100.1.3';
+
+var unoids = {};
+Object.keys(oids).forEach(function (k) {
+ unoids[oids[k]] = k;
+});
+
+function Identity(opts) {
+ var self = this;
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.components, 'options.components');
+ this.components = opts.components;
+ this.componentLookup = {};
+ this.components.forEach(function (c) {
+ if (c.name && !c.oid)
+ c.oid = oids[c.name];
+ if (c.oid && !c.name)
+ c.name = unoids[c.oid];
+ if (self.componentLookup[c.name] === undefined)
+ self.componentLookup[c.name] = [];
+ self.componentLookup[c.name].push(c);
+ });
+ if (this.componentLookup.cn && this.componentLookup.cn.length > 0) {
+ this.cn = this.componentLookup.cn[0].value;
+ }
+ assert.optionalString(opts.type, 'options.type');
+ if (opts.type === undefined) {
+ if (this.components.length === 1 &&
+ this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1 &&
+ this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.cn[0].value;
+
+ } else if (this.componentLookup.dc &&
+ this.components.length === this.componentLookup.dc.length) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.dc.map(
+ function (c) {
+ return (c.value);
+ }).join('.');
+
+ } else if (this.componentLookup.uid &&
+ this.components.length ===
+ this.componentLookup.uid.length) {
+ this.type = 'user';
+ this.uid = this.componentLookup.uid[0].value;
+
+ } else if (this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1 &&
+ this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.cn[0].value;
+
+ } else if (this.componentLookup.uid &&
+ this.componentLookup.uid.length === 1) {
+ this.type = 'user';
+ this.uid = this.componentLookup.uid[0].value;
+
+ } else if (this.componentLookup.mail &&
+ this.componentLookup.mail.length === 1) {
+ this.type = 'email';
+ this.email = this.componentLookup.mail[0].value;
+
+ } else if (this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1) {
+ this.type = 'user';
+ this.uid = this.componentLookup.cn[0].value;
+
+ } else {
+ this.type = 'unknown';
+ }
+ } else {
+ this.type = opts.type;
+ if (this.type === 'host')
+ this.hostname = opts.hostname;
+ else if (this.type === 'user')
+ this.uid = opts.uid;
+ else if (this.type === 'email')
+ this.email = opts.email;
+ else
+ throw (new Error('Unknown type ' + this.type));
+ }
+}
+
+Identity.prototype.toString = function () {
+ return (this.components.map(function (c) {
+ return (c.name.toUpperCase() + '=' + c.value);
+ }).join(', '));
+};
+
+Identity.prototype.toAsn1 = function (der, tag) {
+ der.startSequence(tag);
+ this.components.forEach(function (c) {
+ der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set);
+ der.startSequence();
+ der.writeOID(c.oid);
+ der.writeString(c.value, asn1.Ber.PrintableString);
+ der.endSequence();
+ der.endSequence();
+ });
+ der.endSequence();
+};
+
+function globMatch(a, b) {
+ if (a === '**' || b === '**')
+ return (true);
+ var aParts = a.split('.');
+ var bParts = b.split('.');
+ if (aParts.length !== bParts.length)
+ return (false);
+ for (var i = 0; i < aParts.length; ++i) {
+ if (aParts[i] === '*' || bParts[i] === '*')
+ continue;
+ if (aParts[i] !== bParts[i])
+ return (false);
+ }
+ return (true);
+}
+
+Identity.prototype.equals = function (other) {
+ if (!Identity.isIdentity(other, [1, 0]))
+ return (false);
+ if (other.components.length !== this.components.length)
+ return (false);
+ for (var i = 0; i < this.components.length; ++i) {
+ if (this.components[i].oid !== other.components[i].oid)
+ return (false);
+ if (!globMatch(this.components[i].value,
+ other.components[i].value)) {
+ return (false);
+ }
+ }
+ return (true);
+};
+
+Identity.forHost = function (hostname) {
+ assert.string(hostname, 'hostname');
+ return (new Identity({
+ type: 'host',
+ hostname: hostname,
+ components: [ { name: 'cn', value: hostname } ]
+ }));
+};
+
+Identity.forUser = function (uid) {
+ assert.string(uid, 'uid');
+ return (new Identity({
+ type: 'user',
+ uid: uid,
+ components: [ { name: 'uid', value: uid } ]
+ }));
+};
+
+Identity.forEmail = function (email) {
+ assert.string(email, 'email');
+ return (new Identity({
+ type: 'email',
+ email: email,
+ components: [ { name: 'mail', value: email } ]
+ }));
+};
+
+Identity.parseDN = function (dn) {
+ assert.string(dn, 'dn');
+ var parts = dn.split(',');
+ var cmps = parts.map(function (c) {
+ c = c.trim();
+ var eqPos = c.indexOf('=');
+ var name = c.slice(0, eqPos).toLowerCase();
+ var value = c.slice(eqPos + 1);
+ return ({ name: name, value: value });
+ });
+ return (new Identity({ components: cmps }));
+};
+
+Identity.parseAsn1 = function (der, top) {
+ var components = [];
+ der.readSequence(top);
+ var end = der.offset + der.length;
+ while (der.offset < end) {
+ der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set);
+ var after = der.offset + der.length;
+ der.readSequence();
+ var oid = der.readOID();
+ var type = der.peek();
+ var value;
+ switch (type) {
+ case asn1.Ber.PrintableString:
+ case asn1.Ber.IA5String:
+ case asn1.Ber.OctetString:
+ case asn1.Ber.T61String:
+ value = der.readString(type);
+ break;
+ case asn1.Ber.Utf8String:
+ value = der.readString(type, true);
+ value = value.toString('utf8');
+ break;
+ case asn1.Ber.CharacterString:
+ case asn1.Ber.BMPString:
+ value = der.readString(type, true);
+ value = value.toString('utf16le');
+ break;
+ default:
+ throw (new Error('Unknown asn1 type ' + type));
+ }
+ components.push({ oid: oid, value: value });
+ der._offset = after;
+ }
+ der._offset = end;
+ return (new Identity({
+ components: components
+ }));
+};
+
+Identity.isIdentity = function (obj, ver) {
+ return (utils.isCompatible(obj, Identity, ver));
+};
+
+/*
+ * API versions for Identity:
+ * [1,0] -- initial ver
+ */
+Identity.prototype._sshpkApiVersion = [1, 0];
+
+Identity._oldVersionDetect = function (obj) {
+ return ([1, 0]);
+};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js
index 0b40429c95c21f..96a1384286a811 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js
@@ -4,6 +4,8 @@ var Key = require('./key');
var Fingerprint = require('./fingerprint');
var Signature = require('./signature');
var PrivateKey = require('./private-key');
+var Certificate = require('./certificate');
+var Identity = require('./identity');
var errs = require('./errors');
module.exports = {
@@ -16,11 +18,21 @@ module.exports = {
parseSignature: Signature.parse,
PrivateKey: PrivateKey,
parsePrivateKey: PrivateKey.parse,
+ Certificate: Certificate,
+ parseCertificate: Certificate.parse,
+ createSelfSignedCertificate: Certificate.createSelfSigned,
+ createCertificate: Certificate.create,
+ Identity: Identity,
+ identityFromDN: Identity.parseDN,
+ identityForHost: Identity.forHost,
+ identityForUser: Identity.forUser,
+ identityForEmail: Identity.forEmail,
/* errors */
FingerprintFormatError: errs.FingerprintFormatError,
InvalidAlgorithmError: errs.InvalidAlgorithmError,
KeyParseError: errs.KeyParseError,
SignatureParseError: errs.SignatureParseError,
- KeyEncryptedError: errs.KeyEncryptedError
+ KeyEncryptedError: errs.KeyEncryptedError,
+ CertificateParseError: errs.CertificateParseError
};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
index edc5143426a122..ff5c3637337cd3 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
@@ -117,6 +117,7 @@ Key.prototype.fingerprint = function (algo) {
algo = 'sha256';
assert.string(algo, 'algorithm');
var opts = {
+ type: 'key',
hash: this.hash(algo),
algorithm: algo
};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js
index ddf4a8c988c908..964f55cb5667c0 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js
@@ -65,23 +65,31 @@ Signature.prototype.toBuffer = function (format) {
buf = new SSHBuffer({});
buf.writeString('ssh-dss');
r = this.part.r.data;
- if (r[0] === 0x00)
+ if (r.length > 20 && r[0] === 0x00)
r = r.slice(1);
s = this.part.s.data;
+ if (s.length > 20 && s[0] === 0x00)
+ s = s.slice(1);
+ if ((this.hashAlgorithm &&
+ this.hashAlgorithm !== 'sha1') ||
+ r.length + s.length !== 40) {
+ throw (new Error('OpenSSH only supports ' +
+ 'DSA signatures with SHA1 hash'));
+ }
buf.writeBuffer(Buffer.concat([r, s]));
return (buf.toBuffer());
} else if (format === 'ssh' && this.type === 'ecdsa') {
var inner = new SSHBuffer({});
- r = this.part.r;
- if (r[0] === 0x00)
- r = r.slice(1);
- inner.writePart(r);
+ r = this.part.r.data;
+ inner.writeBuffer(r);
inner.writePart(this.part.s);
buf = new SSHBuffer({});
/* XXX: find a more proper way to do this? */
var curve;
- var sz = this.part.r.data.length * 8;
+ if (r[0] === 0x00)
+ r = r.slice(1);
+ var sz = r.length * 8;
if (sz === 256)
curve = 'nistp256';
else if (sz === 384)
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
index 0b0027734959a4..8fc2cb87852f40 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
@@ -73,6 +73,14 @@ SSHBuffer.prototype.readInt = function () {
return (v);
};
+SSHBuffer.prototype.readInt64 = function () {
+ assert.ok(this._offset + 8 < this._buffer.length,
+ 'buffer not long enough to read Int64');
+ var v = this._buffer.slice(this._offset, this._offset + 8);
+ this._offset += 8;
+ return (v);
+};
+
SSHBuffer.prototype.readChar = function () {
var v = this._buffer[this._offset++];
return (v);
@@ -106,6 +114,22 @@ SSHBuffer.prototype.writeInt = function (v) {
this._offset += 4;
};
+SSHBuffer.prototype.writeInt64 = function (v) {
+ assert.buffer(v, 'value');
+ if (v.length > 8) {
+ var lead = v.slice(0, v.length - 8);
+ for (var i = 0; i < lead.length; ++i) {
+ assert.strictEqual(lead[i], 0,
+ 'must fit in 64 bits of precision');
+ }
+ v = v.slice(v.length - 8, v.length);
+ }
+ while (this._offset + 8 > this._size)
+ this.expand();
+ v.copy(this._buffer, this._offset);
+ this._offset += 8;
+};
+
SSHBuffer.prototype.writeChar = function (v) {
while (this._offset + 1 > this._size)
this.expand();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json
index 6e7ed68b9e4c03..32e06bf4c8a58b 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json
@@ -76,7 +76,7 @@
],
"dist": {
"shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
- "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz"
},
"directories": {},
"readme": "ERROR: No README data found!"
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
index 882bb3ff415970..adb6f13b158420 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
@@ -999,12 +999,45 @@ function getOptionType(name) {
}
+/**
+ * Return a synopsis string for the given option spec.
+ *
+ * Examples:
+ * > synopsisFromOpt({names: ['help', 'h'], type: 'bool'});
+ * '[ --help | -h ]'
+ * > synopsisFromOpt({name: 'file', type: 'string', helpArg: 'FILE'});
+ * '[ --file=FILE ]'
+ */
+function synopsisFromOpt(o) {
+ assert.object(o, 'o');
+
+ if (o.hasOwnProperty('group')) {
+ return null;
+ }
+ var names = o.names || [o.name];
+ // `type` here could be undefined if, for example, the command has a
+ // dashdash option spec with a bogus 'type'.
+ var type = getOptionType(o.type);
+ var helpArg = o.helpArg || (type && type.helpArg) || 'ARG';
+ var parts = [];
+ names.forEach(function (name) {
+ var part = (name.length === 1 ? '-' : '--') + name;
+ if (type && type.takesArg) {
+ part += (name.length === 1 ? ' ' + helpArg : '=' + helpArg);
+ }
+ parts.push(part);
+ });
+ return ('[ ' + parts.join(' | ') + ' ]');
+};
+
+
module.exports = {
createParser: createParser,
Parser: Parser,
parse: parse,
addOptionType: addOptionType,
getOptionType: getOptionType,
+ synopsisFromOpt: synopsisFromOpt,
// Bash completion-related exports
BASH_COMPLETION_TEMPLATE_PATH: BASH_COMPLETION_TEMPLATE_PATH,
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
index 882ca5b416eb44..d4c70ff8ed28d1 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
@@ -1,7 +1,7 @@
{
"name": "dashdash",
"description": "A light, featureful and explicit option parsing library.",
- "version": "1.13.1",
+ "version": "1.14.0",
"author": {
"name": "Trent Mick",
"email": "trentm@gmail.com",
@@ -58,13 +58,13 @@
"url": "https://github.com/davepacheco"
}
],
- "gitHead": "aabf8a7e71ce7ed3d24c3c57d64a57b78c1a8546",
+ "gitHead": "2f70d248a509418e4473922ee034faf9cd91b3f8",
"bugs": {
"url": "https://github.com/trentm/node-dashdash/issues"
},
"homepage": "https://github.com/trentm/node-dashdash",
- "_id": "dashdash@1.13.1",
- "_shasum": "3530ed38b9026be9af05c83423c9154122e3d47c",
+ "_id": "dashdash@1.14.0",
+ "_shasum": "29e486c5418bf0f356034a993d51686a33e84141",
"_from": "dashdash@>=1.12.0 <2.0.0",
"_npmVersion": "1.4.29",
"_npmUser": {
@@ -78,14 +78,14 @@
}
],
"dist": {
- "shasum": "3530ed38b9026be9af05c83423c9154122e3d47c",
- "tarball": "https://registry.npmjs.org/dashdash/-/dashdash-1.13.1.tgz"
+ "shasum": "29e486c5418bf0f356034a993d51686a33e84141",
+ "tarball": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz"
},
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/dashdash-1.13.1.tgz_1461355198185_0.31851457548327744"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/dashdash-1.14.0.tgz_1464847169030_0.07120498712174594"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.13.1.tgz",
+ "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json
index 2bb7aa8ee81705..25fa11040768a2 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json
@@ -48,7 +48,7 @@
},
"dist": {
"shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505",
- "tarball": "http://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"
+ "tarball": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json
index 6d38314518fa20..22f89a989d4fdd 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json
@@ -58,7 +58,7 @@
},
"dist": {
"shasum": "06d4912255093419477d425633606e0e90782967",
- "tarball": "http://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz"
+ "tarball": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json
index ffac6c287997a7..0113b45676e0a5 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json
@@ -36,7 +36,7 @@
},
"dist": {
"shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd",
- "tarball": "http://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz"
+ "tarball": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
index f46a6bd9f2254d..aacc2955b9dcda 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
@@ -1,6 +1,6 @@
{
"name": "sshpk",
- "version": "1.8.3",
+ "version": "1.9.2",
"description": "A library for finding and using SSH public keys",
"main": "lib/index.js",
"scripts": {
@@ -63,28 +63,28 @@
"temp": "^0.8.2"
},
"man": [
- "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-conv.1",
- "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-sign.1",
- "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-verify.1"
+ "/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-conv.1",
+ "/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-sign.1",
+ "/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-verify.1"
],
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
- "gitHead": "82d39066b2df4e8284350ff5ebb08c5b95c74652",
- "_id": "sshpk@1.8.3",
- "_shasum": "890cc9d614dc5292e5cb1a543b03c9abaa5c374e",
+ "gitHead": "a8b794384822a52eea5ed3b2f192a780b7909609",
+ "_id": "sshpk@1.9.2",
+ "_shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765",
"_from": "sshpk@>=1.7.0 <2.0.0",
- "_npmVersion": "2.15.1",
- "_nodeVersion": "0.12.13",
+ "_npmVersion": "2.15.8",
+ "_nodeVersion": "0.12.15",
"_npmUser": {
"name": "arekinath",
"email": "alex@cooperi.net"
},
"dist": {
- "shasum": "890cc9d614dc5292e5cb1a543b03c9abaa5c374e",
- "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz"
+ "shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765",
+ "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz"
},
"maintainers": [
{
@@ -94,8 +94,8 @@
],
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/sshpk-1.8.3.tgz_1461968607532_0.32797130732797086"
+ "tmp": "tmp/sshpk-1.9.2.tgz_1469841656006_0.10793639998883009"
},
- "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz",
+ "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/package.json b/deps/npm/node_modules/request/node_modules/http-signature/package.json
index d7463088a62447..12b32f8ecfa6d2 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/package.json
@@ -61,7 +61,7 @@
},
"dist": {
"shasum": "df72e267066cd0ac67fb76adf8e134a8fbcf91bf",
- "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz"
+ "tarball": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/is-typedarray/package.json b/deps/npm/node_modules/request/node_modules/is-typedarray/package.json
index 861ef4f7c29711..750da78e6537b5 100644
--- a/deps/npm/node_modules/request/node_modules/is-typedarray/package.json
+++ b/deps/npm/node_modules/request/node_modules/is-typedarray/package.json
@@ -43,7 +43,7 @@
},
"dist": {
"shasum": "e479c80858df0c1b11ddda6940f96011fcda4a9a",
- "tarball": "http://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz"
},
"maintainers": [
{
diff --git a/deps/npm/node_modules/request/node_modules/isstream/package.json b/deps/npm/node_modules/request/node_modules/isstream/package.json
index 85cb14c9cbe00a..266fd5d1d69d28 100644
--- a/deps/npm/node_modules/request/node_modules/isstream/package.json
+++ b/deps/npm/node_modules/request/node_modules/isstream/package.json
@@ -51,7 +51,7 @@
],
"dist": {
"shasum": "47e63f7af55afa6f92e1500e690eb8b8529c099a",
- "tarball": "http://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
+ "tarball": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/qs/.npmignore b/deps/npm/node_modules/request/node_modules/qs/.npmignore
deleted file mode 100644
index 7e1574dc5c3c81..00000000000000
--- a/deps/npm/node_modules/request/node_modules/qs/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-complexity.md
diff --git a/deps/npm/node_modules/request/node_modules/qs/.travis.yml b/deps/npm/node_modules/request/node_modules/qs/.travis.yml
deleted file mode 100644
index 63bdc12bebd6b9..00000000000000
--- a/deps/npm/node_modules/request/node_modules/qs/.travis.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-language: node_js
-node_js:
- - "5.3"
- - "5.2"
- - "5.1"
- - "5.0"
- - "4.2"
- - "4.1"
- - "4.0"
- - "iojs-v3.3"
- - "iojs-v3.2"
- - "iojs-v3.1"
- - "iojs-v3.0"
- - "iojs-v2.5"
- - "iojs-v2.4"
- - "iojs-v2.3"
- - "iojs-v2.2"
- - "iojs-v2.1"
- - "iojs-v2.0"
- - "iojs-v1.8"
- - "iojs-v1.7"
- - "iojs-v1.6"
- - "iojs-v1.5"
- - "iojs-v1.4"
- - "iojs-v1.3"
- - "iojs-v1.2"
- - "iojs-v1.1"
- - "iojs-v1.0"
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.9"
- - "0.8"
- - "0.6"
- - "0.4"
-before_install:
- - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
-script:
- - 'if [ "${TRAVIS_NODE_VERSION}" != "4.2" ]; then npm run tests-only ; else npm test ; fi'
-sudo: false
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: "5.2"
- - node_js: "5.1"
- - node_js: "5.0"
- - node_js: "4.1"
- - node_js: "4.0"
- - node_js: "iojs-v3.2"
- - node_js: "iojs-v3.1"
- - node_js: "iojs-v3.0"
- - node_js: "iojs-v2.4"
- - node_js: "iojs-v2.3"
- - node_js: "iojs-v2.2"
- - node_js: "iojs-v2.1"
- - node_js: "iojs-v2.0"
- - node_js: "iojs-v1.7"
- - node_js: "iojs-v1.6"
- - node_js: "iojs-v1.5"
- - node_js: "iojs-v1.4"
- - node_js: "iojs-v1.3"
- - node_js: "iojs-v1.2"
- - node_js: "iojs-v1.1"
- - node_js: "iojs-v1.0"
- - node_js: "0.11"
- - node_js: "0.9"
- - node_js: "0.6"
- - node_js: "0.4"
diff --git a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md
index 5c66ea44464cb1..86bea763886548 100644
--- a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md
+++ b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md
@@ -1,4 +1,16 @@
-## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=34&state=closed)
+## **6.2.1**
+- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
+- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
+- [Tests] remove `parallelshell` since it does not reliably report failures
+- [Tests] up to `node` `v6.3`, `v5.12`
+- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv`
+
+## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
+- [New] pass Buffers to the encoder/decoder directly (#161)
+- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
+- [Fix] fix compacting of nested sparse arrays (#150)
+
+## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
- [New] allowDots option for `stringify` (#151)
- [Fix] "sort" option should work at a depth of 3 or more (#151)
- [Fix] Restore `dist` directory; will be removed in v7 (#148)
@@ -12,6 +24,9 @@
## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
+## **5.2.1**
+- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
+
## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
diff --git a/deps/npm/node_modules/request/node_modules/qs/README.md b/deps/npm/node_modules/request/node_modules/qs/README.md
index 335eafb4be5a72..4a313528817a99 100644
--- a/deps/npm/node_modules/request/node_modules/qs/README.md
+++ b/deps/npm/node_modules/request/node_modules/qs/README.md
@@ -225,6 +225,26 @@ var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });
assert.equal(unencoded, 'a[b]=c');
```
+This encoding can also be replaced by a custom encoding method set as `encoder` option:
+
+```javascript
+var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
+ // Passed in values `a`, `b`, `c`
+ return // Return encoded string
+}})
+```
+
+_(Note: the `encoder` option does not apply if `encode` is `false`)_
+
+Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:
+
+```javascript
+var decoded = qs.parse('x=z', { decoder: function (str) {
+ // Passed in values `x`, `z`
+ return // Return decoded string
+}})
+```
+
Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
When arrays are stringified, by default they are given explicit indices:
@@ -333,3 +353,24 @@ To completely skip rendering keys with `null` values, use the `skipNulls` flag:
var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });
assert.equal(nullsSkipped, 'a=b');
```
+
+### Dealing with special character sets
+
+By default the encoding and decoding of characters is done in `utf-8`. If you
+wish to encode querystrings to a different character set (i.e.
+[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the
+[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:
+
+```javascript
+var encoder = require('qs-iconv/encoder')('shift_jis');
+var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });
+assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');
+```
+
+This also works for decoding of query strings:
+
+```javascript
+var decoder = require('qs-iconv/decoder')('shift_jis');
+var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
+assert.deepEqual(obj, { a: 'こんにちは!' });
+```
diff --git a/deps/npm/node_modules/request/node_modules/qs/Readme.md b/deps/npm/node_modules/request/node_modules/qs/Readme.md
index 335eafb4be5a72..4a313528817a99 100644
--- a/deps/npm/node_modules/request/node_modules/qs/Readme.md
+++ b/deps/npm/node_modules/request/node_modules/qs/Readme.md
@@ -225,6 +225,26 @@ var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false });
assert.equal(unencoded, 'a[b]=c');
```
+This encoding can also be replaced by a custom encoding method set as `encoder` option:
+
+```javascript
+var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) {
+ // Passed in values `a`, `b`, `c`
+ return // Return encoded string
+}})
+```
+
+_(Note: the `encoder` option does not apply if `encode` is `false`)_
+
+Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values:
+
+```javascript
+var decoded = qs.parse('x=z', { decoder: function (str) {
+ // Passed in values `x`, `z`
+ return // Return decoded string
+}})
+```
+
Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
When arrays are stringified, by default they are given explicit indices:
@@ -333,3 +353,24 @@ To completely skip rendering keys with `null` values, use the `skipNulls` flag:
var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true });
assert.equal(nullsSkipped, 'a=b');
```
+
+### Dealing with special character sets
+
+By default the encoding and decoding of characters is done in `utf-8`. If you
+wish to encode querystrings to a different character set (i.e.
+[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the
+[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library:
+
+```javascript
+var encoder = require('qs-iconv/encoder')('shift_jis');
+var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder });
+assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I');
+```
+
+This also works for decoding of query strings:
+
+```javascript
+var decoder = require('qs-iconv/decoder')('shift_jis');
+var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder });
+assert.deepEqual(obj, { a: 'こんにちは!' });
+```
diff --git a/deps/npm/node_modules/request/node_modules/qs/bower.json b/deps/npm/node_modules/request/node_modules/qs/bower.json
deleted file mode 100644
index 44f050642d73db..00000000000000
--- a/deps/npm/node_modules/request/node_modules/qs/bower.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "qs",
- "main": "dist/qs.js",
- "homepage": "https://github.com/hapijs/qs",
- "authors": [
- "Nathan LaFreniere "
- ],
- "description": "A querystring parser that supports nesting and arrays, with a depth limit",
- "keywords": [
- "querystring",
- "qs"
- ],
- "license": "BSD-3-Clause",
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "test",
- "tests"
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/qs/component.json b/deps/npm/node_modules/request/node_modules/qs/component.json
deleted file mode 100644
index cb8d93fb1fe8f7..00000000000000
--- a/deps/npm/node_modules/request/node_modules/qs/component.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "qs",
- "repository": "hapijs/qs",
- "description": "query-string parser / stringifier with nesting support",
- "version": "6.1.0",
- "keywords": ["querystring", "query", "parser"],
- "main": "lib/index.js",
- "scripts": [
- "lib/index.js",
- "lib/parse.js",
- "lib/stringify.js",
- "lib/utils.js"
- ],
- "license": "BSD-3-Clause"
-}
diff --git a/deps/npm/node_modules/request/node_modules/qs/dist/qs.js b/deps/npm/node_modules/request/node_modules/qs/dist/qs.js
index bb8ea31a957830..fcf825b584085f 100644
--- a/deps/npm/node_modules/request/node_modules/qs/dist/qs.js
+++ b/deps/npm/node_modules/request/node_modules/qs/dist/qs.js
@@ -14,7 +14,9 @@ module.exports = {
var Utils = require('./utils');
-var internals = {
+var has = Object.prototype.hasOwnProperty;
+
+var defaults = {
delimiter: '&',
depth: 5,
arrayLimit: 20,
@@ -22,10 +24,11 @@ var internals = {
strictNullHandling: false,
plainObjects: false,
allowPrototypes: false,
- allowDots: false
+ allowDots: false,
+ decoder: Utils.decode
};
-internals.parseValues = function (str, options) {
+var parseValues = function parseValues(str, options) {
var obj = {};
var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
@@ -33,28 +36,25 @@ internals.parseValues = function (str, options) {
var part = parts[i];
var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+ var key, val;
if (pos === -1) {
- obj[Utils.decode(part)] = '';
-
- if (options.strictNullHandling) {
- obj[Utils.decode(part)] = null;
- }
+ key = options.decoder(part);
+ val = options.strictNullHandling ? null : '';
} else {
- var key = Utils.decode(part.slice(0, pos));
- var val = Utils.decode(part.slice(pos + 1));
-
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- obj[key] = [].concat(obj[key]).concat(val);
- } else {
- obj[key] = val;
- }
+ key = options.decoder(part.slice(0, pos));
+ val = options.decoder(part.slice(pos + 1));
+ }
+ if (has.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
}
}
return obj;
};
-internals.parseObject = function (chain, val, options) {
+var parseObject = function parseObject(chain, val, options) {
if (!chain.length) {
return val;
}
@@ -64,7 +64,7 @@ internals.parseObject = function (chain, val, options) {
var obj;
if (root === '[]') {
obj = [];
- obj = obj.concat(internals.parseObject(chain, val, options));
+ obj = obj.concat(parseObject(chain, val, options));
} else {
obj = options.plainObjects ? Object.create(null) : {};
var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
@@ -77,16 +77,16 @@ internals.parseObject = function (chain, val, options) {
(options.parseArrays && index <= options.arrayLimit)
) {
obj = [];
- obj[index] = internals.parseObject(chain, val, options);
+ obj[index] = parseObject(chain, val, options);
} else {
- obj[cleanRoot] = internals.parseObject(chain, val, options);
+ obj[cleanRoot] = parseObject(chain, val, options);
}
}
return obj;
};
-internals.parseKeys = function (givenKey, val, options) {
+var parseKeys = function parseKeys(givenKey, val, options) {
if (!givenKey) {
return;
}
@@ -109,7 +109,7 @@ internals.parseKeys = function (givenKey, val, options) {
if (segment[1]) {
// If we aren't using plain objects, optionally prefix keys
// that would overwrite object prototype properties
- if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {
+ if (!options.plainObjects && has.call(Object.prototype, segment[1])) {
if (!options.allowPrototypes) {
return;
}
@@ -123,7 +123,7 @@ internals.parseKeys = function (givenKey, val, options) {
var i = 0;
while ((segment = child.exec(key)) !== null && i < options.depth) {
i += 1;
- if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].replace(/\[|\]/g, ''))) {
if (!options.allowPrototypes) {
continue;
}
@@ -137,30 +137,32 @@ internals.parseKeys = function (givenKey, val, options) {
keys.push('[' + key.slice(segment.index) + ']');
}
- return internals.parseObject(keys, val, options);
+ return parseObject(keys, val, options);
};
module.exports = function (str, opts) {
var options = opts || {};
- options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
- options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
- options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
options.parseArrays = options.parseArrays !== false;
- options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;
- options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;
- options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;
- options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
- options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;
-
- if (
- str === '' ||
- str === null ||
- typeof str === 'undefined'
- ) {
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
return options.plainObjects ? Object.create(null) : {};
}
- var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
var obj = options.plainObjects ? Object.create(null) : {};
// Iterate over the keys and setup the new object
@@ -168,7 +170,7 @@ module.exports = function (str, opts) {
var keys = Object.keys(tempObj);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
- var newObj = internals.parseKeys(key, tempObj[key], options);
+ var newObj = parseKeys(key, tempObj[key], options);
obj = Utils.merge(obj, newObj, options);
}
@@ -180,45 +182,45 @@ module.exports = function (str, opts) {
var Utils = require('./utils');
-var internals = {
- delimiter: '&',
- arrayPrefixGenerators: {
- brackets: function (prefix) {
- return prefix + '[]';
- },
- indices: function (prefix, key) {
- return prefix + '[' + key + ']';
- },
- repeat: function (prefix) {
- return prefix;
- }
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) {
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) {
+ return prefix + '[' + key + ']';
},
+ repeat: function repeat(prefix) {
+ return prefix;
+ }
+};
+
+var defaults = {
+ delimiter: '&',
strictNullHandling: false,
skipNulls: false,
- encode: true
+ encode: true,
+ encoder: Utils.encode
};
-internals.stringify = function (object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots) {
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
var obj = object;
if (typeof filter === 'function') {
obj = filter(prefix, obj);
- } else if (Utils.isBuffer(obj)) {
- obj = String(obj);
} else if (obj instanceof Date) {
obj = obj.toISOString();
} else if (obj === null) {
if (strictNullHandling) {
- return encode ? Utils.encode(prefix) : prefix;
+ return encoder ? encoder(prefix) : prefix;
}
obj = '';
}
- if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean') {
- if (encode) {
- return [Utils.encode(prefix) + '=' + Utils.encode(obj)];
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (encoder) {
+ return [encoder(prefix) + '=' + encoder(obj)];
}
- return [prefix + '=' + obj];
+ return [prefix + '=' + String(obj)];
}
var values = [];
@@ -243,9 +245,9 @@ internals.stringify = function (object, prefix, generateArrayPrefix, strictNullH
}
if (Array.isArray(obj)) {
- values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots));
+ values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
} else {
- values = values.concat(internals.stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots));
+ values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
}
}
@@ -255,14 +257,20 @@ internals.stringify = function (object, prefix, generateArrayPrefix, strictNullH
module.exports = function (object, opts) {
var obj = object;
var options = opts || {};
- var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
- var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;
- var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;
- var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
var sort = typeof options.sort === 'function' ? options.sort : null;
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
var objKeys;
var filter;
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
if (typeof options.filter === 'function') {
filter = options.filter;
obj = filter('', obj);
@@ -277,7 +285,7 @@ module.exports = function (object, opts) {
}
var arrayFormat;
- if (options.arrayFormat in internals.arrayPrefixGenerators) {
+ if (options.arrayFormat in arrayPrefixGenerators) {
arrayFormat = options.arrayFormat;
} else if ('indices' in options) {
arrayFormat = options.indices ? 'indices' : 'repeat';
@@ -285,7 +293,7 @@ module.exports = function (object, opts) {
arrayFormat = 'indices';
}
- var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
if (!objKeys) {
objKeys = Object.keys(obj);
@@ -302,7 +310,7 @@ module.exports = function (object, opts) {
continue;
}
- keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots));
+ keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
}
return keys.join(delimiter);
@@ -357,7 +365,7 @@ exports.merge = function (target, source, options) {
mergeTarget = exports.arrayToObject(target, options);
}
- return Object.keys(source).reduce(function (acc, key) {
+ return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
if (Object.prototype.hasOwnProperty.call(acc, key)) {
@@ -365,7 +373,7 @@ exports.merge = function (target, source, options) {
} else {
acc[key] = value;
}
- return acc;
+ return acc;
}, mergeTarget);
};
@@ -420,7 +428,7 @@ exports.encode = function (str) {
i += 1;
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
- out += (hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)];
}
return out;
@@ -443,7 +451,9 @@ exports.compact = function (obj, references) {
var compacted = [];
for (var i = 0; i < obj.length; ++i) {
- if (typeof obj[i] !== 'undefined') {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
compacted.push(obj[i]);
}
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
index 9b6cbd221987f0..8b37cb3b294580 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/parse.js
@@ -2,7 +2,9 @@
var Utils = require('./utils');
-var internals = {
+var has = Object.prototype.hasOwnProperty;
+
+var defaults = {
delimiter: '&',
depth: 5,
arrayLimit: 20,
@@ -10,10 +12,11 @@ var internals = {
strictNullHandling: false,
plainObjects: false,
allowPrototypes: false,
- allowDots: false
+ allowDots: false,
+ decoder: Utils.decode
};
-internals.parseValues = function (str, options) {
+var parseValues = function parseValues(str, options) {
var obj = {};
var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
@@ -21,28 +24,25 @@ internals.parseValues = function (str, options) {
var part = parts[i];
var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
+ var key, val;
if (pos === -1) {
- obj[Utils.decode(part)] = '';
-
- if (options.strictNullHandling) {
- obj[Utils.decode(part)] = null;
- }
+ key = options.decoder(part);
+ val = options.strictNullHandling ? null : '';
} else {
- var key = Utils.decode(part.slice(0, pos));
- var val = Utils.decode(part.slice(pos + 1));
-
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- obj[key] = [].concat(obj[key]).concat(val);
- } else {
- obj[key] = val;
- }
+ key = options.decoder(part.slice(0, pos));
+ val = options.decoder(part.slice(pos + 1));
+ }
+ if (has.call(obj, key)) {
+ obj[key] = [].concat(obj[key]).concat(val);
+ } else {
+ obj[key] = val;
}
}
return obj;
};
-internals.parseObject = function (chain, val, options) {
+var parseObject = function parseObject(chain, val, options) {
if (!chain.length) {
return val;
}
@@ -52,7 +52,7 @@ internals.parseObject = function (chain, val, options) {
var obj;
if (root === '[]') {
obj = [];
- obj = obj.concat(internals.parseObject(chain, val, options));
+ obj = obj.concat(parseObject(chain, val, options));
} else {
obj = options.plainObjects ? Object.create(null) : {};
var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
@@ -65,16 +65,16 @@ internals.parseObject = function (chain, val, options) {
(options.parseArrays && index <= options.arrayLimit)
) {
obj = [];
- obj[index] = internals.parseObject(chain, val, options);
+ obj[index] = parseObject(chain, val, options);
} else {
- obj[cleanRoot] = internals.parseObject(chain, val, options);
+ obj[cleanRoot] = parseObject(chain, val, options);
}
}
return obj;
};
-internals.parseKeys = function (givenKey, val, options) {
+var parseKeys = function parseKeys(givenKey, val, options) {
if (!givenKey) {
return;
}
@@ -97,7 +97,7 @@ internals.parseKeys = function (givenKey, val, options) {
if (segment[1]) {
// If we aren't using plain objects, optionally prefix keys
// that would overwrite object prototype properties
- if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {
+ if (!options.plainObjects && has.call(Object.prototype, segment[1])) {
if (!options.allowPrototypes) {
return;
}
@@ -111,7 +111,7 @@ internals.parseKeys = function (givenKey, val, options) {
var i = 0;
while ((segment = child.exec(key)) !== null && i < options.depth) {
i += 1;
- if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].replace(/\[|\]/g, ''))) {
if (!options.allowPrototypes) {
continue;
}
@@ -125,30 +125,32 @@ internals.parseKeys = function (givenKey, val, options) {
keys.push('[' + key.slice(segment.index) + ']');
}
- return internals.parseObject(keys, val, options);
+ return parseObject(keys, val, options);
};
module.exports = function (str, opts) {
var options = opts || {};
- options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
- options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
- options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
+
+ if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
+ options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
+ options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
options.parseArrays = options.parseArrays !== false;
- options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;
- options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;
- options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;
- options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
- options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;
-
- if (
- str === '' ||
- str === null ||
- typeof str === 'undefined'
- ) {
+ options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
+ options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
+ options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
+ options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
+ options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
+ options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+
+ if (str === '' || str === null || typeof str === 'undefined') {
return options.plainObjects ? Object.create(null) : {};
}
- var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
var obj = options.plainObjects ? Object.create(null) : {};
// Iterate over the keys and setup the new object
@@ -156,7 +158,7 @@ module.exports = function (str, opts) {
var keys = Object.keys(tempObj);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
- var newObj = internals.parseKeys(key, tempObj[key], options);
+ var newObj = parseKeys(key, tempObj[key], options);
obj = Utils.merge(obj, newObj, options);
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
index 892dad45a9f30f..6e1c9a263cd979 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/stringify.js
@@ -2,45 +2,45 @@
var Utils = require('./utils');
-var internals = {
- delimiter: '&',
- arrayPrefixGenerators: {
- brackets: function (prefix) {
- return prefix + '[]';
- },
- indices: function (prefix, key) {
- return prefix + '[' + key + ']';
- },
- repeat: function (prefix) {
- return prefix;
- }
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) {
+ return prefix + '[]';
+ },
+ indices: function indices(prefix, key) {
+ return prefix + '[' + key + ']';
},
+ repeat: function repeat(prefix) {
+ return prefix;
+ }
+};
+
+var defaults = {
+ delimiter: '&',
strictNullHandling: false,
skipNulls: false,
- encode: true
+ encode: true,
+ encoder: Utils.encode
};
-internals.stringify = function (object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots) {
+var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) {
var obj = object;
if (typeof filter === 'function') {
obj = filter(prefix, obj);
- } else if (Utils.isBuffer(obj)) {
- obj = String(obj);
} else if (obj instanceof Date) {
obj = obj.toISOString();
} else if (obj === null) {
if (strictNullHandling) {
- return encode ? Utils.encode(prefix) : prefix;
+ return encoder ? encoder(prefix) : prefix;
}
obj = '';
}
- if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean') {
- if (encode) {
- return [Utils.encode(prefix) + '=' + Utils.encode(obj)];
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) {
+ if (encoder) {
+ return [encoder(prefix) + '=' + encoder(obj)];
}
- return [prefix + '=' + obj];
+ return [prefix + '=' + String(obj)];
}
var values = [];
@@ -65,9 +65,9 @@ internals.stringify = function (object, prefix, generateArrayPrefix, strictNullH
}
if (Array.isArray(obj)) {
- values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots));
+ values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
} else {
- values = values.concat(internals.stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots));
+ values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
}
}
@@ -77,14 +77,20 @@ internals.stringify = function (object, prefix, generateArrayPrefix, strictNullH
module.exports = function (object, opts) {
var obj = object;
var options = opts || {};
- var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
- var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;
- var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;
- var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;
+ var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
+ var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
+ var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
+ var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
+ var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null;
var sort = typeof options.sort === 'function' ? options.sort : null;
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
var objKeys;
var filter;
+
+ if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
if (typeof options.filter === 'function') {
filter = options.filter;
obj = filter('', obj);
@@ -99,7 +105,7 @@ module.exports = function (object, opts) {
}
var arrayFormat;
- if (options.arrayFormat in internals.arrayPrefixGenerators) {
+ if (options.arrayFormat in arrayPrefixGenerators) {
arrayFormat = options.arrayFormat;
} else if ('indices' in options) {
arrayFormat = options.indices ? 'indices' : 'repeat';
@@ -107,7 +113,7 @@ module.exports = function (object, opts) {
arrayFormat = 'indices';
}
- var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
if (!objKeys) {
objKeys = Object.keys(obj);
@@ -124,7 +130,7 @@ module.exports = function (object, opts) {
continue;
}
- keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort, allowDots));
+ keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots));
}
return keys.join(delimiter);
diff --git a/deps/npm/node_modules/request/node_modules/qs/lib/utils.js b/deps/npm/node_modules/request/node_modules/qs/lib/utils.js
index 5d433560306849..2c5c8ee503355b 100755
--- a/deps/npm/node_modules/request/node_modules/qs/lib/utils.js
+++ b/deps/npm/node_modules/request/node_modules/qs/lib/utils.js
@@ -46,7 +46,7 @@ exports.merge = function (target, source, options) {
mergeTarget = exports.arrayToObject(target, options);
}
- return Object.keys(source).reduce(function (acc, key) {
+ return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
if (Object.prototype.hasOwnProperty.call(acc, key)) {
@@ -54,7 +54,7 @@ exports.merge = function (target, source, options) {
} else {
acc[key] = value;
}
- return acc;
+ return acc;
}, mergeTarget);
};
@@ -109,7 +109,7 @@ exports.encode = function (str) {
i += 1;
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
- out += (hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)];
}
return out;
@@ -132,7 +132,9 @@ exports.compact = function (obj, references) {
var compacted = [];
for (var i = 0; i < obj.length; ++i) {
- if (typeof obj[i] !== 'undefined') {
+ if (obj[i] && typeof obj[i] === 'object') {
+ compacted.push(exports.compact(obj[i], refs));
+ } else if (typeof obj[i] !== 'undefined') {
compacted.push(obj[i]);
}
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/package.json b/deps/npm/node_modules/request/node_modules/qs/package.json
index 6b481626571e41..a3cff0a08291de 100644
--- a/deps/npm/node_modules/request/node_modules/qs/package.json
+++ b/deps/npm/node_modules/request/node_modules/qs/package.json
@@ -2,7 +2,7 @@
"name": "qs",
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
"homepage": "https://github.com/ljharb/qs",
- "version": "6.1.0",
+ "version": "6.2.1",
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/qs.git"
@@ -24,17 +24,20 @@
},
"dependencies": {},
"devDependencies": {
- "browserify": "^12.0.1",
- "tape": "^4.3.0",
+ "browserify": "^13.0.1",
+ "tape": "^4.6.0",
"covert": "^1.1.0",
"mkdirp": "^0.5.1",
- "eslint": "^1.10.3",
- "@ljharb/eslint-config": "^1.6.1",
+ "eslint": "^3.1.0",
+ "@ljharb/eslint-config": "^6.0.0",
"parallelshell": "^2.0.0",
- "evalmd": "^0.0.16"
+ "iconv-lite": "^0.4.13",
+ "qs-iconv": "^1.0.3",
+ "evalmd": "^0.0.17"
},
"scripts": {
- "test": "parallelshell 'npm run readme' 'npm run lint' 'npm run coverage'",
+ "pretest": "npm run --silent readme && npm run --silent lint",
+ "test": "npm run --silent coverage",
"tests-only": "node test",
"readme": "evalmd README.md",
"lint": "eslint lib/*.js text/*.js",
@@ -43,22 +46,22 @@
"prepublish": "npm run dist"
},
"license": "BSD-3-Clause",
- "gitHead": "5bd79545edb33d6a43398fec7df9ecef2da005ea",
+ "gitHead": "335f839142e6c2c69f5302c4940d92acb0e77561",
"bugs": {
"url": "https://github.com/ljharb/qs/issues"
},
- "_id": "qs@6.1.0",
- "_shasum": "ec1d1626b24278d99f0fdf4549e524e24eceeb26",
- "_from": "qs@>=6.1.0 <6.2.0",
- "_npmVersion": "3.3.12",
- "_nodeVersion": "5.5.0",
+ "_id": "qs@6.2.1",
+ "_shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625",
+ "_from": "qs@>=6.2.0 <6.3.0",
+ "_npmVersion": "3.10.3",
+ "_nodeVersion": "6.3.0",
"_npmUser": {
"name": "ljharb",
"email": "ljharb@gmail.com"
},
"dist": {
- "shasum": "ec1d1626b24278d99f0fdf4549e524e24eceeb26",
- "tarball": "http://registry.npmjs.org/qs/-/qs-6.1.0.tgz"
+ "shasum": "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625",
+ "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz"
},
"maintainers": [
{
@@ -75,10 +78,10 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-5-east.internal.npmjs.com",
- "tmp": "tmp/qs-6.1.0.tgz_1454565583082_0.44599376199766994"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/qs-6.2.1.tgz_1469044929716_0.06957711698487401"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/qs/-/qs-6.1.0.tgz",
+ "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/parse.js b/deps/npm/node_modules/request/node_modules/qs/test/parse.js
index 5665d074e95bd4..ccf8c8c4c5365a 100755
--- a/deps/npm/node_modules/request/node_modules/qs/test/parse.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/parse.js
@@ -2,6 +2,7 @@
var test = require('tape');
var qs = require('../');
+var iconv = require('iconv-lite');
test('parse()', function (t) {
t.test('parses a simple string', function (st) {
@@ -120,8 +121,11 @@ test('parse()', function (t) {
st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } });
st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] });
- st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c'), { a: { '0': 'b', t: 'u', c: true } });
- st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y'), { a: { '0': 'b', '1': 'c', x: 'y' } });
+
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { '0': 'b', c: true, t: 'u' } });
+ st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { '0': 'b', t: 'u', hasOwnProperty: 'c' } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { '0': 'b', '1': 'c', x: 'y' } });
+ st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { '0': 'b', hasOwnProperty: 'c', x: 'y' } });
st.end();
});
@@ -173,14 +177,42 @@ test('parse()', function (t) {
t.test('allows for empty strings in arrays', function (st) {
st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] });
- st.deepEqual(qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true }), { a: ['b', null, 'c', ''] });
- st.deepEqual(qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true }), { a: ['b', '', 'c', null] });
- st.deepEqual(qs.parse('a[]=&a[]=b&a[]=c'), { a: ['', 'b', 'c'] });
+
+ st.deepEqual(
+ qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }),
+ { a: ['b', null, 'c', ''] },
+ 'with arrayLimit 20 + array indices: null then empty string works'
+ );
+ st.deepEqual(
+ qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }),
+ { a: ['b', null, 'c', ''] },
+ 'with arrayLimit 0 + array brackets: null then empty string works'
+ );
+
+ st.deepEqual(
+ qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }),
+ { a: ['b', '', 'c', null] },
+ 'with arrayLimit 20 + array indices: empty string then null works'
+ );
+ st.deepEqual(
+ qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }),
+ { a: ['b', '', 'c', null] },
+ 'with arrayLimit 0 + array brackets: empty string then null works'
+ );
+
+ st.deepEqual(
+ qs.parse('a[]=&a[]=b&a[]=c'),
+ { a: ['', 'b', 'c'] },
+ 'array brackets: empty strings work'
+ );
st.end();
});
t.test('compacts sparse arrays', function (st) {
st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] });
+ st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] });
+ st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] });
+ st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] });
st.end();
});
@@ -390,4 +422,30 @@ test('parse()', function (t) {
st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray);
st.end();
});
+
+ t.test('can parse with custom encoding', function (st) {
+ st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', {
+ decoder: function (str) {
+ var reg = /\%([0-9A-F]{2})/ig;
+ var result = [];
+ var parts;
+ var last = 0;
+ while (parts = reg.exec(str)) {
+ result.push(parseInt(parts[1], 16));
+ last = parts.index + parts[0].length;
+ }
+ return iconv.decode(new Buffer(result), 'shift_jis').toString();
+ }
+ }), { 県: '大阪府' });
+ st.end();
+ });
+
+ t.test('throws error with wrong decoder', function (st) {
+ st.throws(function () {
+ qs.parse({}, {
+ decoder: 'string'
+ });
+ }, new TypeError('Decoder has to be a function.'));
+ st.end();
+ });
});
diff --git a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
index 508c2460b69081..699397e3346a9e 100755
--- a/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
+++ b/deps/npm/node_modules/request/node_modules/qs/test/stringify.js
@@ -2,6 +2,7 @@
var test = require('tape');
var qs = require('../');
+var iconv = require('iconv-lite');
test('stringify()', function (t) {
t.test('stringifies a querystring object', function (st) {
@@ -65,6 +66,11 @@ test('stringify()', function (t) {
st.end();
});
+ t.test('stringifies an array with mixed objects and primitives', function (st) {
+ st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3');
+ st.end();
+ });
+
t.test('stringifies an object inside an array with dots notation', function (st) {
st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c');
st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1');
@@ -256,4 +262,44 @@ test('stringify()', function (t) {
st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b');
st.end();
});
+
+ t.test('can stringify with custom encoding', function (st) {
+ st.equal(qs.stringify({ 県: '大阪府', '': ''}, {
+ encoder: function (str) {
+ if (str.length === 0) {
+ return '';
+ }
+ var buf = iconv.encode(str, 'shiftjis');
+ var result = [];
+ for (var i=0; i < buf.length; ++i) {
+ result.push(buf.readUInt8(i).toString(16));
+ }
+ return '%' + result.join('%');
+ }
+ }), '%8c%a7=%91%e5%8d%e3%95%7b&=');
+ st.end();
+ });
+
+ t.test('throws error with wrong encoder', function (st) {
+ st.throws(function () {
+ qs.stringify({}, {
+ encoder: 'string'
+ });
+ }, new TypeError('Encoder has to be a function.'));
+ st.end();
+ });
+
+ t.test('can use custom encoder for a buffer object', {
+ skip: typeof Buffer === 'undefined'
+ }, function (st) {
+ st.equal(qs.stringify({ a: new Buffer([1]) }, {
+ encoder: function (buffer) {
+ if (typeof buffer === 'string') {
+ return buffer;
+ }
+ return String.fromCharCode(buffer.readUInt8(0) + 97);
+ }
+ }), 'a=b');
+ st.end();
+ });
});
diff --git a/deps/npm/node_modules/request/node_modules/stringstream/package.json b/deps/npm/node_modules/request/node_modules/stringstream/package.json
index 39474baa0b5ef2..2c6d7cdca6d2f8 100644
--- a/deps/npm/node_modules/request/node_modules/stringstream/package.json
+++ b/deps/npm/node_modules/request/node_modules/stringstream/package.json
@@ -42,7 +42,7 @@
],
"dist": {
"shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878",
- "tarball": "http://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz"
+ "tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/README.md b/deps/npm/node_modules/request/node_modules/tough-cookie/README.md
index 9899dbf6eed156..126f222b904646 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/README.md
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/README.md
@@ -1,9 +1,8 @@
[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js
-[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie)
+[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/)
-[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie)
-![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9)
+[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie)
# Synopsis
@@ -30,6 +29,10 @@ It's _so_ easy!
Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.
+## Version Support
+
+Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module.
+
# API
## tough
@@ -426,6 +429,17 @@ Inherits from `Store`.
A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API.
+## Community Cookie Stores
+
+These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look:
+
+- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases
+- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk
+- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis
+- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk
+- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage
+
+
# Serialization Format
**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`.
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js
index 12da297ac4d20f..c3dacfe44a3f2a 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js
@@ -68,9 +68,6 @@ var LOOSE_COOKIE_PAIR = /^((?:=)?([^=;]*)\s*=\s*)?([^\n\r\0]*)/;
// Note ';' is \x3B
var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/;
-// Used for checking whether or not there is a trailing semi-colon
-var TRAILING_SEMICOLON = /;+$/;
-
var DAY_OF_MONTH = /^(\d{1,2})[^\d]*$/;
var TIME = /^(\d{1,2})[^\d]*:(\d{1,2})[^\d]*:(\d{1,2})[^\d]*$/;
var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/i;
@@ -327,12 +324,6 @@ function parse(str, options) {
}
str = str.trim();
- // S4.1.1 Trailing semi-colons are not part of the specification.
- var semiColonCheck = TRAILING_SEMICOLON.exec(str);
- if (semiColonCheck) {
- str = str.slice(0, semiColonCheck.index);
- }
-
// We use a regex to parse the "name-value-pair" part of S5.2
var firstSemi = str.indexOf(';'); // S5.2 step 1
var pairRe = options.loose ? LOOSE_COOKIE_PAIR : COOKIE_PAIR;
@@ -362,7 +353,7 @@ function parse(str, options) {
// S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string
// (including the %x3B (";") in question)." plus later on in the same section
// "discard the first ";" and trim".
- var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim();
+ var unparsed = str.slice(firstSemi + 1).trim();
// "If the unparsed-attributes string is empty, skip the rest of these
// steps."
@@ -378,9 +369,12 @@ function parse(str, options) {
* cookie-attribute-list". Therefore, in this implementation, we overwrite
* the previous value.
*/
- var cookie_avs = unparsed.split(/\s*;\s*/);
+ var cookie_avs = unparsed.split(';');
while (cookie_avs.length) {
- var av = cookie_avs.shift();
+ var av = cookie_avs.shift().trim();
+ if (av.length === 0) { // happens if ";;" appears
+ continue;
+ }
var av_sep = av.indexOf('=');
var av_key, av_value;
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json
index cc1aebfc8efa13..289a4ab253ba7e 100644
--- a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json
+++ b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json
@@ -36,7 +36,7 @@
"RFC6265",
"RFC2965"
],
- "version": "2.2.2",
+ "version": "2.3.1",
"homepage": "https://github.com/SalesforceEng/tough-cookie",
"repository": {
"type": "git",
@@ -54,41 +54,42 @@
"test": "vows test/*_test.js"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.8"
},
"devDependencies": {
"async": "^1.4.2",
+ "string.prototype.repeat": "^0.2.0",
"vows": "^0.8.1"
},
- "gitHead": "cc46628c4d7d2e8c372ecba29293ca8a207ec192",
- "_id": "tough-cookie@2.2.2",
- "_shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7",
- "_from": "tough-cookie@>=2.2.0 <2.3.0",
- "_npmVersion": "3.3.12",
- "_nodeVersion": "5.1.1",
+ "gitHead": "c11a2d11d12348a35ef595c809e30e641a804a7d",
+ "_id": "tough-cookie@2.3.1",
+ "_shasum": "99c77dfbb7d804249e8a299d4cb0fd81fef083fd",
+ "_from": "tough-cookie@>=2.3.0 <2.4.0",
+ "_npmVersion": "3.10.3",
+ "_nodeVersion": "6.3.1",
"_npmUser": {
"name": "jstash",
"email": "jstash@gmail.com"
},
"dist": {
- "shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7",
- "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz"
+ "shasum": "99c77dfbb7d804249e8a299d4cb0fd81fef083fd",
+ "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz"
},
"maintainers": [
{
"name": "jstash",
- "email": "jeremy@goinstant.com"
+ "email": "jstash@gmail.com"
},
{
- "name": "goinstant",
- "email": "services@goinstant.com"
+ "name": "nexxy",
+ "email": "emily@contactvibe.com"
}
],
"_npmOperationalInternal": {
- "host": "packages-13-west.internal.npmjs.com",
- "tmp": "tmp/tough-cookie-2.2.2.tgz_1457564639182_0.5129188685677946"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/tough-cookie-2.3.1.tgz_1469494891088_0.8524557144846767"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz",
+ "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index 70c7f76dc77429..591e8bbf54de3e 100644
--- a/deps/npm/node_modules/request/package.json
+++ b/deps/npm/node_modules/request/package.json
@@ -7,7 +7,7 @@
"util",
"utility"
],
- "version": "2.72.0",
+ "version": "2.74.0",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -32,7 +32,7 @@
"combined-stream": "~1.0.5",
"extend": "~3.0.0",
"forever-agent": "~0.6.1",
- "form-data": "~1.0.0-rc3",
+ "form-data": "~1.0.0-rc4",
"har-validator": "~2.0.6",
"hawk": "~3.1.3",
"http-signature": "~1.1.0",
@@ -42,9 +42,9 @@
"mime-types": "~2.1.7",
"node-uuid": "~1.4.7",
"oauth-sign": "~0.8.1",
- "qs": "~6.1.0",
+ "qs": "~6.2.0",
"stringstream": "~0.0.4",
- "tough-cookie": "~2.2.0",
+ "tough-cookie": "~2.3.0",
"tunnel-agent": "~0.4.1"
},
"scripts": {
@@ -56,40 +56,40 @@
},
"devDependencies": {
"bluebird": "^3.2.1",
- "browserify": "^12.0.2",
+ "browserify": "^13.0.1",
"browserify-istanbul": "^2.0.0",
"buffer-equal": "^1.0.0",
- "codecov.io": "^0.1.6",
+ "codecov": "^1.0.1",
"coveralls": "^2.11.4",
"eslint": "^2.5.3",
"function-bind": "^1.0.2",
"istanbul": "^0.4.0",
- "karma": "^0.13.10",
+ "karma": "^1.1.1",
"karma-browserify": "^5.0.1",
- "karma-cli": "^0.1.1",
- "karma-coverage": "^0.5.3",
+ "karma-cli": "^1.0.0",
+ "karma-coverage": "^1.0.0",
"karma-phantomjs-launcher": "^1.0.0",
- "karma-tap": "^1.0.3",
+ "karma-tap": "^2.0.1",
"phantomjs-prebuilt": "^2.1.3",
"rimraf": "^2.2.8",
"server-destroy": "^1.0.1",
- "tape": "^4.2.0",
+ "tape": "^4.6.0",
"taper": "^0.4.0"
},
- "gitHead": "6dcac13642955577592fdafb5ff3cdc8a6ff1b1b",
+ "gitHead": "76e82351cbc21049441b1763c6f2bbd504fa8f5a",
"homepage": "https://github.com/request/request#readme",
- "_id": "request@2.72.0",
- "_shasum": "0ce3a179512620b10441f14c82e21c12c0ddb4e1",
- "_from": "request@2.72.0",
- "_npmVersion": "3.8.5",
- "_nodeVersion": "5.9.0",
+ "_id": "request@2.74.0",
+ "_shasum": "7693ca768bbb0ea5c8ce08c084a45efa05b892ab",
+ "_from": "request@2.74.0",
+ "_npmVersion": "2.15.6",
+ "_nodeVersion": "6.2.2",
"_npmUser": {
"name": "simov",
"email": "simeonvelichkov@gmail.com"
},
"dist": {
- "shasum": "0ce3a179512620b10441f14c82e21c12c0ddb4e1",
- "tarball": "https://registry.npmjs.org/request/-/request-2.72.0.tgz"
+ "shasum": "7693ca768bbb0ea5c8ce08c084a45efa05b892ab",
+ "tarball": "https://registry.npmjs.org/request/-/request-2.74.0.tgz"
},
"maintainers": [
{
@@ -110,10 +110,10 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/request-2.72.0.tgz_1460901215210_0.9173020373564214"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/request-2.74.0.tgz_1469231082306_0.13140005595050752"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/request/-/request-2.72.0.tgz",
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.74.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
index ac2cd8098f1045..8267c125375af4 100644
--- a/deps/npm/node_modules/request/request.js
+++ b/deps/npm/node_modules/request/request.js
@@ -9,6 +9,7 @@ var http = require('http')
, bl = require('bl')
, hawk = require('hawk')
, aws2 = require('aws-sign2')
+ , aws4 = require('aws4')
, httpSignature = require('http-signature')
, mime = require('mime-types')
, stringstream = require('stringstream')
@@ -70,20 +71,6 @@ function filterOutReservedFunctions(reserved, options) {
}
-// Function for properly handling a connection error
-function connectionErrorHandler(error) {
- var socket = this
- if (socket.res) {
- if (socket.res.request) {
- socket.res.request.emit('error', error)
- } else {
- socket.res.emit('error', error)
- }
- } else {
- socket._httpMessage.emit('error', error)
- }
-}
-
// Return a simpler request object to allow serialization
function requestToJSON() {
var self = this
@@ -335,7 +322,7 @@ Request.prototype.init = function (options) {
var formData = options.formData
var requestForm = self.form()
var appendFormValue = function (key, value) {
- if (value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
+ if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
requestForm.append(key, value.value, value.options)
} else {
requestForm.append(key, value)
@@ -804,11 +791,6 @@ Request.prototype.start = function () {
self.emit('socket', socket)
})
- self.on('end', function() {
- if ( self.req.connection ) {
- self.req.connection.removeListener('error', connectionErrorHandler)
- }
- })
self.emit('request', self.req)
}
@@ -843,11 +825,6 @@ Request.prototype.onRequestResponse = function (response) {
debug('response end', self.uri.href, response.statusCode, response.headers)
})
- // The check on response.connection is a workaround for browserify.
- if (response.connection && response.connection.listeners('error').indexOf(connectionErrorHandler) === -1) {
- response.connection.setMaxListeners(0)
- response.connection.once('error', connectionErrorHandler)
- }
if (self._aborted) {
debug('aborted', self.uri.href)
response.resume()
@@ -1266,7 +1243,6 @@ Request.prototype.aws = function (opts, now) {
}
if (opts.sign_version == 4 || opts.sign_version == '4') {
- var aws4 = require('aws4')
// use aws4
var options = {
host: self.uri.host,
diff --git a/deps/npm/node_modules/retry/Readme.md b/deps/npm/node_modules/retry/Readme.md
index 26e50a3a7f3c6a..eee05f7bb61537 100644
--- a/deps/npm/node_modules/retry/Readme.md
+++ b/deps/npm/node_modules/retry/Readme.md
@@ -78,7 +78,7 @@ milliseconds. If `options` is an array, a copy of that array is returned.
The formula used to calculate the individual timeouts is:
```
-var Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout);
+Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout)
```
Have a look at [this article][article] for a better explanation of approach.
@@ -120,11 +120,11 @@ an array of method names which need to be wrapped.
```
retry.wrap(obj)
-retry.wrap(obj, ['method1', 'method2']);
+retry.wrap(obj, ['method1', 'method2'])
-retry.wrap(obj, {retries: 3});
+retry.wrap(obj, {retries: 3})
-retry.wrap(obj, {retries: 3}, ['method1', 'method2']);
+retry.wrap(obj, {retries: 3}, ['method1', 'method2'])
```
The `options` object can take any options that the usual call to `retry.operation` can take.
@@ -139,7 +139,7 @@ Available options:
If `forever` is true, the following changes happen:
* `RetryOperation.errors()` will only output an array of one item: the last error.
-* `RetryOperation` will repeatedly use the last item in the `timeouts` array.
+* `RetryOperation` will repeatedly use the `timeouts` array. Once all of its timeouts have been used up, it restarts with the first timeout, then uses the second and so on.
#### retryOperation.errors()
@@ -181,6 +181,10 @@ has been reached.
Otherwise it returns `true`, and retries the operation after the timeout for
the current attempt number.
+#### retryOperation.stop()
+
+Allows you to stop the operation being retried. Useful for aborting the operation on a fatal error etc.
+
#### retryOperation.attempts()
Returns an int representing the number of attempts it took to call `fn` before it was successful.
@@ -192,6 +196,10 @@ retry is licensed under the MIT license.
# Changelog
+0.10.0 Adding `stop` functionality, thanks to @maxnachlinger.
+
+0.9.0 Adding `unref` functionality, thanks to @satazor.
+
0.8.0 Implementing retry.wrap.
0.7.0 Some bug fixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13).
diff --git a/deps/npm/node_modules/retry/example/dns.js b/deps/npm/node_modules/retry/example/dns.js
index d6351e9d05bb33..446729b6f9af6b 100644
--- a/deps/npm/node_modules/retry/example/dns.js
+++ b/deps/npm/node_modules/retry/example/dns.js
@@ -28,4 +28,4 @@ faultTolerantResolve('nodejs.org', function(err, errors, addresses) {
console.warn('addresses:');
console.log(addresses);
-});
+});
\ No newline at end of file
diff --git a/deps/npm/node_modules/retry/example/stop.js b/deps/npm/node_modules/retry/example/stop.js
new file mode 100644
index 00000000000000..e1ceafeebafc51
--- /dev/null
+++ b/deps/npm/node_modules/retry/example/stop.js
@@ -0,0 +1,40 @@
+var retry = require('../lib/retry');
+
+function attemptAsyncOperation(someInput, cb) {
+ var opts = {
+ retries: 2,
+ factor: 2,
+ minTimeout: 1 * 1000,
+ maxTimeout: 2 * 1000,
+ randomize: true
+ };
+ var operation = retry.operation(opts);
+
+ operation.attempt(function(currentAttempt) {
+ failingAsyncOperation(someInput, function(err, result) {
+
+ if (err && err.message === 'A fatal error') {
+ operation.stop();
+ return cb(err);
+ }
+
+ if (operation.retry(err)) {
+ return;
+ }
+
+ cb(operation.mainError(), operation.errors(), result);
+ });
+ });
+}
+
+attemptAsyncOperation('test input', function(err, errors, result) {
+ console.warn('err:');
+ console.log(err);
+
+ console.warn('result:');
+ console.log(result);
+});
+
+function failingAsyncOperation(input, cb) {
+ return setImmediate(cb.bind(null, new Error('A fatal error')));
+}
diff --git a/deps/npm/node_modules/retry/lib/retry.js b/deps/npm/node_modules/retry/lib/retry.js
index 02ab14729bd8b7..77428cfd0006fa 100644
--- a/deps/npm/node_modules/retry/lib/retry.js
+++ b/deps/npm/node_modules/retry/lib/retry.js
@@ -33,6 +33,10 @@ exports.timeouts = function(options) {
timeouts.push(this.createTimeout(i, opts));
}
+ if (options && options.forever && !timeouts.length) {
+ timeouts.push(this.createTimeout(i, opts));
+ }
+
// sort the array numerically ascending
timeouts.sort(function(a,b) {
return a - b;
diff --git a/deps/npm/node_modules/retry/lib/retry_operation.js b/deps/npm/node_modules/retry/lib/retry_operation.js
index ad96efbdf3b02d..2b3db8e1776973 100644
--- a/deps/npm/node_modules/retry/lib/retry_operation.js
+++ b/deps/npm/node_modules/retry/lib/retry_operation.js
@@ -19,6 +19,15 @@ function RetryOperation(timeouts, options) {
}
module.exports = RetryOperation;
+RetryOperation.prototype.stop = function() {
+ if (this._timeout) {
+ clearTimeout(this._timeout);
+ }
+
+ this._timeouts = [];
+ this._cachedTimeouts = null;
+};
+
RetryOperation.prototype.retry = function(err) {
if (this._timeout) {
clearTimeout(this._timeout);
diff --git a/deps/npm/node_modules/retry/package.json b/deps/npm/node_modules/retry/package.json
index c8fc00f9d7593b..7d4a38fcd814d1 100644
--- a/deps/npm/node_modules/retry/package.json
+++ b/deps/npm/node_modules/retry/package.json
@@ -7,7 +7,7 @@
"name": "retry",
"description": "Abstraction for exponential and custom retry strategies for failed operations.",
"license": "MIT",
- "version": "0.9.0",
+ "version": "0.10.0",
"homepage": "https://github.com/tim-kos/node-retry",
"repository": {
"type": "git",
@@ -25,14 +25,14 @@
"fake": "0.2.0",
"far": "0.0.1"
},
- "gitHead": "1b621cf499ef7647d005e3650006b93a8dbeb986",
+ "gitHead": "0616e6a6ebc49b5a36b619c8f7c414ced8c3813b",
"bugs": {
"url": "https://github.com/tim-kos/node-retry/issues"
},
- "_id": "retry@0.9.0",
+ "_id": "retry@0.10.0",
"scripts": {},
- "_shasum": "6f697e50a0e4ddc8c8f7fb547a9b60dead43678d",
- "_from": "retry@0.9.0",
+ "_shasum": "649e15ca408422d98318161935e7f7d652d435dd",
+ "_from": "retry@0.10.0",
"_npmVersion": "2.1.7",
"_nodeVersion": "4.2.1",
"_npmUser": {
@@ -46,8 +46,13 @@
}
],
"dist": {
- "shasum": "6f697e50a0e4ddc8c8f7fb547a9b60dead43678d",
- "tarball": "http://registry.npmjs.org/retry/-/retry-0.9.0.tgz"
+ "shasum": "649e15ca408422d98318161935e7f7d652d435dd",
+ "tarball": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz"
},
- "_resolved": "https://registry.npmjs.org/retry/-/retry-0.9.0.tgz"
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/retry-0.10.0.tgz_1471682099847_0.5031970851123333"
+ },
+ "_resolved": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/retry/test/integration/test-forever.js b/deps/npm/node_modules/retry/test/integration/test-forever.js
new file mode 100644
index 00000000000000..b41307cb529f12
--- /dev/null
+++ b/deps/npm/node_modules/retry/test/integration/test-forever.js
@@ -0,0 +1,24 @@
+var common = require('../common');
+var assert = common.assert;
+var retry = require(common.dir.lib + '/retry');
+
+(function testForeverUsesFirstTimeout() {
+ var operation = retry.operation({
+ retries: 0,
+ minTimeout: 100,
+ maxTimeout: 100,
+ forever: true
+ });
+
+ operation.attempt(function(numAttempt) {
+ console.log('>numAttempt', numAttempt);
+ var err = new Error("foo");
+ if (numAttempt == 10) {
+ operation.stop();
+ }
+
+ if (operation.retry(err)) {
+ return;
+ }
+ });
+})();
diff --git a/deps/npm/node_modules/retry/test/integration/test-retry-operation.js b/deps/npm/node_modules/retry/test/integration/test-retry-operation.js
index cecfa3b7310013..916936424f073b 100644
--- a/deps/npm/node_modules/retry/test/integration/test-retry-operation.js
+++ b/deps/npm/node_modules/retry/test/integration/test-retry-operation.js
@@ -104,3 +104,73 @@ var retry = require(common.dir.lib + '/retry');
fn();
})();
+
+(function testRetryForeverNoRetries() {
+ var error = new Error('some error');
+ var delay = 50
+ var operation = retry.operation({
+ retries: null,
+ forever: true,
+ minTimeout: delay,
+ maxTimeout: delay
+ });
+
+ var attempts = 0;
+ var startTime = new Date().getTime();
+
+ var finalCallback = fake.callback('finalCallback');
+ fake.expectAnytime(finalCallback);
+
+ var fn = function() {
+ operation.attempt(function(currentAttempt) {
+ attempts++;
+ assert.equal(currentAttempt, attempts);
+ if (attempts !== 4 && operation.retry(error)) {
+ return;
+ }
+
+ var endTime = new Date().getTime();
+ var minTime = startTime + (delay * 3);
+ var maxTime = minTime + 20 // add a little headroom for code execution time
+ assert(endTime > minTime)
+ assert(endTime < maxTime)
+ assert.strictEqual(attempts, 4);
+ assert.strictEqual(operation.attempts(), attempts);
+ assert.strictEqual(operation.mainError(), error);
+ finalCallback();
+ });
+ };
+
+ fn();
+})();
+
+(function testStop() {
+ var error = new Error('some error');
+ var operation = retry.operation([1, 2, 3]);
+ var attempts = 0;
+
+ var finalCallback = fake.callback('finalCallback');
+ fake.expectAnytime(finalCallback);
+
+ var fn = function() {
+ operation.attempt(function(currentAttempt) {
+ attempts++;
+ assert.equal(currentAttempt, attempts);
+
+ if (attempts === 2) {
+ operation.stop();
+
+ assert.strictEqual(attempts, 2);
+ assert.strictEqual(operation.attempts(), attempts);
+ assert.strictEqual(operation.mainError(), error);
+ finalCallback();
+ }
+
+ if (operation.retry(error)) {
+ return;
+ }
+ });
+ };
+
+ fn();
+})();
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/LICENSE b/deps/npm/node_modules/rimraf/node_modules/glob/LICENSE
deleted file mode 100644
index 19129e315fe593..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/common.js b/deps/npm/node_modules/rimraf/node_modules/glob/common.js
deleted file mode 100644
index b280e76cee9be6..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/common.js
+++ /dev/null
@@ -1,226 +0,0 @@
-exports.alphasort = alphasort
-exports.alphasorti = alphasorti
-exports.setopts = setopts
-exports.ownProp = ownProp
-exports.makeAbs = makeAbs
-exports.finish = finish
-exports.mark = mark
-exports.isIgnored = isIgnored
-exports.childrenIgnored = childrenIgnored
-
-function ownProp (obj, field) {
- return Object.prototype.hasOwnProperty.call(obj, field)
-}
-
-var path = require("path")
-var minimatch = require("minimatch")
-var isAbsolute = require("path-is-absolute")
-var Minimatch = minimatch.Minimatch
-
-function alphasorti (a, b) {
- return a.toLowerCase().localeCompare(b.toLowerCase())
-}
-
-function alphasort (a, b) {
- return a.localeCompare(b)
-}
-
-function setupIgnores (self, options) {
- self.ignore = options.ignore || []
-
- if (!Array.isArray(self.ignore))
- self.ignore = [self.ignore]
-
- if (self.ignore.length) {
- self.ignore = self.ignore.map(ignoreMap)
- }
-}
-
-// ignore patterns are always in dot:true mode.
-function ignoreMap (pattern) {
- var gmatcher = null
- if (pattern.slice(-3) === '/**') {
- var gpattern = pattern.replace(/(\/\*\*)+$/, '')
- gmatcher = new Minimatch(gpattern, { dot: true })
- }
-
- return {
- matcher: new Minimatch(pattern, { dot: true }),
- gmatcher: gmatcher
- }
-}
-
-function setopts (self, pattern, options) {
- if (!options)
- options = {}
-
- // base-matching: just use globstar for that.
- if (options.matchBase && -1 === pattern.indexOf("/")) {
- if (options.noglobstar) {
- throw new Error("base matching requires globstar")
- }
- pattern = "**/" + pattern
- }
-
- self.silent = !!options.silent
- self.pattern = pattern
- self.strict = options.strict !== false
- self.realpath = !!options.realpath
- self.realpathCache = options.realpathCache || Object.create(null)
- self.follow = !!options.follow
- self.dot = !!options.dot
- self.mark = !!options.mark
- self.nodir = !!options.nodir
- if (self.nodir)
- self.mark = true
- self.sync = !!options.sync
- self.nounique = !!options.nounique
- self.nonull = !!options.nonull
- self.nosort = !!options.nosort
- self.nocase = !!options.nocase
- self.stat = !!options.stat
- self.noprocess = !!options.noprocess
-
- self.maxLength = options.maxLength || Infinity
- self.cache = options.cache || Object.create(null)
- self.statCache = options.statCache || Object.create(null)
- self.symlinks = options.symlinks || Object.create(null)
-
- setupIgnores(self, options)
-
- self.changedCwd = false
- var cwd = process.cwd()
- if (!ownProp(options, "cwd"))
- self.cwd = cwd
- else {
- self.cwd = path.resolve(options.cwd)
- self.changedCwd = self.cwd !== cwd
- }
-
- self.root = options.root || path.resolve(self.cwd, "/")
- self.root = path.resolve(self.root)
- if (process.platform === "win32")
- self.root = self.root.replace(/\\/g, "/")
-
- self.nomount = !!options.nomount
-
- // disable comments and negation in Minimatch.
- // Note that they are not supported in Glob itself anyway.
- options.nonegate = true
- options.nocomment = true
-
- self.minimatch = new Minimatch(pattern, options)
- self.options = self.minimatch.options
-}
-
-function finish (self) {
- var nou = self.nounique
- var all = nou ? [] : Object.create(null)
-
- for (var i = 0, l = self.matches.length; i < l; i ++) {
- var matches = self.matches[i]
- if (!matches || Object.keys(matches).length === 0) {
- if (self.nonull) {
- // do like the shell, and spit out the literal glob
- var literal = self.minimatch.globSet[i]
- if (nou)
- all.push(literal)
- else
- all[literal] = true
- }
- } else {
- // had matches
- var m = Object.keys(matches)
- if (nou)
- all.push.apply(all, m)
- else
- m.forEach(function (m) {
- all[m] = true
- })
- }
- }
-
- if (!nou)
- all = Object.keys(all)
-
- if (!self.nosort)
- all = all.sort(self.nocase ? alphasorti : alphasort)
-
- // at *some* point we statted all of these
- if (self.mark) {
- for (var i = 0; i < all.length; i++) {
- all[i] = self._mark(all[i])
- }
- if (self.nodir) {
- all = all.filter(function (e) {
- return !(/\/$/.test(e))
- })
- }
- }
-
- if (self.ignore.length)
- all = all.filter(function(m) {
- return !isIgnored(self, m)
- })
-
- self.found = all
-}
-
-function mark (self, p) {
- var abs = makeAbs(self, p)
- var c = self.cache[abs]
- var m = p
- if (c) {
- var isDir = c === 'DIR' || Array.isArray(c)
- var slash = p.slice(-1) === '/'
-
- if (isDir && !slash)
- m += '/'
- else if (!isDir && slash)
- m = m.slice(0, -1)
-
- if (m !== p) {
- var mabs = makeAbs(self, m)
- self.statCache[mabs] = self.statCache[abs]
- self.cache[mabs] = self.cache[abs]
- }
- }
-
- return m
-}
-
-// lotta situps...
-function makeAbs (self, f) {
- var abs = f
- if (f.charAt(0) === '/') {
- abs = path.join(self.root, f)
- } else if (isAbsolute(f) || f === '') {
- abs = f
- } else if (self.changedCwd) {
- abs = path.resolve(self.cwd, f)
- } else {
- abs = path.resolve(f)
- }
- return abs
-}
-
-
-// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
-// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
-function isIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
-
-function childrenIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/glob.js b/deps/npm/node_modules/rimraf/node_modules/glob/glob.js
deleted file mode 100644
index 804cde53f0d276..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/glob.js
+++ /dev/null
@@ -1,772 +0,0 @@
-// Approach:
-//
-// 1. Get the minimatch set
-// 2. For each pattern in the set, PROCESS(pattern, false)
-// 3. Store matches per-set, then uniq them
-//
-// PROCESS(pattern, inGlobStar)
-// Get the first [n] items from pattern that are all strings
-// Join these together. This is PREFIX.
-// If there is no more remaining, then stat(PREFIX) and
-// add to matches if it succeeds. END.
-//
-// If inGlobStar and PREFIX is symlink and points to dir
-// set ENTRIES = []
-// else readdir(PREFIX) as ENTRIES
-// If fail, END
-//
-// with ENTRIES
-// If pattern[n] is GLOBSTAR
-// // handle the case where the globstar match is empty
-// // by pruning it out, and testing the resulting pattern
-// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
-// // handle other cases.
-// for ENTRY in ENTRIES (not dotfiles)
-// // attach globstar + tail onto the entry
-// // Mark that this entry is a globstar match
-// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
-//
-// else // not globstar
-// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
-// Test ENTRY against pattern[n]
-// If fails, continue
-// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
-//
-// Caveat:
-// Cache all stats and readdirs results to minimize syscall. Since all
-// we ever care about is existence and directory-ness, we can just keep
-// `true` for files, and [children,...] for directories, or `false` for
-// things that don't exist.
-
-module.exports = glob
-
-var fs = require('fs')
-var minimatch = require('minimatch')
-var Minimatch = minimatch.Minimatch
-var inherits = require('inherits')
-var EE = require('events').EventEmitter
-var path = require('path')
-var assert = require('assert')
-var isAbsolute = require('path-is-absolute')
-var globSync = require('./sync.js')
-var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
-var setopts = common.setopts
-var ownProp = common.ownProp
-var inflight = require('inflight')
-var util = require('util')
-var childrenIgnored = common.childrenIgnored
-var isIgnored = common.isIgnored
-
-var once = require('once')
-
-function glob (pattern, options, cb) {
- if (typeof options === 'function') cb = options, options = {}
- if (!options) options = {}
-
- if (options.sync) {
- if (cb)
- throw new TypeError('callback provided to sync glob')
- return globSync(pattern, options)
- }
-
- return new Glob(pattern, options, cb)
-}
-
-glob.sync = globSync
-var GlobSync = glob.GlobSync = globSync.GlobSync
-
-// old api surface
-glob.glob = glob
-
-function extend (origin, add) {
- if (add === null || typeof add !== 'object') {
- return origin
- }
-
- var keys = Object.keys(add)
- var i = keys.length
- while (i--) {
- origin[keys[i]] = add[keys[i]]
- }
- return origin
-}
-
-glob.hasMagic = function (pattern, options_) {
- var options = extend({}, options_)
- options.noprocess = true
-
- var g = new Glob(pattern, options)
- var set = g.minimatch.set
- if (set.length > 1)
- return true
-
- for (var j = 0; j < set[0].length; j++) {
- if (typeof set[0][j] !== 'string')
- return true
- }
-
- return false
-}
-
-glob.Glob = Glob
-inherits(Glob, EE)
-function Glob (pattern, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = null
- }
-
- if (options && options.sync) {
- if (cb)
- throw new TypeError('callback provided to sync glob')
- return new GlobSync(pattern, options)
- }
-
- if (!(this instanceof Glob))
- return new Glob(pattern, options, cb)
-
- setopts(this, pattern, options)
- this._didRealPath = false
-
- // process each pattern in the minimatch set
- var n = this.minimatch.set.length
-
- // The matches are stored as {: true,...} so that
- // duplicates are automagically pruned.
- // Later, we do an Object.keys() on these.
- // Keep them as a list so we can fill in when nonull is set.
- this.matches = new Array(n)
-
- if (typeof cb === 'function') {
- cb = once(cb)
- this.on('error', cb)
- this.on('end', function (matches) {
- cb(null, matches)
- })
- }
-
- var self = this
- var n = this.minimatch.set.length
- this._processing = 0
- this.matches = new Array(n)
-
- this._emitQueue = []
- this._processQueue = []
- this.paused = false
-
- if (this.noprocess)
- return this
-
- if (n === 0)
- return done()
-
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false, done)
- }
-
- function done () {
- --self._processing
- if (self._processing <= 0)
- self._finish()
- }
-}
-
-Glob.prototype._finish = function () {
- assert(this instanceof Glob)
- if (this.aborted)
- return
-
- if (this.realpath && !this._didRealpath)
- return this._realpath()
-
- common.finish(this)
- this.emit('end', this.found)
-}
-
-Glob.prototype._realpath = function () {
- if (this._didRealpath)
- return
-
- this._didRealpath = true
-
- var n = this.matches.length
- if (n === 0)
- return this._finish()
-
- var self = this
- for (var i = 0; i < this.matches.length; i++)
- this._realpathSet(i, next)
-
- function next () {
- if (--n === 0)
- self._finish()
- }
-}
-
-Glob.prototype._realpathSet = function (index, cb) {
- var matchset = this.matches[index]
- if (!matchset)
- return cb()
-
- var found = Object.keys(matchset)
- var self = this
- var n = found.length
-
- if (n === 0)
- return cb()
-
- var set = this.matches[index] = Object.create(null)
- found.forEach(function (p, i) {
- // If there's a problem with the stat, then it means that
- // one or more of the links in the realpath couldn't be
- // resolved. just return the abs value in that case.
- p = self._makeAbs(p)
- fs.realpath(p, self.realpathCache, function (er, real) {
- if (!er)
- set[real] = true
- else if (er.syscall === 'stat')
- set[p] = true
- else
- self.emit('error', er) // srsly wtf right here
-
- if (--n === 0) {
- self.matches[index] = set
- cb()
- }
- })
- })
-}
-
-Glob.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-Glob.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
-
-Glob.prototype.abort = function () {
- this.aborted = true
- this.emit('abort')
-}
-
-Glob.prototype.pause = function () {
- if (!this.paused) {
- this.paused = true
- this.emit('pause')
- }
-}
-
-Glob.prototype.resume = function () {
- if (this.paused) {
- this.emit('resume')
- this.paused = false
- if (this._emitQueue.length) {
- var eq = this._emitQueue.slice(0)
- this._emitQueue.length = 0
- for (var i = 0; i < eq.length; i ++) {
- var e = eq[i]
- this._emitMatch(e[0], e[1])
- }
- }
- if (this._processQueue.length) {
- var pq = this._processQueue.slice(0)
- this._processQueue.length = 0
- for (var i = 0; i < pq.length; i ++) {
- var p = pq[i]
- this._processing--
- this._process(p[0], p[1], p[2], p[3])
- }
- }
- }
-}
-
-Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
- assert(this instanceof Glob)
- assert(typeof cb === 'function')
-
- if (this.aborted)
- return
-
- this._processing++
- if (this.paused) {
- this._processQueue.push([pattern, index, inGlobStar, cb])
- return
- }
-
- //console.error('PROCESS %d', this._processing, pattern)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // see if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index, cb)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip _processing
- if (childrenIgnored(this, read))
- return cb()
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
-}
-
-Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return cb()
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return cb()
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this._emitMatch(index, e)
- }
- // This was the last one, and no stats were needed
- return cb()
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
- this._process([e].concat(remain), index, inGlobStar, cb)
- }
- cb()
-}
-
-Glob.prototype._emitMatch = function (index, e) {
- if (this.aborted)
- return
-
- if (this.matches[index][e])
- return
-
- if (isIgnored(this, e))
- return
-
- if (this.paused) {
- this._emitQueue.push([index, e])
- return
- }
-
- var abs = this._makeAbs(e)
-
- if (this.nodir) {
- var c = this.cache[abs]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- if (this.mark)
- e = this._mark(e)
-
- this.matches[index][e] = true
-
- var st = this.statCache[abs]
- if (st)
- this.emit('stat', e, st)
-
- this.emit('match', e)
-}
-
-Glob.prototype._readdirInGlobStar = function (abs, cb) {
- if (this.aborted)
- return
-
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false, cb)
-
- var lstatkey = 'lstat\0' + abs
- var self = this
- var lstatcb = inflight(lstatkey, lstatcb_)
-
- if (lstatcb)
- fs.lstat(abs, lstatcb)
-
- function lstatcb_ (er, lstat) {
- if (er)
- return cb()
-
- var isSym = lstat.isSymbolicLink()
- self.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory()) {
- self.cache[abs] = 'FILE'
- cb()
- } else
- self._readdir(abs, false, cb)
- }
-}
-
-Glob.prototype._readdir = function (abs, inGlobStar, cb) {
- if (this.aborted)
- return
-
- cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
- if (!cb)
- return
-
- //console.error('RD %j %j', +inGlobStar, abs)
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs, cb)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return cb()
-
- if (Array.isArray(c))
- return cb(null, c)
- }
-
- var self = this
- fs.readdir(abs, readdirCb(this, abs, cb))
-}
-
-function readdirCb (self, abs, cb) {
- return function (er, entries) {
- if (er)
- self._readdirError(abs, er, cb)
- else
- self._readdirEntries(abs, entries, cb)
- }
-}
-
-Glob.prototype._readdirEntries = function (abs, entries, cb) {
- if (this.aborted)
- return
-
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
- return cb(null, entries)
-}
-
-Glob.prototype._readdirError = function (f, er, cb) {
- if (this.aborted)
- return
-
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
- case 'ENOTDIR': // totally normal. means it *does* exist.
- this.cache[this._makeAbs(f)] = 'FILE'
- if (f === this.cwd) {
- var error = new Error(er.code + ' invalid cwd ' + f)
- error.path = f
- error.code = er.code
- this.emit('error', error)
- this.abort()
- }
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict) {
- this.emit('error', er)
- // If the error is handled, then we abort
- // if not, we threw out of here
- this.abort()
- }
- if (!this.silent)
- console.error('glob error', er)
- break
- }
-
- return cb()
-}
-
-Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-
-Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
- //console.error('pgs2', prefix, remain[0], entries)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return cb()
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false, cb)
-
- var isSym = this.symlinks[abs]
- var len = entries.length
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return cb()
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true, cb)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true, cb)
- }
-
- cb()
-}
-
-Glob.prototype._processSimple = function (prefix, index, cb) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var self = this
- this._stat(prefix, function (er, exists) {
- self._processSimple2(prefix, index, er, exists, cb)
- })
-}
-Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
-
- //console.error('ps2', prefix, exists)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return cb()
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this._emitMatch(index, prefix)
- cb()
-}
-
-// Returns either 'DIR', 'FILE', or false
-Glob.prototype._stat = function (f, cb) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return cb()
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return cb(null, c)
-
- if (needDir && c === 'FILE')
- return cb()
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (stat !== undefined) {
- if (stat === false)
- return cb(null, stat)
- else {
- var type = stat.isDirectory() ? 'DIR' : 'FILE'
- if (needDir && type === 'FILE')
- return cb()
- else
- return cb(null, type, stat)
- }
- }
-
- var self = this
- var statcb = inflight('stat\0' + abs, lstatcb_)
- if (statcb)
- fs.lstat(abs, statcb)
-
- function lstatcb_ (er, lstat) {
- if (lstat && lstat.isSymbolicLink()) {
- // If it's a symlink, then treat it as the target, unless
- // the target does not exist, then treat it as a file.
- return fs.stat(abs, function (er, stat) {
- if (er)
- self._stat2(f, abs, null, lstat, cb)
- else
- self._stat2(f, abs, er, stat, cb)
- })
- } else {
- self._stat2(f, abs, er, lstat, cb)
- }
- }
-}
-
-Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
- if (er) {
- this.statCache[abs] = false
- return cb()
- }
-
- var needDir = f.slice(-1) === '/'
- this.statCache[abs] = stat
-
- if (abs.slice(-1) === '/' && !stat.isDirectory())
- return cb(null, false, stat)
-
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c !== 'DIR')
- return cb()
-
- return cb(null, c, stat)
-}
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js b/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js
deleted file mode 100644
index 19f103f908ac72..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-function posix(path) {
- return path.charAt(0) === '/';
-};
-
-function win32(path) {
- // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
- var result = splitDeviceRe.exec(path);
- var device = result[1] || '';
- var isUnc = !!device && device.charAt(1) !== ':';
-
- // UNC paths are always absolute
- return !!result[2] || isUnc;
-};
-
-module.exports = process.platform === 'win32' ? win32 : posix;
-module.exports.posix = posix;
-module.exports.win32 = win32;
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license b/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license
deleted file mode 100644
index 654d0bfe943437..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json b/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
deleted file mode 100644
index 39372636f3fb4f..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "name": "path-is-absolute",
- "version": "1.0.0",
- "description": "Node.js 0.12 path.isAbsolute() ponyfill",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/path-is-absolute.git"
- },
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "node test.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "path",
- "paths",
- "file",
- "dir",
- "absolute",
- "isabsolute",
- "is-absolute",
- "built-in",
- "util",
- "utils",
- "core",
- "ponyfill",
- "polyfill",
- "shim",
- "is",
- "detect",
- "check"
- ],
- "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1",
- "bugs": {
- "url": "https://github.com/sindresorhus/path-is-absolute/issues"
- },
- "homepage": "https://github.com/sindresorhus/path-is-absolute",
- "_id": "path-is-absolute@1.0.0",
- "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912",
- "_from": "path-is-absolute@>=1.0.0 <2.0.0",
- "_npmVersion": "2.5.1",
- "_nodeVersion": "0.12.0",
- "_npmUser": {
- "name": "sindresorhus",
- "email": "sindresorhus@gmail.com"
- },
- "maintainers": [
- {
- "name": "sindresorhus",
- "email": "sindresorhus@gmail.com"
- }
- ],
- "dist": {
- "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912",
- "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md b/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md
deleted file mode 100644
index cdf94f4309a27e..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
-
-> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill
-
-> Ponyfill: A polyfill that doesn't overwrite the native method
-
-
-## Install
-
-```
-$ npm install --save path-is-absolute
-```
-
-
-## Usage
-
-```js
-var pathIsAbsolute = require('path-is-absolute');
-
-// Linux
-pathIsAbsolute('/home/foo');
-//=> true
-
-// Windows
-pathIsAbsolute('C:/Users/');
-//=> true
-
-// Any OS
-pathIsAbsolute.posix('/home/foo');
-//=> true
-```
-
-
-## API
-
-See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).
-
-### pathIsAbsolute(path)
-
-### pathIsAbsolute.posix(path)
-
-The Posix specific version.
-
-### pathIsAbsolute.win32(path)
-
-The Windows specific version.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/package.json b/deps/npm/node_modules/rimraf/node_modules/glob/package.json
deleted file mode 100644
index 3f1119ee89fada..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/package.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "name": "glob",
- "description": "a little globber",
- "version": "7.0.0",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-glob.git"
- },
- "main": "glob.js",
- "files": [
- "glob.js",
- "sync.js",
- "common.js"
- ],
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "2 || 3",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "devDependencies": {
- "mkdirp": "0",
- "rimraf": "^2.2.8",
- "tap": "^5.0.0",
- "tick": "0.0.6"
- },
- "scripts": {
- "prepublish": "npm run benchclean",
- "profclean": "rm -f v8.log profile.txt",
- "test": "tap test/*.js --cov",
- "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
- "bench": "bash benchmark.sh",
- "prof": "bash prof.sh && cat profile.txt",
- "benchclean": "node benchclean.js"
- },
- "license": "ISC",
- "gitHead": "8e8876f84232783fd2db3182af5fa33cc83f1989",
- "bugs": {
- "url": "https://github.com/isaacs/node-glob/issues"
- },
- "homepage": "https://github.com/isaacs/node-glob#readme",
- "_id": "glob@7.0.0",
- "_shasum": "3b20a357fffcf46bb384aed6f8ae9a647fdb6ac4",
- "_from": "glob@>=7.0.0 <8.0.0",
- "_npmVersion": "3.7.0",
- "_nodeVersion": "4.0.0",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "dist": {
- "shasum": "3b20a357fffcf46bb384aed6f8ae9a647fdb6ac4",
- "tarball": "http://registry.npmjs.org/glob/-/glob-7.0.0.tgz"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "_npmOperationalInternal": {
- "host": "packages-5-east.internal.npmjs.com",
- "tmp": "tmp/glob-7.0.0.tgz_1455132435010_0.6941273615229875"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.0.tgz"
-}
diff --git a/deps/npm/node_modules/rimraf/node_modules/glob/sync.js b/deps/npm/node_modules/rimraf/node_modules/glob/sync.js
deleted file mode 100644
index aa28c87a3e5daf..00000000000000
--- a/deps/npm/node_modules/rimraf/node_modules/glob/sync.js
+++ /dev/null
@@ -1,466 +0,0 @@
-module.exports = globSync
-globSync.GlobSync = GlobSync
-
-var fs = require('fs')
-var minimatch = require('minimatch')
-var Minimatch = minimatch.Minimatch
-var Glob = require('./glob.js').Glob
-var util = require('util')
-var path = require('path')
-var assert = require('assert')
-var isAbsolute = require('path-is-absolute')
-var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
-var setopts = common.setopts
-var ownProp = common.ownProp
-var childrenIgnored = common.childrenIgnored
-
-function globSync (pattern, options) {
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- return new GlobSync(pattern, options).found
-}
-
-function GlobSync (pattern, options) {
- if (!pattern)
- throw new Error('must provide pattern')
-
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- if (!(this instanceof GlobSync))
- return new GlobSync(pattern, options)
-
- setopts(this, pattern, options)
-
- if (this.noprocess)
- return this
-
- var n = this.minimatch.set.length
- this.matches = new Array(n)
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false)
- }
- this._finish()
-}
-
-GlobSync.prototype._finish = function () {
- assert(this instanceof GlobSync)
- if (this.realpath) {
- var self = this
- this.matches.forEach(function (matchset, index) {
- var set = self.matches[index] = Object.create(null)
- for (var p in matchset) {
- try {
- p = self._makeAbs(p)
- var real = fs.realpathSync(p, self.realpathCache)
- set[real] = true
- } catch (er) {
- if (er.syscall === 'stat')
- set[self._makeAbs(p)] = true
- else
- throw er
- }
- }
- })
- }
- common.finish(this)
-}
-
-
-GlobSync.prototype._process = function (pattern, index, inGlobStar) {
- assert(this instanceof GlobSync)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // See if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip processing
- if (childrenIgnored(this, read))
- return
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
-}
-
-
-GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
- var entries = this._readdir(abs, inGlobStar)
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix.slice(-1) !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this.matches[index][e] = true
- }
- // This was the last one, and no stats were needed
- return
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix)
- newPattern = [prefix, e]
- else
- newPattern = [e]
- this._process(newPattern.concat(remain), index, inGlobStar)
- }
-}
-
-
-GlobSync.prototype._emitMatch = function (index, e) {
- var abs = this._makeAbs(e)
- if (this.mark)
- e = this._mark(e)
-
- if (this.matches[index][e])
- return
-
- if (this.nodir) {
- var c = this.cache[this._makeAbs(e)]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- this.matches[index][e] = true
- if (this.stat)
- this._stat(e)
-}
-
-
-GlobSync.prototype._readdirInGlobStar = function (abs) {
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false)
-
- var entries
- var lstat
- var stat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- // lstat failed, doesn't exist
- return null
- }
-
- var isSym = lstat.isSymbolicLink()
- this.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && !lstat.isDirectory())
- this.cache[abs] = 'FILE'
- else
- entries = this._readdir(abs, false)
-
- return entries
-}
-
-GlobSync.prototype._readdir = function (abs, inGlobStar) {
- var entries
-
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return null
-
- if (Array.isArray(c))
- return c
- }
-
- try {
- return this._readdirEntries(abs, fs.readdirSync(abs))
- } catch (er) {
- this._readdirError(abs, er)
- return null
- }
-}
-
-GlobSync.prototype._readdirEntries = function (abs, entries) {
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
-
- // mark and cache dir-ness
- return entries
-}
-
-GlobSync.prototype._readdirError = function (f, er) {
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
- case 'ENOTDIR': // totally normal. means it *does* exist.
- this.cache[this._makeAbs(f)] = 'FILE'
- if (f === this.cwd) {
- var error = new Error(er.code + ' invalid cwd ' + f)
- error.path = f
- error.code = er.code
- throw error
- }
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict)
- throw er
- if (!this.silent)
- console.error('glob error', er)
- break
- }
-}
-
-GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
-
- var entries = this._readdir(abs, inGlobStar)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false)
-
- var len = entries.length
- var isSym = this.symlinks[abs]
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true)
- }
-}
-
-GlobSync.prototype._processSimple = function (prefix, index) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var exists = this._stat(prefix)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this.matches[index][prefix] = true
-}
-
-// Returns either 'DIR', 'FILE', or false
-GlobSync.prototype._stat = function (f) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return false
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return c
-
- if (needDir && c === 'FILE')
- return false
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (!stat) {
- var lstat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- return false
- }
-
- if (lstat.isSymbolicLink()) {
- try {
- stat = fs.statSync(abs)
- } catch (er) {
- stat = lstat
- }
- } else {
- stat = lstat
- }
- }
-
- this.statCache[abs] = stat
-
- var c = stat.isDirectory() ? 'DIR' : 'FILE'
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c !== 'DIR')
- return false
-
- return c
-}
-
-GlobSync.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-GlobSync.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
diff --git a/deps/npm/node_modules/rimraf/package.json b/deps/npm/node_modules/rimraf/package.json
index 0cbadee1ae4ac4..3c19919ef4bde9 100644
--- a/deps/npm/node_modules/rimraf/package.json
+++ b/deps/npm/node_modules/rimraf/package.json
@@ -1,6 +1,6 @@
{
"name": "rimraf",
- "version": "2.5.2",
+ "version": "2.5.4",
"main": "rimraf.js",
"description": "A deep deletion module for node (like `rm -rf`)",
"author": {
@@ -20,7 +20,7 @@
"rimraf": "./bin.js"
},
"dependencies": {
- "glob": "^7.0.0"
+ "glob": "^7.0.5"
},
"files": [
"LICENSE",
@@ -30,25 +30,25 @@
],
"devDependencies": {
"mkdirp": "^0.5.1",
- "tap": "^5.1.1"
+ "tap": "^6.1.1"
},
- "gitHead": "f414f87021f88d004ac487eebc8d07ce6a152721",
+ "gitHead": "2af08bbbd0a03549b278414309dc5d8097699443",
"bugs": {
"url": "https://github.com/isaacs/rimraf/issues"
},
"homepage": "https://github.com/isaacs/rimraf#readme",
- "_id": "rimraf@2.5.2",
- "_shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726",
- "_from": "rimraf@2.5.2",
- "_npmVersion": "3.7.0",
- "_nodeVersion": "5.6.0",
+ "_id": "rimraf@2.5.4",
+ "_shasum": "96800093cbf1a0c86bd95b4625467535c29dfa04",
+ "_from": "rimraf@latest",
+ "_npmVersion": "3.10.6",
+ "_nodeVersion": "4.4.4",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"dist": {
- "shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726",
- "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz"
+ "shasum": "96800093cbf1a0c86bd95b4625467535c29dfa04",
+ "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz"
},
"maintainers": [
{
@@ -57,9 +57,10 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-6-west.internal.npmjs.com",
- "tmp": "tmp/rimraf-2.5.2.tgz_1455346499772_0.9326622514054179"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/rimraf-2.5.4.tgz_1469206941888_0.8645927573088557"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz"
+ "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/rimraf/rimraf.js b/deps/npm/node_modules/rimraf/rimraf.js
index c01d13b200cc5e..5d9a5768a454dd 100644
--- a/deps/npm/node_modules/rimraf/rimraf.js
+++ b/deps/npm/node_modules/rimraf/rimraf.js
@@ -48,9 +48,9 @@ function rimraf (p, options, cb) {
assert(p, 'rimraf: missing path')
assert.equal(typeof p, 'string', 'rimraf: path should be a string')
- assert(options, 'rimraf: missing options')
- assert.equal(typeof options, 'object', 'rimraf: options should be object')
assert.equal(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.equal(typeof options, 'object', 'rimraf: options should be object')
defaults(options)
@@ -61,7 +61,7 @@ function rimraf (p, options, cb) {
if (options.disableGlob || !glob.hasMagic(p))
return afterGlob(null, [p])
- fs.lstat(p, function (er, stat) {
+ options.lstat(p, function (er, stat) {
if (!er)
return afterGlob(null, [p])
@@ -135,6 +135,10 @@ function rimraf_ (p, options, cb) {
if (er && er.code === "ENOENT")
return cb(null)
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === "EPERM" && isWindows)
+ fixWinEPERM(p, options, er, cb)
+
if (st && st.isDirectory())
return rmdir(p, options, er, cb)
@@ -269,7 +273,7 @@ function rimrafSync (p, options) {
results = [p]
} else {
try {
- fs.lstatSync(p)
+ options.lstatSync(p)
results = [p]
} catch (er) {
results = glob.sync(p, options.glob)
@@ -287,6 +291,10 @@ function rimrafSync (p, options) {
} catch (er) {
if (er.code === "ENOENT")
return
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === "EPERM" && isWindows)
+ fixWinEPERMSync(p, options, er)
}
try {
diff --git a/deps/npm/node_modules/spdx-license-ids/package.json b/deps/npm/node_modules/spdx-license-ids/package.json
index 15a20c5c8eebc3..c0b72753fdd29b 100644
--- a/deps/npm/node_modules/spdx-license-ids/package.json
+++ b/deps/npm/node_modules/spdx-license-ids/package.json
@@ -1,6 +1,6 @@
{
"name": "spdx-license-ids",
- "version": "1.2.1",
+ "version": "1.2.2",
"description": "A list of SPDX license identifiers",
"repository": {
"type": "git",
@@ -11,7 +11,7 @@
"url": "https://github.com/shinnn"
},
"scripts": {
- "build": "node --strong_mode --harmony_destructuring build.js",
+ "build": "node --strong_mode build.js",
"lint": "eslint --config @shinnn/node --env browser --ignore-path .gitignore .",
"pretest": "${npm_package_scripts_build} && ${npm_package_scripts_lint}",
"test": "node --strong_mode test.js | tap-spec",
@@ -36,35 +36,35 @@
"client-side"
],
"devDependencies": {
- "@shinnn/eslint-config-node": "^2.0.0",
+ "@shinnn/eslint-config-node": "^3.0.0",
"chalk": "^1.1.3",
- "eslint": "^2.7.0",
+ "eslint": "^3.1.1",
"get-spdx-license-ids": "^1.0.0",
- "istanbul": "^0.4.3",
- "loud-rejection": "^1.3.0",
+ "istanbul": "^0.4.4",
+ "loud-rejection": "^1.6.0",
"rimraf-promise": "^2.0.0",
- "stringify-object": "^2.3.1",
+ "stringify-object": "^2.4.0",
"tap-spec": "^4.1.1",
- "tape": "^4.5.1",
+ "tape": "^4.6.0",
"write-file-atomically": "1.0.0"
},
- "gitHead": "e907f783792ee05a85dbf66acd24cf1c3067bb76",
+ "gitHead": "70e2541bf04b4fbef4c5df52c581a1861fd355b2",
"bugs": {
"url": "https://github.com/shinnn/spdx-license-ids/issues"
},
"homepage": "https://github.com/shinnn/spdx-license-ids#readme",
- "_id": "spdx-license-ids@1.2.1",
- "_shasum": "d07ea17a4d2fd9351f9d94e2ff9cec74180fe8f3",
- "_from": "spdx-license-ids@>=1.2.0 <1.3.0",
- "_npmVersion": "3.8.3",
- "_nodeVersion": "5.10.0",
+ "_id": "spdx-license-ids@1.2.2",
+ "_shasum": "c9df7a3424594ade6bd11900d596696dc06bac57",
+ "_from": "spdx-license-ids@1.2.2",
+ "_npmVersion": "3.10.5",
+ "_nodeVersion": "6.3.0",
"_npmUser": {
"name": "shinnn",
"email": "snnskwtnb@gmail.com"
},
"dist": {
- "shasum": "d07ea17a4d2fd9351f9d94e2ff9cec74180fe8f3",
- "tarball": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.1.tgz"
+ "shasum": "c9df7a3424594ade6bd11900d596696dc06bac57",
+ "tarball": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz"
},
"maintainers": [
{
@@ -73,10 +73,10 @@
}
],
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/spdx-license-ids-1.2.1.tgz_1460030484408_0.8782658798154444"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/spdx-license-ids-1.2.2.tgz_1469529975605_0.35518706892617047"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.1.tgz",
+ "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/spdx-license-ids/spdx-license-ids.json b/deps/npm/node_modules/spdx-license-ids/spdx-license-ids.json
index 4779e44fada093..1c60d6eed9e5be 100644
--- a/deps/npm/node_modules/spdx-license-ids/spdx-license-ids.json
+++ b/deps/npm/node_modules/spdx-license-ids/spdx-license-ids.json
@@ -44,6 +44,7 @@
"BSD-3-Clause-Clear",
"BSD-4-Clause",
"BSD-Protection",
+ "BSD-Source-Code",
"BSD-3-Clause-Attribution",
"0BSD",
"BSD-4-Clause-UC",
@@ -317,6 +318,9 @@
"ZPL-1.1",
"ZPL-2.0",
"ZPL-2.1",
+ "BSD-3-Clause-No-Nuclear-License",
+ "BSD-3-Clause-No-Nuclear-Warranty",
+ "BSD-3-Clause-No-Nuclear-License-2014",
"eCos-2.0",
"GPL-2.0-with-autoconf-exception",
"GPL-2.0-with-bison-exception",
diff --git a/deps/npm/node_modules/which/CHANGELOG.md b/deps/npm/node_modules/which/CHANGELOG.md
index 56106119e9a645..f2c6e4fd39de14 100644
--- a/deps/npm/node_modules/which/CHANGELOG.md
+++ b/deps/npm/node_modules/which/CHANGELOG.md
@@ -1,6 +1,10 @@
# Changes
+## v1.2.11
+
+* Prevent changelog script from being included in package
+
## v1.2.10
* Use env.PATH only, not env.Path
diff --git a/deps/npm/node_modules/which/changelog.sh b/deps/npm/node_modules/which/changelog.sh
deleted file mode 100644
index 360e54af40f6af..00000000000000
--- a/deps/npm/node_modules/which/changelog.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-(
- echo '# Changes'
- echo ''
- git log --first-parent --pretty=format:'%s' \
- | grep -v '^update changelog' \
- | perl -p -e 's/^((v?[0-9]+\.?)+)$/\n## \1\n/g' \
- | perl -p -e 's/^([^#\s].*)$/* \1/g'
-)> CHANGELOG.md
diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json
index 90b621d8cc3585..37426be02565fc 100644
--- a/deps/npm/node_modules/which/package.json
+++ b/deps/npm/node_modules/which/package.json
@@ -6,7 +6,7 @@
},
"name": "which",
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
- "version": "1.2.10",
+ "version": "1.2.11",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-which.git"
@@ -26,30 +26,30 @@
},
"scripts": {
"test": "tap test/*.js --cov",
- "changelog": "bash changelog.sh",
+ "changelog": "bash gen-changelog.sh",
"postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}"
},
"files": [
"which.js",
"bin/which"
],
- "gitHead": "3f590834623ee940d922e12b1c8b9cbf24bd5012",
+ "gitHead": "8a7d0aa1ca10173f9f4d84bf528a3efc1f5d0c6f",
"bugs": {
"url": "https://github.com/isaacs/node-which/issues"
},
"homepage": "https://github.com/isaacs/node-which#readme",
- "_id": "which@1.2.10",
- "_shasum": "91cd9bd0751322411b659b40f054b21de957ab2d",
- "_from": "which@>=1.2.10 <1.3.0",
- "_npmVersion": "3.9.1",
- "_nodeVersion": "4.4.4",
+ "_id": "which@1.2.11",
+ "_shasum": "c8b2eeea6b8c1659fa7c1dd4fdaabe9533dc5e8b",
+ "_from": "which@1.2.11",
+ "_npmVersion": "3.10.7",
+ "_nodeVersion": "6.5.0",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"dist": {
- "shasum": "91cd9bd0751322411b659b40f054b21de957ab2d",
- "tarball": "https://registry.npmjs.org/which/-/which-1.2.10.tgz"
+ "shasum": "c8b2eeea6b8c1659fa7c1dd4fdaabe9533dc5e8b",
+ "tarball": "https://registry.npmjs.org/which/-/which-1.2.11.tgz"
},
"maintainers": [
{
@@ -59,9 +59,9 @@
],
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/which-1.2.10.tgz_1465116744337_0.4818702598568052"
+ "tmp": "tmp/which-1.2.11.tgz_1473093398489_0.1032072464004159"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/which/-/which-1.2.10.tgz",
+ "_resolved": "https://registry.npmjs.org/which/-/which-1.2.11.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 2e7e6226655a4a..45c111cc1bd564 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.15.9",
+ "version": "2.15.11",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -48,19 +48,19 @@
"fs-vacuum": "~1.2.9",
"fs-write-stream-atomic": "~1.0.8",
"fstream": "~1.0.10",
- "fstream-npm": "~1.0.7",
+ "fstream-npm": "~1.1.1",
"github-url-from-git": "~1.4.0",
"github-url-from-username-repo": "~1.0.2",
- "glob": "~7.0.4",
- "graceful-fs": "~4.1.4",
- "hosted-git-info": "~2.1.4",
+ "glob": "~7.0.6",
+ "graceful-fs": "~4.1.6",
+ "hosted-git-info": "~2.1.5",
"inflight": "~1.0.4",
- "inherits": "~2.0.1",
+ "inherits": "~2.0.3",
"ini": "~1.3.4",
"init-package-json": "~1.9.4",
"lockfile": "~1.0.1",
"lru-cache": "~4.0.1",
- "minimatch": "~3.0.0",
+ "minimatch": "~3.0.3",
"mkdirp": "~0.5.1",
"node-gyp": "~3.4.0",
"nopt": "~3.0.6",
@@ -69,26 +69,26 @@
"npm-cache-filename": "~1.0.2",
"npm-install-checks": "~1.0.7",
"npm-package-arg": "~4.1.0",
- "npm-registry-client": "~7.1.2",
- "npm-user-validate": "~0.1.4",
+ "npm-registry-client": "~7.2.1",
+ "npm-user-validate": "~0.1.5",
"npmlog": "~2.0.4",
- "once": "~1.3.3",
+ "once": "~1.4.0",
"opener": "~1.4.1",
"osenv": "~0.1.3",
"path-is-inside": "~1.0.0",
"read": "~1.0.7",
"read-installed": "~4.0.3",
"read-package-json": "~2.0.4",
- "readable-stream": "~2.1.4",
+ "readable-stream": "~2.1.5",
"realize-package-specifier": "~3.0.1",
- "request": "~2.72.0",
- "retry": "~0.9.0",
- "rimraf": "~2.5.2",
+ "request": "~2.74.0",
+ "retry": "~0.10.0",
+ "rimraf": "~2.5.4",
"semver": "~5.1.0",
"sha": "~2.0.1",
"slide": "~1.1.6",
"sorted-object": "~2.0.0",
- "spdx-license-ids": "~1.2.1",
+ "spdx-license-ids": "~1.2.2",
"strip-ansi": "~3.0.1",
"tar": "~2.2.1",
"text-table": "~0.2.0",
@@ -96,7 +96,7 @@
"umask": "~1.1.0",
"validate-npm-package-license": "~3.0.1",
"validate-npm-package-name": "~2.2.2",
- "which": "~1.2.10",
+ "which": "~1.2.11",
"wrappy": "~1.0.2",
"write-file-atomic": "~1.1.4"
},
@@ -182,7 +182,7 @@
"require-inject": "~1.4.0",
"sprintf-js": "~1.0.3",
"tacks": "~1.2.1",
- "tap": "~5.7.1"
+ "tap": "~7.1.1"
},
"scripts": {
"dumpconf": "env | grep npm | sort | uniq",
diff --git a/deps/npm/test/tap/add-local.js b/deps/npm/test/tap/add-local.js
new file mode 100644
index 00000000000000..0a5b7b5dc37636
--- /dev/null
+++ b/deps/npm/test/tap/add-local.js
@@ -0,0 +1,137 @@
+var path = require('path')
+var test = require('tap').test
+var mkdirp = require('mkdirp')
+var osenv = require('osenv')
+var rimraf = require('rimraf')
+var requireInject = require('require-inject')
+
+var pkg = path.join(__dirname, '/local-dir')
+var cache = path.join(pkg, '/cache')
+var tmp = path.join(pkg, '/tmp')
+var prefix = path.join(pkg, '/prefix')
+
+var Tacks = require('tacks')
+var File = Tacks.File
+var Dir = Tacks.Dir
+
+test('addLocal directory race on Windows', function (t) {
+ setup()
+ var p = {
+ name: 'test',
+ version: '1.0.0',
+ type: 'directory',
+ spec: pkg
+ }
+ var fixture = new Tacks(
+ Dir({
+ 'package.json': File(p)
+ })
+ )
+ var addLocal = requireInject('../../lib/cache/add-local', {
+ '../../lib/npm.js': {
+ cache: cache,
+ tmp: tmp,
+ prefix: prefix
+ },
+ '../../lib/cache/get-stat': function (cb) {
+ cb(null, {})
+ },
+ chownr: function (x, y, z, cb) {
+ cb(new Error('chownr should never have been called'))
+ },
+ '../../lib/cache/add-local-tarball.js': function (tgz, data, shasum, cb) {
+ cb(null)
+ },
+ '../../lib/utils/lifecycle.js': function (data, cycle, p, cb) {
+ cb(null)
+ },
+ '../../lib/utils/tar.js': {
+ pack: function (tgz, p, data, fancy, cb) {
+ cb(null)
+ }
+ },
+ 'sha': {
+ get: function (tgz, cb) {
+ cb(null, 'deadbeef')
+ }
+ }
+ })
+
+ fixture.create(pkg)
+ addLocal(p, null, function (err) {
+ t.ifErr(err, 'addLocal completed without error')
+ t.done()
+ })
+})
+
+test('addLocal temporary cache file race', function (t) {
+ // See https://github.com/npm/npm/issues/12669
+ setup()
+ var p = {
+ name: 'test',
+ version: '1.0.0',
+ type: 'directory',
+ spec: pkg
+ }
+ var fixture = new Tacks(
+ Dir({
+ 'package.json': File(p)
+ })
+ )
+ var addLocal = requireInject('../../lib/cache/add-local', {
+ // basic setup/mock stuff
+ '../../lib/npm.js': {
+ cache: cache,
+ tmp: tmp,
+ prefix: prefix
+ },
+ '../../lib/cache/add-local-tarball.js': function (tgz, data, shasum, cb) {
+ cb(null)
+ },
+ '../../lib/utils/lifecycle.js': function (data, cycle, p, cb) {
+ cb(null)
+ },
+ '../../lib/utils/tar.js': {
+ pack: function (tgz, p, data, fancy, cb) {
+ cb(null)
+ }
+ },
+ 'sha': {
+ get: function (tgz, cb) {
+ cb(null, 'deadbeef')
+ }
+ },
+
+ // Test-specific mocked values to simulate race.
+ '../../lib/cache/get-stat': function (cb) {
+ cb(null, {uid: 1, gid: 2})
+ },
+ chownr: function (x, y, z, cb) {
+ // Simulate a race condition between `tar.pack` and `chownr`
+ // where the latter will return `ENOENT` when an async process
+ // removes a file that its internal `fs.readdir` listed.
+ cb({code: 'ENOENT'})
+ }
+ })
+
+ fixture.create(pkg)
+ addLocal(p, null, function (err) {
+ t.ifErr(err, 'addLocal completed without error')
+ t.done()
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.done()
+})
+
+function setup () {
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
+}
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
diff --git a/deps/npm/test/tap/correct-mkdir.js b/deps/npm/test/tap/correct-mkdir.js
index 4bfc6b1c977614..a4f86598737c05 100644
--- a/deps/npm/test/tap/correct-mkdir.js
+++ b/deps/npm/test/tap/correct-mkdir.js
@@ -56,3 +56,108 @@ test('correct-mkdir: no race conditions', function (t) {
// Immediate call again in case of race condition there
correctMkdir(cache_dir, handleCallFinish)
})
+
+test('correct-mkdir: ignore ENOENTs from chownr', function (t) {
+ var mock_fs = {}
+ mock_fs.stat = function (path, cb) {
+ if (path === cache_dir) {
+ cb(null, {
+ isDirectory: function () {
+ return true
+ }
+ })
+ } else {
+ assert.ok(false, 'Unhandled stat path: ' + path)
+ }
+ }
+ var mock_chownr = function (path, uid, gid, cb) {
+ cb({code: 'ENOENT'})
+ }
+ var mocks = {
+ 'graceful-fs': mock_fs,
+ 'chownr': mock_chownr
+ }
+ var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks)
+
+ function handleCallFinish (err) {
+ t.ifErr(err, 'chownr\'s ENOENT errors were ignored')
+ t.end()
+ }
+ correctMkdir(cache_dir, handleCallFinish)
+})
+
+// NEED TO RUN LAST
+
+// These test checks that Windows users are protected by crashes related to
+// unexpectedly having a UID/GID other than 0 if a user happens to add these
+// variables to their environment. There are assumptions in correct-mkdir
+// that special-case Windows by checking on UID-related things.
+test('correct-mkdir: SUDO_UID and SUDO_GID non-Windows', function (t) {
+ process.env.SUDO_UID = 999
+ process.env.SUDO_GID = 999
+ process.getuid = function () { return 0 }
+ process.getgid = function () { return 0 }
+ var mock_fs = {}
+ mock_fs.stat = function (path, cb) {
+ if (path === cache_dir) {
+ cb(null, {
+ uid: 0,
+ isDirectory: function () {
+ return true
+ }
+ })
+ } else {
+ assert.ok(false, 'Unhandled stat path: ' + path)
+ }
+ }
+ var mock_chownr = function (path, uid, gid, cb) {
+ t.is(uid, +process.env.SUDO_UID, 'using the environment\'s UID')
+ t.is(gid, +process.env.SUDO_GID, 'using the environment\'s GID')
+ cb(null, {})
+ }
+ var mocks = {
+ 'graceful-fs': mock_fs,
+ 'chownr': mock_chownr
+ }
+ var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks)
+
+ function handleCallFinish () {
+ t.end()
+ }
+ correctMkdir(cache_dir, handleCallFinish)
+})
+
+test('correct-mkdir: SUDO_UID and SUDO_GID Windows', function (t) {
+ process.env.SUDO_UID = 999
+ process.env.SUDO_GID = 999
+ delete process.getuid
+ delete process.getgid
+ var mock_fs = {}
+ mock_fs.stat = function (path, cb) {
+ if (path === cache_dir) {
+ cb(null, {
+ uid: 0,
+ isDirectory: function () {
+ return true
+ }
+ })
+ } else {
+ assert.ok(false, 'Unhandled stat path: ' + path)
+ }
+ }
+ var mock_chownr = function (path, uid, gid, cb) {
+ t.fail('chownr should not be called at all on Windows')
+ cb('nope')
+ }
+ var mocks = {
+ 'graceful-fs': mock_fs,
+ 'chownr': mock_chownr
+ }
+ var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks)
+
+ function handleCallFinish (err) {
+ t.ifErr(err, 'chownr was not called because Windows')
+ t.end()
+ }
+ correctMkdir(cache_dir, handleCallFinish)
+})