diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index a6576de6fd6a..b73d83ac7054 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,63 @@ +### v2.3.0 (2015-01-15): + +#### REGISTRY 2: OH MY STARS! WHO AM I? + +* [`e662a60`](https://github.com/npm/npm/commit/e662a60e2f9a542effd8e72279d4622fe514415e) + The new `whoami` endpoint might not return a value. + ([@othiym23](https://github.com/othiym23)) +* [`c2cccd4`](https://github.com/npm/npm/commit/c2cccd4bbc65885239ed646eb510155f7b8af13d) + `npm-registry-client@5.0.0`: Includes the following fine changes + ([@othiym23](https://github.com/othiym23)): + * [`ba6b73e`](https://github.com/npm/npm-registry-client/commit/ba6b73e351027246c228622014e4441412409bad) + [#92](https://github.com/npm/npm-registry-client/issues/92) BREAKING CHANGE: + Move `/whoami` endpoint out of the package namespace (to `/-/whoami`). + ([@othiym23](https://github.com/othiym23)) + * [`3b174b7`](https://github.com/npm/npm-registry-client/commit/3b174b75c0c9ea77e298e6bb664fb499824ecc7c) + [#93](https://github.com/npm/npm-registry-client/issues/93) Registries based + on token-based auth can now offer starring. + ([@bcoe](https://github.com/bcoe)) + * [`4701a29`](https://github.com/npm/npm-registry-client/commit/4701a29bcda41bc14aa91f361dd0d576e24677d7) + Fix HTTP[S] connection keep-alive on Node 0.11 / io.js 1.0. + ([@fengmk2](https://github.com/fengmk2)) + +#### BETTER REGISTRY METADATA CACHING + +* [`98e1e10`](https://github.com/npm/npm/commit/98e1e1080df1f2cab16ed68035603950ea3d2d48) + [#6791](https://github.com/npm/npm/issues/6791) Add caching based on + Last-Modified / If-Modified-Since headers. Includes this + `npm-registry-client@5.0.0` change ([@lxe](https://github.com/lxe)): + * [`07bc335`](https://github.com/npm/npm-registry-client/commit/07bc33502b93554cd7539bfcce37d6e2d5404cd0) + [#86](https://github.com/npm/npm-registry-client/issues/86) Add Last-Modified + / If-Modified-Since cache header handling. ([@lxe](https://github.com/lxe)) + +#### HOW MUCH IS THAT WINDOWS IN THE DOGGY? + +* [`706d49a`](https://github.com/npm/npm/commit/706d49ab45521360fce1a68779b8de899015d8c2) + [#7107](https://github.com/npm/npm/issues/7107) `getCacheStat` passes a stub + stat on Windows. ([@rmg](https://github.com/rmg)) +* [`5fce278`](https://github.com/npm/npm/commit/5fce278a688a1cb79183e012bde40b089c2e97a4) + [#5267](https://github.com/npm/npm/issues/5267) Use `%COMSPEC%` when set on + Windows. ([@edmorley](https://github.com/edmorley)) +* [`cc2e099`](https://github.com/npm/npm/commit/cc2e09912ce2f91567c485422e4e797c4deb9842) + [#7083](https://github.com/npm/npm/issues/7083) Ensure Git cache prefix + exists before repo clone on Windows. + ([@othiym23](https://github.com/othiym23)) + +#### THRILLING BUG FIXES + +* [`c6fb430`](https://github.com/npm/npm/commit/c6fb430e55672b3caf87d25cbd2aeeebc449e2f2) + [#4197](https://github.com/npm/npm/issues/4197) Report `umask` as a 0-padded + octal literal. ([@smikes](https://github.com/smikes)) +* [`209713e`](https://github.com/npm/npm/commit/209713ebd4b77da11ce27d90c3346f78d760ba52) + [#4197](https://github.com/npm/npm/issues/4197) `umask@1.1.0`: Properly + handle `umask`s (i.e. not decimal numbers). + ([@smikes](https://github.com/smikes)) +* [`9eac0a1`](https://github.com/npm/npm/commit/9eac0a14488c5979ebde4c17881c8cd74f395069) + Make the example for bin links non-destructive. + ([@KevinSheedy](https://github.com/KevinSheedy)) +* [`6338bcf`](https://github.com/npm/npm/commit/6338bcfcd9cd1b0cc48b051dae764dc436ab5332) + `glob@4.3.5`: " -> ', for some reason. ([@isaacs](https://github.com/isaacs)) + ### v2.2.0 (2015-01-08): * [`88c531d`](https://github.com/npm/npm/commit/88c531d1c0b3aced8f2a09632db01b5635e7226a) diff --git a/deps/npm/doc/cli/npm-view.md b/deps/npm/doc/cli/npm-view.md index 8f52a85a92fe..683ed09f46f6 100644 --- a/deps/npm/doc/cli/npm-view.md +++ b/deps/npm/doc/cli/npm-view.md @@ -24,7 +24,7 @@ For example, to show the dependencies of the `ronn` package at version npm view ronn@0.3.5 dependencies -You can view child field by separating them with a period. +You can view child fields by separating them with a period. To view the git repository URL for the latest version of npm, you could do this: diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 00939cbf49d4..1a54ec06b3c9 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -154,12 +154,12 @@ command name to local file name. On install, npm will symlink that file into installs. -For example, npm has this: +For example, myapp could have this: - { "bin" : { "npm" : "./cli.js" } } + { "bin" : { "myapp" : "./cli.js" } } -So, when you install npm, it'll create a symlink from the `cli.js` script to -`/usr/local/bin/npm`. +So, when you install myapp, it'll create a symlink from the `cli.js` script to +`/usr/local/bin/myapp`. If you have a single executable, and its name should be the name of the package, then you can just supply it as a string. For example: diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index fc6201e66792..7aaaffb8d6be 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -829,7 +829,7 @@ The location of user-level configuration settings. ### umask * Default: 022 -* Type: Octal numeric string +* Type: Octal numeric string in range 0000..0777 (0..511) The "umask" value to use when setting the file creation mode on files and folders. diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 2738adcd74b4..a9953056c971 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -126,7 +126,7 @@

If you have a complaint about a package in the public npm registry, and cannot resolve it with the package owner, please email -support@npmjs.com and explain the situation.

+support@npmjs.com and explain the situation.

Any data published to The npm Registry (including user account information) may be removed or modified at the sole discretion of the npm server administrators.

@@ -169,5 +169,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index 971bb1361142..d1b9fb5bca0b 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index e34204f8a6b1..a7f3c3e4ad37 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 65e5d0d399ca..952856f86917 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index 36e2ab9a03f2..16292985c888 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index 7ee80e63e3cb..758eef37ace7 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index 8799f10ffd9e..eb965608ef4a 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index e13998e46fc2..25fa5167f4b1 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 9779d1743d50..f7e777d86d2f 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index 4b7d88cc94f6..fb8b36e1b293 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index 7311b1d5d53f..3612ae521fdc 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -44,5 +44,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 8ae0adaebb9e..dc32dfdbe5ab 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index dc3cb69c7479..ef095d462cb0 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 81831911dfe1..7a80c5297dcf 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 3dd0d472df90..3882694cf03a 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 7c533218f611..8b0bc0c6fb79 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@

global

       - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 251165626725..eeff9318d0ae 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index 35070f867e92..6fff13787514 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index c506967a8804..13a1ed8f5de3 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 19d5abc29118..22398c50df19 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index c528d1f1b747..6ee9e7d59f48 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index 96338745cac1..dccedcab6ce0 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index 9ff291a32423..1203b177a220 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@

CONFIGURATION

       - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 0f4436b8c3a1..718f55aae626 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index aade48106ada..e3c90034fef9 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -52,5 +52,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index ebdede871ea8..5231b853fdb6 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index aed1a1f9d18c..c9877f401251 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -41,5 +41,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 7faf23b64919..8d116367aefb 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index 5da80e161c0c..08aec3538cf8 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index 5af05b1f1eac..74e8271a541b 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index fe29ac2a5052..018b57ea3b24 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 454329e630f5..bc145f5f058a 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index ecb1f949b252..b799e3a7ff40 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 97baf3e8e9ff..51720cc7d851 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 8e8d3e41867a..004ca7ed7f14 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 60a56e336c78..5feecc4b4634 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -27,5 +27,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index 07f17f849119..cdd410a14c61 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 13b73d54634d..627f9e65f0b8 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@

RETURN VALUE

       - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index f15772c49bc1..c381923cd88b 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index 3e9e8cd7aa54..ef985922c643 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@

SYNOPSIS

npm.commands.install(["package"], cb) })

VERSION

-

2.2.0

+

2.3.0

DESCRIPTION

This is the API documentation for npm. To find documentation of the command line @@ -109,5 +109,5 @@

ABBREVS

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 73c55a20f5d6..541ad0c41fa6 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 9fb28248be70..0f61d5c0be8c 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 46e1bb714257..ccb59fe06399 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 321af44288de..a32234b9f75f 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 49c06b89274e..2aec65af8a9b 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index e08fdc15702b..d0d392a29c46 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 49e16489c67b..69da1503e450 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index a35e60beef5b..7521a212a81a 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 85b74cb78395..2ea5f3de96fb 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index ccbd2330524c..886ddd1696f8 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 53e8f77c8c3d..0721663da06f 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 6fc2b6cb997e..6a068adb1557 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index d8b1c3345fc4..38e79ce0d600 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 47ae3dd8842e..3584c29b8810 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index ad398fd1cbec..eb463a8cd992 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 8d1573a9070c..c0586d97b785 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -40,5 +40,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 4ecf983b6021..6a7f9dd7dd9f 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -239,5 +239,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 605250dff9d2..b783736d3252 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -71,5 +71,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 9e339765c731..d4d80cfdaae8 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,7 @@

SYNOPSIS

limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

-
npm@2.2.0 /path/to/npm
+
npm@2.3.0 /path/to/npm
 └─┬ init-package-json@0.0.4
   └── promzard@0.1.5
 

It will print out extraneous, missing, and invalid packages.

@@ -85,5 +85,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 097040ae339e..81552873ad11 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -67,5 +67,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 8f525c08e59d..ed9bcafcb984 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index dc24a7fb4d69..c5ebe0798958 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 03b213771392..f3926644edbd 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 98c757a45325..03b306dad3ea 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -39,5 +39,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index f5d7adfaa4cb..6dc61da6583e 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -59,5 +59,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index e1a3ca6e98fd..27252fcbba24 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 050c1f624d66..2ac34d35d436 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 37deabf88764..e107a541c07c 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 845da11c616a..617de0c68158 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 044a91453107..08adcec8e12a 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 69f93318c4a0..508e04025a67 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -50,5 +50,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index f2943cca9f20..7b613de6b3f0 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 3d6fb470b35b..2495eeb3aa4b 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -164,5 +164,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index ceb9bcf0b5fb..ae434f6e40fe 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index ee5cf6ed5784..6ec03a509909 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index c9ed7fc39eb6..eedbd240c2ef 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -34,5 +34,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index c1f54ba8f75d..610da6069871 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index d3540dae31e3..57757dfa796c 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -61,5 +61,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 754e7a91a149..e7eacf8890f5 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index b7a7426ea878..a0799b36b1ad 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -57,5 +57,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 3c4df5efe327..a277055b1fe2 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 72f508aab30d..d1e66aa81260 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -42,5 +42,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index a9a40f736649..dfb537a74d20 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -55,5 +55,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index aee2ff19a683..8c54064ce522 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -24,7 +24,7 @@

SYNOPSIS

For example, to show the dependencies of the ronn package at version 0.3.5, you could do the following:

npm view ronn@0.3.5 dependencies
-

You can view child field by separating them with a period. +

You can view child fields by separating them with a period. To view the git repository URL for the latest version of npm, you could do this:

npm view npm repository.url
@@ -82,5 +82,5 @@ 

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index d6b6425c0a56..fbd5544e95dd 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 64f8d3f554c7..f561c7eb82a8 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

npm

javascript package manager

SYNOPSIS

npm <command> [args]
 

VERSION

-

2.2.0

+

2.3.0

DESCRIPTION

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

CONTRIBUTIONS

the issues list or ask on the mailing list.

BUGS

When you find issues, please report them:

@@ -118,7 +118,7 @@

