diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-01-24 19:13:50 -0800 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-01-24 19:13:50 -0800 |
commit | c1b1f312035644fd33cbc59cacd7980e7ed432da (patch) | |
tree | 789d6f0b74c158d9d95414d09dbe7c6c08bd115d /deps | |
parent | 640912d18a63704fd493059a72b19e6367c2fc1c (diff) | |
parent | 9975ff603b5ba0e5f4b2f0ffb07474a9013dab36 (diff) | |
download | node-new-c1b1f312035644fd33cbc59cacd7980e7ed432da.tar.gz |
Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
AUTHORS
ChangeLog
deps/uv/AUTHORS
deps/uv/ChangeLog
deps/uv/src/unix/process.c
deps/uv/src/version.c
lib/net.js
node.gyp
src/node_version.h
Diffstat (limited to 'deps')
192 files changed, 1191 insertions, 5937 deletions
diff --git a/deps/npm/Makefile b/deps/npm/Makefile index d2338baba6..e9a211ae2b 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -192,9 +192,6 @@ doc-publish: doc html/doc/* \ node@npmjs.org:/home/node/npm-www/doc rsync -vazu --stats --no-implied-dirs --delete \ - html/static/webfonts/ \ - node@npmjs.org:/home/node/npm-www/static/webfonts - rsync -vazu --stats --no-implied-dirs --delete \ html/static/style.css \ node@npmjs.org:/home/node/npm-www/static/ #cleanup diff --git a/deps/npm/doc/cli/npm-docs.md b/deps/npm/doc/cli/npm-docs.md index cece021f11..5db3d9f7e9 100644 --- a/deps/npm/doc/cli/npm-docs.md +++ b/deps/npm/doc/cli/npm-docs.md @@ -3,17 +3,18 @@ npm-docs(1) -- Docs for a package in a web browser maybe ## SYNOPSIS - npm docs <pkgname> + npm docs [<pkgname> [<pkgname> ...]] npm docs (with no args in a package dir) - npm home <pkgname> + npm home [<pkgname> [<pkgname> ...]] npm home (with no args in a package dir) ## DESCRIPTION This command tries to guess at the likely location of a package's documentation URL, and then tries to open it using the `--browser` -config param. If no package name is provided, it will search for -a `package.json` in the current folder and use the `name` property. +config param. You can pass multiple package names at once. If no +package name is provided, it will search for a `package.json` in +the current folder and use the `name` property. ## CONFIGURATION diff --git a/deps/npm/doc/cli/npm-search.md b/deps/npm/doc/cli/npm-search.md index 79807f994e..4757ad3202 100644 --- a/deps/npm/doc/cli/npm-search.md +++ b/deps/npm/doc/cli/npm-search.md @@ -3,7 +3,7 @@ npm-search(1) -- Search for packages ## SYNOPSIS - npm search [search terms ...] + npm search [--long] [search terms ...] npm s [search terms ...] npm se [search terms ...] @@ -15,6 +15,18 @@ If a term starts with `/`, then it's interpreted as a regular expression. A trailing `/` will be ignored in this case. (Note that many regular expression characters must be escaped or quoted in most shells.) +## CONFIGURATION + +### long + +* Default: false +* Type: Boolean + +Display full package descriptions and other long text across multiple +lines. When disabled (default) search results are truncated to fit +neatly on a single line. Modules with extremely long names will +fall on multiple lines. + ## SEE ALSO * npm-registry(7) diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index ff762888bc..485d4ca450 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -480,7 +480,7 @@ colored output if it is a TTY. * Default: false * Type: Boolean -Show extended information in `npm ls` +Show extended information in `npm ls` and `npm search`. ### message diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index a16a140ede..8676030a36 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -239,7 +239,7 @@ will no doubt tell you to put the output in a gist or email.</p> <ul><li><a href="cli/npm.html">npm(1)</a></li><li><a href="misc/npm-faq.html">npm-faq(7)</a></li><li><a href="cli/npm-help.html">npm-help(1)</a></li><li><a href="misc/npm-index.html">npm-index(7)</a></li></ul> </div> -<p id="footer"><a href="../doc/README.html">README</a> — npm@1.3.23</p> +<p id="footer"><a href="../doc/README.html">README</a> — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index f09a2018be..3a5c77a6fb 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -19,7 +19,7 @@ <p>This function should not be used programmatically. Instead, just refer to the <code>npm.bin</code> member.</p> </div> -<p id="footer">npm-bin — npm@1.3.23</p> +<p id="footer">npm-bin — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index f4025e7ce0..8819b2ba60 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -25,7 +25,7 @@ optional version number.</p> <p>This command will launch a browser, so this command may not be the most friendly for programmatic use.</p> </div> -<p id="footer">npm-bugs — npm@1.3.23</p> +<p id="footer">npm-bugs — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index a18819419c..8dfeb8a39d 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -28,7 +28,7 @@ usage, or <code>man 3 npm-<command></code> for programmatic usage.</p> <ul><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul> </div> -<p id="footer">npm-commands — npm@1.3.23</p> +<p id="footer">npm-commands — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index a90f9d8fcd..df88aa305f 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -33,7 +33,7 @@ functions instead.</p> <ul><li><a href="../api/npm.html">npm(3)</a></li></ul> </div> -<p id="footer">npm-config — npm@1.3.23</p> +<p id="footer">npm-config — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index f6d6aebc71..d8dafa8670 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -32,7 +32,7 @@ install the package.</p></li></ul> <ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul> </div> -<p id="footer">npm-deprecate — npm@1.3.23</p> +<p id="footer">npm-deprecate — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index 5841d0f7ff..36e0712d47 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -25,7 +25,7 @@ optional version number.</p> <p>This command will launch a browser, so this command may not be the most friendly for programmatic use.</p> </div> -<p id="footer">npm-docs — npm@1.3.23</p> +<p id="footer">npm-docs — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 364a46aca1..c38c434881 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -30,7 +30,7 @@ to open. The package can optionally have a version number attached.</p> <p>Since this command opens an editor in a new process, be careful about where and how this is used.</p> </div> -<p id="footer">npm-edit — npm@1.3.23</p> +<p id="footer">npm-edit — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index ba4d6903b1..a52a1f3df6 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -24,7 +24,7 @@ sure to use <code>npm rebuild <pkg></code> if you make any changes.</p> <p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p> </div> -<p id="footer">npm-explore — npm@1.3.23</p> +<p id="footer">npm-explore — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index c4bdc04676..1b71daa8e1 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -32,7 +32,7 @@ Name of the file that matched</li></ul> <p>The silent parameter is not neccessary not used, but it may in the future.</p> </div> -<p id="footer">npm-help-search — npm@1.3.23</p> +<p id="footer">npm-help-search — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 7a8575bf0d..cf468f5e05 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -35,7 +35,7 @@ then go ahead and use this programmatically.</p> <p><a href="../files/package.json.html">package.json(5)</a></p> </div> -<p id="footer">npm-init — npm@1.3.23</p> +<p id="footer">npm-init — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index b34667ce2e..da0e78b7e0 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -25,7 +25,7 @@ the name of a package to be installed.</p> <p>Finally, 'callback' is a function that will be called when all packages have been installed or when an error has been encountered.</p> </div> -<p id="footer">npm-install — npm@1.3.23</p> +<p id="footer">npm-install — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index b33d667ff2..59cf2f61f5 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -39,7 +39,7 @@ npm.commands.link('redis', cb) # link-install the package</code></pre> <p>Now, any changes to the redis package will be reflected in the package in the current working directory</p> </div> -<p id="footer">npm-link — npm@1.3.23</p> +<p id="footer">npm-link — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 7411173b8c..943704429c 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -32,7 +32,7 @@ config object.</p> <p>For a list of all the available command-line configs, see <code>npm help config</code></p> </div> -<p id="footer">npm-load — npm@1.3.23</p> +<p id="footer">npm-load — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 49087c98f9..3c50e897a8 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -59,7 +59,7 @@ project.</p> This means that if a submodule a same dependency as a parent module, then the dependency will only be output once.</p> </div> -<p id="footer">npm-ls — npm@1.3.23</p> +<p id="footer">npm-ls — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 71b4602e75..da61644348 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -19,7 +19,7 @@ currently outdated.</p> <p>If the 'packages' parameter is left out, npm will check all packages.</p> </div> -<p id="footer">npm-outdated — npm@1.3.23</p> +<p id="footer">npm-outdated — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index 9d4beb4dab..e694c0c834 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -34,7 +34,7 @@ that is not implemented at this time.</p> <ul><li><a href="../api/npm-publish.html">npm-publish(3)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul> </div> -<p id="footer">npm-owner — npm@1.3.23</p> +<p id="footer">npm-owner — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index efb6f6a81d..8e7bf8165b 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -25,7 +25,7 @@ overwritten the second time.</p> <p>If no arguments are supplied, then npm packs the current package folder.</p> </div> -<p id="footer">npm-pack — npm@1.3.23</p> +<p id="footer">npm-pack — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 376153a847..d339bea438 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -21,7 +21,7 @@ <p>This function is not useful programmatically</p> </div> -<p id="footer">npm-prefix — npm@1.3.23</p> +<p id="footer">npm-prefix — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index b9ffd37f76..85271ee241 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -23,7 +23,7 @@ <p>Extraneous packages are packages that are not listed on the parent package's dependencies list.</p> </div> -<p id="footer">npm-prune — npm@1.3.23</p> +<p id="footer">npm-prune — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index 997283c4f4..35abdde8b8 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -32,7 +32,7 @@ the registry. Overwrites when the "force" environment variable is set <ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../api/npm-owner.html">npm-owner(3)</a></li></ul> </div> -<p id="footer">npm-publish — npm@1.3.23</p> +<p id="footer">npm-publish — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index da9d256d3d..c09b73d67c 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -22,7 +22,7 @@ the new binary. If no 'packages' parameter is specify, every package wil <p>See <code>npm help build</code></p> </div> -<p id="footer">npm-rebuild — npm@1.3.23</p> +<p id="footer">npm-rebuild — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index f6e5ccce6a..a902a896f0 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -25,7 +25,7 @@ optional version number.</p> <p>This command will launch a browser, so this command may not be the most friendly for programmatic use.</p> </div> -<p id="footer">npm-repo — npm@1.3.23</p> +<p id="footer">npm-repo — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index 7baa16be10..b4e1e7f52b 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p> <ul><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul> </div> -<p id="footer">npm-restart — npm@1.3.23</p> +<p id="footer">npm-restart — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 1017ca46ac..885c8e28eb 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -21,7 +21,7 @@ <p>This function is not useful programmatically.</p> </div> -<p id="footer">npm-root — npm@1.3.23</p> +<p id="footer">npm-root — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index 5aefa72f4a..cddcb461cb 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p> <ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../api/npm-test.html">npm-test(3)</a></li><li><a href="../api/npm-start.html">npm-start(3)</a></li><li><a href="../api/npm-restart.html">npm-restart(3)</a></li><li><a href="../api/npm-stop.html">npm-stop(3)</a></li></ul> </div> -<p id="footer">npm-run-script — npm@1.3.23</p> +<p id="footer">npm-run-script — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 6dbd0bbdd0..ac16cec9b8 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -32,7 +32,7 @@ excluded term (the "searchexclude" config). The search is case insensi and doesn't try to read your mind (it doesn't do any verb tense matching or the like).</p> </div> -<p id="footer">npm-search — npm@1.3.23</p> +<p id="footer">npm-search — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index f902850e5f..1fe3ad51e2 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.</p> <p>Finally, 'callback' is a function that will be called when the shrinkwrap has been saved.</p> </div> -<p id="footer">npm-shrinkwrap — npm@1.3.23</p> +<p id="footer">npm-shrinkwrap — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index e62bb76d09..dfb3ac18a2 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -19,7 +19,7 @@ <p>npm can run tests on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">npm-start — npm@1.3.23</p> +<p id="footer">npm-start — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index 1ccd1b48bb..773c1d2d24 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -19,7 +19,7 @@ <p>npm can run stop on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">npm-stop — npm@1.3.23</p> +<p id="footer">npm-stop — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-submodule.html b/deps/npm/html/doc/api/npm-submodule.html index 18dd656af2..346eb87cb2 100644 --- a/deps/npm/html/doc/api/npm-submodule.html +++ b/deps/npm/html/doc/api/npm-submodule.html @@ -33,7 +33,7 @@ dependencies into the submodule folder.</p> <ul><li>npm help json</li><li>git help submodule</li></ul> </div> -<p id="footer">npm-submodule — npm@1.3.23</p> +<p id="footer">npm-submodule — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 682623d1b7..ba58efbe51 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -29,7 +29,7 @@ parameter is missing or falsey (empty), the default froom the config will be used. For more information about how to set this config, check <code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p> </div> -<p id="footer">npm-tag — npm@1.3.23</p> +<p id="footer">npm-tag — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index f0839f7b3a..db8bc95939 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -22,7 +22,7 @@ true.</p> <p>npm can run tests on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">npm-test — npm@1.3.23</p> +<p id="footer">npm-test — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 109ea2493a..f1d42a239f 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -22,7 +22,7 @@ the name of a package to be uninstalled.</p> <p>Finally, 'callback' is a function that will be called when all packages have been uninstalled or when an error has been encountered.</p> </div> -<p id="footer">npm-uninstall — npm@1.3.23</p> +<p id="footer">npm-uninstall — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 135a7c9708..22257adb73 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -26,7 +26,7 @@ is what is meant.</p> <p>If no version is specified, or if all versions are removed then the root package entry is removed from the registry entirely.</p> </div> -<p id="footer">npm-unpublish — npm@1.3.23</p> +<p id="footer">npm-unpublish — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 0b40e3dfd9..6d0a4ea4c5 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -18,7 +18,7 @@ <p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p> </div> -<p id="footer">npm-update — npm@1.3.23</p> +<p id="footer">npm-update — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index 2bb15c8b44..f376e931e3 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -24,7 +24,7 @@ fail if the repo is not clean.</p> parameter. The difference, however, is this function will fail if it does not have exactly one element. The only element should be a version number.</p> </div> -<p id="footer">npm-version — npm@1.3.23</p> +<p id="footer">npm-version — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 6114d01770..20ee5eaa89 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -99,7 +99,7 @@ the field name.</p> <p>corresponding to the list of fields selected.</p> </div> -<p id="footer">npm-view — npm@1.3.23</p> +<p id="footer">npm-view — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index 14127279bf..c2ff2cfeb6 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -21,7 +21,7 @@ <p>This function is not useful programmatically</p> </div> -<p id="footer">npm-whoami — npm@1.3.23</p> +<p id="footer">npm-whoami — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index bd454ac506..95e3536aa1 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -24,7 +24,7 @@ npm.load([configObject], function (er, npm) { <h2 id="VERSION">VERSION</h2> -<p>1.3.23</p> +<p>1.3.25</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -92,7 +92,7 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p> <pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre> </div> -<p id="footer">npm — npm@1.3.23</p> +<p id="footer">npm — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/api/repo.html b/deps/npm/html/doc/api/repo.html deleted file mode 100644 index 9cfe0d3c30..0000000000 --- a/deps/npm/html/doc/api/repo.html +++ /dev/null @@ -1,59 +0,0 @@ -<!doctype html> -<html> - <title>repo</title> - <meta http-equiv="content-type" value="text/html;utf-8"> - <link rel="stylesheet" type="text/css" href="../../static/style.css"> - - <body> - <div id="wrapper"> -<h1><a href="../api/npm-repo.html">npm-repo</a></h1> <p>Open package repository page in the browser</p> - -<h2 id="SYNOPSIS">SYNOPSIS</h2> - -<pre><code>npm.commands.repo(package, callback)</code></pre> - -<h2 id="DESCRIPTION">DESCRIPTION</h2> - -<p>This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the <code>--browser</code> -config param.</p> - -<p>Like other commands, the first parameter is an array. This command only -uses the first element, which is expected to be a package name with an -optional version number.</p> - -<p>This command will launch a browser, so this command may not be the most -friendly for programmatic use.</p> -</div> -<p id="footer">repo — npm@1.3.22</p> -<script> -;(function () { -var wrapper = document.getElementById("wrapper") -var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) - .filter(function (el) { - return el.parentNode === wrapper - && el.tagName.match(/H[1-6]/) - && el.id - }) -var l = 2 - , toc = document.createElement("ul") -toc.innerHTML = els.map(function (el) { - var i = el.tagName.charAt(1) - , out = "" - while (i > l) { - out += "<ul>" - l ++ - } - while (i < l) { - out += "</ul>" - l -- - } - out += "<li><a href='#" + el.id + "'>" + - ( el.innerText || el.text || el.innerHTML) - + "</a>" - return out -}).join("\n") -toc.id = "toc" -document.body.appendChild(toc) -})() -</script> diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 2fd4fd3218..f3973e1ac9 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -39,7 +39,7 @@ authorize on a new machine.</p> <ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li></ul> </div> -<p id="footer">npm-adduser — npm@1.3.23</p> +<p id="footer">npm-adduser — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 84a04fbaea..bd93faf593 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -20,7 +20,7 @@ <ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-bin — npm@1.3.23</p> +<p id="footer">npm-bin — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index c72ac8f8b9..034b2904ed 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -38,7 +38,7 @@ a <code>package.json</code> in the current folder and use the <code>name</code> <ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul> </div> -<p id="footer">npm-bugs — npm@1.3.23</p> +<p id="footer">npm-bugs — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 52a5b6930a..bfaa852260 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul> <ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul> </div> -<p id="footer">npm-build — npm@1.3.23</p> +<p id="footer">npm-build — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 8b9e13e01b..1361352df7 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -20,7 +20,7 @@ install packages into the local space.</p> <ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul> </div> -<p id="footer">npm-bundle — npm@1.3.23</p> +<p id="footer">npm-bundle — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index 934d46f7a9..a3a4b6955b 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p> <ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li></ul> </div> -<p id="footer">npm-cache — npm@1.3.23</p> +<p id="footer">npm-cache — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index cb0d03c942..2327fb4d2d 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -33,7 +33,7 @@ completions based on the arguments.</p> <ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">npm-completion — npm@1.3.23</p> +<p id="footer">npm-completion — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 0bcbe0f486..2bd228ffdc 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -73,7 +73,7 @@ global config.</p> <ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">npm-config — npm@1.3.23</p> +<p id="footer">npm-config — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 6115b18bc5..5eaadf27b9 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -62,7 +62,7 @@ versions.</p> <ul><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul> </div> -<p id="footer">npm-dedupe — npm@1.3.23</p> +<p id="footer">npm-dedupe — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index be8b2df5be..e52c87c2c1 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -31,7 +31,7 @@ something like this:</p> <ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul> </div> -<p id="footer">npm-deprecate — npm@1.3.23</p> +<p id="footer">npm-deprecate — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index ed60c87242..4fd8ca0875 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -10,17 +10,18 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2> -<pre><code>npm docs <pkgname> +<pre><code>npm docs [<pkgname> [<pkgname> ...]] npm docs (with no args in a package dir) -npm home <pkgname> +npm home [<pkgname> [<pkgname> ...]] npm home (with no args in a package dir)</code></pre> <h2 id="DESCRIPTION">DESCRIPTION</h2> <p>This command tries to guess at the likely location of a package's documentation URL, and then tries to open it using the <code>--browser</code> -config param. If no package name is provided, it will search for -a <code>package.json</code> in the current folder and use the <code>name</code> property.</p> +config param. You can pass multiple package names at once. If no +package name is provided, it will search for a <code>package.json</code> in +the current folder and use the <code>name</code> property.</p> <h2 id="CONFIGURATION">CONFIGURATION</h2> @@ -40,7 +41,7 @@ a <code>package.json</code> in the current folder and use the <code>name</code> <ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li></ul> </div> -<p id="footer">npm-docs — npm@1.3.23</p> +<p id="footer">npm-docs — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 1d5bf87db0..9a498b1db6 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -37,7 +37,7 @@ or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> <ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-explore.html">npm-explore(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-edit — npm@1.3.23</p> +<p id="footer">npm-edit — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 218b204d6f..331bb7841e 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -40,7 +40,7 @@ Windows</li><li>Type: path</li></ul> <ul><li><a href="../cli/npm-submodule.html">npm-submodule(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-edit.html">npm-edit(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul> </div> -<p id="footer">npm-explore — npm@1.3.23</p> +<p id="footer">npm-explore — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 61901c55c7..07fc1e92ca 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -38,7 +38,7 @@ where the terms were found in the documentation.</p> <ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li></ul> </div> -<p id="footer">npm-help-search — npm@1.3.23</p> +<p id="footer">npm-help-search — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 688393d095..9bfcdf13b5 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -36,7 +36,7 @@ matches are equivalent to specifying a topic name.</p> <ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-help-search.html">npm-help-search(1)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li></ul> </div> -<p id="footer">npm-help — npm@1.3.23</p> +<p id="footer">npm-help — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 1e75c7873c..1532c76e61 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -29,7 +29,7 @@ without a really good reason to do so.</p> <ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li></ul> </div> -<p id="footer">npm-init — npm@1.3.23</p> +<p id="footer">npm-init — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index a7e6259b2b..e099de9afa 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -149,7 +149,7 @@ affects a real use-case, it will be investigated.</p> <ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-shrinkwrap.html">npm-shrinkwrap(1)</a></li></ul> </div> -<p id="footer">npm-install — npm@1.3.23</p> +<p id="footer">npm-install — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index caafb1c0df..5878c5b9ef 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -62,7 +62,7 @@ installation target into your project's <code>node_modules</code> folder.</p <ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-link — npm@1.3.23</p> +<p id="footer">npm-link — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 52e2151aed..dc67cd3483 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -25,7 +25,7 @@ limit the results to only the paths to the packages named. Note that nested packages will <em>also</em> show the paths to the specified packages. For example, running <code>npm ls promzard</code> in npm's source tree will show:</p> -<pre><code>npm@1.3.23 /path/to/npm +<pre><code>npm@1.3.25 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5</code></pre> @@ -68,7 +68,7 @@ project.</p> <ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-link.html">npm-link(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../cli/npm-update.html">npm-update(1)</a></li></ul> </div> -<p id="footer">npm-ls — npm@1.3.23</p> +<p id="footer">npm-ls — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index f986a1c2db..c721dda71b 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -25,7 +25,7 @@ version of the package.</p> <ul><li><a href="../cli/npm-update.html">npm-update(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul> </div> -<p id="footer">npm-outdated — npm@1.3.23</p> +<p id="footer">npm-outdated — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 01bb7a83d3..a54c014ae6 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -34,7 +34,7 @@ that is not implemented at this time.</p> <ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul> </div> -<p id="footer">npm-owner — npm@1.3.23</p> +<p id="footer">npm-owner — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index edfb83a629..bfa908d5cd 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -29,7 +29,7 @@ overwritten the second time.</p> <ul><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-pack — npm@1.3.23</p> +<p id="footer">npm-pack — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 5145869820..678d796a71 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -20,7 +20,7 @@ <ul><li><a href="../cli/npm-root.html">npm-root(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-prefix — npm@1.3.23</p> +<p id="footer">npm-prefix — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index c3ab44c07f..f7390c5e44 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -29,7 +29,7 @@ packages specified in your <code>devDependencies</code>.</p> <ul><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul> </div> -<p id="footer">npm-prune — npm@1.3.23</p> +<p id="footer">npm-prune — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index d3affc7c0f..a37ff25985 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -29,7 +29,7 @@ the registry. Overwrites when the "--force" flag is set.</p> <ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-tag.html">npm-tag(1)</a></li></ul> </div> -<p id="footer">npm-publish — npm@1.3.23</p> +<p id="footer">npm-publish — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 08778c7cac..2d413e68cf 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -26,7 +26,7 @@ the new binary.</p> <ul><li><a href="../cli/npm-build.html">npm-build(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul> </div> -<p id="footer">npm-rebuild — npm@1.3.23</p> +<p id="footer">npm-rebuild — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index a39a8f0bb3..7939ce424d 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -32,7 +32,7 @@ a <code>package.json</code> in the current folder and use the <code>name</code> <ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li></ul> </div> -<p id="footer">npm-repo — npm@1.3.23</p> +<p id="footer">npm-repo — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 912999a75a..4124a43a74 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -24,7 +24,7 @@ the "start" script.</p> <ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul> </div> -<p id="footer">npm-restart — npm@1.3.23</p> +<p id="footer">npm-restart — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 9454576b7e..8827c515d1 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -24,7 +24,7 @@ on its behalf.</p> <ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-rm — npm@1.3.23</p> +<p id="footer">npm-rm — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 2aed129446..3eae327553 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -20,7 +20,7 @@ <ul><li><a href="../cli/npm-prefix.html">npm-prefix(1)</a></li><li><a href="../cli/npm-bin.html">npm-bin(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-root — npm@1.3.23</p> +<p id="footer">npm-root — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index c7cc079ee9..efac3c15f4 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -23,7 +23,7 @@ called directly, as well.</p> <ul><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul> </div> -<p id="footer">npm-run-script — npm@1.3.23</p> +<p id="footer">npm-run-script — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index c47551ac90..055cb84580 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -10,7 +10,7 @@ <h2 id="SYNOPSIS">SYNOPSIS</h2> -<pre><code>npm search [search terms ...] +<pre><code>npm search [--long] [search terms ...] npm s [search terms ...] npm se [search terms ...]</code></pre> @@ -22,11 +22,22 @@ npm se [search terms ...]</code></pre> A trailing <code>/</code> will be ignored in this case. (Note that many regular expression characters must be escaped or quoted in most shells.)</p> +<h2 id="CONFIGURATION">CONFIGURATION</h2> + +<h3 id="long">long</h3> + +<ul><li>Default: false</li><li>Type: Boolean</li></ul> + +<p>Display full package descriptions and other long text across multiple +lines. When disabled (default) search results are truncated to fit +neatly on a single line. Modules with extremely long names will +fall on multiple lines.</p> + <h2 id="SEE-ALSO">SEE ALSO</h2> <ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li></ul> </div> -<p id="footer">npm-search — npm@1.3.23</p> +<p id="footer">npm-search — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 6b851bd955..204531fe7e 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -183,7 +183,7 @@ contents rather than versions.</p> <ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul> </div> -<p id="footer">npm-shrinkwrap — npm@1.3.23</p> +<p id="footer">npm-shrinkwrap — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 324c76ff8c..2bc7356729 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -26,7 +26,7 @@ a vaguely positive way to show that you care.</p> <ul><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul> </div> -<p id="footer">npm-star — npm@1.3.23</p> +<p id="footer">npm-star — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 11decba5d1..31c8676182 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -25,7 +25,7 @@ you will most certainly enjoy this command.</p> <ul><li><a href="../cli/npm-star.html">npm-star(1)</a></li><li><a href="../cli/npm-view.html">npm-view(1)</a></li><li><a href="../cli/npm-whoami.html">npm-whoami(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul> </div> -<p id="footer">npm-stars — npm@1.3.23</p> +<p id="footer">npm-stars — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 6cf1da1214..45bc8fc310 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -20,7 +20,7 @@ <ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul> </div> -<p id="footer">npm-start — npm@1.3.23</p> +<p id="footer">npm-start — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index b72b92331c..abbd762731 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -20,7 +20,7 @@ <ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-test.html">npm-test(1)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li></ul> </div> -<p id="footer">npm-stop — npm@1.3.23</p> +<p id="footer">npm-stop — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html index ee108fca3f..cc972070f1 100644 --- a/deps/npm/html/doc/cli/npm-submodule.html +++ b/deps/npm/html/doc/cli/npm-submodule.html @@ -33,7 +33,7 @@ dependencies into the submodule folder.</p> <ul><li><a href="../files/package.json.html">package.json(5)</a></li><li>git help submodule</li></ul> </div> -<p id="footer">npm-submodule — npm@1.3.23</p> +<p id="footer">npm-submodule — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 49623fdf9d..6af9f6b491 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -34,7 +34,7 @@ of using a specific version number:</p> <ul><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-dedupe.html">npm-dedupe(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-tag — npm@1.3.23</p> +<p id="footer">npm-tag — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 1338be79d0..5a8b7705d2 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -24,7 +24,7 @@ true.</p> <ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-start.html">npm-start(1)</a></li><li><a href="../cli/npm-restart.html">npm-restart(1)</a></li><li><a href="../cli/npm-stop.html">npm-stop(1)</a></li></ul> </div> -<p id="footer">npm-test — npm@1.3.23</p> +<p id="footer">npm-test — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index e6fba5604e..f631db3da7 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -22,7 +22,7 @@ on its behalf.</p> <ul><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li></ul> </div> -<p id="footer">npm-uninstall — npm@1.3.23</p> +<p id="footer">npm-uninstall — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 8a4e0bc070..b8b3392c9f 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p> <ul><li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul> </div> -<p id="footer">npm-unpublish — npm@1.3.23</p> +<p id="footer">npm-unpublish — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index dff1f83b54..82154c700c 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -26,7 +26,7 @@ If no package name is specified, all packages in the specified location (global <ul><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-outdated.html">npm-outdated(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-ls.html">npm-ls(1)</a></li></ul> </div> -<p id="footer">npm-update — npm@1.3.23</p> +<p id="footer">npm-update — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 5c255b5b63..74c7ae8c73 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -49,7 +49,7 @@ Enter passphrase:</code></pre> <ul><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/semver.html">semver(7)</a></li></ul> </div> -<p id="footer">npm-version — npm@1.3.23</p> +<p id="footer">npm-version — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 24f5df4aa7..2d5f4194c6 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -91,7 +91,7 @@ the field name.</p> <ul><li><a href="../cli/npm-search.html">npm-search(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li></ul> </div> -<p id="footer">npm-view — npm@1.3.23</p> +<p id="footer">npm-view — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 5cd99f7d2b..057f2095d0 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -20,7 +20,7 @@ <ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li></ul> </div> -<p id="footer">npm-whoami — npm@1.3.23</p> +<p id="footer">npm-whoami — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 1a9c9b977f..91c0d90984 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -14,7 +14,7 @@ <h2 id="VERSION">VERSION</h2> -<p>1.3.23</p> +<p>1.3.25</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -131,7 +131,7 @@ will no doubt tell you to put the output in a gist or email.</p> <ul><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../../doc/README.html">README</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-index.html">npm-index(7)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul> </div> -<p id="footer">npm — npm@1.3.23</p> +<p id="footer">npm — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cli/repo.html b/deps/npm/html/doc/cli/repo.html deleted file mode 100644 index e6d4b9111b..0000000000 --- a/deps/npm/html/doc/cli/repo.html +++ /dev/null @@ -1,66 +0,0 @@ -<!doctype html> -<html> - <title>repo</title> - <meta http-equiv="content-type" value="text/html;utf-8"> - <link rel="stylesheet" type="text/css" href="../../static/style.css"> - - <body> - <div id="wrapper"> -<h1><a href="../cli/npm-repo.html">npm-repo</a></h1> <p>Open package repository page in the browser</p> - -<h2 id="SYNOPSIS">SYNOPSIS</h2> - -<pre><code>npm repo <pkgname> -npm repo (with no args in a package dir)</code></pre> - -<h2 id="DESCRIPTION">DESCRIPTION</h2> - -<p>This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the <code>--browser</code> -config param. If no package name is provided, it will search for -a <code>package.json</code> in the current folder and use the <code>name</code> property.</p> - -<h2 id="CONFIGURATION">CONFIGURATION</h2> - -<h3 id="browser">browser</h3> - -<ul><li>Default: OS X: <code>"open"</code>, Windows: <code>"start"</code>, Others: <code>"xdg-open"</code></li><li>Type: String</li></ul> - -<p>The browser that is called by the <code>npm repo</code> command to open websites.</p> - -<h2 id="SEE-ALSO">SEE ALSO</h2> - -<ul><li><a href="../cli/npm-docs.html">npm-docs(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li></ul> -</div> -<p id="footer">repo — npm@1.3.22</p> -<script> -;(function () { -var wrapper = document.getElementById("wrapper") -var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) - .filter(function (el) { - return el.parentNode === wrapper - && el.tagName.match(/H[1-6]/) - && el.id - }) -var l = 2 - , toc = document.createElement("ul") -toc.innerHTML = els.map(function (el) { - var i = el.tagName.charAt(1) - , out = "" - while (i > l) { - out += "<ul>" - l ++ - } - while (i < l) { - out += "</ul>" - l -- - } - out += "<li><a href='#" + el.id + "'>" + - ( el.innerText || el.text || el.innerHTML) - + "</a>" - return out -}).join("\n") -toc.id = "toc" -document.body.appendChild(toc) -})() -</script> diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 7401b2eb22..04431718c5 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa <ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul> </div> -<p id="footer">npm-folders — npm@1.3.23</p> +<p id="footer">npm-folders — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 7401b2eb22..04431718c5 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa <ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-pack.html">npm-pack(1)</a></li><li><a href="../cli/npm-cache.html">npm-cache(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li></ul> </div> -<p id="footer">npm-folders — npm@1.3.23</p> +<p id="footer">npm-folders — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 4734ac6efa..06f97a94a2 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -546,7 +546,7 @@ ignored.</p></li></ul> <ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul> </div> -<p id="footer">package.json — npm@1.3.23</p> +<p id="footer">package.json — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 895333b450..eeb4ec0734 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -59,7 +59,7 @@ manner.</p> <ul><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">npmrc — npm@1.3.23</p> +<p id="footer">npmrc — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 4734ac6efa..06f97a94a2 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -546,7 +546,7 @@ ignored.</p></li></ul> <ul><li><a href="../misc/semver.html">semver(7)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../cli/npm-version.html">npm-version(1)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../cli/npm-help.html">npm-help(1)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li></ul> </div> -<p id="footer">package.json — npm@1.3.23</p> +<p id="footer">package.json — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 1dd6564aab..58692e8f99 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -416,7 +416,7 @@ <p>The semantic versioner for npm</p> </div> -<p id="footer">npm-index — npm@1.3.23</p> +<p id="footer">npm-index — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 5cc635d7d1..ba558ca19e 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -182,7 +182,7 @@ set to anything."</p> <ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">npm-coding-style — npm@1.3.23</p> +<p id="footer">npm-coding-style — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index b50303e24c..516872a87a 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -415,7 +415,7 @@ colored output if it is a TTY.</p> <ul><li>Default: false</li><li>Type: Boolean</li></ul> -<p>Show extended information in <code>npm ls</code></p> +<p>Show extended information in <code>npm ls</code> and <code>npm search</code>.</p> <h3 id="message">message</h3> @@ -710,7 +710,7 @@ hash, and exit successfully.</p> <ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">npm-config — npm@1.3.23</p> +<p id="footer">npm-config — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 1175a4cee3..e8846f7a0c 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -174,7 +174,7 @@ from a fresh checkout.</p> <ul><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../cli/npm-init.html">npm-init(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li><li><a href="../cli/npm-publish.html">npm-publish(1)</a></li><li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li></ul> </div> -<p id="footer">npm-developers — npm@1.3.23</p> +<p id="footer">npm-developers — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 4eba0f5bea..990888b154 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -91,7 +91,7 @@ things into it.</li></ol> <ul><li><a href="../misc/npm-registry.html">npm-registry(7)</a></li><li><a href="../cli/npm-owner.html">npm-owner(1)</a></li></ul> </div> -<p id="footer">npm-disputes — npm@1.3.23</p> +<p id="footer">npm-disputes — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html index 8f221bf4e7..81c8b514c6 100644 --- a/deps/npm/html/doc/misc/npm-faq.html +++ b/deps/npm/html/doc/misc/npm-faq.html @@ -340,7 +340,7 @@ There is not sufficient need to impose namespace rules on everyone.</p> <ul><li><a href="../cli/npm.html">npm(1)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npm-folders.html">npm-folders(5)</a></li></ul> </div> -<p id="footer">npm-faq — npm@1.3.23</p> +<p id="footer">npm-faq — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 069c2f5478..18c2f566da 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -416,7 +416,7 @@ <p>The semantic versioner for npm</p> </div> -<p id="footer">npm-index — npm@1.3.23</p> +<p id="footer">npm-index — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 70ff129c41..ec82d120e6 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -71,7 +71,7 @@ effectively implement the entire CouchDB API anyway.</p> <ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul> </div> -<p id="footer">npm-registry — npm@1.3.23</p> +<p id="footer">npm-registry — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 75bc5541f6..79529971c0 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -223,7 +223,7 @@ the user will sudo the npm command in question.</li></ul> <ul><li><a href="../cli/npm-run-script.html">npm-run-script(1)</a></li><li><a href="../files/package.json.html">package.json(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../cli/npm-install.html">npm-install(1)</a></li></ul> </div> -<p id="footer">npm-scripts — npm@1.3.23</p> +<p id="footer">npm-scripts — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 952912dc9b..012def487f 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -58,7 +58,7 @@ modules. To track those down, you can do the following:</p> <ul><li><a href="../../doc/README.html">README</a></li><li><a href="../cli/npm-rm.html">npm-rm(1)</a></li><li><a href="../cli/npm-prune.html">npm-prune(1)</a></li></ul> </div> -<p id="footer">removing-npm — npm@1.3.23</p> +<p id="footer">removing-npm — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index cc8e634ab0..27a29c228e 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -94,7 +94,7 @@ in descending order when passed to Array.sort().</li></ul> range.</li><li>maxSatisfying(versions, range): Return the highest version in the list that satisfies the range, or null if none of them do.</li></ul> </div> -<p id="footer">semver — npm@1.3.23</p> +<p id="footer">semver — npm@1.3.25</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/static/style.css b/deps/npm/html/static/style.css index 115492e76f..cfb46fb8eb 100644 --- a/deps/npm/html/static/style.css +++ b/deps/npm/html/static/style.css @@ -1,24 +1,3 @@ -/* - -Webfont: Gubblebum Blocky by Jelloween -License: http://www.myfonts.com/viewlicense?type=web&buildid=2303021 -Webfonts copyright: Copyright (c) 2007 by Tjarda Koster. All rights reserved. - -"Gubblebum Blocky" font -Copyright (c) 2007 by Tjarda Koster, http://jelloween.deviantart.com -included for use in the npm website and documentation, -used with permission. - -*/ - -@font-face { - font-family: gubblefont; - src: url('webfonts/23242D_3_0.eot'); - src: url('webfonts/23242D_3_0.eot?#iefix') format('embedded-opentype'), - url('webfonts/23242D_3_0.woff') format('woff'), - url('webfonts/23242D_3_0.ttf') format('truetype'); -} - /* reset */ * { margin:0; @@ -169,7 +148,7 @@ h1 { background:#fff; } h1 a, h1 a:visited { - font-family:gubblefont, Gubblebum-Blocky, GubbleBum Blocky, GubbleBum, monospace; + font-family:monospace; font-size:60px; color:#900; display:block; diff --git a/deps/npm/html/static/webfonts/23242D_3_0.eot b/deps/npm/html/static/webfonts/23242D_3_0.eot Binary files differdeleted file mode 100644 index a2ce308524..0000000000 --- a/deps/npm/html/static/webfonts/23242D_3_0.eot +++ /dev/null diff --git a/deps/npm/html/static/webfonts/23242D_3_0.ttf b/deps/npm/html/static/webfonts/23242D_3_0.ttf Binary files differdeleted file mode 100644 index 788b1fcf93..0000000000 --- a/deps/npm/html/static/webfonts/23242D_3_0.ttf +++ /dev/null diff --git a/deps/npm/html/static/webfonts/23242D_3_0.woff b/deps/npm/html/static/webfonts/23242D_3_0.woff Binary files differdeleted file mode 100644 index 46540e82af..0000000000 --- a/deps/npm/html/static/webfonts/23242D_3_0.woff +++ /dev/null diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index efb0691966..739f14243f 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -37,7 +37,7 @@ function adduser (args, cb) { function readUsername (c, u, cb) { var v = userValidate.username - read({prompt: "Username: ", default: c.u}, function (er, un) { + read({prompt: "Username: ", default: c.u || ""}, function (er, un) { if (er) { return cb(er.message === "cancelled" ? er.message : er) } @@ -92,8 +92,8 @@ function readPassword (c, u, cb) { function readEmail (c, u, cb) { var v = userValidate.email - - read({prompt: "Email: (this IS public) ", default: c.e}, function (er, em) { + var r = { prompt: "Email: (this IS public) ", default: c.e || "" } + read(r, function (er, em) { if (er) { return cb(er.message === "cancelled" ? er.message : er) } diff --git a/deps/npm/lib/docs.js b/deps/npm/lib/docs.js index 0f59572ac8..2abbd62f26 100644 --- a/deps/npm/lib/docs.js +++ b/deps/npm/lib/docs.js @@ -5,7 +5,6 @@ docs.usage += "\n" docs.usage += "npm docs ." docs.completion = function (opts, cb) { - if (opts.conf.argv.remain.length > 2) return cb() registry.get("/-/short", 60000, function (er, list) { return cb(null, list || []) }) @@ -22,8 +21,20 @@ function url (json) { } function docs (args, cb) { - var project = args[0] || '.' - , package = path.resolve(process.cwd(), "package.json") + args = args || [] + var pending = args.length + if (!pending) return getDoc('.', cb) + args.forEach(function(proj) { + getDoc(proj, function(err) { + if (err) return cb(err) + --pending || cb() + }) + }) +} + +function getDoc (project, cb) { + project = project || '.' + var package = path.resolve(process.cwd(), "package.json") if (project === '.' || project === './') { try { diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 790879d0d7..9270303a65 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -637,8 +637,16 @@ function targetResolver (where, context, deps) { return cb(null, d.name) } - // something is there, but it's not satisfactory. Clobber it. - return cb(null, []) + // see if the package had been previously linked + fs.lstat(path.resolve(nm, pkg), function(err, s) { + if (err) return cb(null, []) + if (s.isSymbolicLink()) { + return cb(null, d.name) + } + + // something is there, but it's not satisfactory. Clobber it. + return cb(null, []) + }) }) }, function (er, inst) { // this is the list of things that are valid and should be ignored. @@ -689,6 +697,12 @@ function targetResolver (where, context, deps) { what = what + "@" + deps[what] } + // This is where we actually fetch the package, if it's not already + // in the cache. + // If it's a git repo, then we want to install it, even if the parent + // already has a matching copy. + // If it's not a git repo, and the parent already has that pkg, then + // we can skip installing it again. cache.add(what, function (er, data) { if (er && parent && parent.optionalDependencies && parent.optionalDependencies.hasOwnProperty(what.split("@")[0])) { @@ -697,9 +711,8 @@ function targetResolver (where, context, deps) { return cb(null, []) } - // if the target is a git repository, we always want to fetch it var isGit = false - , maybeGit = what.split("@").pop() + , maybeGit = what.split("@").slice(1).join() if (maybeGit) isGit = isGitUrl(url.parse(maybeGit)) diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js index dbe8790b9d..0e13da13be 100644 --- a/deps/npm/lib/prune.js +++ b/deps/npm/lib/prune.js @@ -13,19 +13,19 @@ var readInstalled = require("read-installed") prune.completion = require("./utils/completion/installed-deep.js") function prune (args, cb) { + //check if is a valid package.json file var jsonFile = path.resolve(npm.dir, "..", "package.json" ) - readJson(jsonFile, log.warn, function (er, packageData) { + readJson(jsonFile, log.warn, function (er, data) { if (er) return cb(er) + next() + }) + + function next() { readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) { if (er) return cb(er) - if (npm.config.get("production")) { - Object.keys(packageData.devDependencies || {}).forEach(function (k) { - if (data.dependencies[k]) data.dependencies[k].extraneous = true - }) - } prune_(args, data, cb) }) - }) + } } function prune_ (args, data, cb) { diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js index fdc1c8b07d..21b6ab2794 100644 --- a/deps/npm/lib/search.js +++ b/deps/npm/lib/search.js @@ -3,6 +3,7 @@ module.exports = exports = search var npm = require("./npm.js") , registry = npm.registry + , columnify = require('columnify') search.usage = "npm search [some search terms ...]" @@ -91,7 +92,8 @@ function stripData (data) { && (new Date(data.time.modified).toISOString() .split("T").join(" ") .replace(/:[0-9]{2}\.[0-9]{3}Z$/, "")) - || "(prehistoric)" + .slice(0, -5) // remove time + || "prehistoric" } } @@ -129,102 +131,77 @@ function match (words, arg) { } function prettify (data, args) { - try { - var tty = require("tty") - , stdout = process.stdout - , cols = !tty.isatty(stdout.fd) ? Infinity - : process.stdout.getWindowSize()[0] - cols = (cols == 0) ? Infinity : cols - } catch (ex) { cols = Infinity } - - // name, desc, author, keywords - var longest = [] - , spaces - , maxLen = npm.config.get("description") - ? [20, 60, 20, 20, 10, Infinity] - : [20, 20, 20, 10, Infinity] - , headings = npm.config.get("description") - ? ["NAME", "DESCRIPTION", "AUTHOR", "DATE", "VERSION", "KEYWORDS"] - : ["NAME", "AUTHOR", "DATE", "VERSION", "KEYWORDS"] - , lines - , searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase() - , sortFields = { name: 0 - , description: 1 - , author: 2 - , date: 3 - , version: 4 - , keywords: 5 } + var searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase() + , sortField = searchsort.replace(/^\-+/, "") , searchRev = searchsort.charAt(0) === "-" - , sortField = sortFields[searchsort.replace(/^\-+/, "")] + , truncate = !npm.config.get("long") + + if (Object.keys(data).length === 0) { + return "No match found for "+(args.map(JSON.stringify).join(" ")) + } - lines = Object.keys(data).map(function (d) { + var lines = Object.keys(data).map(function (d) { + // strip keyname return data[d] - }).map(function (data) { - // turn a pkg data into a string - // [name,who,desc,targets,keywords] tuple - // also set longest to the longest name - if (typeof data.keywords === "string") { - data.keywords = data.keywords.split(/[,\s]+/) + }).map(function(dat) { + dat.author = dat.maintainers + delete dat.maintainers + dat.date = dat.time + delete dat.time + return dat + }).map(function(dat) { + // split keywords on whitespace or , + if (typeof dat.keywords === "string") { + dat.keywords = dat.keywords.split(/[,\s]+/) } - if (!Array.isArray(data.keywords)) data.keywords = [] - var l = [ data.name - , data.description || "" - , data.maintainers.join(" ") - , data.time - , data.version || "" - , (data.keywords || []).join(" ") - ] - l.forEach(function (s, i) { - var len = s.length - longest[i] = Math.min(maxLen[i] || Infinity - ,Math.max(longest[i] || 0, len)) - if (len > longest[i]) { - l._undent = l._undent || [] - l._undent[i] = len - longest[i] - } - l[i] = ('' + l[i]).replace(/\s+/g, " ") - }) - return l - }).sort(function (a, b) { - // a and b are "line" objects of [name, desc, maint, time, kw] + if (Array.isArray(dat.keywords)) { + dat.keywords = dat.keywords.join(' ') + } + + // split author on whitespace or , + if (typeof dat.author === "string") { + dat.author = dat.author.split(/[,\s]+/) + } + if (Array.isArray(dat.author)) { + dat.author = dat.author.join(' ') + } + return dat + }) + + lines.sort(function(a, b) { var aa = a[sortField].toLowerCase() , bb = b[sortField].toLowerCase() return aa === bb ? 0 - : aa < bb ? (searchRev ? 1 : -1) - : (searchRev ? -1 : 1) - }).map(function (line) { - return line.map(function (s, i) { - spaces = spaces || longest.map(function (n) { - return new Array(n + 2).join(" ") - }) - var len = s.length - if (line._undent && line._undent[i - 1]) { - len += line._undent[i - 1] - 1 - } - return s + spaces[i].substr(len) - }).join(" ").substr(0, cols).trim() - }).map(function (line) { - // colorize! - args.forEach(function (arg, i) { - line = addColorMarker(line, arg, i) - }) - return colorize(line).trim() + : aa < bb ? -1 : 1 }) - if (lines.length === 0) { - return "No match found for "+(args.map(JSON.stringify).join(" ")) - } + if (searchRev) lines.reverse() - // build the heading padded to the longest in each field - return headings.map(function (h, i) { - var space = Math.max(2, 3 + (longest[i] || 0) - h.length) - return h + (new Array(space).join(" ")) - }).join("").substr(0, cols).trim() + "\n" + lines.join("\n") + var columns = npm.config.get("description") + ? ["name", "description", "author", "date", "version", "keywords"] + : ["name", "author", "date", "version", "keywords"] + + var output = columnify(lines, { + include: columns + , truncate: truncate + , config: { + name: { maxWidth: 40, truncate: false, truncateMarker: '' } + , description: { maxWidth: 60 } + , author: { maxWidth: 20 } + , date: { maxWidth: 11 } + , version: { maxWidth: 11 } + , keywords: { maxWidth: Infinity } + } + }) + output = trimToMaxWidth(output) + output = highlightSearchTerms(output, args) + return output } var colors = [31, 33, 32, 36, 34, 35 ] , cl = colors.length + function addColorMarker (str, arg, i) { var m = i % cl + 1 , markStart = String.fromCharCode(m) @@ -260,3 +237,29 @@ function colorize (line) { var uncolor = npm.color ? "\033[0m" : "" return line.split("\u0000").join(uncolor) } + +function getMaxWidth() { + try { + var tty = require("tty") + , stdout = process.stdout + , cols = !tty.isatty(stdout.fd) ? Infinity + : process.stdout.getWindowSize()[0] + cols = (cols == 0) ? Infinity : cols + } catch (ex) { cols = Infinity } + return cols +} + +function trimToMaxWidth(str) { + var maxWidth = getMaxWidth() + return str.split('\n').map(function(line) { + return line.slice(0, maxWidth) + }).join('\n') +} + +function highlightSearchTerms(str, terms) { + terms.forEach(function (arg, i) { + str = addColorMarker(str, arg, i) + }) + + return colorize(str).trim() +} diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index ffa6484fa8..e6ef925b30 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -185,14 +185,6 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { process.nextTick(dequeue) } - var sh = "sh" - var shFlag = "-c" - - if (process.platform === "win32") { - sh = "cmd" - shFlag = "/c" - } - var conf = { cwd: wd , env: env , stdio: [ 0, 1, 2 ] @@ -203,6 +195,15 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { conf.gid = gid ^ 0 } + var sh = "sh" + var shFlag = "-c" + + if (process.platform === "win32") { + sh = "cmd" + shFlag = "/c" + conf.windowsVerbatimArguments = true + } + var proc = spawn(sh, [shFlag, cmd], conf) proc.on("close", function (code, signal) { if (signal) { diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index 62d410c0b6..375001f37c 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -9,9 +9,9 @@ .SH "SYNOPSIS" . .nf -npm docs <pkgname> +npm docs [<pkgname> [<pkgname> \.\.\.]] npm docs (with no args in a package dir) -npm home <pkgname> +npm home [<pkgname> [<pkgname> \.\.\.]] npm home (with no args in a package dir) . .fi @@ -19,8 +19,9 @@ npm home (with no args in a package dir) .SH "DESCRIPTION" This command tries to guess at the likely location of a package\'s documentation URL, and then tries to open it using the \fB\-\-browser\fR -config param\. If no package name is provided, it will search for -a \fBpackage\.json\fR in the current folder and use the \fBname\fR property\. +config param\. You can pass multiple package names at once\. If no +package name is provided, it will search for a \fBpackage\.json\fR in +the current folder and use the \fBname\fR property\. . .SH "CONFIGURATION" . diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index f940705643..9c2a910e5a 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show: .IP "" 4 . .nf -npm@1.3.23 /path/to/npm +npm@1.3.25 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 . diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 9407e561f0..bba9e0d42b 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -9,7 +9,7 @@ .SH "SYNOPSIS" . .nf -npm search [search terms \.\.\.] +npm search [\-\-long] [search terms \.\.\.] npm s [search terms \.\.\.] npm se [search terms \.\.\.] . @@ -23,6 +23,24 @@ If a term starts with \fB/\fR, then it\'s interpreted as a regular expression\. A trailing \fB/\fR will be ignored in this case\. (Note that many regular expression characters must be escaped or quoted in most shells\.) . +.SH "CONFIGURATION" +. +.SS "long" +. +.IP "\(bu" 4 +Default: false +. +.IP "\(bu" 4 +Type: Boolean +. +.IP "" 0 +. +.P +Display full package descriptions and other long text across multiple +lines\. When disabled (default) search results are truncated to fit +neatly on a single line\. Modules with extremely long names will +fall on multiple lines\. +. .SH "SEE ALSO" . .IP "\(bu" 4 diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 2114ecea94..e40aed2b9a 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -14,7 +14,7 @@ npm <command> [args] .fi . .SH "VERSION" -1.3.23 +1.3.25 . .SH "DESCRIPTION" npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man1/repo.1 b/deps/npm/man/man1/repo.1 deleted file mode 100644 index 1c3b8eb973..0000000000 --- a/deps/npm/man/man1/repo.1 +++ /dev/null @@ -1,47 +0,0 @@ -.\" Generated with Ronnjs 0.3.8 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-REPO" "1" "December 2013" "" "" -. -.SH "NAME" -\fBnpm-repo\fR \-\- Open package repository page in the browser -. -.SH "SYNOPSIS" -. -.nf -npm repo <pkgname> -npm repo (with no args in a package dir) -. -.fi -. -.SH "DESCRIPTION" -This command tries to guess at the likely location of a package\'s -repository URL, and then tries to open it using the \fB\-\-browser\fR -config param\. If no package name is provided, it will search for -a \fBpackage\.json\fR in the current folder and use the \fBname\fR property\. -. -.SH "CONFIGURATION" -. -.SS "browser" -. -.IP "\(bu" 4 -Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg\-open"\fR -. -.IP "\(bu" 4 -Type: String -. -.IP "" 0 -. -.P -The browser that is called by the \fBnpm repo\fR command to open websites\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm help docs -. -.IP "\(bu" 4 -npm help config -. -.IP "" 0 - diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index 8e2a7421f3..68923abe43 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -21,7 +21,7 @@ npm\.load([configObject], function (er, npm) { .fi . .SH "VERSION" -1.3.23 +1.3.25 . .SH "DESCRIPTION" This is the API documentation for npm\. diff --git a/deps/npm/man/man3/repo.3 b/deps/npm/man/man3/repo.3 deleted file mode 100644 index ee15118b53..0000000000 --- a/deps/npm/man/man3/repo.3 +++ /dev/null @@ -1,28 +0,0 @@ -.\" Generated with Ronnjs 0.3.8 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-REPO" "3" "December 2013" "" "" -. -.SH "NAME" -\fBnpm-repo\fR \-\- Open package repository page in the browser -. -.SH "SYNOPSIS" -. -.nf -npm\.commands\.repo(package, callback) -. -.fi -. -.SH "DESCRIPTION" -This command tries to guess at the likely location of a package\'s -repository URL, and then tries to open it using the \fB\-\-browser\fR -config param\. -. -.P -Like other commands, the first parameter is an array\. This command only -uses the first element, which is expected to be a package name with an -optional version number\. -. -.P -This command will launch a browser, so this command may not be the most -friendly for programmatic use\. diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index a1970bb83d..f2ce0db1f7 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -848,7 +848,7 @@ Type: Boolean .IP "" 0 . .P -Show extended information in \fBnpm ls\fR +Show extended information in \fBnpm ls\fR and \fBnpm search\fR\|\. . .SS "message" . diff --git a/deps/npm/node_modules/columnify/Readme.md b/deps/npm/node_modules/columnify/Readme.md new file mode 100644 index 0000000000..6520379659 --- /dev/null +++ b/deps/npm/node_modules/columnify/Readme.md @@ -0,0 +1,189 @@ +# columnify + +[![Build Status](https://travis-ci.org/timoxley/columnify.png?branch=master)](https://travis-ci.org/timoxley/columnify) + +Create text-based columns suitable for console output. +Supports minimum and maximum column widths via truncation and text wrapping. + +Designed to [handle sensible wrapping in npm search results](https://github.com/isaacs/npm/pull/2328). + +`npm search` before & after integrating columnify: + +![npm-tidy-search](https://f.cloud.github.com/assets/43438/1848959/ae02ad04-76a1-11e3-8255-4781debffc26.gif) + +## Installation & Update + +``` +$ npm install --save columnify@latest +``` + +## Usage + +```js +var columnify = require('columnify') +var columns = columnify(data, options) +console.log(columns) +``` + +## Examples + +### Simple Columns + +Text is aligned under column headings. Columns are automatically resized +to fit the content of the largest cell. Each cell will be padded with +spaces to fill the available space and ensure column contents are +left-aligned. + +```js +var columnify = require('columnify') + +var columns = columnify([{ + name: 'mod1', + version: '0.0.1' +}, { + name: 'module2', + version: '0.2.0' +}]) + +console.log(columns) +``` +``` +NAME VERSION +mod1 0.0.1 +module2 0.2.0 +``` + +### Wrapping Column Cells + +You can define the maximum width before wrapping for individual cells in +columns. Minimum width is also supported. Wrapping will happen at word +boundaries. Empty cells or those which do not fill the max/min width +will be padded with spaces. + +```js +var columnify = require('columnify') + +var columns = columnify([{ + name: 'mod1', + description: 'some description which happens to be far larger than the max', + version: '0.0.1', +}, { + name: 'module-two', + description: 'another description larger than the max', + version: '0.2.0', +}) + +console.log(columns) +``` +``` +NAME DESCRIPTION VERSION +mod1 some description which happens 0.0.1 + to be far larger than the max +module-two another description larger 0.2.0 + than the max +``` + +### Truncated Columns + +You can disable wrapping and instead truncate content at the maximum +column width. Truncation respects word boundaries. A truncation marker, +`…` will appear next to the last word in any truncated line. + +```js +var columns = columnify(data, { + truncate: true, + config: { + description: { + maxWidth: 20 + } + } +}) + +console.log(columns) +``` + +``` +NAME DESCRIPTION VERSION +mod1 some description… 0.0.1 +module-two another description… 0.2.0 +``` + + +### Custom Truncation Marker + +You can change the truncation marker to something other than the default +`…`. + +```js +var columns = columnify(data, { + truncate: true, + truncateMarker: '>', + widths: { + description: { + maxWidth: 20 + } + } +}) + +console.log(columns) +``` + +``` +NAME DESCRIPTION VERSION +mod1 some description> 0.0.1 +module-two another description> 0.2.0 +``` + +### Custom Column Splitter + +If your columns need some bling, you can split columns with custom +characters. + +```js + +var columns = columnify(data, { + columnSplitter: ' | ' +}) + +console.log(columns) +``` +``` +NAME | DESCRIPTION | VERSION +mod1 | some description which happens to be far larger than the max | 0.0.1 +module-two | another description larger than the max | 0.2.0 +``` + +### Filtering & Ordering Columns + +By default, all properties are converted into columns, whether or not +they exist on every object or not. + +To explicitly specify which columns to include, and in which order, +supply an "include" array: + +```js +var data = [{ + name: 'module1', + description: 'some description', + version: '0.0.1', +}, { + name: 'module2', + description: 'another description', + version: '0.2.0', +}] + +var columns = columnify(data, { + include: ['name', 'version'] // note description not included +}) + +console.log(columns) +``` + +``` +NAME VERSION +module1 0.0.1 +module2 0.2.0 +``` +## License + +MIT diff --git a/deps/npm/node_modules/columnify/index.js b/deps/npm/node_modules/columnify/index.js new file mode 100644 index 0000000000..462c2919f9 --- /dev/null +++ b/deps/npm/node_modules/columnify/index.js @@ -0,0 +1,210 @@ +"use strict" + +var utils = require('./utils') +var padRight = utils.padRight +var splitIntoLines = utils.splitIntoLines +var splitLongWords = utils.splitLongWords + +var DEFAULTS = { + maxWidth: Infinity, + minWidth: 0, + columnSplitter: ' ', + truncate: false, + truncateMarker: '…', + headingTransform: function(key) { + return key.toUpperCase() + }, + dataTransform: function(cell, column, index) { + return cell + } +} + +module.exports = function(items, options) { + + options = options || {} + + var columnConfigs = options.config || {} + delete options.config // remove config so doesn't appear on every column. + + // Option defaults inheritance: + // options.config[columnName] => options => DEFAULTS + options = mixin(options, DEFAULTS) + options.config = options.config || Object.create(null) + + options.spacing = options.spacing || '\n' // probably useless + + var columnNames = options.include || [] // optional user-supplied columns to include + + // if not suppled column names, automatically determine columns from data keys + if (!columnNames.length) { + items.forEach(function(item) { + for (var columnName in item) { + if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName) + } + }) + } + + // initialize column defaults (each column inherits from options.config) + var columns = columnNames.reduce(function(columns, columnName) { + var column = Object.create(options) + columns[columnName] = mixin(column, columnConfigs[columnName]) + return columns + }, Object.create(null)) + + // sanitize column settings + columnNames.forEach(function(columnName) { + var column = columns[columnName] + column.maxWidth = Math.ceil(column.maxWidth) + column.minWidth = Math.ceil(column.minWidth) + column.truncate = !!column.truncate + }) + + // sanitize data + items = items.map(function(item) { + var result = Object.create(null) + columnNames.forEach(function(columnName) { + // null/undefined -> '' + result[columnName] = item[columnName] != null ? item[columnName] : '' + // toString everything + result[columnName] = '' + result[columnName] + // remove funky chars + result[columnName] = result[columnName].replace(/\s+/g, " ") + }) + return result + }) + + // transform data cells + columnNames.forEach(function(columnName) { + var column = columns[columnName] + items = items.map(function(item, index) { + item[columnName] = column.dataTransform(item[columnName], column, index) + return item + }) + }) + + // add headers + var headers = {} + columnNames.forEach(function(columnName) { + var column = columns[columnName] + headers[columnName] = column.headingTransform(columnName) + }) + items.unshift(headers) + + // get actual max-width between min & max + // based on length of data in columns + columnNames.forEach(function(columnName) { + var column = columns[columnName] + column.width = items.map(function(item) { + return item[columnName] + }).reduce(function(min, cur) { + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur.length))) + }, 0) + }) + + // split long words so they can break onto multiple lines + columnNames.forEach(function(columnName) { + var column = columns[columnName] + items = items.map(function(item) { + item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker) + return item + }) + }) + + // wrap long lines. each item is now an array of lines. + columnNames.forEach(function(columnName) { + var column = columns[columnName] + items = items.map(function(item, index) { + var cell = item[columnName] + item[columnName] = splitIntoLines(cell, column.width) + + // if truncating required, only include first line + add truncation char + if (column.truncate && item[columnName].length > 1) { + item[columnName] = splitIntoLines(cell, column.width - column.truncateMarker.length) + var firstLine = item[columnName][0] + if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker + item[columnName] = item[columnName].slice(0, 1) + } + return item + }) + }) + + // recalculate column widths from truncated output/lines + columnNames.forEach(function(columnName) { + var column = columns[columnName] + column.width = items.map(function(item) { + return item[columnName].reduce(function(min, cur) { + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur.length))) + }, 0) + }).reduce(function(min, cur) { + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur))) + }, 0) + }) + + var rows = createRows(items, columns, columnNames) // merge lines into rows + + // conceive output + return rows.reduce(function(output, row) { + return output.concat(row.reduce(function(rowOut, line) { + return rowOut.concat(line.join(options.columnSplitter)) + }, [])) + }, []).join(options.spacing) +} + +/** + * Convert wrapped lines into rows with padded values. + * + * @param Array items data to process + * @param Array columns column width settings for wrapping + * @param Array columnNames column ordering + * @return Array items wrapped in arrays, corresponding to lines + */ + +function createRows(items, columns, columnNames) { + return items.map(function(item) { + var row = [] + var numLines = 0 + columnNames.forEach(function(columnName) { + numLines = Math.max(numLines, item[columnName].length) + }) + // combine matching lines of each rows + for (var i = 0; i < numLines; i++) { + row[i] = row[i] || [] + columnNames.forEach(function(columnName) { + var column = columns[columnName] + var val = item[columnName][i] || '' // || '' ensures empty columns get padded + row[i].push(padRight(val, column.width)) + }) + } + return row + }) +} + +/** + * Generic source->target mixin. + * Copy properties from `source` into `target` if target doesn't have them. + * Destructive. Modifies `target`. + * + * @param target Object target for mixin properties. + * @param source Object source of mixin properties. + * @return Object `target` after mixin applied. + */ + +function mixin(target, source) { + source = source || {} + for (var key in source) { + if (target.hasOwnProperty(key)) continue + target[key] = source[key] + } + return target +} + +/** + * Adapted from String.prototype.endsWith polyfill. + */ + +function endsWith(target, searchString, position) { + position = position || target.length; + position = position - searchString.length; + var lastIndex = target.lastIndexOf(searchString); + return lastIndex !== -1 && lastIndex === position; +} diff --git a/deps/npm/node_modules/columnify/package.json b/deps/npm/node_modules/columnify/package.json new file mode 100644 index 0000000000..f4fa2cb2a4 --- /dev/null +++ b/deps/npm/node_modules/columnify/package.json @@ -0,0 +1,42 @@ +{ + "name": "columnify", + "version": "0.1.2", + "description": "Render data in text columns, supports in-column text-wrap.", + "main": "index.js", + "scripts": { + "test": "tap test" + }, + "author": { + "name": "Tim Oxley" + }, + "license": "MIT", + "devDependencies": { + "tape": "~2.3.0", + "tap": "~0.4.6" + }, + "repository": { + "type": "git", + "url": "git://github.com/timoxley/columnify.git" + }, + "keywords": [ + "column", + "text", + "ansi", + "console", + "terminal", + "wrap", + "table" + ], + "bugs": { + "url": "https://github.com/timoxley/columnify/issues" + }, + "homepage": "https://github.com/timoxley/columnify", + "readme": "# columnify\n\n[![Build Status](https://travis-ci.org/timoxley/columnify.png?branch=master)](https://travis-ci.org/timoxley/columnify)\n\nCreate text-based columns suitable for console output. \nSupports minimum and maximum column widths via truncation and text wrapping.\n\nDesigned to [handle sensible wrapping in npm search results](https://github.com/isaacs/npm/pull/2328).\n\n`npm search` before & after integrating columnify:\n\n![npm-tidy-search](https://f.cloud.github.com/assets/43438/1848959/ae02ad04-76a1-11e3-8255-4781debffc26.gif)\n\n## Installation & Update\n\n```\n$ npm install --save columnify@latest\n```\n\n## Usage\n\n```js\nvar columnify = require('columnify')\nvar columns = columnify(data, options)\nconsole.log(columns)\n```\n\n## Examples\n\n### Simple Columns\n\nText is aligned under column headings. Columns are automatically resized\nto fit the content of the largest cell. Each cell will be padded with\nspaces to fill the available space and ensure column contents are\nleft-aligned.\n\n```js\nvar columnify = require('columnify')\n\nvar columns = columnify([{\n name: 'mod1',\n version: '0.0.1'\n}, {\n name: 'module2',\n version: '0.2.0'\n}])\n\nconsole.log(columns)\n```\n```\nNAME VERSION\nmod1 0.0.1 \nmodule2 0.2.0 \n```\n\n### Wrapping Column Cells\n\nYou can define the maximum width before wrapping for individual cells in\ncolumns. Minimum width is also supported. Wrapping will happen at word\nboundaries. Empty cells or those which do not fill the max/min width\nwill be padded with spaces.\n\n```js\nvar columnify = require('columnify')\n\nvar columns = columnify([{\n name: 'mod1',\n description: 'some description which happens to be far larger than the max',\n version: '0.0.1',\n}, {\n name: 'module-two',\n description: 'another description larger than the max',\n version: '0.2.0',\n})\n\nconsole.log(columns)\n```\n```\nNAME DESCRIPTION VERSION\nmod1 some description which happens 0.0.1\n to be far larger than the max\nmodule-two another description larger 0.2.0\n than the max\n```\n\n### Truncated Columns\n\nYou can disable wrapping and instead truncate content at the maximum\ncolumn width. Truncation respects word boundaries. A truncation marker,\n`…` will appear next to the last word in any truncated line.\n\n```js\nvar columns = columnify(data, {\n truncate: true,\n config: {\n description: {\n maxWidth: 20\n }\n }\n})\n\nconsole.log(columns)\n```\n\n```\nNAME DESCRIPTION VERSION\nmod1 some description… 0.0.1 \nmodule-two another description… 0.2.0 \n```\n\n\n### Custom Truncation Marker\n\nYou can change the truncation marker to something other than the default\n`…`.\n\n```js\nvar columns = columnify(data, {\n truncate: true,\n truncateMarker: '>',\n widths: {\n description: {\n maxWidth: 20\n }\n }\n})\n\nconsole.log(columns)\n```\n\n```\nNAME DESCRIPTION VERSION\nmod1 some description> 0.0.1 \nmodule-two another description> 0.2.0 \n```\n\n### Custom Column Splitter\n\nIf your columns need some bling, you can split columns with custom\ncharacters.\n\n```js\n\nvar columns = columnify(data, {\n columnSplitter: ' | '\n})\n\nconsole.log(columns)\n```\n```\nNAME | DESCRIPTION | VERSION\nmod1 | some description which happens to be far larger than the max | 0.0.1\nmodule-two | another description larger than the max | 0.2.0\n```\n\n### Filtering & Ordering Columns\n\nBy default, all properties are converted into columns, whether or not\nthey exist on every object or not.\n\nTo explicitly specify which columns to include, and in which order,\nsupply an \"include\" array:\n\n```js\nvar data = [{\n name: 'module1',\n description: 'some description',\n version: '0.0.1',\n}, {\n name: 'module2',\n description: 'another description',\n version: '0.2.0',\n}]\n\nvar columns = columnify(data, {\n include: ['name', 'version'] // note description not included\n})\n\nconsole.log(columns)\n```\n\n```\nNAME VERSION\nmodule1 0.0.1\nmodule2 0.2.0\n```\n## License\n\nMIT\n", + "readmeFilename": "Readme.md", + "_id": "columnify@0.1.2", + "dist": { + "shasum": "ab1a1f1e37b26ba4b87c6920fb717fe51c827042" + }, + "_from": "columnify@0.1.2", + "_resolved": "https://registry.npmjs.org/columnify/-/columnify-0.1.2.tgz" +} diff --git a/deps/npm/node_modules/columnify/utils.js b/deps/npm/node_modules/columnify/utils.js new file mode 100644 index 0000000000..bd7641da42 --- /dev/null +++ b/deps/npm/node_modules/columnify/utils.js @@ -0,0 +1,76 @@ +/** + * Pad `str` up to total length `max` with `chr`. + * If `str` is longer than `max`, padRight will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padRight(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = 1 + max - str.length + if (length <= 0) return str + return str + Array.apply(null, {length: length}) + .join(chr || ' ') +} + +/** + * Split a String `str` into lines of maxiumum length `max`. + * Splits on word boundaries. + * + * @param String str string to split + * @param Number max length of each line + * @return Array Array containing lines. + */ + +function splitIntoLines(str, max) { + return str.trim().split(' ').reduce(function(lines, word) { + var line = lines[lines.length - 1] + if (line && line.join(' ').length + word.length < max) { + lines[lines.length - 1].push(word) // add to line + } + else lines.push([word]) // new line + return lines + }, []).map(function(l) { + return l.join(' ') + }) +} + +/** + * Add spaces and `truncationChar` between words of + * `str` which are longer than `max`. + * + * @param String str string to split + * @param Number max length of each line + * @param Number truncationChar character to append to split words + * @return String + */ + +function splitLongWords(str, max, truncationChar, result) { + str = str.trim() + result = result || [] + if (!str) return result.join(' ') || '' + var words = str.split(' ') + var word = words.shift() || str + + if (word.length > max) { + var remainder = word.slice(max - truncationChar.length) // get remainder + words.unshift(remainder) // save remainder for next loop + + word = word.slice(0, max - truncationChar.length) // grab truncated word + word += truncationChar // add trailing … or whatever + } + result.push(word) + return splitLongWords(words.join(' '), max, truncationChar, result) +} + +/** + * Exports + */ + +module.exports.padRight = padRight +module.exports.splitIntoLines = splitIntoLines +module.exports.splitLongWords = splitLongWords diff --git a/deps/npm/node_modules/init-package-json/node_modules/promzard/LICENSE b/deps/npm/node_modules/init-package-json/node_modules/promzard/LICENSE new file mode 100644 index 0000000000..05eeeb88c2 --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +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/init-package-json/node_modules/promzard/package.json b/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json index 14c20d0442..24560a0767 100644 --- a/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json +++ b/deps/npm/node_modules/init-package-json/node_modules/promzard/package.json @@ -6,7 +6,7 @@ }, "name": "promzard", "description": "prompting wizardly", - "version": "0.2.0", + "version": "0.2.1", "repository": { "url": "git://github.com/isaacs/promzard" }, @@ -20,12 +20,13 @@ "scripts": { "test": "tap test/*.js" }, + "license": "ISC", "readme": "# promzard\n\nA prompting wizard for building files from specialized PromZard modules.\nUsed by `npm init`.\n\nA reimplementation of @SubStack's\n[prompter](https://github.com/substack/node-prompter), which does not\nuse AST traversal.\n\nFrom another point of view, it's a reimplementation of\n[@Marak](https://github.com/marak)'s\n[wizard](https://github.com/Marak/wizard) which doesn't use schemas.\n\nThe goal is a nice drop-in enhancement for `npm init`.\n\n## Usage\n\n```javascript\nvar promzard = require('promzard')\npromzard(inputFile, optionalContextAdditions, function (er, data) {\n // .. you know what you doing ..\n})\n```\n\nIn the `inputFile` you can have something like this:\n\n```javascript\nvar fs = require('fs')\nmodule.exports = {\n \"greeting\": prompt(\"Who shall you greet?\", \"world\", function (who) {\n return \"Hello, \" + who\n }),\n \"filename\": __filename,\n \"directory\": function (cb) {\n fs.readdir(__dirname, cb)\n }\n}\n```\n\nWhen run, promzard will display the prompts and resolve the async\nfunctions in order, and then either give you an error, or the resolved\ndata, ready to be dropped into a JSON file or some other place.\n\n\n### promzard(inputFile, ctx, callback)\n\nThe inputFile is just a node module. You can require() things, set\nmodule.exports, etc. Whatever that module exports is the result, and it\nis walked over to call any functions as described below.\n\nThe only caveat is that you must give PromZard the full absolute path\nto the module (you can get this via Node's `require.resolve`.) Also,\nthe `prompt` function is injected into the context object, so watch out.\n\nWhatever you put in that `ctx` will of course also be available in the\nmodule. You can get quite fancy with this, passing in existing configs\nand so on.\n\n### Class: promzard.PromZard(file, ctx)\n\nJust like the `promzard` function, but the EventEmitter that makes it\nall happen. Emits either a `data` event with the data, or a `error`\nevent if it blows up.\n\nIf `error` is emitted, then `data` never will be.\n\n### prompt(...)\n\nIn the promzard input module, you can call the `prompt` function.\nThis prompts the user to input some data. The arguments are interpreted\nbased on type:\n\n1. `string` The first string encountered is the prompt. The second is\n the default value.\n2. `function` A transformer function which receives the data and returns\n something else. More than meets the eye.\n3. `object` The `prompt` member is the prompt, the `default` member is\n the default value, and the `transform` is the transformer.\n\nWhatever the final value is, that's what will be put on the resulting\nobject.\n\n### Functions\n\nIf there are any functions on the promzard input module's exports, then\npromzard will call each of them with a callback. This way, your module\ncan do asynchronous actions if necessary to validate or ascertain\nwhatever needs verification.\n\nThe functions are called in the context of the ctx object, and are given\na single argument, which is a callback that should be called with either\nan error, or the result to assign to that spot.\n\nIn the async function, you can also call prompt() and return the result\nof the prompt in the callback.\n\nFor example, this works fine in a promzard module:\n\n```\nexports.asyncPrompt = function (cb) {\n fs.stat(someFile, function (er, st) {\n // if there's an error, no prompt, just error\n // otherwise prompt and use the actual file size as the default\n cb(er, prompt('file size', st.size))\n })\n}\n```\n\nYou can also return other async functions in the async function\ncallback. Though that's a bit silly, it could be a handy way to reuse\nfunctionality in some cases.\n\n### Sync vs Async\n\nThe `prompt()` function is not synchronous, though it appears that way.\nIt just returns a token that is swapped out when the data object is\nwalked over asynchronously later, and returns a token.\n\nFor that reason, prompt() calls whose results don't end up on the data\nobject are never shown to the user. For example, this will only prompt\nonce:\n\n```\nexports.promptThreeTimes = prompt('prompt me once', 'shame on you')\nexports.promptThreeTimes = prompt('prompt me twice', 'um....')\nexports.promptThreeTimes = prompt('you cant prompt me again')\n```\n\n### Isn't this exactly the sort of 'looks sync' that you said was bad about other libraries?\n\nYeah, sorta. I wouldn't use promzard for anything more complicated than\na wizard that spits out prompts to set up a config file or something.\nMaybe there are other use cases I haven't considered.\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/isaacs/promzard/issues" }, "homepage": "https://github.com/isaacs/promzard", - "_id": "promzard@0.2.0", + "_id": "promzard@0.2.1", "_from": "promzard@~0.2.0" } diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py index f9cec33639..d50eac0045 100644 --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py @@ -273,7 +273,14 @@ class XcodeSettings(object): return out.rstrip('\n') def _GetSdkVersionInfoItem(self, sdk, infoitem): - return self._GetStdout(['xcodebuild', '-version', '-sdk', sdk, infoitem]) + # xcodebuild requires Xcode and can't run on Command Line Tools-only + # systems from 10.7 onward. + # Since the CLT has no SDK paths anyway, returning None is the + # most sensible route and should still do the right thing. + try: + return self._GetStdout(['xcodebuild', '-version', '-sdk', sdk, infoitem]) + except: + pass def _SdkRoot(self, configname): if configname is None: @@ -397,10 +404,11 @@ class XcodeSettings(object): cflags += self._Settings().get('WARNING_CFLAGS', []) - config = self.spec['configurations'][self.configname] - framework_dirs = config.get('mac_framework_dirs', []) - for directory in framework_dirs: - cflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) + if 'SDKROOT' in self._Settings(): + config = self.spec['configurations'][self.configname] + framework_dirs = config.get('mac_framework_dirs', []) + for directory in framework_dirs: + cflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) self.configname = None return cflags @@ -647,10 +655,11 @@ class XcodeSettings(object): for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []): ldflags.append('-Wl,-rpath,' + rpath) - config = self.spec['configurations'][self.configname] - framework_dirs = config.get('mac_framework_dirs', []) - for directory in framework_dirs: - ldflags.append('-F' + directory.replace('$(SDKROOT)', self._SdkPath())) + if 'SDKROOT' in self._Settings(): + config = self.spec['configurations'][self.configname] + framework_dirs = config.get('mac_framework_dirs', []) + for directory in framework_dirs: + ldflags.append('-F' + directory.replace('$(SDKROOT)', self._SdkPath())) self.configname = None return ldflags @@ -826,7 +835,10 @@ class XcodeSettings(object): l = '-l' + m.group(1) else: l = library - return l.replace('$(SDKROOT)', self._SdkPath(config_name)) + if self._SdkPath(): + return l.replace('$(SDKROOT)', self._SdkPath(config_name)) + else: + return l def AdjustLibraries(self, libraries, config_name=None): """Transforms entries like 'Cocoa.framework' in libraries into entries like diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index 5c4098e912..b28964c5e6 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -10,7 +10,7 @@ "bindings", "gyp" ], - "version": "0.12.1", + "version": "0.12.2", "installVersion": 9, "author": { "name": "Nathan Rajlich", @@ -50,10 +50,6 @@ "url": "https://github.com/TooTallNate/node-gyp/issues" }, "homepage": "https://github.com/TooTallNate/node-gyp", - "_id": "node-gyp@0.12.1", - "dist": { - "shasum": "edc233dc9bbbd567cb167adf96c31a245c2712a4" - }, - "_from": "node-gyp@latest", - "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-0.12.1.tgz" + "_id": "node-gyp@0.12.2", + "_from": "node-gyp@latest" } diff --git a/deps/npm/node_modules/npm-registry-client/lib/adduser.js b/deps/npm/node_modules/npm-registry-client/lib/adduser.js index 4ed8e60dd7..2684063ccd 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/adduser.js +++ b/deps/npm/node_modules/npm-registry-client/lib/adduser.js @@ -129,7 +129,7 @@ function done (cb, pre) { this.log.warn("adduser", "Incorrect username or password\n" +"You can reset your account by visiting:\n" +"\n" - +" http://admin.npmjs.org/reset\n") + +" https://npmjs.org/forgot\n") } return cb(error) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/couch-login/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/couch-login/package.json index b287d02865..0df26c0e8d 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/couch-login/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/couch-login/package.json @@ -28,5 +28,9 @@ }, "homepage": "https://github.com/isaacs/couch-login", "_id": "couch-login@0.1.19", - "_from": "couch-login@~0.1.18" + "dist": { + "shasum": "5c472f64670dfb43fc381d290629b223edb64afa" + }, + "_from": "couch-login@~0.1.18", + "_resolved": "https://registry.npmjs.org/couch-login/-/couch-login-0.1.19.tgz" } diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index 221732c9ec..1f7730645c 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": "0.3.2", + "version": "0.3.3", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -39,6 +39,10 @@ "url": "https://github.com/isaacs/npm-registry-client/issues" }, "homepage": "https://github.com/isaacs/npm-registry-client", - "_id": "npm-registry-client@0.3.2", - "_from": "npm-registry-client@~0.3.1" + "_id": "npm-registry-client@0.3.3", + "dist": { + "shasum": "da08bb681fb24aa5c988ca71f8c10f27f09daf4a" + }, + "_from": "npm-registry-client@~0.3.2", + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-0.3.3.tgz" } diff --git a/deps/npm/node_modules/npmconf/config-defs.js b/deps/npm/node_modules/npmconf/config-defs.js index f85d544c74..4a91dc2e72 100644 --- a/deps/npm/node_modules/npmconf/config-defs.js +++ b/deps/npm/node_modules/npmconf/config-defs.js @@ -117,94 +117,7 @@ Object.defineProperty(exports, "defaults", {get: function () { , "bin-links" : true , browser : null - , ca: // the npm CA certificate. - [ "-----BEGIN CERTIFICATE-----\n"+ - "MIIChzCCAfACCQDauvz/KHp8ejANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC\n"+ - "VVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMQwwCgYDVQQKEwNucG0x\n"+ - "IjAgBgNVBAsTGW5wbSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxDjAMBgNVBAMTBW5w\n"+ - "bUNBMRcwFQYJKoZIhvcNAQkBFghpQGl6cy5tZTAeFw0xMTA5MDUwMTQ3MTdaFw0y\n"+ - "MTA5MDIwMTQ3MTdaMIGHMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNV\n"+ - "BAcTB09ha2xhbmQxDDAKBgNVBAoTA25wbTEiMCAGA1UECxMZbnBtIENlcnRpZmlj\n"+ - "YXRlIEF1dGhvcml0eTEOMAwGA1UEAxMFbnBtQ0ExFzAVBgkqhkiG9w0BCQEWCGlA\n"+ - "aXpzLm1lMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLI4tIqPpRW+ACw9GE\n"+ - "OgBlJZwK5f8nnKCLK629Pv5yJpQKs3DENExAyOgDcyaF0HD0zk8zTp+ZsLaNdKOz\n"+ - "Gn2U181KGprGKAXP6DU6ByOJDWmTlY6+Ad1laYT0m64fERSpHw/hjD3D+iX4aMOl\n"+ - "y0HdbT5m1ZGh6SJz3ZqxavhHLQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAC4ySDbC\n"+ - "l7W1WpLmtLGEQ/yuMLUf6Jy/vr+CRp4h+UzL+IQpCv8FfxsYE7dhf/bmWTEupBkv\n"+ - "yNL18lipt2jSvR3v6oAHAReotvdjqhxddpe5Holns6EQd1/xEZ7sB1YhQKJtvUrl\n"+ - "ZNufy1Jf1r0ldEGeA+0ISck7s+xSh9rQD2Op\n"+ - "-----END CERTIFICATE-----\n", - - // "GlobalSign Root CA" - "-----BEGIN CERTIFICATE-----\n"+ - "MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx\n"+ - "GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds\n"+ - "b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV\n"+ - "BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD\n"+ - "VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa\n"+ - "DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc\n"+ - "THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb\n"+ - "Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP\n"+ - "c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX\n"+ - "gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV\n"+ - "HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF\n"+ - "AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj\n"+ - "Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG\n"+ - "j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH\n"+ - "hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC\n"+ - "X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==\n"+ - "-----END CERTIFICATE-----\n", - - // "GlobalSign Root CA - R2" - "-----BEGIN CERTIFICATE-----\n"+ - "MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv\n"+ - "YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh\n"+ - "bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT\n"+ - "aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln\n"+ - "bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6\n"+ - "ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp\n"+ - "s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN\n"+ - "S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL\n"+ - "TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C\n"+ - "ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E\n"+ - "FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i\n"+ - "YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN\n"+ - "BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp\n"+ - "9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu\n"+ - "01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7\n"+ - "9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7\n"+ - "TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==\n"+ - "-----END CERTIFICATE-----\n", - - // GlobalSign Organization Validation CA - G2 - "-----BEGIN CERTIFICATE-----\n"+ - "MIIEYDCCA0igAwIBAgILBAAAAAABL07hRQwwDQYJKoZIhvcNAQEFBQAwVzELMAkG\n"+ - "A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv\n"+ - "b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw0xMTA0MTMxMDAw\n"+ - "MDBaFw0yMjA0MTMxMDAwMDBaMF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i\n"+ - "YWxTaWduIG52LXNhMTMwMQYDVQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBW\n"+ - "YWxpZGF0aW9uIENBIC0gRzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB\n"+ - "AQDdNR3yIFQmGtDvpW+Bdllw3Of01AMkHyQOnSKf1Ccyeit87ovjYWI4F6+0S3qf\n"+ - "ZyEcLZVUunm6tsTyDSF0F2d04rFkCJlgePtnwkv3J41vNnbPMYzl8QbX3FcOW6zu\n"+ - "zi2rqqlwLwKGyLHQCAeV6irs0Z7kNlw7pja1Q4ur944+ABv/hVlrYgGNguhKujiz\n"+ - "4MP0bRmn6gXdhGfCZsckAnNate6kGdn8AM62pI3ffr1fsjqdhDFPyGMM5NgNUqN+\n"+ - "ARvUZ6UYKOsBp4I82Y4d5UcNuotZFKMfH0vq4idGhs6dOcRmQafiFSNrVkfB7cVT\n"+ - "5NSAH2v6gEaYsgmmD5W+ZoiTAgMBAAGjggElMIIBITAOBgNVHQ8BAf8EBAMCAQYw\n"+ - "EgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUXUayjcRLdBy77fVztjq3OI91\n"+ - "nn4wRwYDVR0gBEAwPjA8BgRVHSAAMDQwMgYIKwYBBQUHAgEWJmh0dHBzOi8vd3d3\n"+ - "Lmdsb2JhbHNpZ24uY29tL3JlcG9zaXRvcnkvMDMGA1UdHwQsMCowKKAmoCSGImh0\n"+ - "dHA6Ly9jcmwuZ2xvYmFsc2lnbi5uZXQvcm9vdC5jcmwwPQYIKwYBBQUHAQEEMTAv\n"+ - "MC0GCCsGAQUFBzABhiFodHRwOi8vb2NzcC5nbG9iYWxzaWduLmNvbS9yb290cjEw\n"+ - "HwYDVR0jBBgwFoAUYHtmGkUNl8qJUC99BM00qP/8/UswDQYJKoZIhvcNAQEFBQAD\n"+ - "ggEBABvgiADHBREc/6stSEJSzSBo53xBjcEnxSxZZ6CaNduzUKcbYumlO/q2IQen\n"+ - "fPMOK25+Lk2TnLryhj5jiBDYW2FQEtuHrhm70t8ylgCoXtwtI7yw07VKoI5lkS/Z\n"+ - "9oL2dLLffCbvGSuXL+Ch7rkXIkg/pfcNYNUNUUflWP63n41edTzGQfDPgVRJEcYX\n"+ - "pOBWYdw9P91nbHZF2krqrhqkYE/Ho9aqp9nNgSvBZnWygI/1h01fwlr1kMbawb30\n"+ - "hag8IyrhFHvBN91i0ZJsumB9iOQct+R2UTjEqUdOqCsukNK1OFHrwZyKarXMsh3o\n"+ - "wFZUTKiL8IkyhtyTMr5NGvo1dbU=\n"+ - "-----END CERTIFICATE-----\n" - ] - + , ca: null , cache : cache @@ -222,7 +135,7 @@ Object.defineProperty(exports, "defaults", {get: function () { , description : true , dev : false , editor : osenv.editor() - , email: null + , email: "" , "engine-strict": false , force : false diff --git a/deps/npm/node_modules/npmconf/package.json b/deps/npm/node_modules/npmconf/package.json index 9d5814231f..182252d90a 100644 --- a/deps/npm/node_modules/npmconf/package.json +++ b/deps/npm/node_modules/npmconf/package.json @@ -1,6 +1,6 @@ { "name": "npmconf", - "version": "0.1.9", + "version": "0.1.12", "description": "The config thing npm uses", "main": "npmconf.js", "directories": { @@ -45,6 +45,6 @@ "url": "https://github.com/isaacs/npmconf/issues" }, "homepage": "https://github.com/isaacs/npmconf", - "_id": "npmconf@0.1.9", - "_from": "npmconf@~0.1.7" + "_id": "npmconf@0.1.12", + "_from": "npmconf@0.1.12" } diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json index 6dc59e6a93..73590c0a26 100644 --- a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json @@ -10,6 +10,7 @@ ,"devDepenencies": "devDependencies" ,"devdependencies": "devDependencies" ,"repostitory": "repository" + ,"repo": "repository" ,"prefereGlobal": "preferGlobal" ,"hompage": "homepage" ,"hampage": "homepage" diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json index 8c05298c51..1ea36836ac 100644 --- a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json @@ -1,6 +1,6 @@ { "name": "normalize-package-data", - "version": "0.2.7", + "version": "0.2.8", "author": { "name": "Meryn Stol", "email": "merynstol@gmail.com" @@ -44,6 +44,6 @@ "url": "https://github.com/meryn/normalize-package-data/issues" }, "homepage": "https://github.com/meryn/normalize-package-data", - "_id": "normalize-package-data@0.2.7", + "_id": "normalize-package-data@0.2.8", "_from": "normalize-package-data@~0.2.7" } diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js index 941d68bfea..3eef829fd4 100644 --- a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/test/typo.js @@ -20,6 +20,7 @@ test('typos', function(t) { 'devDepenencies should probably be devDependencies.', 'devdependencies should probably be devDependencies.', 'repostitory should probably be repository.', + 'repo should probably be repository.', 'prefereGlobal should probably be preferGlobal.', 'hompage should probably be homepage.', 'hampage should probably be homepage.', @@ -38,6 +39,7 @@ test('typos', function(t) { ,"devDepenencies": "devDependencies" ,"devdependencies": "devDependencies" ,"repostitory": "repository" + ,"repo": "repository" ,"prefereGlobal": "preferGlobal" ,"hompage": "homepage" ,"hampage": "homepage" diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json index f2379b6715..f1e40ddc13 100644 --- a/deps/npm/node_modules/read-package-json/package.json +++ b/deps/npm/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "1.1.4", + "version": "1.1.6", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -34,6 +34,10 @@ "url": "https://github.com/isaacs/read-package-json/issues" }, "homepage": "https://github.com/isaacs/read-package-json", - "_id": "read-package-json@1.1.4", - "_from": "read-package-json@latest" + "_id": "read-package-json@1.1.6", + "dist": { + "shasum": "a851dbbaca48ff78a87f890f0a9fdf43b1759d5a" + }, + "_from": "read-package-json@1.1.6", + "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.1.6.tgz" } diff --git a/deps/npm/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/read-package-json/read-json.js index d9a4610d9c..5f69c0dcf6 100644 --- a/deps/npm/node_modules/read-package-json/read-json.js +++ b/deps/npm/node_modules/read-package-json/read-json.js @@ -19,6 +19,7 @@ var normalizeData = require("normalize-package-data") readJson.extraSet = [ gypfile, serverjs, + scriptpath, authors, readme, mans, @@ -110,6 +111,7 @@ function extras (file, data, log_, strict_, cb_) { else if (typeof arguments[i] === 'function') log = arguments[i] } + if (!log) log = function () {}; cb = arguments[i] var set = readJson.extraSet var n = set.length @@ -125,6 +127,22 @@ function extras (file, data, log_, strict_, cb_) { } } +function scriptpath (file, data, cb) { + if (!data.scripts) return cb(null, data); + var k = Object.keys(data.scripts) + k.forEach(scriptpath_, data.scripts) + cb(null, data); +} +function scriptpath_(key) { + s = this[key] + // This is never allowed, and only causes problems + if (typeof s !== 'string') + return delete this[key] + var spre = /^(\.[\/\\])?node_modules[\/\\].bin[\\\/]/ + if (s.match(spre)) + this[key] = this[key].replace(spre, '') +} + function gypfile (file, data, cb) { var dir = path.dirname(file) var s = data.scripts || {} @@ -318,9 +336,10 @@ function final (file, data, log, strict, cb) { } function makePackageId (data) { - return cleanString(data.name) + "@" + cleanString(data.version) + var name = cleanString(data.name) + var ver = cleanString(data.version) + return name + "@" + ver } - function cleanString(str) { return (!str || typeof(str) !== "string") ? "" : str.trim() } diff --git a/deps/npm/node_modules/read-package-json/test/fixtures/not-json.css b/deps/npm/node_modules/read-package-json/test/fixtures/not-json.css index 37163912d4..41c91e96af 100644 --- a/deps/npm/node_modules/read-package-json/test/fixtures/not-json.css +++ b/deps/npm/node_modules/read-package-json/test/fixtures/not-json.css @@ -14,7 +14,7 @@ body { }, "main": "read-json.js", "scripts": { - "test": "tap test/*.js" + "test": "./node_modules/.bin/tap test/*.js" }, "dependencies": { "glob": "~3.1.9", diff --git a/deps/npm/node_modules/read-package-json/test/non-json.js b/deps/npm/node_modules/read-package-json/test/non-json.js index 09ee687d5d..e8d989b6f6 100644 --- a/deps/npm/node_modules/read-package-json/test/non-json.js +++ b/deps/npm/node_modules/read-package-json/test/non-json.js @@ -25,7 +25,8 @@ var expect = npmlog: '0', 'graceful-fs': '~1.1.8' }, devDependencies: { tap: '~0.2.5' }, - optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' }, + homepage: "https://github.com/isaacs/read-package-json", + optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' }, _id: 'read-package-json@0.1.1', readme: 'ERROR: No README data found!' } diff --git a/deps/npm/node_modules/rimraf/package.json b/deps/npm/node_modules/rimraf/package.json index fedc9c3c20..d26d949f9c 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.2.5", + "version": "2.2.6", "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", "author": { @@ -51,6 +51,6 @@ "url": "https://github.com/isaacs/rimraf/issues" }, "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.2.5", - "_from": "rimraf@latest" + "_id": "rimraf@2.2.6", + "_from": "rimraf@~2.2.5" } diff --git a/deps/npm/node_modules/rimraf/rimraf.js b/deps/npm/node_modules/rimraf/rimraf.js index a9258072ee..ce62051fc5 100644 --- a/deps/npm/node_modules/rimraf/rimraf.js +++ b/deps/npm/node_modules/rimraf/rimraf.js @@ -110,7 +110,7 @@ function rmdir (p, originalEr, cb) { // if we guessed wrong, and it's not a directory, then // raise the original error. fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST")) + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) rmkids(p, cb) else if (er && er.code === "ENOTDIR") cb(originalEr) @@ -165,7 +165,7 @@ function rmdirSync (p, originalEr) { return if (er.code === "ENOTDIR") throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST") + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") rmkidsSync(p) } } diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/sha/node_modules/readable-stream/.npmignore new file mode 100644 index 0000000000..38344f87a6 --- /dev/null +++ b/deps/npm/node_modules/sha/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js
\ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/examples/CAPSLOCKTYPER.JS b/deps/npm/node_modules/sha/node_modules/readable-stream/examples/CAPSLOCKTYPER.JS deleted file mode 100644 index 205a42564b..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/examples/CAPSLOCKTYPER.JS +++ /dev/null @@ -1,32 +0,0 @@ -var Transform = require('../transform'); -var inherits = require('util').inherits; - -// subclass -function MyStream () { - Transform.call(this, { - lowWaterMark: 0, - encoding: 'utf8' - }); -} -inherits(MyStream, Transform); - -MyStream.prototype._transform = function (chunk, outputFn, callback) { - outputFn(new Buffer(String(chunk).toUpperCase())); - callback(); -}; - -// use it! -var s = new MyStream(); -process.stdin.resume(); -process.stdin.pipe(s).pipe(process.stdout); -if (process.stdin.setRawMode) - process.stdin.setRawMode(true); -process.stdin.on('data', function (c) { - c = c.toString(); - if (c === '\u0003' || c === '\u0004') { - process.stdin.pause(); - s.end(); - } - if (c === '\r') - process.stdout.write('\n'); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/examples/typer-fsr.js b/deps/npm/node_modules/sha/node_modules/readable-stream/examples/typer-fsr.js deleted file mode 100644 index 7e715844bd..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/examples/typer-fsr.js +++ /dev/null @@ -1,15 +0,0 @@ -var fs = require('fs'); -var FSReadable = require('../fs.js'); -var rst = new FSReadable(__filename); - -rst.on('end', function() { - process.stdin.pause(); -}); - -process.stdin.setRawMode(true); -process.stdin.on('data', function() { - var c = rst.read(3); - if (!c) return; - process.stdout.write(c); -}); -process.stdin.resume(); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/examples/typer.js b/deps/npm/node_modules/sha/node_modules/readable-stream/examples/typer.js deleted file mode 100644 index c16eb6fb00..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/examples/typer.js +++ /dev/null @@ -1,17 +0,0 @@ -var fs = require('fs'); -var fst = fs.createReadStream(__filename); -var Readable = require('../readable.js'); -var rst = new Readable(); -rst.wrap(fst); - -rst.on('end', function() { - process.stdin.pause(); -}); - -process.stdin.setRawMode(true); -process.stdin.on('data', function() { - var c = rst.read(3); - if (!c) return setTimeout(process.exit, 500) - process.stdout.write(c); -}); -process.stdin.resume(); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/fs.js b/deps/npm/node_modules/sha/node_modules/readable-stream/fs.js deleted file mode 100644 index a663af86ef..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/fs.js +++ /dev/null @@ -1,1705 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// Maintainers, keep in mind that octal literals are not allowed -// in strict mode. Use the decimal value and add a comment with -// the octal value. Example: -// -// var mode = 438; /* mode=0666 */ - -var util = require('util'); -var pathModule = require('path'); - -var binding = process.binding('fs'); -var constants = process.binding('constants'); -var fs = exports; -var Stream = require('stream').Stream; -var EventEmitter = require('events').EventEmitter; - -var Readable = require('./lib/_stream_readable.js'); -var Writable = require('./lib/_stream_writable.js'); - -var kMinPoolSpace = 128; -var kPoolSize = 40 * 1024; - -var O_APPEND = constants.O_APPEND || 0; -var O_CREAT = constants.O_CREAT || 0; -var O_DIRECTORY = constants.O_DIRECTORY || 0; -var O_EXCL = constants.O_EXCL || 0; -var O_NOCTTY = constants.O_NOCTTY || 0; -var O_NOFOLLOW = constants.O_NOFOLLOW || 0; -var O_RDONLY = constants.O_RDONLY || 0; -var O_RDWR = constants.O_RDWR || 0; -var O_SYMLINK = constants.O_SYMLINK || 0; -var O_SYNC = constants.O_SYNC || 0; -var O_TRUNC = constants.O_TRUNC || 0; -var O_WRONLY = constants.O_WRONLY || 0; - -var isWindows = process.platform === 'win32'; - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - if (DEBUG) { - var backtrace = new Error; - return function(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - throw err; - } - }; - } - - return function(err) { - if (err) { - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - } - }; -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -// Ensure that callbacks run in the global context. Only use this function -// for callbacks that are passed to the binding layer, callbacks that are -// invoked from JS already run in the proper scope. -function makeCallback(cb) { - if (typeof cb !== 'function') { - return rethrow(); - } - - return function() { - return cb.apply(null, arguments); - }; -} - -function assertEncoding(encoding) { - if (encoding && !Buffer.isEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -function nullCheck(path, callback) { - if (('' + path).indexOf('\u0000') !== -1) { - var er = new Error('Path must be a string without null bytes.'); - if (!callback) - throw er; - process.nextTick(function() { - callback(er); - }); - return false; - } - return true; -} - -fs.Stats = binding.Stats; - -fs.Stats.prototype._checkModeProperty = function(property) { - return ((this.mode & constants.S_IFMT) === property); -}; - -fs.Stats.prototype.isDirectory = function() { - return this._checkModeProperty(constants.S_IFDIR); -}; - -fs.Stats.prototype.isFile = function() { - return this._checkModeProperty(constants.S_IFREG); -}; - -fs.Stats.prototype.isBlockDevice = function() { - return this._checkModeProperty(constants.S_IFBLK); -}; - -fs.Stats.prototype.isCharacterDevice = function() { - return this._checkModeProperty(constants.S_IFCHR); -}; - -fs.Stats.prototype.isSymbolicLink = function() { - return this._checkModeProperty(constants.S_IFLNK); -}; - -fs.Stats.prototype.isFIFO = function() { - return this._checkModeProperty(constants.S_IFIFO); -}; - -fs.Stats.prototype.isSocket = function() { - return this._checkModeProperty(constants.S_IFSOCK); -}; - -fs.exists = function(path, callback) { - if (!nullCheck(path, cb)) return; - binding.stat(pathModule._makeLong(path), cb); - function cb(err, stats) { - if (callback) callback(err ? false : true); - } -}; - -fs.existsSync = function(path) { - try { - nullCheck(path); - binding.stat(pathModule._makeLong(path)); - return true; - } catch (e) { - return false; - } -}; - -fs.readFile = function(path, encoding_) { - var encoding = typeof(encoding_) === 'string' ? encoding_ : null; - var callback = maybeCallback(arguments[arguments.length - 1]); - - assertEncoding(encoding); - - // first, stat the file, so we know the size. - var size; - var buffer; // single buffer with file data - var buffers; // list for when size is unknown - var pos = 0; - var fd; - - fs.open(path, constants.O_RDONLY, 438 /*=0666*/, function(er, fd_) { - if (er) return callback(er); - fd = fd_; - - fs.fstat(fd, function(er, st) { - if (er) return callback(er); - size = st.size; - if (size === 0) { - // the kernel lies about many files. - // Go ahead and try to read some bytes. - buffers = []; - return read(); - } - - buffer = new Buffer(size); - read(); - }); - }); - - function read() { - if (size === 0) { - buffer = new Buffer(8192); - fs.read(fd, buffer, 0, 8192, -1, afterRead); - } else { - fs.read(fd, buffer, pos, size - pos, -1, afterRead); - } - } - - function afterRead(er, bytesRead) { - if (er) { - return fs.close(fd, function(er2) { - return callback(er); - }); - } - - if (bytesRead === 0) { - return close(); - } - - pos += bytesRead; - if (size !== 0) { - if (pos === size) close(); - else read(); - } else { - // unknown size, just read until we don't get bytes. - buffers.push(buffer.slice(0, bytesRead)); - read(); - } - } - - function close() { - fs.close(fd, function(er) { - if (size === 0) { - // collected the data into the buffers list. - buffer = Buffer.concat(buffers, pos); - } else if (pos < size) { - buffer = buffer.slice(0, pos); - } - - if (encoding) buffer = buffer.toString(encoding); - return callback(er, buffer); - }); - } -}; - -fs.readFileSync = function(path, encoding) { - assertEncoding(encoding); - - var fd = fs.openSync(path, constants.O_RDONLY, 438 /*=0666*/); - - var size; - var threw = true; - try { - size = fs.fstatSync(fd).size; - threw = false; - } finally { - if (threw) fs.closeSync(fd); - } - - var pos = 0; - var buffer; // single buffer with file data - var buffers; // list for when size is unknown - - if (size === 0) { - buffers = []; - } else { - buffer = new Buffer(size); - } - - var done = false; - while (!done) { - var threw = true; - try { - if (size !== 0) { - var bytesRead = fs.readSync(fd, buffer, pos, size - pos); - } else { - // the kernel lies about many files. - // Go ahead and try to read some bytes. - buffer = new Buffer(8192); - var bytesRead = fs.readSync(fd, buffer, 0, 8192); - if (bytesRead) { - buffers.push(buffer.slice(0, bytesRead)); - } - } - threw = false; - } finally { - if (threw) fs.closeSync(fd); - } - - pos += bytesRead; - done = (bytesRead === 0) || (size !== 0 && pos >= size); - } - - fs.closeSync(fd); - - if (size === 0) { - // data was collected into the buffers list. - buffer = Buffer.concat(buffers, pos); - } else if (pos < size) { - buffer = buffer.slice(0, pos); - } - - if (encoding) buffer = buffer.toString(encoding); - return buffer; -}; - - -// Used by binding.open and friends -function stringToFlags(flag) { - // Only mess with strings - if (typeof flag !== 'string') { - return flag; - } - - // O_EXCL is mandated by POSIX, Windows supports it too. - // Let's add a check anyway, just in case. - if (!O_EXCL && ~flag.indexOf('x')) { - throw errnoException('ENOSYS', 'fs.open(O_EXCL)'); - } - - switch (flag) { - case 'r' : return O_RDONLY; - case 'rs' : return O_RDONLY | O_SYNC; - case 'r+' : return O_RDWR; - case 'rs+' : return O_RDWR | O_SYNC; - - case 'w' : return O_TRUNC | O_CREAT | O_WRONLY; - case 'wx' : // fall through - case 'xw' : return O_TRUNC | O_CREAT | O_WRONLY | O_EXCL; - - case 'w+' : return O_TRUNC | O_CREAT | O_RDWR; - case 'wx+': // fall through - case 'xw+': return O_TRUNC | O_CREAT | O_RDWR | O_EXCL; - - case 'a' : return O_APPEND | O_CREAT | O_WRONLY; - case 'ax' : // fall through - case 'xa' : return O_APPEND | O_CREAT | O_WRONLY | O_EXCL; - - case 'a+' : return O_APPEND | O_CREAT | O_RDWR; - case 'ax+': // fall through - case 'xa+': return O_APPEND | O_CREAT | O_RDWR | O_EXCL; - } - - throw new Error('Unknown file open flag: ' + flag); -} - -// exported but hidden, only used by test/simple/test-fs-open-flags.js -Object.defineProperty(exports, '_stringToFlags', { - enumerable: false, - value: stringToFlags -}); - - -// Yes, the follow could be easily DRYed up but I provide the explicit -// list to make the arguments clear. - -fs.close = function(fd, callback) { - binding.close(fd, makeCallback(callback)); -}; - -fs.closeSync = function(fd) { - return binding.close(fd); -}; - -function modeNum(m, def) { - switch (typeof m) { - case 'number': return m; - case 'string': return parseInt(m, 8); - default: - if (def) { - return modeNum(def); - } else { - return undefined; - } - } -} - -fs.open = function(path, flags, mode, callback) { - callback = makeCallback(arguments[arguments.length - 1]); - mode = modeNum(mode, 438 /*=0666*/); - - if (!nullCheck(path, callback)) return; - binding.open(pathModule._makeLong(path), - stringToFlags(flags), - mode, - callback); -}; - -fs.openSync = function(path, flags, mode) { - mode = modeNum(mode, 438 /*=0666*/); - nullCheck(path); - return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); -}; - -fs.read = function(fd, buffer, offset, length, position, callback) { - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, length, position, encoding, callback) - var cb = arguments[4], - encoding = arguments[3]; - - assertEncoding(encoding); - - position = arguments[2]; - length = arguments[1]; - buffer = new Buffer(length); - offset = 0; - - callback = function(err, bytesRead) { - if (!cb) return; - - var str = (bytesRead > 0) ? buffer.toString(encoding, 0, bytesRead) : ''; - - (cb)(err, str, bytesRead); - }; - } - - function wrapper(err, bytesRead) { - // Retain a reference to buffer so that it can't be GC'ed too soon. - callback && callback(err, bytesRead || 0, buffer); - } - - binding.read(fd, buffer, offset, length, position, wrapper); -}; - -fs.readSync = function(fd, buffer, offset, length, position) { - var legacy = false; - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, length, position, encoding, callback) - legacy = true; - var encoding = arguments[3]; - - assertEncoding(encoding); - - position = arguments[2]; - length = arguments[1]; - buffer = new Buffer(length); - - offset = 0; - } - - var r = binding.read(fd, buffer, offset, length, position); - if (!legacy) { - return r; - } - - var str = (r > 0) ? buffer.toString(encoding, 0, r) : ''; - return [str, r]; -}; - -fs.write = function(fd, buffer, offset, length, position, callback) { - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, data, position, encoding, callback) - callback = arguments[4]; - position = arguments[2]; - assertEncoding(arguments[3]); - - buffer = new Buffer('' + arguments[1], arguments[3]); - offset = 0; - length = buffer.length; - } - - if (!length) { - if (typeof callback == 'function') { - process.nextTick(function() { - callback(undefined, 0); - }); - } - return; - } - - callback = maybeCallback(callback); - - function wrapper(err, written) { - // Retain a reference to buffer so that it can't be GC'ed too soon. - callback(err, written || 0, buffer); - } - - binding.write(fd, buffer, offset, length, position, wrapper); -}; - -fs.writeSync = function(fd, buffer, offset, length, position) { - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, data, position, encoding) - position = arguments[2]; - assertEncoding(arguments[3]); - - buffer = new Buffer('' + arguments[1], arguments[3]); - offset = 0; - length = buffer.length; - } - if (!length) return 0; - - return binding.write(fd, buffer, offset, length, position); -}; - -fs.rename = function(oldPath, newPath, callback) { - callback = makeCallback(callback); - if (!nullCheck(oldPath, callback)) return; - if (!nullCheck(newPath, callback)) return; - binding.rename(pathModule._makeLong(oldPath), - pathModule._makeLong(newPath), - callback); -}; - -fs.renameSync = function(oldPath, newPath) { - nullCheck(oldPath); - nullCheck(newPath); - return binding.rename(pathModule._makeLong(oldPath), - pathModule._makeLong(newPath)); -}; - -fs.truncate = function(path, len, callback) { - if (typeof path === 'number') { - // legacy - return fs.ftruncate(path, len, callback); - } - if (typeof len === 'function') { - callback = len; - len = 0; - } else if (typeof len === 'undefined') { - len = 0; - } - callback = maybeCallback(callback); - fs.open(path, 'w', function(er, fd) { - if (er) return callback(er); - binding.ftruncate(fd, len, function(er) { - fs.close(fd, function(er2) { - callback(er || er2); - }); - }); - }); -}; - -fs.truncateSync = function(path, len) { - if (typeof path === 'number') { - // legacy - return fs.ftruncateSync(path, len); - } - if (typeof len === 'undefined') { - len = 0; - } - // allow error to be thrown, but still close fd. - var fd = fs.openSync(path, 'w'); - try { - var ret = fs.ftruncateSync(fd, len); - } finally { - fs.closeSync(fd); - } - return ret; -}; - -fs.ftruncate = function(fd, len, callback) { - if (typeof len === 'function') { - callback = len; - len = 0; - } else if (typeof len === 'undefined') { - len = 0; - } - binding.ftruncate(fd, len, makeCallback(callback)); -}; - -fs.ftruncateSync = function(fd, len) { - if (typeof len === 'undefined') { - len = 0; - } - return binding.ftruncate(fd, len); -}; - -fs.rmdir = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.rmdir(pathModule._makeLong(path), callback); -}; - -fs.rmdirSync = function(path) { - nullCheck(path); - return binding.rmdir(pathModule._makeLong(path)); -}; - -fs.fdatasync = function(fd, callback) { - binding.fdatasync(fd, makeCallback(callback)); -}; - -fs.fdatasyncSync = function(fd) { - return binding.fdatasync(fd); -}; - -fs.fsync = function(fd, callback) { - binding.fsync(fd, makeCallback(callback)); -}; - -fs.fsyncSync = function(fd) { - return binding.fsync(fd); -}; - -fs.mkdir = function(path, mode, callback) { - if (typeof mode === 'function') callback = mode; - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.mkdir(pathModule._makeLong(path), - modeNum(mode, 511 /*=0777*/), - callback); -}; - -fs.mkdirSync = function(path, mode) { - nullCheck(path); - return binding.mkdir(pathModule._makeLong(path), - modeNum(mode, 511 /*=0777*/)); -}; - -fs.sendfile = function(outFd, inFd, inOffset, length, callback) { - binding.sendfile(outFd, inFd, inOffset, length, makeCallback(callback)); -}; - -fs.sendfileSync = function(outFd, inFd, inOffset, length) { - return binding.sendfile(outFd, inFd, inOffset, length); -}; - -fs.readdir = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.readdir(pathModule._makeLong(path), callback); -}; - -fs.readdirSync = function(path) { - nullCheck(path); - return binding.readdir(pathModule._makeLong(path)); -}; - -fs.fstat = function(fd, callback) { - binding.fstat(fd, makeCallback(callback)); -}; - -fs.lstat = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.lstat(pathModule._makeLong(path), callback); -}; - -fs.stat = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.stat(pathModule._makeLong(path), callback); -}; - -fs.fstatSync = function(fd) { - return binding.fstat(fd); -}; - -fs.lstatSync = function(path) { - nullCheck(path); - return binding.lstat(pathModule._makeLong(path)); -}; - -fs.statSync = function(path) { - nullCheck(path); - return binding.stat(pathModule._makeLong(path)); -}; - -fs.readlink = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.readlink(pathModule._makeLong(path), callback); -}; - -fs.readlinkSync = function(path) { - nullCheck(path); - return binding.readlink(pathModule._makeLong(path)); -}; - -function preprocessSymlinkDestination(path, type) { - if (!isWindows) { - // No preprocessing is needed on Unix. - return path; - } else if (type === 'junction') { - // Junctions paths need to be absolute and \\?\-prefixed. - return pathModule._makeLong(path); - } else { - // Windows symlinks don't tolerate forward slashes. - return ('' + path).replace(/\//g, '\\'); - } -} - -fs.symlink = function(destination, path, type_, callback) { - var type = (typeof type_ === 'string' ? type_ : null); - var callback = makeCallback(arguments[arguments.length - 1]); - - if (!nullCheck(destination, callback)) return; - if (!nullCheck(path, callback)) return; - - binding.symlink(preprocessSymlinkDestination(destination, type), - pathModule._makeLong(path), - type, - callback); -}; - -fs.symlinkSync = function(destination, path, type) { - type = (typeof type === 'string' ? type : null); - - nullCheck(destination); - nullCheck(path); - - return binding.symlink(preprocessSymlinkDestination(destination, type), - pathModule._makeLong(path), - type); -}; - -fs.link = function(srcpath, dstpath, callback) { - callback = makeCallback(callback); - if (!nullCheck(srcpath, callback)) return; - if (!nullCheck(dstpath, callback)) return; - - binding.link(pathModule._makeLong(srcpath), - pathModule._makeLong(dstpath), - callback); -}; - -fs.linkSync = function(srcpath, dstpath) { - nullCheck(srcpath); - nullCheck(dstpath); - return binding.link(pathModule._makeLong(srcpath), - pathModule._makeLong(dstpath)); -}; - -fs.unlink = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.unlink(pathModule._makeLong(path), callback); -}; - -fs.unlinkSync = function(path) { - nullCheck(path); - return binding.unlink(pathModule._makeLong(path)); -}; - -fs.fchmod = function(fd, mode, callback) { - binding.fchmod(fd, modeNum(mode), makeCallback(callback)); -}; - -fs.fchmodSync = function(fd, mode) { - return binding.fchmod(fd, modeNum(mode)); -}; - -if (constants.hasOwnProperty('O_SYMLINK')) { - fs.lchmod = function(path, mode, callback) { - callback = maybeCallback(callback); - fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, function(err, fd) { - if (err) { - 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); - }); - }); - }); - }; - - fs.lchmodSync = function(path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK); - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2; - try { - var ret = fs.fchmodSync(fd, mode); - } catch (er) { - err = er; - } - try { - fs.closeSync(fd); - } catch (er) { - err2 = er; - } - if (err || err2) throw (err || err2); - return ret; - }; -} - - -fs.chmod = function(path, mode, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.chmod(pathModule._makeLong(path), - modeNum(mode), - callback); -}; - -fs.chmodSync = function(path, mode) { - nullCheck(path); - return binding.chmod(pathModule._makeLong(path), modeNum(mode)); -}; - -if (constants.hasOwnProperty('O_SYMLINK')) { - fs.lchown = function(path, uid, gid, callback) { - callback = maybeCallback(callback); - fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, function(err, fd) { - if (err) { - callback(err); - return; - } - fs.fchown(fd, uid, gid, callback); - }); - }; - - fs.lchownSync = function(path, uid, gid) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK); - return fs.fchownSync(fd, uid, gid); - }; -} - -fs.fchown = function(fd, uid, gid, callback) { - binding.fchown(fd, uid, gid, makeCallback(callback)); -}; - -fs.fchownSync = function(fd, uid, gid) { - return binding.fchown(fd, uid, gid); -}; - -fs.chown = function(path, uid, gid, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.chown(pathModule._makeLong(path), uid, gid, callback); -}; - -fs.chownSync = function(path, uid, gid) { - nullCheck(path); - return binding.chown(pathModule._makeLong(path), uid, gid); -}; - -// converts Date or number to a fractional UNIX timestamp -function toUnixTimestamp(time) { - if (typeof time == 'number') { - return time; - } - if (time instanceof Date) { - // convert to 123.456 UNIX timestamp - return time.getTime() / 1000; - } - throw new Error('Cannot parse time: ' + time); -} - -// exported for unit tests, not for public consumption -fs._toUnixTimestamp = toUnixTimestamp; - -fs.utimes = function(path, atime, mtime, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.utimes(pathModule._makeLong(path), - toUnixTimestamp(atime), - toUnixTimestamp(mtime), - callback); -}; - -fs.utimesSync = function(path, atime, mtime) { - nullCheck(path); - atime = toUnixTimestamp(atime); - mtime = toUnixTimestamp(mtime); - binding.utimes(pathModule._makeLong(path), atime, mtime); -}; - -fs.futimes = function(fd, atime, mtime, callback) { - atime = toUnixTimestamp(atime); - mtime = toUnixTimestamp(mtime); - binding.futimes(fd, atime, mtime, makeCallback(callback)); -}; - -fs.futimesSync = function(fd, atime, mtime) { - atime = toUnixTimestamp(atime); - mtime = toUnixTimestamp(mtime); - binding.futimes(fd, atime, mtime); -}; - -function writeAll(fd, buffer, offset, length, position, callback) { - callback = maybeCallback(arguments[arguments.length - 1]); - - // write(fd, buffer, offset, length, position, callback) - fs.write(fd, buffer, offset, length, position, function(writeErr, written) { - if (writeErr) { - fs.close(fd, function() { - if (callback) callback(writeErr); - }); - } else { - if (written === length) { - fs.close(fd, callback); - } else { - offset += written; - length -= written; - position += written; - writeAll(fd, buffer, offset, length, position, callback); - } - } - }); -} - -fs.writeFile = function(path, data, encoding_, callback) { - var encoding = (typeof(encoding_) == 'string' ? encoding_ : 'utf8'); - assertEncoding(encoding); - - callback = maybeCallback(arguments[arguments.length - 1]); - fs.open(path, 'w', 438 /*=0666*/, function(openErr, fd) { - if (openErr) { - if (callback) callback(openErr); - } else { - var buffer = Buffer.isBuffer(data) ? data : new Buffer('' + data, - encoding); - writeAll(fd, buffer, 0, buffer.length, 0, callback); - } - }); -}; - -fs.writeFileSync = function(path, data, encoding) { - assertEncoding(encoding); - - var fd = fs.openSync(path, 'w'); - if (!Buffer.isBuffer(data)) { - data = new Buffer('' + data, encoding || 'utf8'); - } - var written = 0; - var length = data.length; - try { - while (written < length) { - written += fs.writeSync(fd, data, written, length - written, written); - } - } finally { - fs.closeSync(fd); - } -}; - -fs.appendFile = function(path, data, encoding_, callback) { - var encoding = (typeof(encoding_) == 'string' ? encoding_ : 'utf8'); - assertEncoding(encoding); - - callback = maybeCallback(arguments[arguments.length - 1]); - - fs.open(path, 'a', 438 /*=0666*/, function(err, fd) { - if (err) return callback(err); - var buffer = Buffer.isBuffer(data) ? data : new Buffer('' + data, encoding); - writeAll(fd, buffer, 0, buffer.length, null, callback); - }); -}; - -fs.appendFileSync = function(path, data, encoding) { - assertEncoding(encoding); - - var fd = fs.openSync(path, 'a'); - if (!Buffer.isBuffer(data)) { - data = new Buffer('' + data, encoding || 'utf8'); - } - var written = 0; - var position = null; - var length = data.length; - - try { - while (written < length) { - written += fs.writeSync(fd, data, written, length - written, position); - position += written; // XXX not safe with multiple concurrent writers? - } - } finally { - fs.closeSync(fd); - } -}; - -function errnoException(errorno, syscall) { - // TODO make this more compatible with ErrnoException from src/node.cc - // Once all of Node is using this function the ErrnoException from - // src/node.cc should be removed. - var e = new Error(syscall + ' ' + errorno); - e.errno = e.code = errorno; - e.syscall = syscall; - return e; -} - - -function FSWatcher() { - EventEmitter.call(this); - - var self = this; - var FSEvent = process.binding('fs_event_wrap').FSEvent; - this._handle = new FSEvent(); - this._handle.owner = this; - - this._handle.onchange = function(status, event, filename) { - if (status) { - self._handle.close(); - self.emit('error', errnoException(errno, 'watch')); - } else { - self.emit('change', event, filename); - } - }; -} -util.inherits(FSWatcher, EventEmitter); - -FSWatcher.prototype.start = function(filename, persistent) { - nullCheck(filename); - var r = this._handle.start(pathModule._makeLong(filename), persistent); - - if (r) { - this._handle.close(); - throw errnoException(errno, 'watch'); - } -}; - -FSWatcher.prototype.close = function() { - this._handle.close(); -}; - -fs.watch = function(filename) { - nullCheck(filename); - var watcher; - var options; - var listener; - - if ('object' == typeof arguments[1]) { - options = arguments[1]; - listener = arguments[2]; - } else { - options = {}; - listener = arguments[1]; - } - - if (options.persistent === undefined) options.persistent = true; - - watcher = new FSWatcher(); - watcher.start(filename, options.persistent); - - if (listener) { - watcher.addListener('change', listener); - } - - return watcher; -}; - - -// Stat Change Watchers - -function StatWatcher() { - EventEmitter.call(this); - - var self = this; - this._handle = new binding.StatWatcher(); - - // uv_fs_poll is a little more powerful than ev_stat but we curb it for - // the sake of backwards compatibility - var oldStatus = -1; - - this._handle.onchange = function(current, previous, newStatus) { - if (oldStatus === -1 && - newStatus === -1 && - current.nlink === previous.nlink) return; - - oldStatus = newStatus; - self.emit('change', current, previous); - }; - - this._handle.onstop = function() { - self.emit('stop'); - }; -} -util.inherits(StatWatcher, EventEmitter); - - -StatWatcher.prototype.start = function(filename, persistent, interval) { - nullCheck(filename); - this._handle.start(pathModule._makeLong(filename), persistent, interval); -}; - - -StatWatcher.prototype.stop = function() { - this._handle.stop(); -}; - - -var statWatchers = {}; -function inStatWatchers(filename) { - return Object.prototype.hasOwnProperty.call(statWatchers, filename) && - statWatchers[filename]; -} - - -fs.watchFile = function(filename) { - nullCheck(filename); - var stat; - var listener; - - var options = { - // Poll interval in milliseconds. 5007 is what libev used to use. It's - // a little on the slow side but let's stick with it for now to keep - // behavioral changes to a minimum. - interval: 5007, - persistent: true - }; - - if ('object' == typeof arguments[1]) { - options = util._extend(options, arguments[1]); - listener = arguments[2]; - } else { - listener = arguments[1]; - } - - if (!listener) { - throw new Error('watchFile requires a listener function'); - } - - if (inStatWatchers(filename)) { - stat = statWatchers[filename]; - } else { - stat = statWatchers[filename] = new StatWatcher(); - stat.start(filename, options.persistent, options.interval); - } - stat.addListener('change', listener); - return stat; -}; - -fs.unwatchFile = function(filename, listener) { - nullCheck(filename); - if (!inStatWatchers(filename)) return; - - var stat = statWatchers[filename]; - - if (typeof listener === 'function') { - stat.removeListener('change', listener); - } else { - stat.removeAllListeners('change'); - } - - if (stat.listeners('change').length === 0) { - stat.stop(); - statWatchers[filename] = undefined; - } -}; - -// Realpath -// Not using realpath(2) because it's bad. -// See: http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -fs.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -fs.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; - - - -var pool; - -function allocNewPool() { - pool = new Buffer(kPoolSize); - pool.used = 0; -} - - - -fs.createReadStream = function(path, options) { - return new ReadStream(path, options); -}; - -util.inherits(ReadStream, Readable); -fs.ReadStream = ReadStream; - -function ReadStream(path, options) { - if (!(this instanceof ReadStream)) - return new ReadStream(path, options); - - // a little bit bigger buffer and water marks by default - options = util._extend({ - bufferSize: 64 * 1024, - lowWaterMark: 16 * 1024, - highWaterMark: 64 * 1024 - }, options || {}); - - Readable.call(this, options); - - this.path = path; - this.fd = options.hasOwnProperty('fd') ? options.fd : null; - this.flags = options.hasOwnProperty('flags') ? options.flags : 'r'; - this.mode = options.hasOwnProperty('mode') ? options.mode : 438; /*=0666*/ - - this.start = options.hasOwnProperty('start') ? options.start : undefined; - this.end = options.hasOwnProperty('start') ? options.end : undefined; - this.pos = undefined; - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (typeof this.fd !== 'number') - this.open(); - - this.on('end', function() { - this.destroy(); - }); -} - -fs.FileReadStream = fs.ReadStream; // support the legacy name - -ReadStream.prototype.open = function() { - var self = this; - fs.open(this.path, this.flags, this.mode, function(er, fd) { - if (er) { - self.destroy(); - self.emit('error', er); - return; - } - - self.fd = fd; - self.emit('open', fd); - // start the flow of data. - self.read(); - }); -}; - -ReadStream.prototype._read = function(n, cb) { - if (typeof this.fd !== 'number') - return this.once('open', function() { - this._read(n, cb); - }); - - if (this.destroyed) - return; - - if (!pool || pool.length - pool.used < kMinPoolSpace) { - // discard the old pool. Can't add to the free list because - // users might have refernces to slices on it. - pool = null; - allocNewPool(); - } - - // Grab another reference to the pool in the case that while we're - // in the thread pool another read() finishes up the pool, and - // allocates a new one. - var thisPool = pool; - var toRead = Math.min(pool.length - pool.used, n); - var start = pool.used; - - if (this.pos !== undefined) - toRead = Math.min(this.end - this.pos + 1, toRead); - - // already read everything we were supposed to read! - // treat as EOF. - if (toRead <= 0) - return cb(); - - // the actual read. - var self = this; - fs.read(this.fd, pool, pool.used, toRead, this.pos, onread); - - // move the pool positions, and internal position for reading. - if (this.pos !== undefined) - this.pos += toRead; - pool.used += toRead; - - function onread(er, bytesRead) { - if (er) { - self.destroy(); - return cb(er); - } - - var b = null; - if (bytesRead > 0) - b = thisPool.slice(start, start + bytesRead); - - cb(null, b); - } -}; - - -ReadStream.prototype.destroy = function() { - if (this.destroyed) - return; - this.destroyed = true; - if ('number' === typeof this.fd) - this.close(); -}; - - -ReadStream.prototype.close = function(cb) { - if (cb) - this.once('close', cb); - if (this.closed || 'number' !== typeof this.fd) { - if ('number' !== typeof this.fd) - this.once('open', close); - return process.nextTick(this.emit.bind(this, 'close')); - } - this.closed = true; - var self = this; - close(); - - function close() { - fs.close(self.fd, function(er) { - if (er) - self.emit('error', er); - else - self.emit('close'); - }); - } -}; - - - - -fs.createWriteStream = function(path, options) { - return new WriteStream(path, options); -}; - -util.inherits(WriteStream, Writable); -fs.WriteStream = WriteStream; -function WriteStream(path, options) { - if (!(this instanceof WriteStream)) - return new WriteStream(path, options); - - // a little bit bigger buffer and water marks by default - options = util._extend({ - bufferSize: 64 * 1024, - lowWaterMark: 16 * 1024, - highWaterMark: 64 * 1024 - }, options || {}); - - Writable.call(this, options); - - this.path = path; - this.fd = null; - - this.fd = options.hasOwnProperty('fd') ? options.fd : null; - this.flags = options.hasOwnProperty('flags') ? options.flags : 'w'; - this.mode = options.hasOwnProperty('mode') ? options.mode : 438; /*=0666*/ - - this.start = options.hasOwnProperty('start') ? options.start : undefined; - this.pos = undefined; - this.bytesWritten = 0; - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - if ('number' !== typeof this.fd) - this.open(); - - // dispose on finish. - this.once('finish', this.close); -} - -fs.FileWriteStream = fs.WriteStream; // support the legacy name - - -WriteStream.prototype.open = function() { - fs.open(this.path, this.flags, this.mode, function(er, fd) { - if (er) { - this.destroy(); - this.emit('error', er); - return; - } - - this.fd = fd; - this.emit('open', fd); - }.bind(this)); -}; - - -WriteStream.prototype._write = function(data, cb) { - if (!Buffer.isBuffer(data)) - return this.emit('error', new Error('Invalid data')); - - if (typeof this.fd !== 'number') - return this.once('open', this._write.bind(this, data, cb)); - - fs.write(this.fd, data, 0, data.length, this.pos, function(er, bytes) { - if (er) { - this.destroy(); - return cb(er); - } - this.bytesWritten += bytes; - cb(); - }.bind(this)); - - if (this.pos !== undefined) - this.pos += data.length; -}; - - -WriteStream.prototype.destroy = ReadStream.prototype.destroy; -WriteStream.prototype.close = ReadStream.prototype.close; - -// There is no shutdown() for files. -WriteStream.prototype.destroySoon = WriteStream.prototype.end; - - -// SyncWriteStream is internal. DO NOT USE. -// Temporary hack for process.stdout and process.stderr when piped to files. -function SyncWriteStream(fd) { - Stream.call(this); - - this.fd = fd; - this.writable = true; - this.readable = false; -} - -util.inherits(SyncWriteStream, Stream); - - -// Export -fs.SyncWriteStream = SyncWriteStream; - - -SyncWriteStream.prototype.write = function(data, arg1, arg2) { - var encoding, cb; - - // parse arguments - if (arg1) { - if (typeof arg1 === 'string') { - encoding = arg1; - cb = arg2; - } else if (typeof arg1 === 'function') { - cb = arg1; - } else { - throw new Error('bad arg'); - } - } - assertEncoding(encoding); - - // Change strings to buffers. SLOW - if (typeof data == 'string') { - data = new Buffer(data, encoding); - } - - fs.writeSync(this.fd, data, 0, data.length); - - if (cb) { - process.nextTick(cb); - } - - return true; -}; - - -SyncWriteStream.prototype.end = function(data, arg1, arg2) { - if (data) { - this.write(data, arg1, arg2); - } - this.destroy(); -}; - - -SyncWriteStream.prototype.destroy = function() { - fs.closeSync(this.fd); - this.fd = null; - this.emit('close'); - return true; -}; - -SyncWriteStream.prototype.destroySoon = SyncWriteStream.prototype.destroy; diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js index 3c9da084a2..0ac8534b7a 100644 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js @@ -372,7 +372,7 @@ function chunkInvalid(state, chunk) { function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { + if (state.decoder && !state.ended && state.decoder.end) { var chunk = state.decoder.end(); if (chunk && chunk.length) { state.buffer.push(chunk); @@ -522,7 +522,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { } // This is a brutally ugly hack to make sure that our error handler // is attached before any userland ones. NEVER DO THIS. - if (!dest._events.error) + if (!dest._events || !dest._events.error) dest.on('error', onerror); else if (Array.isArray(dest._events.error)) dest._events.error.unshift(onerror); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js index f08b05e525..707e4b3bf0 100644 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js @@ -174,7 +174,7 @@ Transform.prototype._write = function(chunk, encoding, cb) { Transform.prototype._read = function(n) { var ts = this._transformState; - if (ts.writechunk && ts.writecb && !ts.transforming) { + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { ts.transforming = true; this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); } else { diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js index 56ca47ddfe..4b976a9f3f 100644 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js @@ -196,6 +196,8 @@ function decodeChunk(state, chunk, encoding) { // If we return false, then we need a drain event, so set that flag. function writeOrBuffer(stream, state, chunk, encoding, cb) { chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; var len = state.objectMode ? 1 : chunk.length; state.length += len; diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json index 9297062d47..206b4806c1 100644 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "1.0.17", + "version": "1.0.24", "description": "An exploration of a new kind of readable streams for Node.js", "main": "readable.js", "dependencies": {}, @@ -30,10 +30,7 @@ "bugs": { "url": "https://github.com/isaacs/readable-stream/issues" }, - "_id": "readable-stream@1.0.17", - "dist": { - "shasum": "cbc295fdf394dfa1225d225d02e6b6d0f409fd4b" - }, - "_from": "readable-stream@1.0", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.17.tgz" + "homepage": "https://github.com/isaacs/readable-stream", + "_id": "readable-stream@1.0.24", + "_from": "readable-stream@1.0" } diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/common.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/common.js deleted file mode 100644 index 1dec2e3571..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/common.js +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - global.setImmediate, - clearTimeout, - clearInterval, - global.clearImmediate, - console, - Buffer, - process, - global]; - - if (global.errno) { - knownGlobals.push(errno); - } - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks() { - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '<anonymous>' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/fixtures/x1024.txt b/deps/npm/node_modules/sha/node_modules/readable-stream/test/fixtures/x1024.txt deleted file mode 100644 index c6a9d2f1a5..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/fixtures/x1024.txt +++ /dev/null @@ -1 +0,0 @@ -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-basic.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-basic.js deleted file mode 100644 index edc3811ed1..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-basic.js +++ /dev/null @@ -1,475 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -var common = require('../common.js'); -var R = require('../../lib/_stream_readable'); -var assert = require('assert'); - -var util = require('util'); -var EE = require('events').EventEmitter; - -function TestReader(n) { - R.apply(this); - this._buffer = new Buffer(n || 100); - this._buffer.fill('x'); - this._pos = 0; - this._bufs = 10; -} - -util.inherits(TestReader, R); - -TestReader.prototype.read = function(n) { - if (n === 0) return null; - var max = this._buffer.length - this._pos; - n = n || max; - n = Math.max(n, 0); - var toRead = Math.min(n, max); - if (toRead === 0) { - // simulate the read buffer filling up with some more bytes some time - // in the future. - setTimeout(function() { - this._pos = 0; - this._bufs -= 1; - if (this._bufs <= 0) { - // read them all! - if (!this.ended) { - this.emit('end'); - this.ended = true; - } - } else { - this.emit('readable'); - } - }.bind(this), 10); - return null; - } - - var ret = this._buffer.slice(this._pos, this._pos + toRead); - this._pos += toRead; - return ret; -}; - -///// - -function TestWriter() { - EE.apply(this); - this.received = []; - this.flush = false; -} - -util.inherits(TestWriter, EE); - -TestWriter.prototype.write = function(c) { - this.received.push(c.toString()); - this.emit('write', c); - return true; -}; - -TestWriter.prototype.end = function(c) { - if (c) this.write(c); - this.emit('end', this.received); -}; - -//////// - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - ok: assert, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - - -test('a most basic test', function(t) { - var r = new TestReader(20); - - var reads = []; - var expect = [ 'x', - 'xx', - 'xxx', - 'xxxx', - 'xxxxx', - 'xxxxx', - 'xxxxxxxx', - 'xxxxxxxxx', - 'xxx', - 'xxxxxxxxxxxx', - 'xxxxxxxx', - 'xxxxxxxxxxxxxxx', - 'xxxxx', - 'xxxxxxxxxxxxxxxxxx', - 'xx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx' ]; - - r.on('end', function() { - t.same(reads, expect); - t.end(); - }); - - var readSize = 1; - function flow() { - var res; - while (null !== (res = r.read(readSize++))) { - reads.push(res.toString()); - } - r.once('readable', flow); - } - - flow(); -}); - -test('pipe', function(t) { - var r = new TestReader(5); - - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ] - - var w = new TestWriter; - var flush = true; - - w.on('end', function(received) { - t.same(received, expect); - t.end(); - }); - - r.pipe(w); -}); - - - -[1,2,3,4,5,6,7,8,9].forEach(function(SPLIT) { - test('unpipe', function(t) { - var r = new TestReader(5); - - // unpipe after 3 writes, then write to another stream instead. - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ]; - expect = [ expect.slice(0, SPLIT), expect.slice(SPLIT) ]; - - var w = [ new TestWriter(), new TestWriter() ]; - - var writes = SPLIT; - w[0].on('write', function() { - if (--writes === 0) { - r.unpipe(); - t.equal(r._readableState.pipes, null); - w[0].end(); - r.pipe(w[1]); - t.equal(r._readableState.pipes, w[1]); - } - }); - - var ended = 0; - - var ended0 = false; - var ended1 = false; - w[0].on('end', function(results) { - t.equal(ended0, false); - ended0 = true; - ended++; - t.same(results, expect[0]); - }); - - w[1].on('end', function(results) { - t.equal(ended1, false); - ended1 = true; - ended++; - t.equal(ended, 2); - t.same(results, expect[1]); - t.end(); - }); - - r.pipe(w[0]); - }); -}); - - -// both writers should get the same exact data. -test('multipipe', function(t) { - var r = new TestReader(5); - var w = [ new TestWriter, new TestWriter ]; - - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ]; - - var c = 2; - w[0].on('end', function(received) { - t.same(received, expect, 'first'); - if (--c === 0) t.end(); - }); - w[1].on('end', function(received) { - t.same(received, expect, 'second'); - if (--c === 0) t.end(); - }); - - r.pipe(w[0]); - r.pipe(w[1]); -}); - - -[1,2,3,4,5,6,7,8,9].forEach(function(SPLIT) { - test('multi-unpipe', function(t) { - var r = new TestReader(5); - - // unpipe after 3 writes, then write to another stream instead. - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ]; - expect = [ expect.slice(0, SPLIT), expect.slice(SPLIT) ]; - - var w = [ new TestWriter(), new TestWriter(), new TestWriter() ]; - - var writes = SPLIT; - w[0].on('write', function() { - if (--writes === 0) { - r.unpipe(); - w[0].end(); - r.pipe(w[1]); - } - }); - - var ended = 0; - - w[0].on('end', function(results) { - ended++; - t.same(results, expect[0]); - }); - - w[1].on('end', function(results) { - ended++; - t.equal(ended, 2); - t.same(results, expect[1]); - t.end(); - }); - - r.pipe(w[0]); - r.pipe(w[2]); - }); -}); - -test('back pressure respected', function (t) { - function noop() {} - - var r = new R({ objectMode: true }); - r._read = noop; - var counter = 0; - r.push(["one"]); - r.push(["two"]); - r.push(["three"]); - r.push(["four"]); - r.push(null); - - var w1 = new R(); - w1.write = function (chunk) { - assert.equal(chunk[0], "one"); - w1.emit("close"); - process.nextTick(function () { - r.pipe(w2); - r.pipe(w3); - }) - }; - w1.end = noop; - - r.pipe(w1); - - var expected = ["two", "two", "three", "three", "four", "four"]; - - var w2 = new R(); - w2.write = function (chunk) { - assert.equal(chunk[0], expected.shift()); - assert.equal(counter, 0); - - counter++; - - if (chunk[0] === "four") { - return true; - } - - setTimeout(function () { - counter--; - w2.emit("drain"); - }, 10); - - return false; - } - w2.end = noop; - - var w3 = new R(); - w3.write = function (chunk) { - assert.equal(chunk[0], expected.shift()); - assert.equal(counter, 1); - - counter++; - - if (chunk[0] === "four") { - return true; - } - - setTimeout(function () { - counter--; - w3.emit("drain"); - }, 50); - - return false; - }; - w3.end = function () { - assert.equal(counter, 2); - assert.equal(expected.length, 0); - t.end(); - }; -}); - -test('read(0) for ended streams', function (t) { - var r = new R(); - var written = false; - var ended = false; - r._read = function (n) {}; - - r.push(new Buffer("foo")); - r.push(null); - - var v = r.read(0); - - assert.equal(v, null); - - var w = new R(); - - w.write = function (buffer) { - written = true; - assert.equal(ended, false); - assert.equal(buffer.toString(), "foo") - }; - - w.end = function () { - ended = true; - assert.equal(written, true); - t.end(); - }; - - r.pipe(w); -}) - -test('sync _read ending', function (t) { - var r = new R(); - var called = false; - r._read = function (n) { - r.push(null); - }; - - r.once('end', function () { - called = true; - }) - - r.read(); - - process.nextTick(function () { - assert.equal(called, true); - t.end(); - }) -}); - -test('adding readable triggers data flow', function(t) { - var r = new R({ highWaterMark: 5 }); - var onReadable = false; - var readCalled = 0; - - r._read = function(n) { - if (readCalled++ === 2) - r.push(null); - else - r.push(new Buffer('asdf')); - }; - - var called = false; - r.on('readable', function() { - onReadable = true; - r.read(); - }); - - r.on('end', function() { - t.equal(readCalled, 3); - t.ok(onReadable); - t.end(); - }); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-compatibility.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-compatibility.js deleted file mode 100644 index 4de76b5773..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-compatibility.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -var common = require('../common.js'); -var R = require('../../lib/_stream_readable'); -var assert = require('assert'); - -var util = require('util'); -var EE = require('events').EventEmitter; - -var ondataCalled = 0; - -function TestReader() { - R.apply(this); - this._buffer = new Buffer(100); - this._buffer.fill('x'); - - this.on('data', function() { - ondataCalled++; - }); -} - -util.inherits(TestReader, R); - -TestReader.prototype._read = function(n) { - this.push(this._buffer); - this._buffer = new Buffer(0); -}; - -var reader = new TestReader(); -assert.equal(ondataCalled, 1); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-finish-pipe.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-finish-pipe.js deleted file mode 100644 index 6a7e41e5b1..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-finish-pipe.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common.js'); -var stream = require('../../readable'); -var Buffer = require('buffer').Buffer; - -var r = new stream.Readable(); -r._read = function(size) { - r.push(new Buffer(size)); -}; - -var w = new stream.Writable(); -w._write = function(data, encoding, cb) { - cb(null); -}; - -r.pipe(w); - -// This might sound unrealistic, but it happens in net.js. When -// `socket.allowHalfOpen === false`, EOF will cause `.destroySoon()` call which -// ends the writable side of net.Socket. -w.end(); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-large-read-stall.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-large-read-stall.js deleted file mode 100644 index 6da70e8880..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-large-read-stall.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common.js'); -var assert = require('assert'); - -// If everything aligns so that you do a read(n) of exactly the -// remaining buffer, then make sure that 'end' still emits. - -var READSIZE = 100; -var PUSHSIZE = 20; -var PUSHCOUNT = 1000; -var HWM = 50; - -var Readable = require('../../readable').Readable; -var r = new Readable({ - highWaterMark: HWM -}); -var rs = r._readableState; - -r._read = push; - -r.on('readable', function() { - console.error('>> readable'); - do { - console.error(' > read(%d)', READSIZE); - var ret = r.read(READSIZE); - console.error(' < %j (%d remain)', ret && ret.length, rs.length); - } while (ret && ret.length === READSIZE); - - console.error('<< after read()', - ret && ret.length, - rs.needReadable, - rs.length); -}); - -var endEmitted = false; -r.on('end', function() { - endEmitted = true; - console.error('end'); -}); - -var pushes = 0; -function push() { - if (pushes > PUSHCOUNT) - return; - - if (pushes++ === PUSHCOUNT) { - console.error(' push(EOF)'); - return r.push(null); - } - - console.error(' push #%d', pushes); - if (r.push(new Buffer(PUSHSIZE))) - setTimeout(push); -} - -// start the flow -var ret = r.read(0); - -process.on('exit', function() { - assert.equal(pushes, PUSHCOUNT + 1); - assert(endEmitted); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-objects.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-objects.js deleted file mode 100644 index cd23539f3c..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-objects.js +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -var common = require('../common.js'); -var Readable = require('../../lib/_stream_readable'); -var Writable = require('../../lib/_stream_writable'); -var assert = require('assert'); - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function() { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on('exit', function() { - assert.equal(count, 0); -}); - -process.nextTick(run); - -function toArray(callback) { - var stream = new Writable({ objectMode: true }); - var list = []; - stream.write = function(chunk) { - list.push(chunk); - }; - - stream.end = function() { - callback(list); - }; - - return stream; -} - -function fromArray(list) { - var r = new Readable({ objectMode: true }); - r._read = noop; - list.forEach(function(chunk) { - r.push(chunk); - }); - r.push(null); - - return r; -} - -function noop() {} - -test('can read objects from stream', function(t) { - var r = fromArray([{ one: '1'}, { two: '2' }]); - - var v1 = r.read(); - var v2 = r.read(); - var v3 = r.read(); - - assert.deepEqual(v1, { one: '1' }); - assert.deepEqual(v2, { two: '2' }); - assert.deepEqual(v3, null); - - t.end(); -}); - -test('can pipe objects into stream', function(t) { - var r = fromArray([{ one: '1'}, { two: '2' }]); - - r.pipe(toArray(function(list) { - assert.deepEqual(list, [ - { one: '1' }, - { two: '2' } - ]); - - t.end(); - })); -}); - -test('read(n) is ignored', function(t) { - var r = fromArray([{ one: '1'}, { two: '2' }]); - - var value = r.read(2); - - assert.deepEqual(value, { one: '1' }); - - t.end(); -}); - -test('can read objects from _read (sync)', function(t) { - var r = new Readable({ objectMode: true }); - var list = [{ one: '1'}, { two: '2' }]; - r._read = function(n) { - var item = list.shift(); - r.push(item || null); - }; - - r.pipe(toArray(function(list) { - assert.deepEqual(list, [ - { one: '1' }, - { two: '2' } - ]); - - t.end(); - })); -}); - -test('can read objects from _read (async)', function(t) { - var r = new Readable({ objectMode: true }); - var list = [{ one: '1'}, { two: '2' }]; - r._read = function(n) { - var item = list.shift(); - process.nextTick(function() { - r.push(item || null); - }); - }; - - r.pipe(toArray(function(list) { - assert.deepEqual(list, [ - { one: '1' }, - { two: '2' } - ]); - - t.end(); - })); -}); - -test('can read strings as objects', function(t) { - var r = new Readable({ - objectMode: true - }); - r._read = noop; - var list = ['one', 'two', 'three']; - list.forEach(function(str) { - r.push(str); - }); - r.push(null); - - r.pipe(toArray(function(array) { - assert.deepEqual(array, list); - - t.end(); - })); -}); - -test('read(0) for object streams', function(t) { - var r = new Readable({ - objectMode: true - }); - r._read = noop; - - r.push('foobar'); - r.push(null); - - var v = r.read(0); - - r.pipe(toArray(function(array) { - assert.deepEqual(array, ['foobar']); - - t.end(); - })); -}); - -test('falsey values', function(t) { - var r = new Readable({ - objectMode: true - }); - r._read = noop; - - r.push(false); - r.push(0); - r.push(''); - r.push(null); - - r.pipe(toArray(function(array) { - assert.deepEqual(array, [false, 0, '']); - - t.end(); - })); -}); - -test('high watermark _read', function(t) { - var r = new Readable({ - highWaterMark: 6, - objectMode: true - }); - var calls = 0; - var list = ['1', '2', '3', '4', '5', '6', '7', '8']; - - r._read = function(n) { - calls++; - }; - - list.forEach(function(c) { - r.push(c); - }); - - var v = r.read(); - - assert.equal(calls, 0); - assert.equal(v, '1'); - - var v2 = r.read(); - - assert.equal(calls, 1); - assert.equal(v2, '2'); - - t.end(); -}); - -test('high watermark push', function(t) { - var r = new Readable({ - highWaterMark: 6, - objectMode: true - }); - r._read = function(n) {}; - for (var i = 0; i < 6; i++) { - var bool = r.push(i); - assert.equal(bool, i === 5 ? false : true); - } - - t.end(); -}); - -test('can write objects to stream', function(t) { - var w = new Writable({ objectMode: true }); - - w._write = function(chunk, encoding, cb) { - assert.deepEqual(chunk, { foo: 'bar' }); - cb(); - }; - - w.on('finish', function() { - t.end(); - }); - - w.write({ foo: 'bar' }); - w.end(); -}); - -test('can write multiple objects to stream', function(t) { - var w = new Writable({ objectMode: true }); - var list = []; - - w._write = function(chunk, encoding, cb) { - list.push(chunk); - cb(); - }; - - w.on('finish', function() { - assert.deepEqual(list, [0, 1, 2, 3, 4]); - - t.end(); - }); - - w.write(0); - w.write(1); - w.write(2); - w.write(3); - w.write(4); - w.end(); -}); - -test('can write strings as objects', function(t) { - var w = new Writable({ - objectMode: true - }); - var list = []; - - w._write = function(chunk, encoding, cb) { - list.push(chunk); - process.nextTick(cb); - }; - - w.on('finish', function() { - assert.deepEqual(list, ['0', '1', '2', '3', '4']); - - t.end(); - }); - - w.write('0'); - w.write('1'); - w.write('2'); - w.write('3'); - w.write('4'); - w.end(); -}); - -test('buffers finish until cb is called', function(t) { - var w = new Writable({ - objectMode: true - }); - var called = false; - - w._write = function(chunk, encoding, cb) { - assert.equal(chunk, 'foo'); - - process.nextTick(function() { - called = true; - cb(); - }); - }; - - w.on('finish', function() { - assert.equal(called, true); - - t.end(); - }); - - w.write('foo'); - w.end(); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-pipe-error-handling.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-pipe-error-handling.js deleted file mode 100644 index 823dae2c0c..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-pipe-error-handling.js +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var stream = require('../../readable'); - -(function testErrorListenerCatches() { - var count = 1000; - - var source = new stream.Readable(); - source._read = function(n) { - n = Math.min(count, n); - count -= n; - source.push(new Buffer(n)); - }; - - var unpipedDest; - source.unpipe = function(dest) { - unpipedDest = dest; - stream.Readable.prototype.unpipe.call(this, dest); - }; - - var dest = new stream.Writable(); - dest._write = function(chunk, encoding, cb) { - cb(); - }; - - source.pipe(dest); - - var gotErr = null; - dest.on('error', function(err) { - gotErr = err; - }); - - var unpipedSource; - dest.on('unpipe', function(src) { - unpipedSource = src; - }); - - var err = new Error('This stream turned into bacon.'); - dest.emit('error', err); - assert.strictEqual(gotErr, err); - assert.strictEqual(unpipedSource, source); - assert.strictEqual(unpipedDest, dest); -})(); - -(function testErrorWithoutListenerThrows() { - var count = 1000; - - var source = new stream.Readable(); - source._read = function(n) { - n = Math.min(count, n); - count -= n; - source.push(new Buffer(n)); - }; - - var unpipedDest; - source.unpipe = function(dest) { - unpipedDest = dest; - stream.Readable.prototype.unpipe.call(this, dest); - }; - - var dest = new stream.Writable(); - dest._write = function(chunk, encoding, cb) { - cb(); - }; - - source.pipe(dest); - - var unpipedSource; - dest.on('unpipe', function(src) { - unpipedSource = src; - }); - - var err = new Error('This stream turned into bacon.'); - - var gotErr = null; - try { - dest.emit('error', err); - } catch (e) { - gotErr = e; - } - assert.strictEqual(gotErr, err); - assert.strictEqual(unpipedSource, source); - assert.strictEqual(unpipedDest, dest); -})(); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-push.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-push.js deleted file mode 100644 index e85f785d95..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-push.js +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common.js'); -var stream = require('../../readable'); -var Readable = stream.Readable; -var Writable = stream.Writable; -var assert = require('assert'); - -var util = require('util'); -var EE = require('events').EventEmitter; - - -// a mock thing a bit like the net.Socket/tcp_wrap.handle interaction - -var stream = new Readable({ - highWaterMark: 16, - encoding: 'utf8' -}); - -var source = new EE; - -stream._read = function() { - console.error('stream._read'); - readStart(); -}; - -var ended = false; -stream.on('end', function() { - ended = true; -}); - -source.on('data', function(chunk) { - var ret = stream.push(chunk); - console.error('data', stream._readableState.length); - if (!ret) - readStop(); -}); - -source.on('end', function() { - stream.push(null); -}); - -var reading = false; - -function readStart() { - console.error('readStart'); - reading = true; -} - -function readStop() { - console.error('readStop'); - reading = false; - process.nextTick(function() { - var r = stream.read(); - if (r !== null) - writer.write(r); - }); -} - -var writer = new Writable({ - decodeStrings: false -}); - -var written = []; - -var expectWritten = - [ 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg' ]; - -writer._write = function(chunk, encoding, cb) { - console.error('WRITE %s', chunk); - written.push(chunk); - process.nextTick(cb); -}; - -writer.on('finish', finish); - - -// now emit some chunks. - -var chunk = "asdfg"; - -var set = 0; -readStart(); -data(); -function data() { - assert(reading); - source.emit('data', chunk); - assert(reading); - source.emit('data', chunk); - assert(reading); - source.emit('data', chunk); - assert(reading); - source.emit('data', chunk); - assert(!reading); - if (set++ < 5) - setTimeout(data, 10); - else - end(); -} - -function finish() { - console.error('finish'); - assert.deepEqual(written, expectWritten); - console.log('ok'); -} - -function end() { - source.emit('end'); - assert(!reading); - writer.end(stream.read()); - setTimeout(function() { - assert(ended); - }); -} diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-read-sync-stack.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-read-sync-stack.js deleted file mode 100644 index 7e86eec533..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-read-sync-stack.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var Readable = require('../../readable').Readable; -var r = new Readable(); -var N = 256 * 1024; - -// Go ahead and allow the pathological case for this test. -// Yes, it's an infinite loop, that's the point. -process.maxTickDepth = N + 2; - -var reads = 0; -r._read = function(n) { - var chunk = reads++ === N ? null : new Buffer(1); - r.push(chunk); -}; - -r.on('readable', function onReadable() { - if (!(r._readableState.length % 256)) - console.error('readable', r._readableState.length); - r.read(N * 2); -}); - -var ended = false; -r.on('end', function onEnd() { - ended = true; -}); - -r.read(0); - -process.on('exit', function() { - assert(ended); - console.log('ok'); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js deleted file mode 100644 index 1b067f53b9..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); - -var Readable = require('../../readable').Readable; - -test1(); -if (!/^v0\.[0-8]\./.test(process.version)) - test2(); - -function test1() { - var r = new Readable(); - - // should not end when we get a Buffer(0) or '' as the _read result - // that just means that there is *temporarily* no data, but to go - // ahead and try again later. - // - // note that this is very unusual. it only works for crypto streams - // because the other side of the stream will call read(0) to cycle - // data through openssl. that's why we set the timeouts to call - // r.read(0) again later, otherwise there is no more work being done - // and the process just exits. - - var buf = new Buffer(5); - buf.fill('x'); - var reads = 5; - r._read = function(n) { - switch (reads--) { - case 0: - return r.push(null); // EOF - case 1: - return r.push(buf); - case 2: - setTimeout(r.read.bind(r, 0), 10); - return r.push(new Buffer(0)); // Not-EOF! - case 3: - setTimeout(r.read.bind(r, 0), 10); - return process.nextTick(function() { - return r.push(new Buffer(0)); - }); - case 4: - setTimeout(r.read.bind(r, 0), 10); - return setTimeout(function() { - return r.push(new Buffer(0)); - }); - case 5: - return setTimeout(function() { - return r.push(buf); - }); - default: - throw new Error('unreachable'); - } - }; - - var results = []; - function flow() { - var chunk; - while (null !== (chunk = r.read())) - results.push(chunk + ''); - } - r.on('readable', flow); - r.on('end', function() { - results.push('EOF'); - }); - flow(); - - process.on('exit', function() { - assert.deepEqual(results, [ 'xxxxx', 'xxxxx', 'EOF' ]); - console.log('ok'); - }); -} - -function test2() { - var r = new Readable({ encoding: 'base64' }); - var reads = 5; - r._read = function(n) { - if (!reads--) - return r.push(null); // EOF - else - return r.push(new Buffer('x')); - }; - - var results = []; - function flow() { - var chunk; - while (null !== (chunk = r.read())) - results.push(chunk + ''); - } - r.on('readable', flow); - r.on('end', function() { - results.push('EOF'); - }); - flow(); - - process.on('exit', function() { - assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); - console.log('ok'); - }); -} diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-from-list.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-from-list.js deleted file mode 100644 index 04a96f5372..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-from-list.js +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var assert = require('assert'); -var common = require('../common.js'); -var fromList = require('../../lib/_stream_readable')._fromList; - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - - - -test('buffers', function(t) { - // have a length - var len = 16; - var list = [ new Buffer('foog'), - new Buffer('bark'), - new Buffer('bazy'), - new Buffer('kuel') ]; - - // read more than the first element. - var ret = fromList(6, { buffer: list, length: 16 }); - t.equal(ret.toString(), 'foogba'); - - // read exactly the first element. - ret = fromList(2, { buffer: list, length: 10 }); - t.equal(ret.toString(), 'rk'); - - // read less than the first element. - ret = fromList(2, { buffer: list, length: 8 }); - t.equal(ret.toString(), 'ba'); - - // read more than we have. - ret = fromList(100, { buffer: list, length: 6 }); - t.equal(ret.toString(), 'zykuel'); - - // all consumed. - t.same(list, []); - - t.end(); -}); - -test('strings', function(t) { - // have a length - var len = 16; - var list = [ 'foog', - 'bark', - 'bazy', - 'kuel' ]; - - // read more than the first element. - var ret = fromList(6, { buffer: list, length: 16, decoder: true }); - t.equal(ret, 'foogba'); - - // read exactly the first element. - ret = fromList(2, { buffer: list, length: 10, decoder: true }); - t.equal(ret, 'rk'); - - // read less than the first element. - ret = fromList(2, { buffer: list, length: 8, decoder: true }); - t.equal(ret, 'ba'); - - // read more than we have. - ret = fromList(100, { buffer: list, length: 6, decoder: true }); - t.equal(ret, 'zykuel'); - - // all consumed. - t.same(list, []); - - t.end(); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-legacy-drain.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-legacy-drain.js deleted file mode 100644 index c6cbc7d6b3..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-legacy-drain.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); - -var Stream = require('../../readable'); -var Readable = Stream.Readable; - -var r = new Readable(); -var N = 256; -var reads = 0; -r._read = function(n) { - return r.push(++reads === N ? null : new Buffer(1)); -}; - -var rended = false; -r.on('end', function() { - rended = true; -}); - -var w = new Stream(); -w.writable = true; -var writes = 0; -var buffered = 0; -w.write = function(c) { - writes += c.length; - buffered += c.length; - process.nextTick(drain); - return false; -}; - -function drain() { - assert(buffered <= 2); - buffered = 0; - w.emit('drain'); -} - - -var wended = false; -w.end = function() { - wended = true; -}; - -// Just for kicks, let's mess with the drain count. -// This verifies that even if it gets negative in the -// pipe() cleanup function, we'll still function properly. -r.on('readable', function() { - w.emit('drain'); -}); - -r.pipe(w); -process.on('exit', function() { - assert(rended); - assert(wended); - console.error('ok'); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-non-empty-end.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-non-empty-end.js deleted file mode 100644 index c971898c1f..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-readable-non-empty-end.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var assert = require('assert'); -var common = require('../common.js'); -var Readable = require('../../lib/_stream_readable'); - -var len = 0; -var chunks = new Array(10); -for (var i = 1; i <= 10; i++) { - chunks[i-1] = new Buffer(i); - len += i; -} - -var test = new Readable(); -var n = 0; -test._read = function(size) { - var chunk = chunks[n++]; - setTimeout(function() { - test.push(chunk); - }); -}; - -test.on('end', thrower); -function thrower() { - throw new Error('this should not happen!'); -} - -var bytesread = 0; -test.on('readable', function() { - var b = len - bytesread - 1; - var res = test.read(b); - if (res) { - bytesread += res.length; - console.error('br=%d len=%d', bytesread, len); - setTimeout(next); - } - test.read(0); -}); -test.read(0); - -function next() { - // now let's make 'end' happen - test.removeListener('end', thrower); - - var endEmitted = false; - process.on('exit', function() { - assert(endEmitted, 'end should be emitted by now'); - }); - test.on('end', function() { - endEmitted = true; - }); - - // one to get the last byte - var r = test.read(); - assert(r); - assert.equal(r.length, 1); - r = test.read(); - assert.equal(r, null); -} diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-set-encoding.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-set-encoding.js deleted file mode 100644 index 602acd6d49..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-set-encoding.js +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -var common = require('../common.js'); -var assert = require('assert'); -var R = require('../../lib/_stream_readable'); -var util = require('util'); - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - -///// - -util.inherits(TestReader, R); - -function TestReader(n, opts) { - R.call(this, opts); - - this.pos = 0; - this.len = n || 100; -} - -TestReader.prototype._read = function(n) { - setTimeout(function() { - - if (this.pos >= this.len) { - return this.push(null); - } - - n = Math.min(n, this.len - this.pos); - if (n <= 0) { - return this.push(null); - } - - this.pos += n; - var ret = new Buffer(n); - ret.fill('a'); - - console.log("this.push(ret)", ret) - - return this.push(ret); - }.bind(this), 1); -}; - -test('setEncoding utf8', function(t) { - var tr = new TestReader(100); - tr.setEncoding('utf8'); - var out = []; - var expect = - [ 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - - -test('setEncoding hex', function(t) { - var tr = new TestReader(100); - tr.setEncoding('hex'); - var out = []; - var expect = - [ '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - -test('setEncoding hex with read(13)', function(t) { - var tr = new TestReader(100); - tr.setEncoding('hex'); - var out = []; - var expect = - [ "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "16161" ]; - - tr.on('readable', function flow() { - console.log("readable once") - var chunk; - while (null !== (chunk = tr.read(13))) - out.push(chunk); - }); - - tr.on('end', function() { - console.log("END") - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - -test('encoding: utf8', function(t) { - var tr = new TestReader(100, { encoding: 'utf8' }); - var out = []; - var expect = - [ 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - - -test('encoding: hex', function(t) { - var tr = new TestReader(100, { encoding: 'hex' }); - var out = []; - var expect = - [ '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - -test('encoding: hex with read(13)', function(t) { - var tr = new TestReader(100, { encoding: 'hex' }); - var out = []; - var expect = - [ "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "16161" ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(13))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-transform.js deleted file mode 100644 index 5804c39d80..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-transform.js +++ /dev/null @@ -1,435 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var assert = require('assert'); -var common = require('../common.js'); -var PassThrough = require('../../lib/_stream_passthrough'); -var Transform = require('../../lib/_stream_transform'); - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - ok: assert, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - -///// - -test('writable side consumption', function(t) { - var tx = new Transform({ - highWaterMark: 10 - }); - - var transformed = 0; - tx._transform = function(chunk, encoding, cb) { - transformed += chunk.length; - tx.push(chunk); - cb(); - }; - - for (var i = 1; i <= 10; i++) { - tx.write(new Buffer(i)); - } - tx.end(); - - t.equal(tx._readableState.length, 10); - t.equal(transformed, 10); - t.equal(tx._transformState.writechunk.length, 5); - t.same(tx._writableState.buffer.map(function(c) { - return c.chunk.length; - }), [6, 7, 8, 9, 10]); - - t.end(); -}); - -test('passthrough', function(t) { - var pt = new PassThrough(); - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5).toString(), 'arkba'); - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5).toString(), 'l'); - t.end(); -}); - -test('simple transform', function(t) { - var pt = new Transform; - pt._transform = function(c, e, cb) { - var ret = new Buffer(c.length); - ret.fill('x'); - pt.push(ret); - cb(); - }; - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - t.equal(pt.read(5).toString(), 'xxxxx'); - t.equal(pt.read(5).toString(), 'xxxxx'); - t.equal(pt.read(5).toString(), 'xxxxx'); - t.equal(pt.read(5).toString(), 'x'); - t.end(); -}); - -test('async passthrough', function(t) { - var pt = new Transform; - pt._transform = function(chunk, encoding, cb) { - setTimeout(function() { - pt.push(chunk); - cb(); - }, 10); - }; - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - pt.on('finish', function() { - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5).toString(), 'arkba'); - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5).toString(), 'l'); - t.end(); - }); -}); - -test('assymetric transform (expand)', function(t) { - var pt = new Transform; - - // emit each chunk 2 times. - pt._transform = function(chunk, encoding, cb) { - setTimeout(function() { - pt.push(chunk); - setTimeout(function() { - pt.push(chunk); - cb(); - }, 10) - }, 10); - }; - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - pt.on('finish', function() { - t.equal(pt.read(5).toString(), 'foogf'); - t.equal(pt.read(5).toString(), 'oogba'); - t.equal(pt.read(5).toString(), 'rkbar'); - t.equal(pt.read(5).toString(), 'kbazy'); - t.equal(pt.read(5).toString(), 'bazyk'); - t.equal(pt.read(5).toString(), 'uelku'); - t.equal(pt.read(5).toString(), 'el'); - t.end(); - }); -}); - -test('assymetric transform (compress)', function(t) { - var pt = new Transform; - - // each output is the first char of 3 consecutive chunks, - // or whatever's left. - pt.state = ''; - - pt._transform = function(chunk, encoding, cb) { - if (!chunk) - chunk = ''; - var s = chunk.toString(); - setTimeout(function() { - this.state += s.charAt(0); - if (this.state.length === 3) { - pt.push(new Buffer(this.state)); - this.state = ''; - } - cb(); - }.bind(this), 10); - }; - - pt._flush = function(cb) { - // just output whatever we have. - pt.push(new Buffer(this.state)); - this.state = ''; - cb(); - }; - - pt.write(new Buffer('aaaa')); - pt.write(new Buffer('bbbb')); - pt.write(new Buffer('cccc')); - pt.write(new Buffer('dddd')); - pt.write(new Buffer('eeee')); - pt.write(new Buffer('aaaa')); - pt.write(new Buffer('bbbb')); - pt.write(new Buffer('cccc')); - pt.write(new Buffer('dddd')); - pt.write(new Buffer('eeee')); - pt.write(new Buffer('aaaa')); - pt.write(new Buffer('bbbb')); - pt.write(new Buffer('cccc')); - pt.write(new Buffer('dddd')); - pt.end(); - - // 'abcdeabcdeabcd' - pt.on('finish', function() { - t.equal(pt.read(5).toString(), 'abcde'); - t.equal(pt.read(5).toString(), 'abcde'); - t.equal(pt.read(5).toString(), 'abcd'); - t.end(); - }); -}); - - -test('passthrough event emission', function(t) { - var pt = new PassThrough(); - var emits = 0; - pt.on('readable', function() { - var state = pt._readableState; - console.error('>>> emit readable %d', emits); - emits++; - }); - - var i = 0; - - pt.write(new Buffer('foog')); - - console.error('need emit 0'); - pt.write(new Buffer('bark')); - - console.error('should have emitted readable now 1 === %d', emits); - t.equal(emits, 1); - - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5) + '', 'null'); - - console.error('need emit 1'); - - pt.write(new Buffer('bazy')); - console.error('should have emitted, but not again'); - pt.write(new Buffer('kuel')); - - console.error('should have emitted readable now 2 === %d', emits); - t.equal(emits, 2); - - t.equal(pt.read(5).toString(), 'arkba'); - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5), null); - - console.error('need emit 2'); - - pt.end(); - - t.equal(emits, 3); - - t.equal(pt.read(5).toString(), 'l'); - t.equal(pt.read(5), null); - - console.error('should not have emitted again'); - t.equal(emits, 3); - t.end(); -}); - -test('passthrough event emission reordered', function(t) { - var pt = new PassThrough; - var emits = 0; - pt.on('readable', function() { - console.error('emit readable', emits) - emits++; - }); - - pt.write(new Buffer('foog')); - console.error('need emit 0'); - pt.write(new Buffer('bark')); - console.error('should have emitted readable now 1 === %d', emits); - t.equal(emits, 1); - - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5), null); - - console.error('need emit 1'); - pt.once('readable', function() { - t.equal(pt.read(5).toString(), 'arkba'); - - t.equal(pt.read(5), null); - - console.error('need emit 2'); - pt.once('readable', function() { - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5), null); - pt.once('readable', function() { - t.equal(pt.read(5).toString(), 'l'); - t.equal(pt.read(5), null); - t.equal(emits, 4); - t.end(); - }); - pt.end(); - }); - pt.write(new Buffer('kuel')); - }); - - pt.write(new Buffer('bazy')); -}); - -test('passthrough facaded', function(t) { - console.error('passthrough facaded'); - var pt = new PassThrough; - var datas = []; - pt.on('data', function(chunk) { - datas.push(chunk.toString()); - }); - - pt.on('end', function() { - t.same(datas, ['foog', 'bark', 'bazy', 'kuel']); - t.end(); - }); - - pt.write(new Buffer('foog')); - setTimeout(function() { - pt.write(new Buffer('bark')); - setTimeout(function() { - pt.write(new Buffer('bazy')); - setTimeout(function() { - pt.write(new Buffer('kuel')); - setTimeout(function() { - pt.end(); - }, 10); - }, 10); - }, 10); - }, 10); -}); - -test('object transform (json parse)', function(t) { - console.error('json parse stream'); - var jp = new Transform({ objectMode: true }); - jp._transform = function(data, encoding, cb) { - try { - jp.push(JSON.parse(data)); - cb(); - } catch (er) { - cb(er); - } - }; - - // anything except null/undefined is fine. - // those are "magic" in the stream API, because they signal EOF. - var objects = [ - { foo: 'bar' }, - 100, - "string", - { nested: { things: [ { foo: 'bar' }, 100, "string" ] } } - ]; - - var ended = false; - jp.on('end', function() { - ended = true; - }); - - objects.forEach(function(obj) { - jp.write(JSON.stringify(obj)); - var res = jp.read(); - t.same(res, obj); - }); - - jp.end(); - - process.nextTick(function() { - t.ok(ended); - t.end(); - }) -}); - -test('object transform (json stringify)', function(t) { - console.error('json parse stream'); - var js = new Transform({ objectMode: true }); - js._transform = function(data, encoding, cb) { - try { - js.push(JSON.stringify(data)); - cb(); - } catch (er) { - cb(er); - } - }; - - // anything except null/undefined is fine. - // those are "magic" in the stream API, because they signal EOF. - var objects = [ - { foo: 'bar' }, - 100, - "string", - { nested: { things: [ { foo: 'bar' }, 100, "string" ] } } - ]; - - var ended = false; - js.on('end', function() { - ended = true; - }); - - objects.forEach(function(obj) { - js.write(obj); - var res = js.read(); - t.equal(res, JSON.stringify(obj)); - }); - - js.end(); - - process.nextTick(function() { - t.ok(ended); - t.end(); - }) -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-unpipe-drain.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-unpipe-drain.js deleted file mode 100644 index a3b5394542..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-unpipe-drain.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -var common = require('../common.js'); -var assert = require('assert'); -var stream = require('../../readable'); -var crypto = require('crypto'); - -var util = require('util'); - -function TestWriter() { - stream.Writable.call(this); -} -util.inherits(TestWriter, stream.Writable); - -TestWriter.prototype._write = function (buffer, encoding, callback) { - console.log('write called'); - // super slow write stream (callback never called) -}; - -var dest = new TestWriter(); - -function TestReader(id) { - stream.Readable.call(this); - this.reads = 0; -} -util.inherits(TestReader, stream.Readable); - -TestReader.prototype._read = function (size) { - this.reads += 1; - this.push(crypto.randomBytes(size)); -}; - -var src1 = new TestReader(); -var src2 = new TestReader(); - -src1.pipe(dest); - -src1.once('readable', function () { - process.nextTick(function () { - - src2.pipe(dest); - - src2.once('readable', function () { - process.nextTick(function () { - - src1.unpipe(dest); - }); - }); - }); -}); - - -process.on('exit', function () { - assert.equal(src1.reads, 2); - assert.equal(src2.reads, 2); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-unpipe-leak.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-unpipe-leak.js deleted file mode 100644 index 6882f20932..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-unpipe-leak.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -var common = require('../common.js'); -var assert = require('assert'); -var stream = require('../../readable'); - -var chunk = new Buffer('hallo'); - -var util = require('util'); - -function TestWriter() { - stream.Writable.call(this); -} -util.inherits(TestWriter, stream.Writable); - -TestWriter.prototype._write = function(buffer, encoding, callback) { - callback(null); -}; - -var dest = new TestWriter(); - -// Set this high so that we'd trigger a nextTick warning -// and/or RangeError if we do maybeReadMore wrong. -function TestReader() { - stream.Readable.call(this, { highWaterMark: 0x10000 }); -} -util.inherits(TestReader, stream.Readable); - -TestReader.prototype._read = function(size) { - this.push(chunk); -}; - -var src = new TestReader(); - -for (var i = 0; i < 10; i++) { - src.pipe(dest); - src.unpipe(dest); -} - -assert.equal(src.listeners('end').length, 0); -assert.equal(src.listeners('readable').length, 0); - -assert.equal(dest.listeners('unpipe').length, 0); -assert.equal(dest.listeners('drain').length, 0); -assert.equal(dest.listeners('error').length, 0); -assert.equal(dest.listeners('close').length, 0); -assert.equal(dest.listeners('finish').length, 0); - -console.error(src._readableState); -process.on('exit', function() { - assert(src._readableState.length >= src._readableState.highWaterMark); - src._readableState.buffer.length = 0; - console.error(src._readableState); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-writable.js deleted file mode 100644 index a60e65cd82..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/test/simple/test-stream2-writable.js +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common.js'); -var W = require('../../lib/_stream_writable'); -var D = require('../../lib/_stream_duplex'); -var assert = require('assert'); - -var util = require('util'); -util.inherits(TestWriter, W); - -function TestWriter() { - W.apply(this, arguments); - this.buffer = []; - this.written = 0; -} - -TestWriter.prototype._write = function(chunk, encoding, cb) { - // simulate a small unpredictable latency - setTimeout(function() { - this.buffer.push(chunk.toString()); - this.written += chunk.length; - cb(); - }.bind(this), Math.floor(Math.random() * 10)); -}; - -var chunks = new Array(50); -for (var i = 0; i < chunks.length; i++) { - chunks[i] = new Array(i + 1).join('x'); -} - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - -test('write fast', function(t) { - var tw = new TestWriter({ - highWaterMark: 100 - }); - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.end(); - }); - - chunks.forEach(function(chunk) { - // screw backpressure. Just buffer it all up. - tw.write(chunk); - }); - tw.end(); -}); - -test('write slow', function(t) { - var tw = new TestWriter({ - highWaterMark: 100 - }); - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.end(); - }); - - var i = 0; - (function W() { - tw.write(chunks[i++]); - if (i < chunks.length) - setTimeout(W, 10); - else - tw.end(); - })(); -}); - -test('write backpressure', function(t) { - var tw = new TestWriter({ - highWaterMark: 50 - }); - - var drains = 0; - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.equal(drains, 17); - t.end(); - }); - - tw.on('drain', function() { - drains++; - }); - - var i = 0; - (function W() { - do { - var ret = tw.write(chunks[i++]); - } while (ret !== false && i < chunks.length); - - if (i < chunks.length) { - assert(tw._writableState.length >= 50); - tw.once('drain', W); - } else { - tw.end(); - } - })(); -}); - -test('write bufferize', function(t) { - var tw = new TestWriter({ - highWaterMark: 100 - }); - - var encodings = - [ 'hex', - 'utf8', - 'utf-8', - 'ascii', - 'binary', - 'base64', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le', - undefined ]; - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got the expected chunks'); - }); - - chunks.forEach(function(chunk, i) { - var enc = encodings[ i % encodings.length ]; - chunk = new Buffer(chunk); - tw.write(chunk.toString(enc), enc); - }); - t.end(); -}); - -test('write no bufferize', function(t) { - var tw = new TestWriter({ - highWaterMark: 100, - decodeStrings: false - }); - - tw._write = function(chunk, encoding, cb) { - assert(typeof chunk === 'string'); - chunk = new Buffer(chunk, encoding); - return TestWriter.prototype._write.call(this, chunk, encoding, cb); - }; - - var encodings = - [ 'hex', - 'utf8', - 'utf-8', - 'ascii', - 'binary', - 'base64', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le', - undefined ]; - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got the expected chunks'); - }); - - chunks.forEach(function(chunk, i) { - var enc = encodings[ i % encodings.length ]; - chunk = new Buffer(chunk); - tw.write(chunk.toString(enc), enc); - }); - t.end(); -}); - -test('write callbacks', function (t) { - var callbacks = chunks.map(function(chunk, i) { - return [i, function(er) { - callbacks._called[i] = chunk; - }]; - }).reduce(function(set, x) { - set['callback-' + x[0]] = x[1]; - return set; - }, {}); - callbacks._called = []; - - var tw = new TestWriter({ - highWaterMark: 100 - }); - - tw.on('finish', function() { - process.nextTick(function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.same(callbacks._called, chunks, 'called all callbacks'); - t.end(); - }); - }); - - chunks.forEach(function(chunk, i) { - tw.write(chunk, callbacks['callback-' + i]); - }); - tw.end(); -}); - -test('end callback', function (t) { - var tw = new TestWriter(); - tw.end(function () { - t.end(); - }); -}); - -test('end callback with chunk', function (t) { - var tw = new TestWriter(); - tw.end(new Buffer('hello world'), function () { - t.end(); - }); -}); - -test('end callback with chunk and encoding', function (t) { - var tw = new TestWriter(); - tw.end('hello world', 'ascii', function () { - t.end(); - }); -}); - -test('end callback after .write() call', function (t) { - var tw = new TestWriter(); - tw.write(new Buffer('hello world')); - tw.end(function () { - t.end(); - }); -}); - -test('encoding should be ignored for buffers', function(t) { - var tw = new W(); - var hex = '018b5e9a8f6236ffe30e31baf80d2cf6eb'; - tw._write = function(chunk, encoding, cb) { - t.equal(chunk.toString('hex'), hex); - t.end(); - }; - var buf = new Buffer(hex, 'hex'); - tw.write(buf, 'binary'); -}); - -test('writables are not pipable', function(t) { - var w = new W(); - w._write = function() {}; - var gotError = false; - w.on('error', function(er) { - gotError = true; - }); - w.pipe(process.stdout); - assert(gotError); - t.end(); -}); - -test('duplexes are pipable', function(t) { - var d = new D(); - d._read = function() {}; - d._write = function() {}; - var gotError = false; - d.on('error', function(er) { - gotError = true; - }); - d.pipe(process.stdout); - assert(!gotError); - t.end(); -}); - -test('end(chunk) two times is an error', function(t) { - var w = new W(); - w._write = function() {}; - var gotError = false; - w.on('error', function(er) { - gotError = true; - t.equal(er.message, 'write after end'); - }); - w.end('this is the end'); - w.end('and so is this'); - process.nextTick(function() { - assert(gotError); - t.end(); - }); -}); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/zlib.js b/deps/npm/node_modules/sha/node_modules/readable-stream/zlib.js deleted file mode 100644 index a30ca2091e..0000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/zlib.js +++ /dev/null @@ -1,452 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Transform = require('./lib/_stream_transform.js'); - -var binding = process.binding('zlib'); -var util = require('util'); -var assert = require('assert').ok; - -// zlib doesn't provide these, so kludge them in following the same -// const naming scheme zlib uses. -binding.Z_MIN_WINDOWBITS = 8; -binding.Z_MAX_WINDOWBITS = 15; -binding.Z_DEFAULT_WINDOWBITS = 15; - -// fewer than 64 bytes per chunk is stupid. -// technically it could work with as few as 8, but even 64 bytes -// is absurdly low. Usually a MB or more is best. -binding.Z_MIN_CHUNK = 64; -binding.Z_MAX_CHUNK = Infinity; -binding.Z_DEFAULT_CHUNK = (16 * 1024); - -binding.Z_MIN_MEMLEVEL = 1; -binding.Z_MAX_MEMLEVEL = 9; -binding.Z_DEFAULT_MEMLEVEL = 8; - -binding.Z_MIN_LEVEL = -1; -binding.Z_MAX_LEVEL = 9; -binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; - -// expose all the zlib constants -Object.keys(binding).forEach(function(k) { - if (k.match(/^Z/)) exports[k] = binding[k]; -}); - -// translation table for return codes. -exports.codes = { - Z_OK: binding.Z_OK, - Z_STREAM_END: binding.Z_STREAM_END, - Z_NEED_DICT: binding.Z_NEED_DICT, - Z_ERRNO: binding.Z_ERRNO, - Z_STREAM_ERROR: binding.Z_STREAM_ERROR, - Z_DATA_ERROR: binding.Z_DATA_ERROR, - Z_MEM_ERROR: binding.Z_MEM_ERROR, - Z_BUF_ERROR: binding.Z_BUF_ERROR, - Z_VERSION_ERROR: binding.Z_VERSION_ERROR -}; - -Object.keys(exports.codes).forEach(function(k) { - exports.codes[exports.codes[k]] = k; -}); - -exports.Deflate = Deflate; -exports.Inflate = Inflate; -exports.Gzip = Gzip; -exports.Gunzip = Gunzip; -exports.DeflateRaw = DeflateRaw; -exports.InflateRaw = InflateRaw; -exports.Unzip = Unzip; - -exports.createDeflate = function(o) { - return new Deflate(o); -}; - -exports.createInflate = function(o) { - return new Inflate(o); -}; - -exports.createDeflateRaw = function(o) { - return new DeflateRaw(o); -}; - -exports.createInflateRaw = function(o) { - return new InflateRaw(o); -}; - -exports.createGzip = function(o) { - return new Gzip(o); -}; - -exports.createGunzip = function(o) { - return new Gunzip(o); -}; - -exports.createUnzip = function(o) { - return new Unzip(o); -}; - - -// Convenience methods. -// compress/decompress a string or buffer in one step. -exports.deflate = function(buffer, callback) { - zlibBuffer(new Deflate(), buffer, callback); -}; - -exports.gzip = function(buffer, callback) { - zlibBuffer(new Gzip(), buffer, callback); -}; - -exports.deflateRaw = function(buffer, callback) { - zlibBuffer(new DeflateRaw(), buffer, callback); -}; - -exports.unzip = function(buffer, callback) { - zlibBuffer(new Unzip(), buffer, callback); -}; - -exports.inflate = function(buffer, callback) { - zlibBuffer(new Inflate(), buffer, callback); -}; - -exports.gunzip = function(buffer, callback) { - zlibBuffer(new Gunzip(), buffer, callback); -}; - -exports.inflateRaw = function(buffer, callback) { - zlibBuffer(new InflateRaw(), buffer, callback); -}; - -function zlibBuffer(engine, buffer, callback) { - var buffers = []; - var nread = 0; - - engine.on('error', onError); - engine.on('end', onEnd); - - engine.end(buffer); - flow(); - - function flow() { - var chunk; - while (null !== (chunk = engine.read())) { - buffers.push(chunk); - nread += chunk.length; - } - engine.once('readable', flow); - } - - function onError(err) { - engine.removeListener('end', onEnd); - engine.removeListener('readable', flow); - callback(err); - } - - function onEnd() { - var buf = Buffer.concat(buffers, nread); - buffers = []; - callback(null, buf); - } -} - - -// generic zlib -// minimal 2-byte header -function Deflate(opts) { - if (!(this instanceof Deflate)) return new Deflate(opts); - Zlib.call(this, opts, binding.DEFLATE); -} - -function Inflate(opts) { - if (!(this instanceof Inflate)) return new Inflate(opts); - Zlib.call(this, opts, binding.INFLATE); -} - - - -// gzip - bigger header, same deflate compression -function Gzip(opts) { - if (!(this instanceof Gzip)) return new Gzip(opts); - Zlib.call(this, opts, binding.GZIP); -} - -function Gunzip(opts) { - if (!(this instanceof Gunzip)) return new Gunzip(opts); - Zlib.call(this, opts, binding.GUNZIP); -} - - - -// raw - no header -function DeflateRaw(opts) { - if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); - Zlib.call(this, opts, binding.DEFLATERAW); -} - -function InflateRaw(opts) { - if (!(this instanceof InflateRaw)) return new InflateRaw(opts); - Zlib.call(this, opts, binding.INFLATERAW); -} - - -// auto-detect header. -function Unzip(opts) { - if (!(this instanceof Unzip)) return new Unzip(opts); - Zlib.call(this, opts, binding.UNZIP); -} - - -// the Zlib class they all inherit from -// This thing manages the queue of requests, and returns -// true or false if there is anything in the queue when -// you call the .write() method. - -function Zlib(opts, mode) { - this._opts = opts = opts || {}; - this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; - - Transform.call(this, opts); - - // means a different thing there. - this._readableState.chunkSize = null; - - if (opts.chunkSize) { - if (opts.chunkSize < exports.Z_MIN_CHUNK || - opts.chunkSize > exports.Z_MAX_CHUNK) { - throw new Error('Invalid chunk size: ' + opts.chunkSize); - } - } - - if (opts.windowBits) { - if (opts.windowBits < exports.Z_MIN_WINDOWBITS || - opts.windowBits > exports.Z_MAX_WINDOWBITS) { - throw new Error('Invalid windowBits: ' + opts.windowBits); - } - } - - if (opts.level) { - if (opts.level < exports.Z_MIN_LEVEL || - opts.level > exports.Z_MAX_LEVEL) { - throw new Error('Invalid compression level: ' + opts.level); - } - } - - if (opts.memLevel) { - if (opts.memLevel < exports.Z_MIN_MEMLEVEL || - opts.memLevel > exports.Z_MAX_MEMLEVEL) { - throw new Error('Invalid memLevel: ' + opts.memLevel); - } - } - - if (opts.strategy) { - if (opts.strategy != exports.Z_FILTERED && - opts.strategy != exports.Z_HUFFMAN_ONLY && - opts.strategy != exports.Z_RLE && - opts.strategy != exports.Z_FIXED && - opts.strategy != exports.Z_DEFAULT_STRATEGY) { - throw new Error('Invalid strategy: ' + opts.strategy); - } - } - - if (opts.dictionary) { - if (!Buffer.isBuffer(opts.dictionary)) { - throw new Error('Invalid dictionary: it should be a Buffer instance'); - } - } - - this._binding = new binding.Zlib(mode); - - var self = this; - this._hadError = false; - this._binding.onerror = function(message, errno) { - // there is no way to cleanly recover. - // continuing only obscures problems. - self._binding = null; - self._hadError = true; - - var error = new Error(message); - error.errno = errno; - error.code = exports.codes[errno]; - self.emit('error', error); - }; - - this._binding.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, - opts.level || exports.Z_DEFAULT_COMPRESSION, - opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, - opts.strategy || exports.Z_DEFAULT_STRATEGY, - opts.dictionary); - - this._buffer = new Buffer(this._chunkSize); - this._offset = 0; - this._closed = false; - - this.once('end', this.close); -} - -util.inherits(Zlib, Transform); - -Zlib.prototype.reset = function reset() { - return this._binding.reset(); -}; - -Zlib.prototype._flush = function(output, callback) { - var rs = this._readableState; - var self = this; - this._transform(null, output, function(er) { - if (er) - return callback(er); - - // now a weird thing happens... it could be that you called flush - // but everything had already actually been consumed, but it wasn't - // enough to get over the Readable class's lowWaterMark. - // In that case, we emit 'readable' now to make sure it's consumed. - if (rs.length && - rs.length < rs.lowWaterMark && - !rs.ended && - rs.needReadable) - self.emit('readable'); - - callback(); - }); -}; - -Zlib.prototype.flush = function(callback) { - var ws = this._writableState; - var ts = this._transformState; - - if (ws.writing) { - ws.needDrain = true; - var self = this; - this.once('drain', function() { - self._flush(ts.output, callback); - }); - return; - } - - this._flush(ts.output, callback || function() {}); -}; - -Zlib.prototype.close = function(callback) { - if (callback) - process.nextTick(callback); - - if (this._closed) - return; - - this._closed = true; - - this._binding.close(); - - var self = this; - process.nextTick(function() { - self.emit('close'); - }); -}; - -Zlib.prototype._transform = function(chunk, output, cb) { - var flushFlag; - var ws = this._writableState; - var ending = ws.ending || ws.ended; - var last = ending && (!chunk || ws.length === chunk.length); - - if (chunk !== null && !Buffer.isBuffer(chunk)) - return cb(new Error('invalid input')); - - // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag. - // If it's explicitly flushing at some other time, then we use - // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression - // goodness. - if (last) - flushFlag = binding.Z_FINISH; - else if (chunk === null) - flushFlag = binding.Z_FULL_FLUSH; - else - flushFlag = binding.Z_NO_FLUSH; - - var availInBefore = chunk && chunk.length; - var availOutBefore = this._chunkSize - this._offset; - var inOff = 0; - - var req = this._binding.write(flushFlag, - chunk, // in - inOff, // in_off - availInBefore, // in_len - this._buffer, // out - this._offset, //out_off - availOutBefore); // out_len - - req.buffer = chunk; - req.callback = callback; - - var self = this; - function callback(availInAfter, availOutAfter, buffer) { - if (self._hadError) - return; - - var have = availOutBefore - availOutAfter; - assert(have >= 0, 'have should not go down'); - - if (have > 0) { - var out = self._buffer.slice(self._offset, self._offset + have); - self._offset += have; - // serve some output to the consumer. - output(out); - } - - // exhausted the output buffer, or used all the input create a new one. - if (availOutAfter === 0 || self._offset >= self._chunkSize) { - availOutBefore = self._chunkSize; - self._offset = 0; - self._buffer = new Buffer(self._chunkSize); - } - - if (availOutAfter === 0) { - // Not actually done. Need to reprocess. - // Also, update the availInBefore to the availInAfter value, - // so that if we have to hit it a third (fourth, etc.) time, - // it'll have the correct byte counts. - inOff += (availInBefore - availInAfter); - availInBefore = availInAfter; - - var newReq = self._binding.write(flushFlag, - chunk, - inOff, - availInBefore, - self._buffer, - self._offset, - self._chunkSize); - newReq.callback = callback; // this same function - newReq.buffer = chunk; - return; - } - - // finished with the chunk. - cb(); - } -}; - -util.inherits(Deflate, Zlib); -util.inherits(Inflate, Zlib); -util.inherits(Gzip, Zlib); -util.inherits(Gunzip, Zlib); -util.inherits(DeflateRaw, Zlib); -util.inherits(InflateRaw, Zlib); -util.inherits(Unzip, Zlib); diff --git a/deps/npm/node_modules/sha/package.json b/deps/npm/node_modules/sha/package.json index a5f40090ca..af9aa7adae 100644 --- a/deps/npm/node_modules/sha/package.json +++ b/deps/npm/node_modules/sha/package.json @@ -22,10 +22,11 @@ "bugs": { "url": "https://github.com/ForbesLindesay/sha/issues" }, + "homepage": "https://github.com/ForbesLindesay/sha", "dependencies": { "graceful-fs": "2", "readable-stream": "1.0" }, "_id": "sha@1.2.3", - "_from": "sha@latest" + "_from": "sha@~1.2.1" } diff --git a/deps/npm/package.json b/deps/npm/package.json index 616c7ac688..553082d6f7 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "1.3.23", + "version": "1.3.25", "name": "npm", "publishConfig": { "proprietary-attribs": false @@ -50,15 +50,15 @@ "mkdirp": "~0.3.5", "read": "~1.0.4", "lru-cache": "~2.5.0", - "node-gyp": "~0.12.0", + "node-gyp": "~0.12.2", "fstream-npm": "~0.1.6", "uid-number": "0", "archy": "0", "chownr": "0", "npmlog": "0.0.6", "ansi": "~0.2.1", - "npm-registry-client": "~0.3.2", - "read-package-json": "~1.1.4", + "npm-registry-client": "~0.3.3", + "read-package-json": "~1.1.6", "read-installed": "~0.2.2", "glob": "~3.2.6", "init-package-json": "0.0.14", @@ -66,7 +66,7 @@ "lockfile": "~0.4.0", "retry": "~0.6.0", "once": "~1.3.0", - "npmconf": "~0.1.7", + "npmconf": "~0.1.12", "opener": "~1.3.0", "chmodr": "~0.1.0", "cmd-shim": "~1.1.1", @@ -79,7 +79,8 @@ "text-table": "~0.2.0", "ansicolors": "~0.3.2", "ansistyles": "~0.1.3", - "path-is-inside": "~1.0.0" + "path-is-inside": "~1.0.0", + "columnify": "0.1.2" }, "bundleDependencies": [ "semver", @@ -129,7 +130,8 @@ "text-table", "ansicolors", "ansistyles", - "path-is-inside" + "path-is-inside", + "columnify" ], "devDependencies": { "ronn": "~0.3.6", diff --git a/deps/npm/test/tap/ignore-install-link.js b/deps/npm/test/tap/ignore-install-link.js new file mode 100644 index 0000000000..314b157a2e --- /dev/null +++ b/deps/npm/test/tap/ignore-install-link.js @@ -0,0 +1,125 @@ +var common = require('../common-tap.js') +var test = require('tap').test +var osenv = require('osenv') +var npm = require.resolve("../../bin/npm-cli.js") +var node = process.execPath +var path = require('path') +var fs = require('fs') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var pkg = path.resolve(__dirname, 'ignore-install-link') +var spawn = require('child_process').spawn +var linkDir = path.resolve(osenv.tmpdir(), 'npm-link-issue') + +test('ignore-install-link: ignore install if a package is linked', function(t) { + setup(function(err) { + if (err) { + t.ifError(err) + t.end() + return + } + + var p = path.resolve(pkg, 'node_modules', 'npm-link-issue') + fs.lstat(p, function(err, s) { + t.ifError(err) + + t.ok(true === s.isSymbolicLink(), 'child is a symlink') + t.end() + }) + }) +}) + +test('cleanup', function(t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + rimraf.sync(linkDir) + t.end() +}) + + +function setup(cb) { + rimraf.sync(linkDir) + mkdirp.sync(pkg) + mkdirp.sync(path.resolve(pkg, 'cache')) + mkdirp.sync(path.resolve(pkg, 'node_modules')) + mkdirp.sync(linkDir) + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ + author: 'Evan Lucas', + name: 'ignore-install-link', + version: '0.0.0', + description: 'Test for ignoring install when a package has been linked', + dependencies: { + 'npm-link-issue': 'git+https://github.com/lancefisher/npm-link-issue.git#0.0.1' + } + }), 'utf8') + fs.writeFileSync(path.resolve(linkDir, 'package.json'), JSON.stringify({ + author: 'lancefisher', + name: 'npm-link-issue', + version: '0.0.1', + description: 'Sample Dependency' + }), 'utf8') + + clone(cb) +} + +function clone (cb) { + var child = createChild(process.cwd(), 'git', ['--git-dir', linkDir, 'init']) + child.on('close', function(c) { + if (c !== 0) + return cb(new Error('Failed to init the git repository')) + + console.log('Successfully inited the git repository') + process.chdir(linkDir) + performLink(cb) + }) +} + +function performLink (cb) { + var child = createChild(linkDir, node, [npm, 'link', '.']) + child.on('close', function(c) { + if (c !== 0) + return cb(new Error('Failed to link ' + linkDir + ' globally')) + + console.log('Successfully linked ' + linkDir + ' globally') + performLink2(cb) + }) +} + +function performLink2 (cb) { + var child = createChild(pkg, node, [npm, 'link', 'npm-link-issue']) + child.on('close', function(c) { + if (c !== 0) + return cb(new Error('Failed to link ' + linkDir + ' to local node_modules')) + + console.log('Successfully linked ' + linkDir + ' to local node_modules') + performInstall(cb) + }) +} + +function performInstall (cb) { + var child = createChild(pkg, node, [npm, 'install']) + child.on('close', function(c) { + if (c !== 0) + return cb(new Error('Failed to install')) + + console.log('Successfully installed') + cb() + }) +} + +function createChild (cwd, cmd, args) { + var env = { + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH + } + + if (process.platform === "win32") + env.npm_config_cache = "%APPDATA%\\npm-cache" + + return spawn(cmd, args, { + cwd: cwd, + stdio: "inherit", + env: env + }) +} diff --git a/deps/npm/test/tap/outdated-git.js b/deps/npm/test/tap/outdated-git.js index 433f8b0440..dda2abccc8 100644 --- a/deps/npm/test/tap/outdated-git.js +++ b/deps/npm/test/tap/outdated-git.js @@ -12,12 +12,13 @@ mkdirp.sync(pkg + "/cache") test("dicovers new versions in outdated", function (t) { process.chdir(pkg) - t.plan(3) + t.plan(4) npm.load({cache: pkg + "/cache", registry: common.registry}, function () { npm.outdated(function (er, d) { t.equal('git', d[0][3]) t.equal('git', d[0][4]) t.equal('git://github.com/robertkowalski/foo-private.git', d[0][5]) + t.equal('git://user:pass@github.com/robertkowalski/foo-private.git', d[1][5]) }) }) }) diff --git a/deps/npm/test/tap/outdated-git/package.json b/deps/npm/test/tap/outdated-git/package.json index 02385d5827..e160a21cc1 100644 --- a/deps/npm/test/tap/outdated-git/package.json +++ b/deps/npm/test/tap/outdated-git/package.json @@ -5,6 +5,7 @@ "version": "0.0.1", "main": "index.js", "dependencies": { - "foo-private": "git://github.com/robertkowalski/foo-private.git" + "foo-private": "git://github.com/robertkowalski/foo-private.git", + "foo-private-credentials": "git://user:pass@github.com/robertkowalski/foo-private.git" } } diff --git a/deps/npm/test/tap/outdated-json.js b/deps/npm/test/tap/outdated-json.js index f54642fab8..7c19561ee3 100644 --- a/deps/npm/test/tap/outdated-json.js +++ b/deps/npm/test/tap/outdated-json.js @@ -4,10 +4,11 @@ var common = require("../common-tap.js") , npm = require("../../") , mr = require("npm-registry-mock") , path = require("path") + , osenv = require("osenv") , spawn = require('child_process').spawn , node = process.execPath , npmc = require.resolve('../../') - , pkg = __dirname + '/outdated-new-versions' + , pkg = path.resolve(__dirname, 'outdated-new-versions') , args = [ npmc , 'outdated' , '--json' @@ -65,6 +66,8 @@ test("cleanup", function (t) { }) function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) rimraf.sync(pkg + "/node_modules") rimraf.sync(pkg + "/cache") } diff --git a/deps/npm/test/tap/prepublish.js b/deps/npm/test/tap/prepublish.js index 355ce1a23f..f80085d92c 100644 --- a/deps/npm/test/tap/prepublish.js +++ b/deps/npm/test/tap/prepublish.js @@ -58,16 +58,21 @@ test('test', function (t) { env: env }) child.stdout.setEncoding('utf8') - child.stderr.on('data', function(chunk) { - throw new Error('got stderr data: ' + JSON.stringify('' + chunk)) - }) + child.stderr.on('data', onerr) child.stdout.on('data', ondata) child.on('close', onend) var c = '' + , e = '' function ondata (chunk) { c += chunk } + function onerr (chunk) { + e += chunk + } function onend () { + if (e) { + throw new Error('got stderr data: ' + JSON.stringify('' + e)) + } c = c.trim() var regex = new RegExp("" + "> npm-test-prepublish@1.2.5 prepublish [^\\r\\n]+\\r?\\n" + diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js new file mode 100644 index 0000000000..97bed98cb7 --- /dev/null +++ b/deps/npm/test/tap/scripts-whitespace-windows.js @@ -0,0 +1,71 @@ +var test = require('tap').test +var path = require('path') +var npm = path.resolve(__dirname, '../../cli.js') +var pkg = __dirname + '/scripts-whitespace-windows' +var tmp = pkg + '/tmp' +var cache = pkg + '/cache' +var modules = pkg + '/node_modules' +var dep = pkg + '/dep' + +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var node = process.execPath +var spawn = require('child_process').spawn + +test('setup', function (t) { + mkdirp.sync(cache) + mkdirp.sync(tmp) + rimraf.sync(modules) + + var env = { + npm_config_cache: cache, + npm_config_tmp: tmp, + npm_config_prefix: pkg, + npm_config_global: 'false' + } + + var child = spawn(node, [npm, 'i', dep], { + cwd: pkg, + env: env + }) + + child.stdout.setEncoding('utf8') + child.stderr.on('data', function(chunk) { + throw new Error('got stderr data: ' + JSON.stringify('' + chunk)) + }) + child.on('close', function () { + t.end() + }) +}) + +test('test', function (t) { + + var child = spawn(node, [npm, 'run', 'foo'], { + cwd: pkg, + env: process.env + }) + + child.stdout.setEncoding('utf8') + child.stderr.on('data', function(chunk) { + throw new Error('got stderr data: ' + JSON.stringify('' + chunk)) + }) + child.stdout.on('data', ondata) + child.on('close', onend) + var c = '' + function ondata (chunk) { + c += chunk + } + function onend () { + c = c.trim() + + t.ok(/npm-test-fine/.test(c)) + t.end() + } +}) + +test('cleanup', function (t) { + rimraf.sync(cache) + rimraf.sync(tmp) + rimraf.sync(modules) + t.end() +}) diff --git a/deps/npm/test/tap/scripts-whitespace-windows/README.md b/deps/npm/test/tap/scripts-whitespace-windows/README.md new file mode 100644 index 0000000000..76f177f192 --- /dev/null +++ b/deps/npm/test/tap/scripts-whitespace-windows/README.md @@ -0,0 +1 @@ +# Hi diff --git a/deps/npm/test/tap/scripts-whitespace-windows/dep/README.md b/deps/npm/test/tap/scripts-whitespace-windows/dep/README.md new file mode 100644 index 0000000000..0d9d64f271 --- /dev/null +++ b/deps/npm/test/tap/scripts-whitespace-windows/dep/README.md @@ -0,0 +1 @@ +# Hi! diff --git a/deps/npm/test/tap/scripts-whitespace-windows/dep/bin/foo b/deps/npm/test/tap/scripts-whitespace-windows/dep/bin/foo new file mode 100644 index 0000000000..d6708417d9 --- /dev/null +++ b/deps/npm/test/tap/scripts-whitespace-windows/dep/bin/foo @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +if (process.argv.length === 8) + console.log('npm-test-fine') diff --git a/deps/npm/test/tap/scripts-whitespace-windows/dep/package.json b/deps/npm/test/tap/scripts-whitespace-windows/dep/package.json new file mode 100644 index 0000000000..4ff9829130 --- /dev/null +++ b/deps/npm/test/tap/scripts-whitespace-windows/dep/package.json @@ -0,0 +1,6 @@ +{ + "name": "scripts-whitespace-windows-dep", + "version": "0.0.1", + "bin": [ "bin/foo" ], + "repository": "git://github.com/robertkowalski/bogusfixture" +} diff --git a/deps/npm/test/tap/scripts-whitespace-windows/package.json b/deps/npm/test/tap/scripts-whitespace-windows/package.json new file mode 100644 index 0000000000..06e1a572b3 --- /dev/null +++ b/deps/npm/test/tap/scripts-whitespace-windows/package.json @@ -0,0 +1,11 @@ +{ + "name": "scripts-whitespace-windows", + "scripts": { + "foo": "foo --title \"Analysis of\" --recurse -d report src" + }, + "description": "a test", + "repository": "git://github.com/robertkowalski/bogus", + "dependencies": { + "scripts-whitespace-windows-dep": "0.0.1" + } +} diff --git a/deps/npm/test/tap/startstop.js b/deps/npm/test/tap/startstop.js index f94f3b0292..d5a0026cee 100644 --- a/deps/npm/test/tap/startstop.js +++ b/deps/npm/test/tap/startstop.js @@ -12,13 +12,14 @@ var common = require('../common-tap') function run (command, t, parse) { var c = '' + , e = '' , node = process.execPath , child = spawn(node, [npm, command], { cwd: pkg }) child.stderr.on('data', function (chunk) { - throw new Error('npm ' + command + ' stderr: ' + chunk.toString()) + e += chunk }) child.stdout.on('data', function (chunk) { @@ -26,6 +27,9 @@ function run (command, t, parse) { }) child.stdout.on('end', function () { + if (e) { + throw new Error('npm ' + command + ' stderr: ' + e.toString()) + } if (parse) { // custom parsing function c = parse(c) |