BUGS

  • web: http://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com

    Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -128,7 +128,7 @@

    AUTHOR

    Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

    +i@izs.me

    SEE ALSO

    Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -117,7 +117,7 @@

    AUTHOR

    Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html index 31e4979b87c8..95f26c6eebf2 100644 --- a/deps/npm/html/partial/doc/files/npm-json.html +++ b/deps/npm/html/partial/doc/files/npm-json.html @@ -104,10 +104,10 @@

      bin

      command name to local file name. On install, npm will symlink that file into prefix/bin for global installs, or ./node_modules/.bin/ for local installs.

      -

      For example, npm has this:

      -
      { "bin" : { "npm" : "./cli.js" } }
      -

      So, when you install npm, it'll create a symlink from the cli.js script to -/usr/local/bin/npm.

      +

      For example, myapp could have this:

      +
      { "bin" : { "myapp" : "./cli.js" } }
      +

      So, when you install myapp, it'll create a symlink from the cli.js script to +/usr/local/bin/myapp.

      If you have a single executable, and its name should be the name of the package, then you can just supply it as a string. For example:

      { "name": "my-program"
      diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html
      index 31e4979b87c8..95f26c6eebf2 100644
      --- a/deps/npm/html/partial/doc/files/package.json.html
      +++ b/deps/npm/html/partial/doc/files/package.json.html
      @@ -104,10 +104,10 @@ 

      bin

      command name to local file name. On install, npm will symlink that file into prefix/bin for global installs, or ./node_modules/.bin/ for local installs.

      -

      For example, npm has this:

      -
      { "bin" : { "npm" : "./cli.js" } }
      -

      So, when you install npm, it'll create a symlink from the cli.js script to -/usr/local/bin/npm.

      +

      For example, myapp could have this:

      +
      { "bin" : { "myapp" : "./cli.js" } }
      +

      So, when you install myapp, it'll create a symlink from the cli.js script to +/usr/local/bin/myapp.

      If you have a single executable, and its name should be the name of the package, then you can just supply it as a string. For example:

      { "name": "my-program"
      diff --git a/deps/npm/html/partial/doc/misc/npm-config.html b/deps/npm/html/partial/doc/misc/npm-config.html
      index d9b9dfdbe026..1dcbc237ccf5 100644
      --- a/deps/npm/html/partial/doc/misc/npm-config.html
      +++ b/deps/npm/html/partial/doc/misc/npm-config.html
      @@ -700,7 +700,7 @@ 

      userconfig

      umask

      • Default: 022
      • -
      • Type: Octal numeric string
      • +
      • Type: Octal numeric string in range 0000..0777 (0..511)

      The "umask" value to use when setting the file creation mode on files and folders.

      diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html index 1cc7ca38aee2..ab322741a701 100644 --- a/deps/npm/html/partial/doc/misc/npm-disputes.html +++ b/deps/npm/html/partial/doc/misc/npm-disputes.html @@ -2,7 +2,7 @@

      npm-disputes

      Handling Module

      SYNOPSIS

      1. Get the author email with npm owner ls <pkgname>
      2. -
      3. Email the author, CC support@npmjs.com
      4. +
      5. Email the author, CC support@npmjs.com
      6. After a few weeks, if there's no resolution, we'll sort it out.

      Don't squat on package names. Publish code or move out of the way.

      @@ -40,12 +40,12 @@

      DESCRIPTION

      owner (Bob).
    • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
    • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
    • diff --git a/deps/npm/html/partial/doc/misc/npm-faq.html b/deps/npm/html/partial/doc/misc/npm-faq.html index 5b935102cdfb..a015b7383120 100644 --- a/deps/npm/html/partial/doc/misc/npm-faq.html +++ b/deps/npm/html/partial/doc/misc/npm-faq.html @@ -225,7 +225,7 @@

      I get ECONNREFUSED a lot. What'

      To check if the registry is down, open up https://registry.npmjs.org/ in a web browser. This will also tell you if you are just unable to access the internet for some reason.

      -

      If the registry IS down, let us know by emailing support@npmjs.com +

      If the registry IS down, let us know by emailing support@npmjs.com or posting an issue at https://github.com/npm/npm/issues. If it's down for the world (and not just on your local network) then we're probably already being pinged about it.

      diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js index 1ad925eec35f..c829a4fe6d5e 100644 --- a/deps/npm/lib/cache/add-remote-git.js +++ b/deps/npm/lib/cache/add-remote-git.js @@ -14,6 +14,7 @@ var mkdir = require("mkdirp") , addLocal = require("./add-local.js") , realizePackageSpecifier = require("realize-package-specifier") , normalizeGitUrl = require("normalize-git-url") + , randomBytes = require("crypto").pseudoRandomBytes // only need uniqueness var remotes = path.resolve(npm.config.get("cache"), "_git-remotes") var templates = path.join(remotes, "_templates") @@ -211,11 +212,23 @@ function resolveHead (p, u, co, origUrl, cb) { * this has to be two steps. */ function cache (p, u, treeish, resolved, cb) { - var tmp = path.join(npm.tmp, Date.now()+"-"+Math.random(), treeish) - git.whichAndExec( - [ "clone", p, tmp ], - { cwd : p, env : gitEnv() }, - function (er, stdout, stderr) { + // generate a unique filename + randomBytes(6, function (er, random) { + if (er) return cb(er) + + var tmp = path.join( + npm.tmp, + "git-cache-"+random.toString("hex"), + treeish + ) + + mkdir(tmp, function (er) { + if (er) return cb(er) + + git.whichAndExec(["clone", p, tmp], { cwd : p, env : gitEnv() }, clone) + }) + + function clone (er, stdout, stderr) { stdout = (stdout + "\n" + stderr).trim() if (er) { log.error("Failed to clone "+resolved+" from "+u, stderr) @@ -224,34 +237,32 @@ function cache (p, u, treeish, resolved, cb) { log.verbose("git clone", "from", p) log.verbose("git clone", stdout) - git.whichAndExec( - [ "checkout", treeish ], - { cwd : tmp, env : gitEnv() }, - function (er, stdout, stderr) { - stdout = (stdout + "\n" + stderr).trim() - if (er) { - log.error("Failed to check out "+treeish, stderr) - return cb(er) - } - log.verbose("git checkout", stdout) + git.whichAndExec(["checkout", treeish], { cwd : tmp, env : gitEnv() }, checkout) + } - realizePackageSpecifier(tmp, function (er, spec) { - if (er) { - log.error("Failed to map", tmp, "to a package specifier") - return cb(er) - } + function checkout (er, stdout, stderr) { + stdout = (stdout + "\n" + stderr).trim() + if (er) { + log.error("Failed to check out "+treeish, stderr) + return cb(er) + } + log.verbose("git checkout", stdout) - // https://github.com/npm/npm/issues/6400 - // ensure pack logic is applied - addLocal(spec, null, function (er, data) { - if (data) data._resolved = resolved - cb(er, data) - }) - }) + realizePackageSpecifier(tmp, function (er, spec) { + if (er) { + log.error("Failed to map", tmp, "to a package specifier") + return cb(er) } - ) + + // https://github.com/npm/npm/issues/6400 + // ensure pack logic is applied + addLocal(spec, null, function (er, data) { + if (data) data._resolved = resolved + cb(er, data) + }) + }) } - ) + }) } var gitEnv_ diff --git a/deps/npm/lib/cache/caching-client.js b/deps/npm/lib/cache/caching-client.js index d81e6f53d628..459a236f5540 100644 --- a/deps/npm/lib/cache/caching-client.js +++ b/deps/npm/lib/cache/caching-client.js @@ -37,9 +37,9 @@ CachingRegistryClient.prototype._invalidatingRequest = function (uri, params, cb var invalidated = client._mapToCache(uri) // invalidate cache // - // This is irrelevant for commands that do etag caching, but ls and - // view also have a timed cache, so this keeps the user from thinking - // that it didn't work when it did. + // This is irrelevant for commands that do etag / last-modified caching, + // but ls and view also have a timed cache, so this keeps the user from + // thinking that it didn't work when it did. // Note that failure is an acceptable option here, since the only // result will be a stale cache for some helper commands. client.log.verbose("request", "invalidating", invalidated, "on", method) @@ -99,6 +99,7 @@ function get_ (uri, cachePath, params, cb) { , data = params.data , stat = params.stat , etag + , lastModified timeout = Math.min(timeout, npm.config.get("cache-max") || 0) timeout = Math.max(timeout, npm.config.get("cache-min") || -Infinity) @@ -110,17 +111,20 @@ function get_ (uri, cachePath, params, cb) { if (data) { if (data._etag) etag = data._etag + if (data._lastModified) lastModified = data._lastModified if (stat && timeout && timeout > 0) { if ((Date.now() - stat.mtime.getTime())/1000 < timeout) { log.verbose("get", uri, "not expired, no request") delete data._etag + delete data._lastModified return cb(null, data, JSON.stringify(data), { statusCode : 304 }) } if (staleOk) { log.verbose("get", uri, "staleOk, background update") delete data._etag + delete data._lastModified process.nextTick( cb.bind(null, null, data, JSON.stringify(data), { statusCode : 304 } ) ) @@ -130,9 +134,10 @@ function get_ (uri, cachePath, params, cb) { } var options = { - etag : etag, - follow : params.follow, - auth : params.auth + etag : etag, + lastModified : lastModified, + follow : params.follow, + auth : params.auth } this.request(uri, options, function (er, remoteData, raw, response) { // if we get an error talking to the registry, but we have it @@ -144,9 +149,9 @@ function get_ (uri, cachePath, params, cb) { if (response) { log.silly("get", "cb", [response.statusCode, response.headers]) - if (response.statusCode === 304 && etag) { + if (response.statusCode === 304 && (etag || lastModified)) { remoteData = data - log.verbose("etag", uri+" from cache") + log.verbose(etag ? "etag" : "lastModified", uri+" from cache") } } @@ -160,6 +165,7 @@ function get_ (uri, cachePath, params, cb) { // just give the write the old college try. if it fails, whatever. function saved () { delete data._etag + delete data._lastModified cb(er, data, raw, response) } @@ -169,7 +175,7 @@ function get_ (uri, cachePath, params, cb) { if (er) return saved() writeFile(cachePath, JSON.stringify(data), function (er) { - if (er || st.uid === null || st.gid === null) return saved() + if (er) return saved() chownr(made || cachePath, st.uid, st.gid, saved) }) diff --git a/deps/npm/lib/cache/get-stat.js b/deps/npm/lib/cache/get-stat.js index 45b60ce7936f..98f95ad6ae1b 100644 --- a/deps/npm/lib/cache/get-stat.js +++ b/deps/npm/lib/cache/get-stat.js @@ -22,11 +22,18 @@ module.exports = function getCacheStat (cb) { function makeCacheDir (cb) { cb = inflight("makeCacheDir", cb) - if (!cb) return log.verbose("getCacheStat", "cache creation already in flight; waiting") + if (!cb) { + return log.verbose( + "getCacheStat", + "cache creation already in flight; waiting" + ) + } log.verbose("getCacheStat", "cache creation not in flight; initializing") if (!process.getuid) return mkdir(npm.cache, function (er) { - return cb(er, {}) + log.verbose("makeCacheDir", "UID & GID are irrelevant on", process.platform) + cacheStat = { uid : 0, gid : 0 } + return cb(er, cacheStat) }) var uid = +process.getuid() @@ -36,8 +43,9 @@ function makeCacheDir (cb) { if (process.env.SUDO_UID) uid = +process.env.SUDO_UID if (process.env.SUDO_GID) gid = +process.env.SUDO_GID } + if (uid !== 0 || !process.env.HOME) { - cacheStat = {uid: uid, gid: gid} + cacheStat = { uid : uid, gid : gid } return mkdir(npm.cache, afterMkdir) } diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index d2a6a89f6962..c79cdc5b8b25 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -18,6 +18,7 @@ var log = require("npmlog") , ini = require("ini") , editor = require("editor") , os = require("os") + , umask = require("./utils/umask") config.completion = function (opts, cb) { var argv = opts.conf.argv.remain @@ -132,6 +133,7 @@ function set (key, val, cb) { val = val.trim() log.info("config", "set %j %j", key, val) var where = npm.config.get("global") ? "global" : "user" + if (key.match(/umask/)) val = umask.fromString(val) npm.config.set(key, val, where) npm.config.save(where, cb) } @@ -141,7 +143,9 @@ function get (key, cb) { if (!public(key)) { return cb(new Error("---sekretz---")) } - console.log(npm.config.get(key)) + var val = npm.config.get(key) + if (key.match(/umask/)) val = umask.toString(val) + console.log(val) cb() } diff --git a/deps/npm/lib/config/core.js b/deps/npm/lib/config/core.js index 6c6112532fa2..59f7cf5568f4 100644 --- a/deps/npm/lib/config/core.js +++ b/deps/npm/lib/config/core.js @@ -8,8 +8,9 @@ var fs = require("fs") var path = require("path") var nopt = require("nopt") var ini = require("ini") -var Octal = configDefs.Octal +var Umask = configDefs.Umask var mkdirp = require("mkdirp") +var umask = require("../utils/umask") exports.load = load exports.Conf = Conf @@ -362,8 +363,8 @@ function parseField (f, k) { var isPath = -1 !== typeList.indexOf(path) var isBool = -1 !== typeList.indexOf(Boolean) var isString = -1 !== typeList.indexOf(String) - var isOctal = -1 !== typeList.indexOf(Octal) - var isNumber = isOctal || (-1 !== typeList.indexOf(Number)) + var isUmask = -1 !== typeList.indexOf(Umask) + var isNumber = -1 !== typeList.indexOf(Number) f = (""+f).trim() @@ -396,8 +397,11 @@ function parseField (f, k) { f = path.resolve(f) } + if (isUmask) + f = umask.fromString(f) + if (isNumber && !isNaN(f)) - f = isOctal ? parseInt(f, 8) : +f + f = +f return f } diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js index febd1049ed16..3d99ab86fa6e 100644 --- a/deps/npm/lib/config/defaults.js +++ b/deps/npm/lib/config/defaults.js @@ -9,6 +9,7 @@ var path = require("path") , nopt = require("nopt") , os = require("os") , osenv = require("osenv") + , umask = require("../utils/umask") var log try { @@ -20,19 +21,10 @@ try { } } } -exports.Octal = Octal -function Octal () {} -function validateOctal (data, k, val) { - // must be either an integer or an octal string. - if (typeof val === "number") { - data[k] = val - return true - } - - if (typeof val === "string") { - if (val.charAt(0) !== "0" || isNaN(val)) return false - data[k] = parseInt(val, 8).toString(8) - } +exports.Umask = Umask +function Umask () {} +function validateUmask (data, k, val) { + return umask.validate (data, k, val) } function validateSemver (data, k, val) { @@ -52,8 +44,8 @@ function validateStream (data, k, val) { } nopt.typeDefs.semver = { type: semver, validate: validateSemver } -nopt.typeDefs.Octal = { type: Octal, validate: validateOctal } nopt.typeDefs.Stream = { type: Stream, validate: validateStream } +nopt.typeDefs.Umask = { type: Umask, validate: validateUmask } // Don't let --tag=1.2.3 ever be a thing var tag = {} @@ -71,8 +63,8 @@ nopt.invalidHandler = function (k, val, type) { case tag: log.warn("invalid config", "Tag must not be a SemVer range") break - case Octal: - log.warn("invalid config", "Must be octal number, starting with 0") + case Umask: + log.warn("invalid config", "Must be umask, octal number in range 0000..0777") break case url: log.warn("invalid config", "Must be a full url with 'http://'") @@ -224,7 +216,7 @@ Object.defineProperty(exports, "defaults", {get: function () { , usage : false , user : process.platform === "win32" ? 0 : "nobody" , userconfig : path.resolve(home, ".npmrc") - , umask: process.umask ? process.umask() : parseInt("022", 8) + , umask: process.umask ? process.umask() : umask.fromString("022") , version : false , versions : false , viewer: process.platform === "win32" ? "browser" : "man" @@ -322,7 +314,7 @@ exports.types = , usage : Boolean , user : [Number, String] , userconfig : path - , umask: Octal + , umask: Umask , version : Boolean , versions : Boolean , viewer: String diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index ccee75630870..299fa56988c3 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -3,14 +3,15 @@ exports.cmd = cmd exports.makeEnv = makeEnv var log = require("npmlog") - , spawn = require("./spawn") - , npm = require("../npm.js") - , path = require("path") - , fs = require("graceful-fs") - , chain = require("slide").chain - , Stream = require("stream").Stream - , PATH = "PATH" - , uidNumber = require("uid-number") +var spawn = require("./spawn") +var npm = require("../npm.js") +var path = require("path") +var fs = require("graceful-fs") +var chain = require("slide").chain +var Stream = require("stream").Stream +var PATH = "PATH" +var uidNumber = require("uid-number") +var umask = require("./umask") // windows calls it's path "Path" usually, but this is not guaranteed. if (process.platform === "win32") { @@ -198,7 +199,7 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { var shFlag = "-c" if (process.platform === "win32") { - sh = "cmd" + sh = process.env.comspec || "cmd" shFlag = "/c" conf.windowsVerbatimArguments = true } @@ -316,6 +317,7 @@ function makeEnv (data, prefix, env) { } var value = npm.config.get(i) if (value instanceof Stream || Array.isArray(value)) return + if (i.match(/umask/)) value = umask.toString(value) if (!value) value = "" else if (typeof value === "number") value = "" + value else if (typeof value !== "string") value = JSON.stringify(value) diff --git a/deps/npm/lib/utils/umask.js b/deps/npm/lib/utils/umask.js new file mode 100644 index 000000000000..6ccb4a1194b6 --- /dev/null +++ b/deps/npm/lib/utils/umask.js @@ -0,0 +1,17 @@ +var umask = require("umask") +var npmlog = require("npmlog") +var _fromString = umask.fromString + +module.exports = umask + +// fromString with logging callback +umask.fromString = function (val) { + _fromString(val, function (err, result) { + if (err) { + npmlog.warn("invalid umask", err.message) + } + val = result + }) + + return val +} diff --git a/deps/npm/lib/whoami.js b/deps/npm/lib/whoami.js index 121c4336aeab..42cede1b8204 100644 --- a/deps/npm/lib/whoami.js +++ b/deps/npm/lib/whoami.js @@ -14,6 +14,14 @@ function whoami (args, silent, cb) { var registry = npm.config.get("registry") if (!registry) return cb(new Error("no default registry set")) + function noUser () { + // At this point, if they have a credentials object, it doesn't have a + // token or auth in it. Probably just the default registry. + var msg = "Not authed. Run 'npm adduser'" + if (!silent) console.log(msg) + cb(null, msg) + } + var auth = npm.config.getCredentialsByURI(registry) if (auth) { if (auth.username) { @@ -23,6 +31,7 @@ function whoami (args, silent, cb) { else if (auth.token) { return npm.registry.whoami(registry, { auth : auth }, function (er, username) { if (er) return cb(er) + if (!username) return noUser() if (!silent) console.log(username) cb(null, username) @@ -30,10 +39,5 @@ function whoami (args, silent, cb) { } } - // At this point, if they have a credentials object, it doesn't - // have a token or auth in it. Probably just the default - // registry. - var msg = "Not authed. Run 'npm adduser'" - if (!silent) console.log(msg) - process.nextTick(cb.bind(this, null, msg)) + process.nextTick(noUser) } diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 569a2adc22d5..bbdc916666cd 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show: .P .RS 2 .nf -npm@2.2.0 /path/to/npm +npm@2.3.0 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 2a279d2a799b..0eb7f3118535 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -35,7 +35,7 @@ npm view ronn@0\.3\.5 dependencies .fi .RE .P -You can view child field by separating them with a period\. +You can view child fields by separating them with a period\. To view the git repository URL for the latest version of npm, you could do this: .P diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 6f6b18416eb2..7b4465aa2902 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -2.2.0 +2.3.0 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index 5f89ff7a36b1..1bd3f3890f2e 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) { .RE .SH VERSION .P -2.2.0 +2.3.0 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 113153f082b5..d54eaddbe12d 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -164,16 +164,16 @@ command name to local file name\. On install, npm will symlink that file into \fBprefix/bin\fR for global installs, or \fB\|\./node_modules/\.bin/\fR for local installs\. .P -For example, npm has this: +For example, myapp could have this: .P .RS 2 .nf -{ "bin" : { "npm" : "\./cli\.js" } } +{ "bin" : { "myapp" : "\./cli\.js" } } .fi .RE .P -So, when you install npm, it'll create a symlink from the \fBcli\.js\fR script to -\fB/usr/local/bin/npm\fR\|\. +So, when you install myapp, it'll create a symlink from the \fBcli\.js\fR script to +\fB/usr/local/bin/myapp\fR\|\. .P If you have a single executable, and its name should be the name of the package, then you can just supply it as a string\. For example: diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 113153f082b5..d54eaddbe12d 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -164,16 +164,16 @@ command name to local file name\. On install, npm will symlink that file into \fBprefix/bin\fR for global installs, or \fB\|\./node_modules/\.bin/\fR for local installs\. .P -For example, npm has this: +For example, myapp could have this: .P .RS 2 .nf -{ "bin" : { "npm" : "\./cli\.js" } } +{ "bin" : { "myapp" : "\./cli\.js" } } .fi .RE .P -So, when you install npm, it'll create a symlink from the \fBcli\.js\fR script to -\fB/usr/local/bin/npm\fR\|\. +So, when you install myapp, it'll create a symlink from the \fBcli\.js\fR script to +\fB/usr/local/bin/myapp\fR\|\. .P If you have a single executable, and its name should be the name of the package, then you can just supply it as a string\. For example: diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index d561e074732c..b76ec439c512 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1141,7 +1141,7 @@ The location of user\-level configuration settings\. .IP \(bu 2 Default: 022 .IP \(bu 2 -Type: Octal numeric string +Type: Octal numeric string in range 0000\.\.0777 (0\.\.511) .RE .P diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/clone.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/clone.js index 321ffa30f5e2..f8fa3159a7c4 100644 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/clone.js +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/clone.js @@ -114,7 +114,7 @@ function clone(parent, circular, depth, prototype) { if (proto) { attrs = Object.getOwnPropertyDescriptor(proto, i); } - + if (attrs && attrs.set == null) { continue; } diff --git a/deps/npm/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md index d72bdccbe0e0..e479ae29e3a5 100644 --- a/deps/npm/node_modules/glob/README.md +++ b/deps/npm/node_modules/glob/README.md @@ -249,10 +249,6 @@ filesystem. flag to disable that behavior. * `nonull` Set to never return an empty set, instead returning a set containing the pattern itself. This is the default in glob(3). -* `nocase` Perform a case-insensitive match. Note that - case-insensitive filesystems will sometimes result in glob returning - results that are case-insensitively matched anyway, since readdir - and stat will not raise an error. * `debug` Set to enable debug logging in minimatch and glob. * `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. * `noglobstar` Do not match `**` against multiple filenames. (Ie, diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js index 8c990782189b..7401e0b7e90e 100644 --- a/deps/npm/node_modules/glob/glob.js +++ b/deps/npm/node_modules/glob/glob.js @@ -40,26 +40,27 @@ module.exports = glob -var fs = require("fs") -var minimatch = require("minimatch") +var fs = require('fs') +var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch -var inherits = require("inherits") -var EE = require("events").EventEmitter -var path = require("path") -var assert = require("assert") -var globSync = require("./sync.js") -var common = require("./common.js") +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var globSync = require('./sync.js') +var common = require('./common.js') var alphasort = common.alphasort +var alphasorti = common.alphasorti var isAbsolute = common.isAbsolute var setopts = common.setopts var ownProp = common.ownProp -var inflight = require("inflight") -var util = require("util") +var inflight = require('inflight') +var util = require('util') -var once = require("once") +var once = require('once') function glob (pattern, options, cb) { - if (typeof options === "function") cb = options, options = {} + if (typeof options === 'function') cb = options, options = {} if (!options) options = {} if (options.sync) { @@ -97,7 +98,7 @@ glob.hasMagic = function (pattern, options_) { glob.Glob = Glob inherits(Glob, EE) function Glob (pattern, options, cb) { - if (typeof options === "function") { + if (typeof options === 'function') { cb = options options = null } @@ -122,10 +123,10 @@ function Glob (pattern, options, cb) { // Keep them as a list so we can fill in when nonull is set. this.matches = new Array(n) - if (typeof cb === "function") { + if (typeof cb === 'function') { cb = once(cb) - this.on("error", cb) - this.on("end", function (matches) { + this.on('error', cb) + this.on('end', function (matches) { cb(null, matches) }) } @@ -163,7 +164,7 @@ Glob.prototype._finish = function () { //console.error('FINISH', this.matches) common.finish(this) - this.emit("end", this.found) + this.emit('end', this.found) } Glob.prototype._mark = function (p) { @@ -176,19 +177,19 @@ Glob.prototype._makeAbs = function (f) { Glob.prototype.abort = function () { this.aborted = true - this.emit("abort") + this.emit('abort') } Glob.prototype.pause = function () { if (!this.paused) { this.paused = true - this.emit("pause") + this.emit('pause') } } Glob.prototype.resume = function () { if (this.paused) { - this.emit("resume") + this.emit('resume') this.paused = false if (this._emitQueue.length) { var eq = this._emitQueue.slice(0) @@ -223,11 +224,11 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) { return } - //console.error("PROCESS %d", this._processing, pattern) + //console.error('PROCESS %d', this._processing, pattern) // Get the first [n] parts of pattern that are all strings. var n = 0 - while (typeof pattern[n] === "string") { + while (typeof pattern[n] === 'string') { n ++ } // now n is the index of the first one that is *not* a string. @@ -248,9 +249,9 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) { default: // pattern has some string bits in the front. - // whatever it starts with, whether that's "absolute" like /foo/bar, - // or "relative" like "../baz" - prefix = pattern.slice(0, n).join("/") + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') break } @@ -259,10 +260,10 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) { // get the list of entries. var read if (prefix === null) - read = "." - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix + prefix = '/' + prefix read = prefix } else read = prefix @@ -295,12 +296,12 @@ Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, in var pn = remain[0] var negate = !!this.minimatch.negate var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === "." + var dotOk = this.dot || rawGlob.charAt(0) === '.' var matchedEntries = [] for (var i = 0; i < entries.length; i++) { var e = entries[i] - if (e.charAt(0) !== "." || dotOk) { + if (e.charAt(0) !== '.' || dotOk) { var m if (negate && !prefix) { m = !e.match(pn) @@ -331,13 +332,13 @@ Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, in for (var i = 0; i < len; i ++) { var e = matchedEntries[i] if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e + if (prefix !== '/') + e = prefix + '/' + e else e = prefix + e } - if (e.charAt(0) === "/" && !this.nomount) { + if (e.charAt(0) === '/' && !this.nomount) { e = path.join(this.root, e) } this._emitMatch(index, e) @@ -353,8 +354,8 @@ Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, in var e = matchedEntries[i] var newPattern if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e + if (prefix !== '/') + e = prefix + '/' + e else e = prefix + e } @@ -381,12 +382,12 @@ Glob.prototype._emitMatch = function (index, e) { this.matches[index][e] = true if (!this.stat && !this.mark) - return this.emit("match", e) + return this.emit('match', e) var self = this this._stat(this._makeAbs(e), function (er, c, st) { - self.emit("stat", e, st) - self.emit("match", e) + self.emit('stat', e, st) + self.emit('match', e) }) } } @@ -395,7 +396,7 @@ Glob.prototype._readdirInGlobStar = function (abs, cb) { if (this.aborted) return - var lstatkey = "lstat\0" + abs + var lstatkey = 'lstat\0' + abs var self = this var lstatcb = inflight(lstatkey, lstatcb_) @@ -423,11 +424,11 @@ Glob.prototype._readdir = function (abs, inGlobStar, cb) { if (this.aborted) return - cb = inflight("readdir\0"+abs+"\0"+inGlobStar, cb) + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) if (!cb) return - //console.error("RD %j %j", +inGlobStar, abs) + //console.error('RD %j %j', +inGlobStar, abs) if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs, cb) @@ -449,7 +450,7 @@ function readdirCb (self, abs, cb) { if (er) self._readdirError(abs, er, cb) else - self._readdirEntries(abs, entries.sort(alphasort), cb) + self._readdirEntries(abs, entries, cb) } } @@ -463,10 +464,10 @@ Glob.prototype._readdirEntries = function (abs, entries, cb) { if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i ++) { var e = entries[i] - if (abs === "/") + if (abs === '/') e = abs + e else - e = abs + "/" + e + e = abs + '/' + e this.cache[e] = true } } @@ -481,21 +482,21 @@ Glob.prototype._readdirError = function (f, er, cb) { // handle errors, and cache the information switch (er.code) { - case "ENOTDIR": // totally normal. means it *does* exist. + case 'ENOTDIR': // totally normal. means it *does* exist. this.cache[f] = 'FILE' break - case "ENOENT": // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': this.cache[f] = false break default: // some unusual error. Treat as failure. this.cache[f] = false - if (this.strict) return this.emit("error", er) - if (!this.silent) console.error("glob error", er) + if (this.strict) return this.emit('error', er) + if (!this.silent) console.error('glob error', er) break } return cb() @@ -510,7 +511,7 @@ Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, in Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error("pgs2", prefix, remain[0], entries) + //console.error('pgs2', prefix, remain[0], entries) // no entries means not a dir, so it can never have matches // foo.txt/** doesn't match foo.txt @@ -535,7 +536,7 @@ Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, i for (var i = 0; i < len; i++) { var e = entries[i] - if (e.charAt(0) === "." && !this.dot) + if (e.charAt(0) === '.' && !this.dot) continue // these two cases enter the inGlobStar state @@ -559,7 +560,7 @@ Glob.prototype._processSimple = function (prefix, index, cb) { } Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - //console.error("ps2", prefix, exists) + //console.error('ps2', prefix, exists) if (!this.matches[index]) this.matches[index] = Object.create(null) @@ -570,7 +571,7 @@ Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === "/") { + if (prefix.charAt(0) === '/') { prefix = path.join(this.root, prefix) } else { prefix = path.resolve(this.root, prefix) @@ -579,8 +580,8 @@ Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { } } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/") + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') // Mark this as a match this._emitMatch(index, prefix) @@ -590,7 +591,7 @@ Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { // Returns either 'DIR', 'FILE', or false Glob.prototype._stat = function (f, cb) { var abs = f - if (f.charAt(0) === "/") + if (f.charAt(0) === '/') abs = path.join(this.root, f) else if (this.changedCwd) abs = path.resolve(this.cwd, f) @@ -606,7 +607,7 @@ Glob.prototype._stat = function (f, cb) { c = 'DIR' // It exists, but not how we need it - if (abs.slice(-1) === "/" && c !== 'DIR') + if (abs.slice(-1) === '/' && c !== 'DIR') return cb() return cb(null, c) @@ -622,7 +623,7 @@ Glob.prototype._stat = function (f, cb) { } var self = this - var statcb = inflight("stat\0" + abs, statcb_) + var statcb = inflight('stat\0' + abs, statcb_) if (statcb) fs.stat(abs, statcb) @@ -639,7 +640,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { this.statCache[abs] = stat - if (abs.slice(-1) === "/" && !stat.isDirectory()) + if (abs.slice(-1) === '/' && !stat.isDirectory()) return cb(null, false, stat) var c = stat.isDirectory() ? 'DIR' : 'FILE' diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index 214a260458f8..5b782d625e77 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "4.3.2", + "version": "4.3.5", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -29,7 +29,7 @@ "devDependencies": { "mkdirp": "0", "rimraf": "^2.2.8", - "tap": "~0.4.0", + "tap": "^0.5.0", "tick": "0.0.6" }, "scripts": { @@ -42,16 +42,16 @@ "benchclean": "bash benchclean.sh" }, "license": "ISC", - "gitHead": "941d53c8ab6216f43a6f5e8e01245364ba90cfe9", + "gitHead": "9de4cb6bfeb9c8458cf188fe91447b99bf8f3cfd", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@4.3.2", - "_shasum": "351ec7dafc29256b253ad86cd6b48c5a3404b76d", - "_from": "glob@>=4.3.2 <4.4.0", - "_npmVersion": "2.1.14", - "_nodeVersion": "0.10.33", + "_id": "glob@4.3.5", + "_shasum": "80fbb08ca540f238acce5d11d1e9bc41e75173d3", + "_from": "glob@>=4.3.5 <4.4.0", + "_npmVersion": "2.2.0", + "_nodeVersion": "0.10.35", "_npmUser": { "name": "isaacs", "email": "i@izs.me" @@ -63,10 +63,9 @@ } ], "dist": { - "shasum": "351ec7dafc29256b253ad86cd6b48c5a3404b76d", - "tarball": "http://registry.npmjs.org/glob/-/glob-4.3.2.tgz" + "shasum": "80fbb08ca540f238acce5d11d1e9bc41e75173d3", + "tarball": "http://registry.npmjs.org/glob/-/glob-4.3.5.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-4.3.2.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/glob/-/glob-4.3.5.tgz" } diff --git a/deps/npm/node_modules/glob/sync.js b/deps/npm/node_modules/glob/sync.js index a7f9f52daf6f..f981055af9a6 100644 --- a/deps/npm/node_modules/glob/sync.js +++ b/deps/npm/node_modules/glob/sync.js @@ -1,15 +1,16 @@ module.exports = globSync globSync.GlobSync = GlobSync -var fs = require("fs") -var minimatch = require("minimatch") +var fs = require('fs') +var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch -var Glob = require("./glob.js").Glob -var util = require("util") -var path = require("path") -var assert = require("assert") -var common = require("./common.js") +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var common = require('./common.js') var alphasort = common.alphasort +var alphasorti = common.alphasorti var isAbsolute = common.isAbsolute var setopts = common.setopts var ownProp = common.ownProp @@ -23,7 +24,7 @@ function globSync (pattern, options) { function GlobSync (pattern, options) { if (!pattern) - throw new Error("must provide pattern") + throw new Error('must provide pattern') if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob') @@ -55,7 +56,7 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) { // Get the first [n] parts of pattern that are all strings. var n = 0 - while (typeof pattern[n] === "string") { + while (typeof pattern[n] === 'string') { n ++ } // now n is the index of the first one that is *not* a string. @@ -76,9 +77,9 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) { default: // pattern has some string bits in the front. - // whatever it starts with, whether that's "absolute" like /foo/bar, - // or "relative" like "../baz" - prefix = pattern.slice(0, n).join("/") + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') break } @@ -87,10 +88,10 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) { // get the list of entries. var read if (prefix === null) - read = "." - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix + prefix = '/' + prefix read = prefix } else read = prefix @@ -116,12 +117,12 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, var pn = remain[0] var negate = !!this.minimatch.negate var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === "." + var dotOk = this.dot || rawGlob.charAt(0) === '.' var matchedEntries = [] for (var i = 0; i < entries.length; i++) { var e = entries[i] - if (e.charAt(0) !== "." || dotOk) { + if (e.charAt(0) !== '.' || dotOk) { var m if (negate && !prefix) { m = !e.match(pn) @@ -150,13 +151,13 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, for (var i = 0; i < len; i ++) { var e = matchedEntries[i] if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e else e = prefix + e } - if (e.charAt(0) === "/" && !this.nomount) { + if (e.charAt(0) === '/' && !this.nomount) { e = path.join(this.root, e) } this.matches[index][e] = true @@ -235,7 +236,7 @@ GlobSync.prototype._readdir = function (abs, inGlobStar) { } try { - return this._readdirEntries(abs, fs.readdirSync(abs).sort(alphasort)) + return this._readdirEntries(abs, fs.readdirSync(abs)) } catch (er) { this._readdirError(abs, er) return null @@ -249,10 +250,10 @@ GlobSync.prototype._readdirEntries = function (abs, entries) { if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i ++) { var e = entries[i] - if (abs === "/") + if (abs === '/') e = abs + e else - e = abs + "/" + e + e = abs + '/' + e this.cache[e] = true } } @@ -266,21 +267,21 @@ GlobSync.prototype._readdirEntries = function (abs, entries) { GlobSync.prototype._readdirError = function (f, er) { // handle errors, and cache the information switch (er.code) { - case "ENOTDIR": // totally normal. means it *does* exist. + case 'ENOTDIR': // totally normal. means it *does* exist. this.cache[f] = 'FILE' break - case "ENOENT": // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': this.cache[f] = false break default: // some unusual error. Treat as failure. this.cache[f] = false if (this.strict) throw er - if (!this.silent) console.error("glob error", er) + if (!this.silent) console.error('glob error', er) break } } @@ -312,7 +313,7 @@ GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index for (var i = 0; i < len; i++) { var e = entries[i] - if (e.charAt(0) === "." && !this.dot) + if (e.charAt(0) === '.' && !this.dot) continue // these two cases enter the inGlobStar state @@ -338,7 +339,7 @@ GlobSync.prototype._processSimple = function (prefix, index) { if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === "/") { + if (prefix.charAt(0) === '/') { prefix = path.join(this.root, prefix) } else { prefix = path.resolve(this.root, prefix) @@ -347,8 +348,8 @@ GlobSync.prototype._processSimple = function (prefix, index) { } } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/") + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') // Mark this as a match this.matches[index][prefix] = true @@ -357,7 +358,7 @@ GlobSync.prototype._processSimple = function (prefix, index) { // Returns either 'DIR', 'FILE', or false GlobSync.prototype._stat = function (f) { var abs = f - if (f.charAt(0) === "/") + if (f.charAt(0) === '/') abs = path.join(this.root, f) else if (this.changedCwd) abs = path.resolve(this.cwd, f) @@ -373,7 +374,7 @@ GlobSync.prototype._stat = function (f) { c = 'DIR' // It exists, but not how we need it - if (abs.slice(-1) === "/" && c !== 'DIR') + if (abs.slice(-1) === '/' && c !== 'DIR') return false return c @@ -391,7 +392,7 @@ GlobSync.prototype._stat = function (f) { this.statCache[abs] = stat - if (abs.slice(-1) === "/" && !stat.isDirectory()) + if (abs.slice(-1) === '/' && !stat.isDirectory()) return false var c = stat.isDirectory() ? 'DIR' : 'FILE' diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/README.md b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/README.md index fd4e03a897d1..f23049dc3bf5 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/README.md +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/README.md @@ -1,6 +1,6 @@ # brace-expansion -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), as known from sh/bash, in JavaScript. [![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.png)](http://travis-ci.org/juliangruber/brace-expansion) diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/example.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/example.js index 36cde4de5c11..60ecfc74d416 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/example.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/example.js @@ -5,3 +5,4 @@ console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); console.log(expand('http://www.letters.com/file{a..z..2}.txt')); console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.bak b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.bak index ed35e15af3d0..71b53671d7c8 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.bak +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.bak @@ -195,3 +195,4 @@ function expand(str, isTop) { return expansions; } + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js index f8d40f79acde..a23104e95501 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/index.js @@ -188,3 +188,4 @@ function expand(str, isTop) { return expansions; } + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile index dd2730cfde0c..fa5da71a6d0d 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile @@ -3,3 +3,4 @@ test: @node_modules/.bin/tape test/*.js .PHONY: test + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js index 9ce76f480a43..c02ad348e69a 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js @@ -2,3 +2,4 @@ var balanced = require('./'); console.log(balanced('{', '}', 'pre{in{nested}}post')); console.log(balanced('{', '}', 'pre{first}between{second}post')); + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js index fd1132826a00..e429121eab80 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js @@ -7,3 +7,4 @@ test('empty option', function(t) { ]); t.end(); }); + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/nested.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/nested.js index 54d1e88f6865..0862dc51f90a 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/nested.js @@ -13,3 +13,4 @@ test('nested', function(t) { ]); t.end(); }); + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/order.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/order.js index d5f62566c95d..c00ad155fe67 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/order.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/order.js @@ -7,3 +7,4 @@ test('order', function(t) { ]); t.end(); }); + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/pad.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/pad.js index f830f7c46621..e4158775f1bd 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/pad.js @@ -10,3 +10,4 @@ test('pad', function(t) { ]); t.end(); }); + diff --git a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js index 18ee665fb99c..f73a9579ab39 100644 --- a/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +++ b/deps/npm/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js @@ -47,3 +47,4 @@ test('alphabetic sequences with step count', function(t) { ]); t.end(); }); + diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi index 63fefe3d16c8..0b81fab2027f 100644 --- a/deps/npm/node_modules/node-gyp/addon.gypi +++ b/deps/npm/node_modules/node-gyp/addon.gypi @@ -42,7 +42,7 @@ '-luuid.lib', '-lodbc32.lib', '-lDelayImp.lib', - '-l"<(node_root_dir)/$(ConfigurationName)/iojs.lib"' + '-l"<(node_root_dir)/$(ConfigurationName)/node.lib"' ], # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent' # needs to have dll-interface to be used by clients of class 'node::ObjectWrap' diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js index 3d3c58785f17..f3605902e93c 100644 --- a/deps/npm/node_modules/node-gyp/lib/build.js +++ b/deps/npm/node_modules/node-gyp/lib/build.js @@ -173,7 +173,7 @@ function build (gyp, argv, callback) { } /** - * Copies the iojs.lib file for the current target architecture into the + * Copies the node.lib file for the current target architecture into the * current proper dev dir location. */ @@ -181,15 +181,15 @@ function build (gyp, argv, callback) { if (!win || !copyDevLib) return doBuild() var buildDir = path.resolve(nodeDir, buildType) - , archNodeLibPath = path.resolve(nodeDir, arch, 'iojs.lib') - , buildNodeLibPath = path.resolve(buildDir, 'iojs.lib') + , archNodeLibPath = path.resolve(nodeDir, arch, 'node.lib') + , buildNodeLibPath = path.resolve(buildDir, 'node.lib') mkdirp(buildDir, function (err, isNew) { if (err) return callback(err) log.verbose('"' + buildType + '" dir needed to be created?', isNew) var rs = fs.createReadStream(archNodeLibPath) , ws = fs.createWriteStream(buildNodeLibPath) - log.verbose('copying "iojs.lib" for ' + arch, buildNodeLibPath) + log.verbose('copying "node.lib" for ' + arch, buildNodeLibPath) rs.pipe(ws) rs.on('error', callback) ws.on('error', callback) diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js index 378fbfae4769..6f72e6a93d6c 100644 --- a/deps/npm/node_modules/node-gyp/lib/install.js +++ b/deps/npm/node_modules/node-gyp/lib/install.js @@ -39,7 +39,7 @@ function install (gyp, argv, callback) { } } - var distUrl = gyp.opts['dist-url'] || gyp.opts.disturl || 'https://iojs.org/dist' + var distUrl = gyp.opts['dist-url'] || gyp.opts.disturl || 'http://nodejs.org/dist' // Determine which node dev files version we are installing @@ -185,7 +185,7 @@ function install (gyp, argv, callback) { // now download the node tarball var tarPath = gyp.opts['tarball'] - var tarballUrl = tarPath ? tarPath : distUrl + '/v' + version + '/iojs-v' + version + '.tar.gz' + var tarballUrl = tarPath ? tarPath : distUrl + '/v' + version + '/node-v' + version + '.tar.gz' , badDownload = false , extractCount = 0 , gunzip = zlib.createGunzip() @@ -267,7 +267,7 @@ function install (gyp, argv, callback) { var async = 0 if (win) { - // need to download iojs.lib + // need to download node.lib async++ downloadNodeLib(deref) } @@ -295,8 +295,7 @@ function install (gyp, argv, callback) { // check content shasums for (var k in contentShasums) { log.verbose('validating download checksum for ' + k, '(%s == %s)', contentShasums[k], expectShasums[k]) - // TODO(piscisaureus) re-enable checksum verification when the correct files are in place. - if (false || contentShasums[k] !== expectShasums[k]) { + if (contentShasums[k] !== expectShasums[k]) { cb(new Error(k + ' local checksum ' + contentShasums[k] + ' not match remote ' + expectShasums[k])) return } @@ -344,36 +343,36 @@ function install (gyp, argv, callback) { } function downloadNodeLib (done) { - log.verbose('on Windows; need to download `iojs.lib`...') + log.verbose('on Windows; need to download `node.lib`...') var dir32 = path.resolve(devDir, 'ia32') , dir64 = path.resolve(devDir, 'x64') - , nodeLibPath32 = path.resolve(dir32, 'iojs.lib') - , nodeLibPath64 = path.resolve(dir64, 'iojs.lib') - , nodeLibUrl32 = distUrl + '/v' + version + '/win-x86/iojs.lib' - , nodeLibUrl64 = distUrl + '/v' + version + '/win-x64/iojs.lib' + , nodeLibPath32 = path.resolve(dir32, 'node.lib') + , nodeLibPath64 = path.resolve(dir64, 'node.lib') + , nodeLibUrl32 = distUrl + '/v' + version + '/node.lib' + , nodeLibUrl64 = distUrl + '/v' + version + '/x64/node.lib' - log.verbose('32-bit iojs.lib dir', dir32) - log.verbose('64-bit iojs.lib dir', dir64) - log.verbose('`iojs.lib` 32-bit url', nodeLibUrl32) - log.verbose('`iojs.lib` 64-bit url', nodeLibUrl64) + log.verbose('32-bit node.lib dir', dir32) + log.verbose('64-bit node.lib dir', dir64) + log.verbose('`node.lib` 32-bit url', nodeLibUrl32) + log.verbose('`node.lib` 64-bit url', nodeLibUrl64) var async = 2 mkdir(dir32, function (err) { if (err) return done(err) - log.verbose('streaming 32-bit iojs.lib to:', nodeLibPath32) + log.verbose('streaming 32-bit node.lib to:', nodeLibPath32) var req = download(nodeLibUrl32) if (!req) return req.on('error', done) req.on('response', function (res) { if (res.statusCode !== 200) { - done(new Error(res.statusCode + ' status code downloading 32-bit iojs.lib')) + done(new Error(res.statusCode + ' status code downloading 32-bit node.lib')) return } getContentSha(res, function (_, checksum) { - contentShasums['win-x86/iojs.lib'] = checksum - log.verbose('content checksum', 'win-x86/iojs.lib', checksum) + contentShasums['node.lib'] = checksum + log.verbose('content checksum', 'node.lib', checksum) }) var ws = fs.createWriteStream(nodeLibPath32) @@ -386,20 +385,20 @@ function install (gyp, argv, callback) { }) mkdir(dir64, function (err) { if (err) return done(err) - log.verbose('streaming 64-bit iojs.lib to:', nodeLibPath64) + log.verbose('streaming 64-bit node.lib to:', nodeLibPath64) var req = download(nodeLibUrl64) if (!req) return req.on('error', done) req.on('response', function (res) { if (res.statusCode !== 200) { - done(new Error(res.statusCode + ' status code downloading 64-bit iojs.lib')) + done(new Error(res.statusCode + ' status code downloading 64-bit node.lib')) return } getContentSha(res, function (_, checksum) { - contentShasums['win-x64/iojs.lib'] = checksum - log.verbose('content checksum', 'win-x64/iojs.lib', checksum) + contentShasums['x64/node.lib'] = checksum + log.verbose('content checksum', 'x64/node.lib', checksum) }) var ws = fs.createWriteStream(nodeLibPath64) diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js index 6149a80239f0..50c53a13e98d 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund/test/basic.js @@ -21,3 +21,4 @@ test('basic', function (t) { t.equal(sigmund(obj3), cycleHash) t.end() }) + diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/test/brace-expand.js b/deps/npm/node_modules/node-gyp/node_modules/minimatch/test/brace-expand.js index c3e19d9baf57..e63d3f60c80e 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/test/brace-expand.js +++ b/deps/npm/node_modules/node-gyp/node_modules/minimatch/test/brace-expand.js @@ -36,3 +36,5 @@ tap.test("brace expansion", function (t) { console.error("ending") t.end() }) + + diff --git a/deps/npm/node_modules/npm-registry-client/README.md b/deps/npm/node_modules/npm-registry-client/README.md index 182552aebfdb..a35c4831176f 100644 --- a/deps/npm/node_modules/npm-registry-client/README.md +++ b/deps/npm/node_modules/npm-registry-client/README.md @@ -93,7 +93,7 @@ Deprecate a version of a package in the registry. * `cb` {Function} Fetches data from the registry via a GET request, saving it in the cache folder -with the ETag. +with the ETag or the "Last Modified" timestamp. ### client.publish(uri, params, cb) @@ -182,6 +182,7 @@ caching logic directly. that are not Buffers or Streams are encoded as JSON. Optional – body only used for write operations. * `etag` {String} The cached ETag. Optional. + * `lastModified` {String} The cached Last-Modified timestamp. Optional. * `follow` {Boolean} Follow 302/301 responses. Optional (default: true). * `auth` {Credentials} Optional. * `cb` {Function} diff --git a/deps/npm/node_modules/npm-registry-client/lib/initialize.js b/deps/npm/node_modules/npm-registry-client/lib/initialize.js index 727625e74f59..bd5a4caae3fe 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/initialize.js +++ b/deps/npm/node_modules/npm-registry-client/lib/initialize.js @@ -1,7 +1,12 @@ var crypto = require("crypto") +var HttpAgent = require("http").Agent +var HttpsAgent = require("https").Agent var pkg = require("../package.json") +var httpAgent = new HttpAgent({ keepAlive : true }) +var httpsAgent = new HttpsAgent({ keepAlive : true }) + module.exports = initialize function initialize (uri, method, accept, headers) { @@ -24,11 +29,13 @@ function initialize (uri, method, accept, headers) { // request will not pay attention to the NOPROXY environment variable if a // config value named proxy is passed in, even if it's set to null. var proxy - if (uri.protocol === "https") { + if (uri.protocol === "https:") { proxy = this.config.proxy.https + opts.agent = httpsAgent } else { proxy = this.config.proxy.http + opts.agent = httpAgent } if (typeof proxy === "string") opts.proxy = proxy diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js index ec39cc25d82a..fa969ac22378 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/request.js +++ b/deps/npm/node_modules/npm-registry-client/lib/request.js @@ -121,6 +121,11 @@ function makeRequest (uri, params, cb_) { headers[params.method === "GET" ? "if-none-match" : "if-match"] = params.etag } + if (params.lastModified && params.method === "GET") { + this.log.verbose("lastModified", params.lastModified) + headers["if-modified-since"] = params.lastModified; + } + // figure out wth body is if (params.body) { if (Buffer.isBuffer(params.body)) { @@ -139,6 +144,7 @@ function makeRequest (uri, params, cb_) { } else { delete params.body._etag + delete params.body._lastModified opts.json = params.body } } @@ -220,6 +226,10 @@ function requestDone (method, where, cb) { parsed._etag = response.headers.etag } + if (parsed && response.headers['last-modified']) { + parsed._lastModified = response.headers['last-modified'] + } + // for the search endpoint, the "error" property can be an object if (parsed && parsed.error && typeof parsed.error !== "object" || response.statusCode >= 400) { diff --git a/deps/npm/node_modules/npm-registry-client/lib/star.js b/deps/npm/node_modules/npm-registry-client/lib/star.js index aa707e1592ac..87c5b67c4fdc 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/star.js +++ b/deps/npm/node_modules/npm-registry-client/lib/star.js @@ -11,38 +11,42 @@ function star (uri, params, cb) { var auth = params.auth assert(auth && typeof auth === "object", "must pass auth to star") - if (auth.token) { - return cb(new Error("This operation is unsupported for token-based auth")) - } - else if (!(auth.username && auth.password)) { - return cb(new Error("Must be logged in to star/unstar packages")) + if (!(auth.token || (auth.password && auth.username && auth.email))) { + var er = new Error("Must be logged in to star/unstar packages") + er.code = "ENEEDAUTH" + return cb(er) } var client = this this.request(uri+"?write=true", { auth : auth }, function (er, fullData) { if (er) return cb(er) - fullData = { - _id : fullData._id, - _rev : fullData._rev, - users : fullData.users || {} - } - - if (starred) { - client.log.info("starring", fullData._id) - fullData.users[auth.username] = true - client.log.verbose("starring", fullData) - } else { - delete fullData.users[auth.username] - client.log.info("unstarring", fullData._id) - client.log.verbose("unstarring", fullData) - } - - var options = { - method : "PUT", - body : fullData, - auth : auth - } - return client.request(uri, options, cb) + client.whoami(uri, params, function (er, username) { + if (er) return cb(er) + + var data = { + _id : fullData._id, + _rev : fullData._rev, + users : fullData.users || {} + } + + if (starred) { + client.log.info("starring", data._id) + data.users[username] = true + client.log.verbose("starring", data) + } + else { + delete data.users[username] + client.log.info("unstarring", data._id) + client.log.verbose("unstarring", data) + } + + var options = { + method : "PUT", + body : data, + auth : auth + } + return client.request(uri, options, cb) + }) }) } diff --git a/deps/npm/node_modules/npm-registry-client/lib/whoami.js b/deps/npm/node_modules/npm-registry-client/lib/whoami.js index 684ce7bfbfb2..4c099ebec6fe 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/whoami.js +++ b/deps/npm/node_modules/npm-registry-client/lib/whoami.js @@ -11,7 +11,9 @@ function whoami (uri, params, cb) { var auth = params.auth assert(auth && typeof auth === "object", "must pass auth to whoami") - this.request(url.resolve(uri, "whoami"), { auth : auth }, function (er, userdata) { + if (auth.username) return process.nextTick(cb.bind(this, null, auth.username)) + + this.request(url.resolve(uri, "-/whoami"), { auth : auth }, function (er, userdata) { if (er) return cb(er) cb(null, userdata.username) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/LICENSE index 1e836b476002..99c130e1de34 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/LICENSE +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/LICENSE @@ -2,23 +2,23 @@ The MIT License Copyright (c) 2013 Max Ogden -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, +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 +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 +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. \ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/README.md index 9e9b6eee9f34..e46b823903d2 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/README.md +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/README.md @@ -12,3 +12,4 @@ If you want to guarantee a stable streams base, regardless of what version of No **readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. **readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` + diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/float.patch b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/float.patch index 7abb6dc30b21..b984607a41cc 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/float.patch +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/float.patch @@ -3,36 +3,36 @@ index c5a741c..a2e0d8e 100644 --- a/lib/_stream_duplex.js +++ b/lib/_stream_duplex.js @@ -26,8 +26,8 @@ - + module.exports = Duplex; var util = require('util'); -var Readable = require('_stream_readable'); -var Writable = require('_stream_writable'); +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); - + util.inherits(Duplex, Readable); - + diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js index a5e9864..330c247 100644 --- a/lib/_stream_passthrough.js +++ b/lib/_stream_passthrough.js @@ -25,7 +25,7 @@ - + module.exports = PassThrough; - + -var Transform = require('_stream_transform'); +var Transform = require('./_stream_transform'); var util = require('util'); util.inherits(PassThrough, Transform); - + diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 0c3fe3e..90a8298 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -23,10 +23,34 @@ module.exports = Readable; Readable.ReadableState = ReadableState; - + var EE = require('events').EventEmitter; +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; @@ -63,12 +63,12 @@ index 0c3fe3e..90a8298 100644 +} catch (er) { + debug = function() {}; +} - + util.inherits(Readable, Stream); - + @@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { - - + + function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { + if (state.decoder && !state.ended && state.decoder.end) { @@ -80,9 +80,9 @@ index b1f9fcc..b0caf57 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -64,8 +64,14 @@ - + module.exports = Transform; - + -var Duplex = require('_stream_duplex'); +var Duplex = require('./_stream_duplex'); var util = require('util'); @@ -93,15 +93,15 @@ index b1f9fcc..b0caf57 100644 + } +} util.inherits(Transform, Duplex); - - + + diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index ba2e920..f49288b 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -27,6 +27,12 @@ module.exports = Writable; Writable.WritableState = WritableState; - + var util = require('util'); +if (!util.isUndefined) { + var utilIs = require('core-util-is'); @@ -110,7 +110,7 @@ index ba2e920..f49288b 100644 + } +} var Stream = require('stream'); - + util.inherits(Writable, Stream); @@ -119,7 +125,7 @@ function WritableState(options, stream) { function Writable(options) { @@ -119,29 +119,29 @@ index ba2e920..f49288b 100644 - if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) + if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) return new Writable(options); - + this._writableState = new WritableState(options, this); diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js index e3787e4..8cd2127 100644 --- a/test/simple/test-stream-big-push.js +++ b/test/simple/test-stream-big-push.js @@ -21,7 +21,7 @@ - + var common = require('../common'); var assert = require('assert'); -var stream = require('stream'); +var stream = require('../../'); var str = 'asdfasdfasdfasdfasdf'; - + var r = new stream.Readable({ diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js index bb73777..d40efc7 100644 --- a/test/simple/test-stream-end-paused.js +++ b/test/simple/test-stream-end-paused.js @@ -25,7 +25,7 @@ var gotEnd = false; - + // Make sure we don't miss the end event for paused 0-length streams - + -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; var stream = new Readable(); @@ -154,13 +154,13 @@ index b46ee90..0be8366 100644 @@ -22,8 +22,8 @@ var common = require('../common'); var assert = require('assert'); - + -var Readable = require('_stream_readable'); -var Writable = require('_stream_writable'); +var Readable = require('../../lib/_stream_readable'); +var Writable = require('../../lib/_stream_writable'); var util = require('util'); - + util.inherits(TestReadable, Readable); diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js deleted file mode 100644 @@ -295,12 +295,12 @@ index c5d724b..c7d6b7d 100644 --- a/test/simple/test-stream-pipe-error-handling.js +++ b/test/simple/test-stream-pipe-error-handling.js @@ -21,7 +21,7 @@ - + var common = require('../common'); var assert = require('assert'); -var Stream = require('stream').Stream; +var Stream = require('../../').Stream; - + (function testErrorListenerCatches() { var source = new Stream(); diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js @@ -309,25 +309,25 @@ index cb9d5fe..56f8d61 100644 +++ b/test/simple/test-stream-pipe-event.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. - + var common = require('../common'); -var stream = require('stream'); +var stream = require('../../'); var assert = require('assert'); var util = require('util'); - + diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js index f2e6ec2..a5c9bf9 100644 --- a/test/simple/test-stream-push-order.js +++ b/test/simple/test-stream-push-order.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. - + var common = require('../common.js'); -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; var assert = require('assert'); - + var s = new Readable({ diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js index 06f43dc..1701a9a 100644 @@ -336,11 +336,11 @@ index 06f43dc..1701a9a 100644 @@ -22,7 +22,7 @@ var common = require('../common'); var assert = require('assert'); - + -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; var util = require('util'); - + util.inherits(MyStream, Readable); diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js index ba6a577..a8e6f7b 100644 @@ -349,10 +349,10 @@ index ba6a577..a8e6f7b 100644 @@ -22,7 +22,7 @@ var common = require('../common'); var assert = require('assert'); - + -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; - + (function first() { // First test, not reading when the readable is added. diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js @@ -362,10 +362,10 @@ index 2891ad6..11689ba 100644 @@ -27,7 +27,7 @@ var assert = require('assert'); // more data continuously, but without triggering a nextTick // warning or RangeError. - + -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; - + // throw an error if we trigger a nextTick warning. process.throwDeprecation = true; diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js @@ -373,12 +373,12 @@ index 0c96476..7827538 100644 --- a/test/simple/test-stream-unshift-empty-chunk.js +++ b/test/simple/test-stream-unshift-empty-chunk.js @@ -24,7 +24,7 @@ var assert = require('assert'); - - // This test verifies that stream.unshift(Buffer(0)) or + + // This test verifies that stream.unshift(Buffer(0)) or // stream.unshift('') does not set state.reading=false. -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; - + var r = new Readable(); var nChunks = 10; diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js @@ -388,14 +388,14 @@ index 83fd9fa..17c18aa 100644 @@ -29,7 +29,7 @@ var assert = require('assert'); // 3. push() after the EOF signaling null is an error. // 4. _read() is not called after pushing the EOF null chunk. - + -var stream = require('stream'); +var stream = require('../../'); var hwm = 10; var r = stream.Readable({ highWaterMark: hwm }); var chunks = 10; @@ -51,7 +51,14 @@ r._read = function(n) { - + function push(fast) { assert(!pushedNull, 'push() after null push'); - var c = pos >= data.length ? null : data.slice(pos, pos + n); @@ -417,10 +417,10 @@ index 5b49e6e..b5321f3 100644 @@ -22,7 +22,7 @@ var common = require('../common'); var assert = require('assert'); - + -var stream = require('stream'); +var stream = require('../../'); - + var queue = []; for (var decode = 0; decode < 2; decode++) { diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js @@ -428,26 +428,26 @@ index 3814bf0..248c1be 100644 --- a/test/simple/test-stream2-basic.js +++ b/test/simple/test-stream2-basic.js @@ -21,7 +21,7 @@ - - + + var common = require('../common.js'); -var R = require('_stream_readable'); +var R = require('../../lib/_stream_readable'); var assert = require('assert'); - + var util = require('util'); diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js index 6cdd4e9..f0fa84b 100644 --- a/test/simple/test-stream2-compatibility.js +++ b/test/simple/test-stream2-compatibility.js @@ -21,7 +21,7 @@ - - + + var common = require('../common.js'); -var R = require('_stream_readable'); +var R = require('../../lib/_stream_readable'); var assert = require('assert'); - + var util = require('util'); diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js index 39b274f..006a19b 100644 @@ -455,12 +455,12 @@ index 39b274f..006a19b 100644 +++ b/test/simple/test-stream2-finish-pipe.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. - + var common = require('../common.js'); -var stream = require('stream'); +var stream = require('../../'); var Buffer = require('buffer').Buffer; - + var r = new stream.Readable(); diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js deleted file mode 100644 @@ -605,7 +605,7 @@ index 2fbfbca..667985b 100644 @@ -30,7 +30,7 @@ var PUSHSIZE = 20; var PUSHCOUNT = 1000; var HWM = 50; - + -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; var r = new Readable({ @@ -613,7 +613,7 @@ index 2fbfbca..667985b 100644 }); @@ -39,23 +39,23 @@ var rs = r._readableState; r._read = push; - + r.on('readable', function() { - console.error('>> readable'); + //console.error('>> readable'); @@ -624,7 +624,7 @@ index 2fbfbca..667985b 100644 - console.error(' < %j (%d remain)', ret && ret.length, rs.length); + //console.error(' < %j (%d remain)', ret && ret.length, rs.length); } while (ret && ret.length === READSIZE); - + - console.error('<< after read()', - ret && ret.length, - rs.needReadable, @@ -634,24 +634,24 @@ index 2fbfbca..667985b 100644 + // rs.needReadable, + // rs.length); }); - + var endEmitted = false; r.on('end', function() { endEmitted = true; - console.error('end'); + //console.error('end'); }); - + var pushes = 0; @@ -64,11 +64,11 @@ function push() { return; - + if (pushes++ === PUSHCOUNT) { - console.error(' push(EOF)'); + //console.error(' push(EOF)'); return r.push(null); } - + - console.error(' push #%d', pushes); + //console.error(' push #%d', pushes); if (r.push(new Buffer(PUSHSIZE))) @@ -662,27 +662,27 @@ index 3e6931d..ff47d89 100644 --- a/test/simple/test-stream2-objects.js +++ b/test/simple/test-stream2-objects.js @@ -21,8 +21,8 @@ - - + + var common = require('../common.js'); -var Readable = require('_stream_readable'); -var Writable = require('_stream_writable'); +var Readable = require('../../lib/_stream_readable'); +var Writable = require('../../lib/_stream_writable'); var assert = require('assert'); - + // tiny node-tap lookalike. diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js index cf7531c..e3f3e4e 100644 --- a/test/simple/test-stream2-pipe-error-handling.js +++ b/test/simple/test-stream2-pipe-error-handling.js @@ -21,7 +21,7 @@ - + var common = require('../common'); var assert = require('assert'); -var stream = require('stream'); +var stream = require('../../'); - + (function testErrorListenerCatches() { var count = 1000; diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js @@ -691,12 +691,12 @@ index 5e8e3cb..53b2616 100755 +++ b/test/simple/test-stream2-pipe-error-once-listener.js @@ -24,7 +24,7 @@ var common = require('../common.js'); var assert = require('assert'); - + var util = require('util'); -var stream = require('stream'); +var stream = require('../../'); - - + + var Read = function() { diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js index b63edc3..eb2b0e9 100644 @@ -704,7 +704,7 @@ index b63edc3..eb2b0e9 100644 +++ b/test/simple/test-stream2-push.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. - + var common = require('../common.js'); -var stream = require('stream'); +var stream = require('../../'); @@ -716,14 +716,14 @@ index e8a7305..9740a47 100644 --- a/test/simple/test-stream2-read-sync-stack.js +++ b/test/simple/test-stream2-read-sync-stack.js @@ -21,7 +21,7 @@ - + var common = require('../common'); var assert = require('assert'); -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; var r = new Readable(); var N = 256 * 1024; - + diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js index cd30178..4b1659d 100644 --- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js @@ -731,13 +731,13 @@ index cd30178..4b1659d 100644 @@ -22,10 +22,9 @@ var common = require('../common'); var assert = require('assert'); - + -var Readable = require('stream').Readable; +var Readable = require('../../').Readable; - + test1(); -test2(); - + function test1() { var r = new Readable(); @@ -88,31 +87,3 @@ function test1() { @@ -777,12 +777,12 @@ index 7c96ffe..04a96f5 100644 --- a/test/simple/test-stream2-readable-from-list.js +++ b/test/simple/test-stream2-readable-from-list.js @@ -21,7 +21,7 @@ - + var assert = require('assert'); var common = require('../common.js'); -var fromList = require('_stream_readable')._fromList; +var fromList = require('../../lib/_stream_readable')._fromList; - + // tiny node-tap lookalike. var tests = []; diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js @@ -792,23 +792,23 @@ index 675da8e..51fd3d5 100644 @@ -22,7 +22,7 @@ var common = require('../common'); var assert = require('assert'); - + -var Stream = require('stream'); +var Stream = require('../../'); var Readable = Stream.Readable; - + var r = new Readable(); diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js index 7314ae7..c971898 100644 --- a/test/simple/test-stream2-readable-non-empty-end.js +++ b/test/simple/test-stream2-readable-non-empty-end.js @@ -21,7 +21,7 @@ - + var assert = require('assert'); var common = require('../common.js'); -var Readable = require('_stream_readable'); +var Readable = require('../../lib/_stream_readable'); - + var len = 0; var chunks = new Array(10); diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js @@ -818,11 +818,11 @@ index 2e5cf25..fd8a3dc 100644 @@ -22,7 +22,7 @@ var common = require('../common'); var assert = require('assert'); - + -var Readable = require('_stream_readable'); +var Readable = require('../../lib/_stream_readable'); var EE = require('events').EventEmitter; - + var oldStream = new EE(); diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js index 90eea01..6b177f7 100644 @@ -831,40 +831,40 @@ index 90eea01..6b177f7 100644 @@ -22,8 +22,8 @@ var common = require('../common'); var assert = require('assert'); - + -var Readable = require('_stream_readable'); -var Writable = require('_stream_writable'); +var Readable = require('../../lib/_stream_readable'); +var Writable = require('../../lib/_stream_writable'); var EE = require('events').EventEmitter; - + var testRuns = 0, completedRuns = 0; diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js index 5d2c32a..685531b 100644 --- a/test/simple/test-stream2-set-encoding.js +++ b/test/simple/test-stream2-set-encoding.js @@ -22,7 +22,7 @@ - + var common = require('../common.js'); var assert = require('assert'); -var R = require('_stream_readable'); +var R = require('../../lib/_stream_readable'); var util = require('util'); - + // tiny node-tap lookalike. diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js index 9c9ddd8..a0cacc6 100644 --- a/test/simple/test-stream2-transform.js +++ b/test/simple/test-stream2-transform.js @@ -21,8 +21,8 @@ - + var assert = require('assert'); var common = require('../common.js'); -var PassThrough = require('_stream_passthrough'); -var Transform = require('_stream_transform'); +var PassThrough = require('../../').PassThrough; +var Transform = require('../../').Transform; - + // tiny node-tap lookalike. var tests = []; diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js @@ -872,41 +872,41 @@ index d66dc3c..365b327 100644 --- a/test/simple/test-stream2-unpipe-drain.js +++ b/test/simple/test-stream2-unpipe-drain.js @@ -22,7 +22,7 @@ - + var common = require('../common.js'); var assert = require('assert'); -var stream = require('stream'); +var stream = require('../../'); var crypto = require('crypto'); - + var util = require('util'); diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js index 99f8746..17c92ae 100644 --- a/test/simple/test-stream2-unpipe-leak.js +++ b/test/simple/test-stream2-unpipe-leak.js @@ -22,7 +22,7 @@ - + var common = require('../common.js'); var assert = require('assert'); -var stream = require('stream'); +var stream = require('../../'); - + var chunk = new Buffer('hallo'); - + diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js index 704100c..209c3a6 100644 --- a/test/simple/test-stream2-writable.js +++ b/test/simple/test-stream2-writable.js @@ -20,8 +20,8 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. - + var common = require('../common.js'); -var W = require('_stream_writable'); -var D = require('_stream_duplex'); +var W = require('../../').Writable; +var D = require('../../').Duplex; var assert = require('assert'); - + var util = require('util'); diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js index b91bde3..2f72c15 100644 @@ -915,8 +915,9 @@ index b91bde3..2f72c15 100644 @@ -22,7 +22,7 @@ var common = require('../common'); var assert = require('assert'); - + -var stream = require('stream'); +var stream = require('../../'); var Readable = stream.Readable; var Writable = stream.Writable; + diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/build/build.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/build/build.js index e1856ef09437..ec58596aeebe 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/build/build.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/build/build.js @@ -206,3 +206,4 @@ module.exports = Array.isArray || function (arr) { }); require.alias("isarray/index.js", "isarray/index.js"); + diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js index e57dabdcebc9..425950f9fc9e 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js @@ -11,7 +11,7 @@ test('u8a without globals', function (t) { vm.runInNewContext(src, c); var TA = c.module.exports; var ua = new(TA.Uint8Array)(5); - + t.equal(ua.length, 5); ua[1] = 256 + 55; t.equal(ua[1], 55); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md index 487b5000b7e0..e6dda4e34ad1 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/readme.md @@ -63,7 +63,7 @@ var concat = require('concat-stream') Return a `writable` stream that will fire `cb(data)` with all of the data that was written to the stream. Data can be written to `writable` as strings, -Buffers, arrays of byte integers, and Uint8Arrays. +Buffers, arrays of byte integers, and Uint8Arrays. By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/test/string.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/test/string.js index b20d4dd5777d..218c522063be 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/test/string.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/test/string.js @@ -58,7 +58,7 @@ test('string from buffers with multibyte characters', function (t) { var snowman = new Buffer('☃') for (var i = 0; i < 8; i++) { strings.write(snowman.slice(0, 1)) - strings.write(snowman.slice(1)) + strings.write(snowman.slice(1)) } strings.end() }) diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index e98b732f7f47..9d4178c572f0 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": "4.0.5", + "version": "5.0.0", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -30,20 +30,21 @@ }, "devDependencies": { "negotiator": "^0.4.9", + "nock": "^0.56.0", "tap": "" }, "optionalDependencies": { "npmlog": "" }, "license": "ISC", - "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\nvar uri = \"npm://registry.npmjs.org/npm\"\nvar params = {timeout: 1000}\n\nclient.get(uri, params, function (error, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (including the registry\npath – but be sure to terminate the path with `/`). `http` and `https` URLs are\nthe only ones supported.\n\n## Using the client\n\nEvery call to the client follows the same pattern:\n\n* `uri` {String} The *fully-qualified* URI of the registry API method being\n invoked.\n* `params` {Object} Per-request parameters.\n* `callback` {Function} Callback to be invoked when the call is complete.\n\n### Credentials\n\nMany requests to the registry can by authenticated, and require credentials\nfor authorization. These credentials always look the same:\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n**or**\n\n* `token` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n## API\n\n### client.adduser(uri, params, cb)\n\n* `uri` {String} Base registry URL.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nAdd a user account to the registry, or verify the credentials.\n\n### client.deprecate(uri, params, cb)\n\n* `uri` {String} Full registry URI for the deprecated package.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Semver version range.\n * `message` {String} The message to use as a deprecation warning.\n * `auth` {Credentials}\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n### client.get(uri, params, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `params` {Object} Object containing per-request properties.\n * `timeout` {Number} Duration before the request times out. Optional\n (default: never).\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `staleOk` {Boolean} If there's cached data available, then return that to\n the callback quickly, and update the cache the background. Optional\n (default: false).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag.\n\n### client.publish(uri, params, cb)\n\n* `uri` {String} The registry URI for the package to publish.\n* `params` {Object} Object containing per-request properties.\n * `metadata` {Object} Package metadata.\n * `body` {Stream} Stream of the package body / tarball.\n * `auth` {Credentials}\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder.\n\n### client.star(uri, params, cb)\n\n* `uri` {String} The complete registry URI for the package to star.\n* `params` {Object} Object containing per-request properties.\n * `starred` {Boolean} True to star the package, false to unstar it. Optional\n (default: false).\n * `auth` {Credentials}\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or unstar a\npackage, though other writes do require that the user be the package owner.\n\n### client.stars(uri, params, cb)\n\n* `uri` {String} The base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `username` {String} Name of user to fetch starred packages for. Optional\n (default: user in `auth`).\n * `auth` {Credentials} Optional (required if `username` is omitted).\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n### client.tag(uri, params, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Version to tag.\n * `tag` {String} Tag name to apply.\n * `auth` {Credentials}\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n### client.unpublish(uri, params, cb)\n\n* `uri` {String} The complete registry URI of the package to unpublish.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} version to unpublish. Optional – omit to unpublish all\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n### client.whoami(uri, params, cb)\n\n* `uri` {String} The base registry for the URI.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSimple call to see who the registry thinks you are. Especially useful with\ntoken-based auth.\n\n\n## PLUMBING\n\nThe below are primarily intended for use by the rest of the API, or by the npm\ncaching logic directly.\n\n### client.request(uri, params, cb)\n\n* `uri` {String} URI pointing to the resource to request.\n* `params` {Object} Object containing per-request properties.\n * `method` {String} HTTP method. Optional (default: \"GET\").\n * `body` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON. Optional – body\n only used for write operations.\n * `etag` {String} The cached ETag. Optional.\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a generic request to the registry. All the other methods are wrappers\naround `client.request`.\n\n### client.fetch(uri, params, cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `params` {Object} Object containing per-request properties.\n * `headers` {Stream} HTTP headers to be included with the request. Optional.\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetch a package from a URL, with auth set appropriately if included. Used to\ncache remote tarballs as well as request package tarballs from the registry.\n\n# Configuration\n\nThe client uses its own configuration, which is just passed in as a simple\nnested object. The following are the supported values (with their defaults, if\nany):\n\n* `proxy.http` {URL} The URL to proxy HTTP requests through.\n* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be\n the same as `proxy.http` if unset.\n* `proxy.localAddress` {IP} The local address to use on multi-homed systems.\n* `ssl.ca` {String} Cerficate signing authority certificates to trust.\n* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates.\n* `ssl.key` {String} Private key (PEM encoded) for client certificate.\n* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates.\n Default = `true`\n* `retry.count` {Number} Number of times to retry on GET failures. Default = 2.\n* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10.\n* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default = 10000 (10 seconds)\n* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default = 60000 (60 seconds)\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `defaultTag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `couchToken` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login).\n* `sessionToken` {string} A random identifier for this set of client requests.\n Default = 8 random hexadecimal bytes.\n", + "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\nvar uri = \"npm://registry.npmjs.org/npm\"\nvar params = {timeout: 1000}\n\nclient.get(uri, params, function (error, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (including the registry\npath – but be sure to terminate the path with `/`). `http` and `https` URLs are\nthe only ones supported.\n\n## Using the client\n\nEvery call to the client follows the same pattern:\n\n* `uri` {String} The *fully-qualified* URI of the registry API method being\n invoked.\n* `params` {Object} Per-request parameters.\n* `callback` {Function} Callback to be invoked when the call is complete.\n\n### Credentials\n\nMany requests to the registry can by authenticated, and require credentials\nfor authorization. These credentials always look the same:\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n**or**\n\n* `token` {String}\n* `alwaysAuth` {Boolean} Whether calls to the target registry are always\n authed.\n\n## API\n\n### client.adduser(uri, params, cb)\n\n* `uri` {String} Base registry URL.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nAdd a user account to the registry, or verify the credentials.\n\n### client.deprecate(uri, params, cb)\n\n* `uri` {String} Full registry URI for the deprecated package.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Semver version range.\n * `message` {String} The message to use as a deprecation warning.\n * `auth` {Credentials}\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n### client.get(uri, params, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `params` {Object} Object containing per-request properties.\n * `timeout` {Number} Duration before the request times out. Optional\n (default: never).\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `staleOk` {Boolean} If there's cached data available, then return that to\n the callback quickly, and update the cache the background. Optional\n (default: false).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag or the \"Last Modified\" timestamp.\n\n### client.publish(uri, params, cb)\n\n* `uri` {String} The registry URI for the package to publish.\n* `params` {Object} Object containing per-request properties.\n * `metadata` {Object} Package metadata.\n * `body` {Stream} Stream of the package body / tarball.\n * `auth` {Credentials}\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder.\n\n### client.star(uri, params, cb)\n\n* `uri` {String} The complete registry URI for the package to star.\n* `params` {Object} Object containing per-request properties.\n * `starred` {Boolean} True to star the package, false to unstar it. Optional\n (default: false).\n * `auth` {Credentials}\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or unstar a\npackage, though other writes do require that the user be the package owner.\n\n### client.stars(uri, params, cb)\n\n* `uri` {String} The base URL for the registry.\n* `params` {Object} Object containing per-request properties.\n * `username` {String} Name of user to fetch starred packages for. Optional\n (default: user in `auth`).\n * `auth` {Credentials} Optional (required if `username` is omitted).\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n### client.tag(uri, params, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `params` {Object} Object containing per-request properties.\n * `version` {String} Version to tag.\n * `tag` {String} Tag name to apply.\n * `auth` {Credentials}\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n### client.unpublish(uri, params, cb)\n\n* `uri` {String} The complete registry URI of the package to unpublish.\n* `params` {Object} Object containing per-request properties.\n * `version` {String} version to unpublish. Optional – omit to unpublish all\n versions.\n * `auth` {Credentials}\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n### client.whoami(uri, params, cb)\n\n* `uri` {String} The base registry for the URI.\n* `params` {Object} Object containing per-request properties.\n * `auth` {Credentials}\n* `cb` {Function}\n\nSimple call to see who the registry thinks you are. Especially useful with\ntoken-based auth.\n\n\n## PLUMBING\n\nThe below are primarily intended for use by the rest of the API, or by the npm\ncaching logic directly.\n\n### client.request(uri, params, cb)\n\n* `uri` {String} URI pointing to the resource to request.\n* `params` {Object} Object containing per-request properties.\n * `method` {String} HTTP method. Optional (default: \"GET\").\n * `body` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON. Optional – body\n only used for write operations.\n * `etag` {String} The cached ETag. Optional.\n * `lastModified` {String} The cached Last-Modified timestamp. Optional.\n * `follow` {Boolean} Follow 302/301 responses. Optional (default: true).\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a generic request to the registry. All the other methods are wrappers\naround `client.request`.\n\n### client.fetch(uri, params, cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `params` {Object} Object containing per-request properties.\n * `headers` {Stream} HTTP headers to be included with the request. Optional.\n * `auth` {Credentials} Optional.\n* `cb` {Function}\n\nFetch a package from a URL, with auth set appropriately if included. Used to\ncache remote tarballs as well as request package tarballs from the registry.\n\n# Configuration\n\nThe client uses its own configuration, which is just passed in as a simple\nnested object. The following are the supported values (with their defaults, if\nany):\n\n* `proxy.http` {URL} The URL to proxy HTTP requests through.\n* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be\n the same as `proxy.http` if unset.\n* `proxy.localAddress` {IP} The local address to use on multi-homed systems.\n* `ssl.ca` {String} Cerficate signing authority certificates to trust.\n* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates.\n* `ssl.key` {String} Private key (PEM encoded) for client certificate.\n* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates.\n Default = `true`\n* `retry.count` {Number} Number of times to retry on GET failures. Default = 2.\n* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10.\n* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default = 10000 (10 seconds)\n* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default = 60000 (60 seconds)\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `defaultTag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `couchToken` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login).\n* `sessionToken` {string} A random identifier for this set of client requests.\n Default = 8 random hexadecimal bytes.\n", "readmeFilename": "README.md", - "gitHead": "33bd08aa65bb26ba1b956d2f119b5e952f4d3141", + "gitHead": "b22f38992087e57f263c269dcd52ff290565d401", "bugs": { "url": "https://github.com/isaacs/npm-registry-client/issues" }, "homepage": "https://github.com/isaacs/npm-registry-client", - "_id": "npm-registry-client@4.0.5", - "_shasum": "27d37ca0c7bbd5df14f4ae35223a4d588dd4fea6", - "_from": "npm-registry-client@>=4.0.5 <4.1.0" + "_id": "npm-registry-client@5.0.0", + "_shasum": "0425db2fc3dcd322e74fe95029d2c49a41e4b6cf", + "_from": "npm-registry-client@>=5.0.0 <5.1.0" } diff --git a/deps/npm/node_modules/npm-registry-client/test/lib/server.js b/deps/npm/node_modules/npm-registry-client/test/lib/server.js index 37cfae04177f..775f7548cf1e 100644 --- a/deps/npm/node_modules/npm-registry-client/test/lib/server.js +++ b/deps/npm/node_modules/npm-registry-client/test/lib/server.js @@ -27,7 +27,7 @@ function handler (req, res) { if (!k) throw Error('unexpected request: ' + req.method + ' ' + req.url) var fn = server._expect[k].shift() - if (!fn) throw Error('unexpected request' + req.method + ' ' + req.url) + if (!fn) throw Error('unexpected request: ' + req.method + ' ' + req.url) var remain = (Object.keys(server._expect).reduce(function (s, k) { diff --git a/deps/npm/node_modules/npm-registry-client/test/request-gzip-content.js b/deps/npm/node_modules/npm-registry-client/test/request-gzip-content.js index 4463de9a7426..497a6b8c0d34 100644 --- a/deps/npm/node_modules/npm-registry-client/test/request-gzip-content.js +++ b/deps/npm/node_modules/npm-registry-client/test/request-gzip-content.js @@ -11,12 +11,12 @@ var client = common.freshClient({ } }) -var TEST_URL = "http://localhost:1337/some-package-gzip/1.2.3" +var TEST_URL = common.registry+"/some-package-gzip/1.2.3" var pkg = { - _id: "some-package-gzip@1.2.3", - name: "some-package-gzip", - version: "1.2.3" + _id : "some-package-gzip@1.2.3", + name : "some-package-gzip", + version : "1.2.3" } zlib.gzip(JSON.stringify(pkg), function (err, pkgGzip) { @@ -32,21 +32,24 @@ zlib.gzip(JSON.stringify(pkg), function (err, pkgGzip) { client.get(TEST_URL, {}, function (er, data) { if (er) throw er - t.deepEqual(data, pkg) + t.deepEqual(data, pkg, "some-package-gzip version 1.2.3") t.end() }) }) tap.test("request wrong gzip package content", function (t) { - server.expect("GET", "/some-package-gzip-error/1.2.3", function (req, res) { - res.statusCode = 200 - res.setHeader("Content-Encoding", "gzip") - res.setHeader("Content-Type", "application/json") - res.end(new Buffer("wrong gzip content")) - }) + // will retry 3 times + for (var i = 0; i < 3; i++) { + server.expect("GET", "/some-package-gzip-error/1.2.3", function (req, res) { + res.statusCode = 200 + res.setHeader("Content-Encoding", "gzip") + res.setHeader("Content-Type", "application/json") + res.end(new Buffer("wrong gzip content")) + }) + } client.get(TEST_URL, {}, function (er) { - t.ok(er) + t.ok(er, "ungzip error") t.end() }) }) diff --git a/deps/npm/node_modules/npm-registry-client/test/request.js b/deps/npm/node_modules/npm-registry-client/test/request.js index 799a626eaea6..cdc4b75f547e 100644 --- a/deps/npm/node_modules/npm-registry-client/test/request.js +++ b/deps/npm/node_modules/npm-registry-client/test/request.js @@ -81,7 +81,7 @@ test("request call contract", function (t) { }) test("run request through its paces", function (t) { - t.plan(24) + t.plan(27) server.expect("/request-defaults", function (req, res) { t.equal(req.method, "GET", "uses GET by default") @@ -94,6 +94,14 @@ test("run request through its paces", function (t) { })) }) + server.expect("/last-modified", function (req, res) { + t.equal(req.headers["if-modified-since"], "test-last-modified", + "got test if-modified-since") + + res.statusCode = 200 + res.json({ fetched : "last-modified" }) + }) + server.expect("/etag", function (req, res) { t.equal(req.headers["if-none-match"], "test-etag", "got test etag") @@ -159,9 +167,20 @@ test("run request through its paces", function (t) { }) var defaults = {} - client.request(common.registry+"/request-defaults", defaults, function (er, data) { + client.request( + common.registry+"/request-defaults", + defaults, + function (er, data, raw, response) { + t.ifError(er, "call worked") + t.deepEquals(data, { fetched : "defaults" }, "confirmed defaults work") + t.equal(response.headers.connection, "keep-alive", "keep-alive set") + } + ) + + var lastModified = { lastModified : "test-last-modified" } + client.request(common.registry+"/last-modified", lastModified, function (er, data) { t.ifError(er, "call worked") - t.deepEquals(data, { fetched : "defaults" }, "confirmed defaults work") + t.deepEquals(data, { fetched : "last-modified" }, "last-modified request sent") }) var etagged = { etag : "test-etag" } diff --git a/deps/npm/node_modules/npm-registry-client/test/star.js b/deps/npm/node_modules/npm-registry-client/test/star.js index 1a8576f8548e..0d899ee50043 100644 --- a/deps/npm/node_modules/npm-registry-client/test/star.js +++ b/deps/npm/node_modules/npm-registry-client/test/star.js @@ -1,9 +1,9 @@ var test = require("tap").test - var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient() var cache = require("./fixtures/underscore/cache.json") +var nock = require("nock") function nop () {} @@ -19,7 +19,7 @@ var AUTH = { } var PARAMS = { starred : STARRED, - auth : AUTH + auth : AUTH } test("star call contract", function (t) { @@ -58,22 +58,6 @@ test("star call contract", function (t) { "params must include auth" ) - t.test("token auth disallowed in star", function (t) { - var params = { - auth : { - token : "lol" - } - } - client.star(URI, params, function (err) { - t.equal( - err && err.message, - "This operation is unsupported for token-based auth", - "star doesn't support token-based auth" - ) - t.end() - }) - }) - t.end() }) @@ -96,7 +80,7 @@ test("star a package", function (t) { req.on("end", function () { var updated = JSON.parse(b) - var already = [ + var already = [ "vesln", "mvolkmann", "lancehunt", "mikl", "linus", "vasc", "bat", "dmalam", "mbrevoort", "danielr", "rsimoes", "thlorenz" ] @@ -110,7 +94,7 @@ test("star a package", function (t) { t.ok(updated.users[USERNAME], "user is in the starred list") res.statusCode = 201 - res.json({starred:true}) + res.json({ starred : true }) }) }) @@ -118,10 +102,80 @@ test("star a package", function (t) { starred : STARRED, auth : AUTH } - client.star("http://localhost:1337/underscore", params, function (error, data) { - t.ifError(error, "no errors") + + client.star("http://localhost:1337/underscore", params, function (er, data) { + t.ifError(er, "no errors") t.ok(data.starred, "was starred") t.end() }) }) + +test("if password auth, only sets authorization on put", function (t) { + var starGet = nock("http://localhost:1010") + .get("/underscore?write=true") + .reply(200, {}) + + var starPut = nock("http://localhost:1010", { + reqheaders : { + authorization : "Basic " + new Buffer(AUTH.username+":"+ + AUTH.password).toString("base64") + } + }) + .put("/underscore") + .reply(200) + + var params = { + starred : STARRED, + auth : AUTH + } + + client.star("http://localhost:1010/underscore", params, function (er) { + t.ifError(er, "starred without issues") + starGet.done() + starPut.done() + t.end() + }) +}) + +test("if token auth, sets bearer on get and put", function (t) { + var starGet = nock("http://localhost:1010", { + reqheaders : { + authorization : "Bearer foo" + } + }) + .get("/underscore?write=true") + .reply(200, {}) + + var getUser = nock("http://localhost:1010", { + reqheaders : { + authorization : "Bearer foo" + } + }) + .get("/-/whoami") + .reply(200, { + username : "bcoe" + }) + + var starPut = nock("http://localhost:1010", { + reqheaders : { + authorization : "Bearer foo" + } + }) + .put("/underscore") + .reply(200) + + var params = { + starred : STARRED, + auth : { + token : "foo" + } + } + client.star("http://localhost:1010/underscore", params, function (er) { + t.ifError(er, "starred without error") + starGet.done() + starPut.done() + getUser.done() + t.end() + }) +}) diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/Makefile b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/Makefile index 2d7580746d0b..b4ff85a33b6e 100644 --- a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/Makefile +++ b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/Makefile @@ -4,3 +4,4 @@ test: @./test/run.js .PHONY: test + diff --git a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js index 787539606e6f..9ecad5b8ad1c 100644 --- a/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +++ b/deps/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js @@ -34,3 +34,5 @@ server.listen(common.PORT, function() { }); }); }); + + diff --git a/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md b/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md index a43093bf321f..652609b37e00 100644 --- a/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md +++ b/deps/npm/node_modules/request/node_modules/node-uuid/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2010-2012 Robert Kieffer +Copyright (c) 2010-2012 Robert Kieffer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md index c6214d5da7c3..f5ee8b464484 100644 --- a/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md +++ b/deps/npm/node_modules/request/node_modules/qs/CHANGELOG.md @@ -65,3 +65,4 @@ ## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed) - [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index + diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch b/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch index c5d8242da5be..b984607a41cc 100644 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch +++ b/deps/npm/node_modules/sha/node_modules/readable-stream/float.patch @@ -3,16 +3,16 @@ index c5a741c..a2e0d8e 100644 --- a/lib/_stream_duplex.js +++ b/lib/_stream_duplex.js @@ -26,8 +26,8 @@ - + module.exports = Duplex; var util = require('util'); -var Readable = require('_stream_readable'); -var Writable = require('_stream_writable'); +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); - + util.inherits(Duplex, Readable); - + diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js index a5e9864..330c247 100644 --- a/lib/_stream_passthrough.js diff --git a/deps/npm/node_modules/umask/.npmignore b/deps/npm/node_modules/umask/.npmignore new file mode 100644 index 000000000000..59d842baa84c --- /dev/null +++ b/deps/npm/node_modules/umask/.npmignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript diff --git a/deps/npm/node_modules/umask/ChangeLog b/deps/npm/node_modules/umask/ChangeLog new file mode 100644 index 000000000000..1254674513b6 --- /dev/null +++ b/deps/npm/node_modules/umask/ChangeLog @@ -0,0 +1,9 @@ +2015-01-15 Sam Mikes + + * index.js: (convert_fromString) accept decimal strings provided they + don't begin with '0' + +2015-01-14 Sam Mikes + + * index.js: initial rev + diff --git a/deps/npm/node_modules/umask/LICENSE b/deps/npm/node_modules/umask/LICENSE new file mode 100644 index 000000000000..e637724b3bc5 --- /dev/null +++ b/deps/npm/node_modules/umask/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Sam Mikes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/deps/npm/node_modules/umask/README.md b/deps/npm/node_modules/umask/README.md new file mode 100644 index 000000000000..80009ae709b2 --- /dev/null +++ b/deps/npm/node_modules/umask/README.md @@ -0,0 +1,78 @@ +# umask + +Convert umask from string <-> number. + +## Installation & Use + +``` +$ npm install -S umask + +var umask = require('umask'); + +console.log(umask.toString(18)); // 0022 + +console.log(umask.fromString('0777')) // 511 +``` + +## API + +### `toString( val )` + +Converts `val` to a 0-padded octal string. `val` is assumed to be a +Number in the correct range (0..511) + +### `fromString( val, [cb] )` + +Converts `val` to a Number that can be used as a umask. `val` can +be of the following forms: + + * String containing octal number (leading 0) + * String containing decimal number + * Number + +In all cases above, the value obtained is then converted to an integer and +checked against the legal `umask` range 0..511 + +`fromString` can be used as a simple converter, with no error feedback, by +omitting the optional callback argument `cb`: + +``` + var mask = umask.fromString(val); + + // mask is now the umask descibed by val or + // the default, 0022 (18 dec) +``` + +The callback arguments are `(err, val)` where `err` is either `null` or an +Error object and `val` is either the converted umask or the default umask, `0022`. + +``` + umask.fromString(val, function (err, val) { + if (err) { + console.error("invalid umask: " + err.message) + } + + /* do something with val */ + }); +``` + +The callback, if provided, is always called **synchronously**. + +### `validate( data, k, val )` + +This is a validation function of the form expected by `nopt`. If +`val` is a valid umask, the function returns true and sets `data[k]`. +If `val` is not a valid umask, the function returns false. + +The `validate` function is stricter than `fromString`: it only accepts +Number or octal String values, and the String value must begin with `0`. +The `validate` function does **not** accept Strings containing decimal +numbers. + +# Maintainer + +Sam Mikes + +# License + +MIT \ No newline at end of file diff --git a/deps/npm/node_modules/umask/index.js b/deps/npm/node_modules/umask/index.js new file mode 100644 index 000000000000..501c0e0c05cb --- /dev/null +++ b/deps/npm/node_modules/umask/index.js @@ -0,0 +1,77 @@ +'use strict'; + +var util = require("util"); + +function toString(val) { + val = val.toString(8); + while (val.length < 4) { + val = "0" + val; + } + return val; +} + +var defaultUmask = 18; // 0022; +var defaultUmaskString = toString(defaultUmask); + +function validate(data, k, val) { + // must be either an integer or an octal string. + if (typeof val === "number" && !isNaN(val)) { + data[k] = val; + return true; + } + + if (typeof val === "string") { + if (val.charAt(0) !== "0") { + return false; + } + data[k] = parseInt(val, 8); + return true; + } + + return false; +} + +function convert_fromString(val, cb) { + if (typeof val === "string") { + // check for octal string first + if (val.charAt(0) === '0' && /^[0-7]+$/.test(val)) { + val = parseInt(val, 8); + } else if (val.charAt(0) !== '0' && /^[0-9]+$/.test(val)) { + // legacy support for decimal strings + val = parseInt(val, 10); + } else { + return cb(new Error(util.format("Expected octal string, got %j, defaulting to %j", + val, defaultUmaskString)), + defaultUmask); + } + } else if (typeof val !== "number") { + return cb(new Error(util.format("Expected number or octal string, got %j, defaulting to %j", + val, defaultUmaskString)), + defaultUmask); + } + + val = Math.floor(val); + + if ((val < 0) || (val > 511)) { + return cb(new Error(util.format("Must be in range 0..511 (0000..0777), got %j", val)), + defaultUmask); + } + + cb(null, val); +} + +function fromString(val, cb) { + + // synchronous callback, no zalgo + convert_fromString(val, cb || function (err, result) { + /*jslint unparam:true*/ + val = result; + }); + + return val; +} + +exports.toString = toString; +exports.fromString = fromString; +exports.validate = validate; + diff --git a/deps/npm/node_modules/umask/package.json b/deps/npm/node_modules/umask/package.json new file mode 100644 index 000000000000..ed84e346f110 --- /dev/null +++ b/deps/npm/node_modules/umask/package.json @@ -0,0 +1,53 @@ +{ + "name": "umask", + "version": "1.1.0", + "description": "convert umask from string <-> number", + "main": "index.js", + "scripts": { + "test": "lab -ct 100", + "lint": "jslint --terse --latest *.js test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/smikes/umask.git" + }, + "keywords": [ + "umask" + ], + "author": { + "name": "Sam Mikes", + "email": "smikes@cubane.com" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/smikes/umask/issues" + }, + "homepage": "https://github.com/smikes/umask", + "devDependencies": { + "code": "^1.2.1", + "jslint": "^0.7.2", + "lab": "^5.2.0" + }, + "gitHead": "63d821e4d0b06ef9a4b727c5fbe5976e9534d76e", + "_id": "umask@1.1.0", + "_shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d", + "_from": "umask@>=1.1.0 <1.2.0", + "_npmVersion": "2.2.0", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "smikes", + "email": "smikes@cubane.com" + }, + "maintainers": [ + { + "name": "smikes", + "email": "smikes@cubane.com" + } + ], + "dist": { + "shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d", + "tarball": "http://registry.npmjs.org/umask/-/umask-1.1.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz" +} diff --git a/deps/npm/node_modules/umask/test/simple.js b/deps/npm/node_modules/umask/test/simple.js new file mode 100644 index 000000000000..8f29ae745a47 --- /dev/null +++ b/deps/npm/node_modules/umask/test/simple.js @@ -0,0 +1,166 @@ +'use strict'; + +var umask = require('..'); + +var Code = require('code'); +var Lab = require('lab'); +var lab = Lab.script(); +exports.lab = lab; + +var describe = lab.describe; +var it = lab.it; +var expect = Code.expect; + +describe('validates umask', function () { + // signature of validator: validate(obj, key, val) + // store valid value in obj[key] + // return false if invalid + + it('accepts numbers', function (done) { + var o = {}, + result = false; + + result = umask.validate(o, 'umask', 0); + expect(result).to.equal(true); + expect(o.umask).to.equal(0); + + result = umask.validate(o, 'umask', 511); + expect(result).to.equal(true); + expect(o.umask).to.equal(511); + done(); + }); + + it('accepts strings', function (done) { + var o = {}, + result; + + result = umask.validate(o, 'umask', "0"); + expect(result).to.equal(true); + expect(o.umask).to.equal(0); + + result = umask.validate(o, 'umask', "0777"); + expect(result).to.equal(true); + expect(o.umask).to.equal(511); + + done(); + }); + + it('rejects other types', function (done) { + expect(umask.validate(undefined, undefined, false)).to.equal(false); + expect(umask.validate(undefined, undefined, {})).to.equal(false); + + done(); + }); + + it('rejects non-octalish strings', function (done) { + expect(umask.validate(undefined, undefined, "1")).to.equal(false); + + done(); + }); + + it('rejects NaN strings', function (done) { + expect(umask.validate(undefined, undefined, NaN)).to.equal(false); + + done(); + }); +}); + +describe('umask to string', function () { + it("converts umask to string", function (done) { + expect(umask.toString(0)).to.equal("0000"); + expect(umask.toString(1)).to.equal("0001"); + expect(umask.toString(7)).to.equal("0007"); + expect(umask.toString(8)).to.equal("0010"); + expect(umask.toString(511)).to.equal("0777"); + expect(umask.toString(18)).to.equal("0022"); + expect(umask.toString(16)).to.equal("0020"); + done(); + }); +}); + +describe('umask from string', function () { + it('converts valid values', function (done) { + expect(umask.fromString("0000")).to.equal(0); + expect(umask.fromString("0")).to.equal(0); + expect(umask.fromString("0777")).to.equal(511); + expect(umask.fromString("0024")).to.equal(20); + + expect(umask.fromString(0)).to.equal(0); + expect(umask.fromString(20)).to.equal(20); + expect(umask.fromString(21)).to.equal(21); + expect(umask.fromString(511)).to.equal(511); + + done(); + }); + + it('converts valid values', function (done) { + expect(umask.fromString("0000")).to.equal(0); + expect(umask.fromString("0")).to.equal(0); + expect(umask.fromString("010")).to.equal(8); + expect(umask.fromString("0777")).to.equal(511); + expect(umask.fromString("0024")).to.equal(20); + + expect(umask.fromString("8")).to.equal(8); + expect(umask.fromString("9")).to.equal(9); + expect(umask.fromString("18")).to.equal(18); + expect(umask.fromString("16")).to.equal(16); + + expect(umask.fromString(0)).to.equal(0); + expect(umask.fromString(20)).to.equal(20); + expect(umask.fromString(21)).to.equal(21); + expect(umask.fromString(511)).to.equal(511); + + expect(umask.fromString(0.1)).to.equal(0); + expect(umask.fromString(511.1)).to.equal(511); + + done(); + }); + + it('errors on empty string', function (done) { + umask.fromString("", function (err, val) { + expect(err.message).to.equal('Expected octal string, got "", defaulting to "0022"'); + expect(val).to.equal(18); + done(); + }); + }); + + it('errors on invalid octal string', function (done) { + umask.fromString("099", function (err, val) { + expect(err.message).to.equal('Expected octal string, got "099", defaulting to "0022"'); + expect(val).to.equal(18); + done(); + }); + }); + + it('errors when non-string, non-number (boolean)', function (done) { + umask.fromString(false, function (err, val) { + expect(err.message).to.equal('Expected number or octal string, got false, defaulting to "0022"'); + expect(val).to.equal(18); + done(); + }); + }); + + it('errors when non-string, non-number (object)', function (done) { + umask.fromString({}, function (err, val) { + expect(err.message).to.equal('Expected number or octal string, got {}, defaulting to "0022"'); + expect(val).to.equal(18); + done(); + }); + }); + + it('errors when out of range (<0)', function (done) { + umask.fromString(-1, function (err, val) { + expect(err.message).to.equal('Must be in range 0..511 (0000..0777), got -1'); + expect(val).to.equal(18); + done(); + }); + }); + + it('errors when out of range (>511)', function (done) { + umask.fromString(512, function (err, val) { + expect(err.message).to.equal('Must be in range 0..511 (0000..0777), got 512'); + expect(val).to.equal(18); + done(); + }); + }); +}); diff --git a/deps/npm/package.json b/deps/npm/package.json index 191268f7e902..9717becdced6 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "2.2.0", + "version": "2.3.0", "name": "npm", "description": "A package manager for node", "keywords": [ @@ -53,7 +53,7 @@ "fstream-npm": "~1.0.1", "github-url-from-git": "~1.4.0", "github-url-from-username-repo": "~1.0.2", - "glob": "~4.3.2", + "glob": "~4.3.5", "graceful-fs": "~3.0.5", "inflight": "~1.0.4", "inherits": "~2.0.1", @@ -70,7 +70,7 @@ "npm-cache-filename": "~1.0.1", "npm-install-checks": "~1.0.5", "npm-package-arg": "~2.1.3", - "npm-registry-client": "~4.0.5", + "npm-registry-client": "~5.0.0", "npm-user-validate": "~0.1.1", "npmlog": "~0.1.1", "once": "~1.3.1", @@ -92,6 +92,7 @@ "tar": "~1.0.3", "text-table": "~0.2.0", "uid-number": "0.0.6", + "umask": "~1.1.0", "which": "~1.0.8", "wrappy": "~1.0.1", "write-file-atomic": "~1.1.0" @@ -158,6 +159,7 @@ "tar", "text-table", "uid-number", + "umask", "which", "wrappy", "write-file-atomic" @@ -165,11 +167,11 @@ "devDependencies": { "marked": "~0.3.2", "marked-man": "~0.1.4", - "nock": "~0.52.4", + "nock": "~0.57.0", "npm-registry-couchapp": "~2.6.2", "npm-registry-mock": "~0.6.3", "require-inject": "~1.1.0", - "tap": "~0.4.12" + "tap": "~0.5.0" }, "scripts": { "test-legacy": "node ./test/run.js", diff --git a/deps/npm/test/tap/add-remote-git-fake-windows.js b/deps/npm/test/tap/add-remote-git-fake-windows.js index 75ebf1da20ae..5de7cff7d0af 100644 --- a/deps/npm/test/tap/add-remote-git-fake-windows.js +++ b/deps/npm/test/tap/add-remote-git-fake-windows.js @@ -14,6 +14,7 @@ var pkg = resolve(__dirname, "add-remote-git") var repo = resolve(__dirname, "add-remote-git-repo") var daemon +var daemonPID var git test("setup", function (t) { @@ -21,7 +22,10 @@ test("setup", function (t) { setup(function (er, r) { t.ifError(er, "git started up successfully") - if (!er) daemon = r[r.length - 1] + if (!er) { + daemon = r[r.length - 2] + daemonPID = r[r.length - 1] + } t.end() }) @@ -45,19 +49,19 @@ test("clean", function (t) { cleanup() t.end() }) - daemon.kill("SIGINT") + process.kill(daemonPID) }) var pjParent = JSON.stringify({ - name : "parent", - version : "1.2.3", + name : "parent", + version : "1.2.3", dependencies : { "child" : "git://localhost:1234/child.git" } }, null, 2) + "\n" var pjChild = JSON.stringify({ - name : "child", + name : "child", version : "1.0.3" }, null, 2) + "\n" @@ -81,19 +85,27 @@ function setup (cb) { var d = git.spawn( [ "daemon", + "--verbose", "--listen=localhost", "--export-all", "--base-path=.", "--port=1234" ], { - cwd : pkg, - env : process.env, + cwd : pkg, + env : process.env, stdio : ["pipe", "pipe", "pipe"] } ) + d.stderr.on("data", childFinder) - cb(null, d) + function childFinder (c) { + var cpid = c.toString().match(/^\[(\d+)\]/) + if (cpid[1]) { + this.removeListener("data", childFinder) + cb(null, [d, cpid[1]]) + } + } } var opts = { diff --git a/deps/npm/test/tap/add-remote-git.js b/deps/npm/test/tap/add-remote-git.js index 13fbc8c34dd1..325ac2ed3dbe 100644 --- a/deps/npm/test/tap/add-remote-git.js +++ b/deps/npm/test/tap/add-remote-git.js @@ -14,6 +14,7 @@ var pkg = resolve(__dirname, "add-remote-git") var repo = resolve(__dirname, "add-remote-git-repo") var daemon +var daemonPID var git test("setup", function (t) { @@ -21,14 +22,16 @@ test("setup", function (t) { setup(function (er, r) { t.ifError(er, "git started up successfully") - if (!er) daemon = r[r.length - 1] + if (!er) { + daemon = r[r.length - 2] + daemonPID = r[r.length - 1] + } t.end() }) }) -test("install from repo on 'OS X'", function (t) { - process.platform = "darwin" +test("install from repo", function (t) { process.chdir(pkg) npm.commands.install(".", [], function (er) { t.ifError(er, "npm installed via git") @@ -42,19 +45,19 @@ test("clean", function (t) { cleanup() t.end() }) - daemon.kill("SIGINT") + process.kill(daemonPID) }) var pjParent = JSON.stringify({ - name : "parent", - version : "1.2.3", + name : "parent", + version : "1.2.3", dependencies : { "child" : "git://localhost:1234/child.git" } }, null, 2) + "\n" var pjChild = JSON.stringify({ - name : "child", + name : "child", version : "1.0.3" }, null, 2) + "\n" @@ -74,19 +77,27 @@ function setup (cb) { var d = git.spawn( [ "daemon", + "--verbose", "--listen=localhost", "--export-all", "--base-path=.", "--port=1234" ], { - cwd : pkg, - env : process.env, + cwd : pkg, + env : process.env, stdio : ["pipe", "pipe", "pipe"] } ) + d.stderr.on("data", childFinder) - cb(null, d) + function childFinder (c) { + var cpid = c.toString().match(/^\[(\d+)\]/) + if (cpid[1]) { + this.removeListener("data", childFinder) + cb(null, [d, cpid[1]]) + } + } } var opts = { diff --git a/deps/npm/test/tap/lifecycle-path.js b/deps/npm/test/tap/lifecycle-path.js index cf4bbdc99ce9..dc05a15dcb1b 100644 --- a/deps/npm/test/tap/lifecycle-path.js +++ b/deps/npm/test/tap/lifecycle-path.js @@ -6,11 +6,13 @@ var pkg = path.resolve(__dirname, "lifecycle-path") var fs = require("fs") var link = path.resolve(pkg, "node-bin") -// Without the path to the shell, nothing works usually. var PATH if (process.platform === "win32") { - PATH = "C:\\Windows\\system32;C:\\Windows" + // On Windows the 'comspec' environment variable is used, + // so cmd.exe does not need to be on the path. + PATH = "C:\\foo\\bar" } else { + // On non-Windows, without the path to the shell, nothing usually works. PATH = "/bin:/usr/bin" } diff --git a/deps/npm/test/tap/umask-lifecycle.js b/deps/npm/test/tap/umask-lifecycle.js new file mode 100644 index 000000000000..a40eae44be4d --- /dev/null +++ b/deps/npm/test/tap/umask-lifecycle.js @@ -0,0 +1,52 @@ +var path = require("path") +var test = require("tap").test +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "umask-lifecycle") +var pj = JSON.stringify({ + name:"x", + version: "1.2.3", + scripts: { umask: "$npm_execpath config get umask && echo \"$npm_config_umask\" && node -p 'process.umask()'" } +}, null, 2) + "\n" + +var expected = [ + "", + "> x@1.2.3 umask "+path.join(__dirname, "umask-lifecycle"), + "> $npm_execpath config get umask && echo \"$npm_config_umask\" && node -p 'process.umask()'", + "", + "0022", + "0022", + "18", + "" +].join("\n") + +test("setup", function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + fs.writeFileSync(pkg + "/package.json", pj) + t.end() +}) + +test("umask script", function (t) { + common.npm(["run", "umask"], { + umask: 0022, + cwd: pkg, + env: { + PATH: process.env.PATH, + Path: process.env.Path, + "npm_config_loglevel": "warn" + } + }, function (er, code, sout, serr) { + t.equal(sout, expected) + t.equal(serr, "") + t.end() + }) +}) + +test("clean", function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/deps/npm/test/tap/whoami.js b/deps/npm/test/tap/whoami.js index e4ed30df7734..558d0db9aefe 100644 --- a/deps/npm/test/tap/whoami.js +++ b/deps/npm/test/tap/whoami.js @@ -45,7 +45,7 @@ test("npm whoami with bearer auth", {timeout : 2 * 1000}, function (t) { function verify(req, res) { t.equal(req.method, "GET") - t.equal(req.url, "/whoami") + t.equal(req.url, "/-/whoami") res.setHeader("content-type", "application/json") res.writeHeader(200)