From 3b69106e50b42c400a375398a8add01eee7ab878 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 2 Nov 2015 17:16:25 -0800 Subject: [PATCH] deps: upgrade npm to 3.3.12 --- deps/npm/CHANGELOG.md | 102 +++++++++++ deps/npm/html/doc/README.html | 4 +- deps/npm/html/doc/cli/npm-access.html | 2 +- deps/npm/html/doc/cli/npm-adduser.html | 2 +- deps/npm/html/doc/cli/npm-bin.html | 2 +- deps/npm/html/doc/cli/npm-bugs.html | 2 +- deps/npm/html/doc/cli/npm-build.html | 2 +- deps/npm/html/doc/cli/npm-bundle.html | 2 +- deps/npm/html/doc/cli/npm-cache.html | 2 +- deps/npm/html/doc/cli/npm-completion.html | 2 +- deps/npm/html/doc/cli/npm-config.html | 2 +- deps/npm/html/doc/cli/npm-dedupe.html | 2 +- deps/npm/html/doc/cli/npm-deprecate.html | 2 +- deps/npm/html/doc/cli/npm-dist-tag.html | 2 +- deps/npm/html/doc/cli/npm-docs.html | 2 +- deps/npm/html/doc/cli/npm-edit.html | 2 +- deps/npm/html/doc/cli/npm-explore.html | 2 +- deps/npm/html/doc/cli/npm-help-search.html | 2 +- deps/npm/html/doc/cli/npm-help.html | 2 +- deps/npm/html/doc/cli/npm-init.html | 2 +- deps/npm/html/doc/cli/npm-install.html | 2 +- deps/npm/html/doc/cli/npm-link.html | 2 +- deps/npm/html/doc/cli/npm-logout.html | 2 +- deps/npm/html/doc/cli/npm-ls.html | 4 +- deps/npm/html/doc/cli/npm-outdated.html | 2 +- deps/npm/html/doc/cli/npm-owner.html | 2 +- deps/npm/html/doc/cli/npm-pack.html | 2 +- deps/npm/html/doc/cli/npm-ping.html | 2 +- deps/npm/html/doc/cli/npm-prefix.html | 2 +- deps/npm/html/doc/cli/npm-prune.html | 2 +- deps/npm/html/doc/cli/npm-publish.html | 2 +- deps/npm/html/doc/cli/npm-rebuild.html | 2 +- deps/npm/html/doc/cli/npm-repo.html | 2 +- deps/npm/html/doc/cli/npm-restart.html | 2 +- deps/npm/html/doc/cli/npm-root.html | 2 +- deps/npm/html/doc/cli/npm-run-script.html | 2 +- deps/npm/html/doc/cli/npm-search.html | 2 +- deps/npm/html/doc/cli/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/cli/npm-star.html | 2 +- deps/npm/html/doc/cli/npm-stars.html | 2 +- deps/npm/html/doc/cli/npm-start.html | 2 +- deps/npm/html/doc/cli/npm-stop.html | 2 +- deps/npm/html/doc/cli/npm-tag.html | 2 +- deps/npm/html/doc/cli/npm-team.html | 2 +- deps/npm/html/doc/cli/npm-test.html | 2 +- deps/npm/html/doc/cli/npm-uninstall.html | 2 +- deps/npm/html/doc/cli/npm-unpublish.html | 2 +- deps/npm/html/doc/cli/npm-update.html | 2 +- deps/npm/html/doc/cli/npm-version.html | 2 +- deps/npm/html/doc/cli/npm-view.html | 2 +- deps/npm/html/doc/cli/npm-whoami.html | 2 +- deps/npm/html/doc/cli/npm.html | 10 +- deps/npm/html/doc/files/npm-folders.html | 2 +- deps/npm/html/doc/files/npm-global.html | 2 +- deps/npm/html/doc/files/npm-json.html | 2 +- deps/npm/html/doc/files/npmrc.html | 2 +- deps/npm/html/doc/files/package.json.html | 2 +- deps/npm/html/doc/index.html | 2 +- deps/npm/html/doc/misc/npm-coding-style.html | 2 +- deps/npm/html/doc/misc/npm-config.html | 2 +- deps/npm/html/doc/misc/npm-developers.html | 2 +- deps/npm/html/doc/misc/npm-disputes.html | 8 +- deps/npm/html/doc/misc/npm-faq.html | 4 +- deps/npm/html/doc/misc/npm-index.html | 165 ++++++++++++++++++ deps/npm/html/doc/misc/npm-orgs.html | 2 +- deps/npm/html/doc/misc/npm-registry.html | 2 +- deps/npm/html/doc/misc/npm-scope.html | 2 +- deps/npm/html/doc/misc/npm-scripts.html | 2 +- deps/npm/html/doc/misc/removing-npm.html | 2 +- deps/npm/html/doc/misc/semver.html | 2 +- deps/npm/lib/fetch-package-metadata.js | 10 ++ deps/npm/lib/install/action/finalize.js | 37 +++- deps/npm/lib/install/deps.js | 24 +-- deps/npm/lib/install/diff-trees.js | 1 + deps/npm/man/man1/npm-README.1 | 2 +- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-build.1 | 2 +- deps/npm/man/man1/npm-bundle.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 32 ++++ deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-rm.1 | 33 ++++ deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-tag.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man5/npm-folders.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package.json.5 | 2 +- deps/npm/man/man7/npm-coding-style.7 | 2 +- deps/npm/man/man7/npm-config.7 | 2 +- deps/npm/man/man7/npm-developers.7 | 2 +- deps/npm/man/man7/npm-disputes.7 | 2 +- deps/npm/man/man7/npm-faq.7 | 2 +- deps/npm/man/man7/npm-index.7 | 2 +- deps/npm/man/man7/npm-orgs.7 | 2 +- deps/npm/man/man7/npm-registry.7 | 2 +- deps/npm/man/man7/npm-scope.7 | 2 +- deps/npm/man/man7/npm-scripts.7 | 2 +- deps/npm/man/man7/removing-npm.7 | 2 +- deps/npm/man/man7/semver.7 | 2 +- deps/npm/package.json | 6 +- deps/npm/test/tap/bugs.js | 8 +- deps/npm/test/tap/override-bundled.js | 106 +++++++++++ deps/npm/test/tap/shrinkwrap-version-match.js | 120 +++++++++++++ deps/npm/test/tap/version-no-package.js | 3 +- 149 files changed, 770 insertions(+), 173 deletions(-) create mode 100644 deps/npm/html/doc/misc/npm-index.html create mode 100644 deps/npm/man/man1/npm-install-test.1 create mode 100644 deps/npm/man/man1/npm-rm.1 create mode 100644 deps/npm/test/tap/override-bundled.js create mode 100644 deps/npm/test/tap/shrinkwrap-version-match.js diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index a37a68bd7c965e..c12eb8fbc2c630 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,105 @@ +### v3.3.12 (2015-11-02): + +Hi, a little hot-fix release for a bug introduced in 3.3.11. The ENOENT fix +last week ([`f0e2088`](https://github.com/npm/npm/commit/f0e2088)) broke +upgrades of modules that have bundled dependencies (like `npm`, augh!) + +* [`aedf7cf`](https://github.com/npm/npm/commit/aedf7cf) + [#10192](//github.com/npm/npm/pull/10192) + If a bundled module is going to be replacing a module that's currently on + disk (for instance, when you upgrade a module that includes bundled + dependencies) we want to select the version from the bundle in preference + over the one that was there previously. + ([@iarna](https://github.com/iarna)) + +### v3.3.11 (2015-10-29): + +This is a dependency update week, so that means no PRs from our lovely +users. Look for those next week. As it happens, the dependencies updated +were just devdeps, so nothing for you all to worry about. + +But the bug fixes, oh geez, I tracked down some really long standing stuff +this week!! The headliner is those intermittent `ENOENT` errors that no one +could reproduce consistently? I think they're nailed! But also pretty +important, the bug where `hapi` would install w/ a dep missing? Squashed! + +#### EEEEEEENOENT + +* [`f0e2088`](https://github.com/npm/npm/commit/f0e2088) + [#10026](https://github.com/npm/npm/issues/10026) + Eliminate some, if not many, of the EONENT errors `npm@3` has seen over + the past few months. This was happening when npm would, in its own mind, + correct a bundled dependency, due to a `package.json` specifying an + incompatible version. Then, when npm extracted the bundled version, what + was on disk didn't match its mind and… well, when it tried to act on what + was in its mind, we got an `ENOENT` because it didn't actually exist on + disk. + ([@iarna](https://github.com/iarna)) + +#### PARTIAL SHRINKWRAPS, NO LONGER A BAD DAY + +* [`712fd9c`](https://github.com/npm/npm/commit/712fd9c) + [#10153](https://github.com/npm/npm/pull/10153) + Imagine that you have a module, let's call it `fun-time`, and it depends + on two dependencies, `need-fun@1` and `need-time`. Further, `need-time` + requires `need-fun@2`. So after install the logical tree will look like + this: + + ``` + fun-time + ├── need-fun@1 + └── need-time + └── need-fun@2 + ``` + + Now, the `fun-time` author also distributes a shrinkwrap, but it only includes + the `need-fun@1` in it. + + Resolving dependencies would look something like this: + + 1. Require `need-fun@1`: Use version from shrinkwrap (ignoring version) + 2. Require `need-time`: User version in package.json + 1. Require `need-fun@2`: Use version from shrinkwrap, which oh hey, is + already installed at the top level, so no further action is needed. + + Which results in this tree: + + ``` + fun-time + ├── need-fun@1 + └── need-time + ``` + + We're ignoring the version check on things specified in the shrinkwrap + so that you can override the version that will be installed. This is + because you may want to use a different version than is specified + by your dependencies' dependencies' `package.json` files. + + To fix this, we now only allow overrides of a dependency version when + that dependency is a child (in the tree) of the thing that requires it. + This means that when we're looking for `need-fun@2` we'll see `need-fun@1` + and reject it because, although it's from a shrinkwrap, it's parent is + `fun-time` and the package doing the requiring is `need-time`. + + ([@iarna](https://github.com/iarna)) + +#### STRING `package.bin` AND NON-NPMJS REGISTRIES + +* [`3de1463`](https://github.com/npm/npm/commit/3de1463) + [#9187](https://github.com/npm/npm/issues/9187) + If you were using a module with the `bin` field in your `package.json` set + to a string on a non-npmjs registry then npm would crash, due to the our + expectation that the `bin` field would be an object. We now pass all + `package.json` data through a routine that normalizes the format, + including the `bin` field. (This is the same routine that your + `package.json` is passed through when read off of disk or sent to the + registry for publication.) Doing this also ensures that older modules on + npm's own registry will be treated exactly the same as new ones. (In the + past we weren't always super careful about scrubbing `package.json` data + on publish. And even when we were, those rules have subtly changed over + time.) + ([@iarna](https://github.com/iarna)) + ### v3.3.10 (2015-10-22): Hey you all! Welcome to a busy bug fix and PR week. We've got changes diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index e5c8288d6bb268..7d191393d4cc49 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -140,7 +140,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.

@@ -183,5 +183,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 4dc5109437d1f3..001fe175cddc65 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 6a2cfe30b2df55..d3d9c2e61844df 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 66deeef77ad1ed..c7c39e06c215ff 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 3012d3bc3bef9f..862cd8ee642b42 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -53,5 +53,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 20c93e65da201c..b6303676288409 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@

DESCRIPTION

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index e5451025f4f43e..8d2e9e4b39b30c 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 f21cd7129ae3b3..989c06bdced5f2 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 97231f7bcb2099..150957ba65b0cc 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -44,5 +44,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index bae456681fd22e..b38e1dd29af891 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -65,5 +65,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 29a829d8b80fab..1e161006951bd2 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -59,5 +59,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 3d979c7f6ace64..22492af06e6aae 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-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 971b4da97f9206..49d06f74a3a727 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -77,5 +77,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index e8567ed8140e5e..763d17fef4c850 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 5e1c5bab5d9b17..47581a3260dc7a 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 ed8115d17f0027..d585315aa0fb00 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 945211aa0ebb38..3d1205c0c3c9fa 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 4c8a49404dfec6..f7cbfd7c22f217 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -51,5 +51,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 8d659da98bf80b..b23c3b9e5b51cd 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index f9b2466670fab0..52ffa24fb4f9bc 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -295,5 +295,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index bd635316f6a2b2..16505c433148a7 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -73,5 +73,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index c4c06c5f6ca35b..27f70f529e7295 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -55,5 +55,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 37efcccbda80ab..2fec3f055aa48e 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,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@3.3.10 /path/to/npm
+
npm@3.3.12 /path/to/npm
 └─┬ init-package-json@0.0.4
   └── promzard@0.1.5
 

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

@@ -104,5 +104,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 3f2962a73389e8..69513a8d7bc156 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 896c36ef3fdcfa..99c485c7d9ee41 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 33866136f16bbf..b35b2c40f885f9 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-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 1bdcbae6600002..c5a8fb663be649 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index f011cd8cdede1d..9111d20c76f9d6 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 bea2e1dcb828df..43010bc3c2435f 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 6111db07add5dc..c2d8b0815aa0f0 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -68,5 +68,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index c27b9386ab5c45..9fdabf57478891 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index b2b723baf08bb9..bf94fde6a53b61 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 05763c00ede120..eb7bf47c5af736 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-root.html b/deps/npm/html/doc/cli/npm-root.html index 293f363ff1c3ea..eaf93c0ac61c01 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 9aaf6d9282a26f..487c086adc7258 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -58,5 +58,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 3aaabac7efefb8..6c31f1b60c19f1 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 80d619900cc7be..ab72eb0d71a5bb 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -169,5 +169,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 912b5c9c9219d9..be7f542964a700 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 d10998a7bbdde8..eac253ff8ecdc6 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 67541cf105abc4..410364f5fa14f3 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 272b1671ae91cf..2c99d6646559f0 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 a1a8fae758f1ef..1bbecd6c694bd9 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -63,5 +63,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index be30e097d4761f..dab0a0e1d129bb 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,4 +67,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 6b14474fe31f91..206de736c581dd 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 3d27d4c34446df..93fe4810f2a821 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -60,5 +60,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index cdc95a6d8857e4..da50613ed6c6be 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 9b943b8a944072..fe4e3c178f2184 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -120,5 +120,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index df22f0ac08b126..bc3cf3b5d64297 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -99,5 +99,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index a39eb98aa0f788..965b3504e26229 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -83,5 +83,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 4461b9e5f97cc8..1b954c864b7b19 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 56647fa029119d..b43ccda47f7d7b 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

-

3.3.10

+

3.3.12

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

    • npm-help(1)
    • @@ -154,5 +154,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index b6573644add374..a4e67332769d4a 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -184,5 +184,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index b6573644add374..a4e67332769d4a 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -184,5 +184,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index b901f73b494d06..92d14ba6c56be1 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -559,5 +559,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 998d5fd7dd1b31..dc50a18c8174d7 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -83,5 +83,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index b901f73b494d06..92d14ba6c56be1 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -559,5 +559,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 9c48c201830f27..36fcbe74c35f98 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -162,5 +162,5 @@

      semver(7)

             - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 5c0b11b268b8b4..757272863d748e 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -154,5 +154,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index c9be4343205bb8..74b3c7bfc65c59 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -829,5 +829,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 93766569250818..3da7d9162186b1 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -195,5 +195,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 16683231e1f677..0962b39b5a998c 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,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.

      @@ -51,12 +51,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.)
    • @@ -112,5 +112,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html index fa5ec1cfc8ffe3..fa0cc22eff9ce8 100644 --- a/deps/npm/html/doc/misc/npm-faq.html +++ b/deps/npm/html/doc/misc/npm-faq.html @@ -237,7 +237,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.

      @@ -308,5 +308,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html new file mode 100644 index 00000000000000..ae0950efd7ebcf --- /dev/null +++ b/deps/npm/html/doc/misc/npm-index.html @@ -0,0 +1,165 @@ + + + npm-index + + + + + + +
      + +

      npm-index

      Index of all npm documentation

      +

      README

      +

      a JavaScript package manager

      +

      Command Line Documentation

      +

      Using npm on the command line

      +

      npm(1)

      +

      javascript package manager

      +

      npm-access(1)

      +

      Set access level on published packages

      +

      npm-adduser(1)

      +

      Add a registry user account

      +

      npm-bin(1)

      +

      Display npm bin folder

      +

      npm-bugs(1)

      +

      Bugs for a package in a web browser maybe

      +

      npm-build(1)

      +

      Build a package

      +

      npm-bundle(1)

      +

      REMOVED

      +

      npm-cache(1)

      +

      Manipulates packages cache

      +

      npm-completion(1)

      +

      Tab Completion for npm

      +

      npm-config(1)

      +

      Manage the npm configuration files

      +

      npm-dedupe(1)

      +

      Reduce duplication

      +

      npm-deprecate(1)

      +

      Deprecate a version of a package

      +

      npm-dist-tag(1)

      +

      Modify package distribution tags

      +

      npm-docs(1)

      +

      Docs for a package in a web browser maybe

      +

      npm-edit(1)

      +

      Edit an installed package

      +

      npm-explore(1)

      +

      Browse an installed package

      +

      npm-help-search(1)

      +

      Search npm help documentation

      +

      npm-help(1)

      +

      Get help on npm

      +

      npm-init(1)

      +

      Interactively create a package.json file

      +

      npm-install(1)

      +

      Install a package

      + +

      Symlink a package folder

      +

      npm-logout(1)

      +

      Log out of the registry

      +

      npm-ls(1)

      +

      List installed packages

      +

      npm-outdated(1)

      +

      Check for outdated packages

      +

      npm-owner(1)

      +

      Manage package owners

      +

      npm-pack(1)

      +

      Create a tarball from a package

      +

      npm-ping(1)

      +

      Ping npm registry

      +

      npm-prefix(1)

      +

      Display prefix

      +

      npm-prune(1)

      +

      Remove extraneous packages

      +

      npm-publish(1)

      +

      Publish a package

      +

      npm-rebuild(1)

      +

      Rebuild a package

      +

      npm-repo(1)

      +

      Open package repository page in the browser

      +

      npm-restart(1)

      +

      Restart a package

      +

      npm-root(1)

      +

      Display npm root

      +

      npm-run-script(1)

      +

      Run arbitrary package scripts

      +

      npm-search(1)

      +

      Search for packages

      +

      npm-shrinkwrap(1)

      +

      Lock down dependency versions

      +

      npm-star(1)

      +

      Mark your favorite packages

      +

      npm-stars(1)

      +

      View packages marked as favorites

      +

      npm-start(1)

      +

      Start a package

      +

      npm-stop(1)

      +

      Stop a package

      +

      npm-tag(1)

      +

      Tag a published version

      +

      npm-team(1)

      +

      Manage organization teams and team memberships

      +

      npm-test(1)

      +

      Test a package

      +

      npm-uninstall(1)

      +

      Remove a package

      +

      npm-unpublish(1)

      +

      Remove a package from the registry

      +

      npm-update(1)

      +

      Update a package

      +

      npm-version(1)

      +

      Bump a package version

      +

      npm-view(1)

      +

      View registry info

      +

      npm-whoami(1)

      +

      Display npm username

      +

      API Documentation

      +

      Using npm in your Node programs

      +

      Files

      +

      File system structures npm uses

      +

      npm-folders(5)

      +

      Folder Structures Used by npm

      +

      npmrc(5)

      +

      The npm config files

      +

      package.json(5)

      +

      Specifics of npm's package.json handling

      +

      Misc

      +

      Various other bits and bobs

      +

      npm-coding-style(7)

      +

      npm's "funny" coding style

      +

      npm-config(7)

      +

      More than you probably want to know about npm configuration

      +

      npm-developers(7)

      +

      Developer Guide

      +

      npm-disputes(7)

      +

      Handling Module Name Disputes

      +

      npm-faq(7)

      +

      Frequently Asked Questions

      +

      npm-index(7)

      +

      Index of all npm documentation

      +

      npm-orgs(7)

      +

      Working with Teams & Orgs

      +

      npm-registry(7)

      +

      The JavaScript Package Registry

      +

      npm-scope(7)

      +

      Scoped packages

      +

      npm-scripts(7)

      +

      How npm handles the "scripts" field

      +

      removing-npm(7)

      +

      Cleaning the Slate

      +

      semver(7)

      +

      The semantic versioner for npm

      + +
      + + + + + + + + + + + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index 286435bafe92d8..a42a4863f8141a 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@

      Team Admins create teams

             - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 3c14be6e209fe7..9068310aef2015 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index d5bab8230926f8..2aac1b177dd8cc 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 2fd860cf6352e8..ed50c1caf8a9d7 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -207,5 +207,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index a1c7885b816234..90e345a4a2990f 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index f87b8e0a0e0051..c73b0534f6816d 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -282,5 +282,5 @@

      Ranges

             - + diff --git a/deps/npm/lib/fetch-package-metadata.js b/deps/npm/lib/fetch-package-metadata.js index 103ed2fc6af29c..9e62cacd914166 100644 --- a/deps/npm/lib/fetch-package-metadata.js +++ b/deps/npm/lib/fetch-package-metadata.js @@ -15,6 +15,7 @@ var rimraf = require('rimraf') var clone = require('lodash.clonedeep') var validate = require('aproba') var unpipe = require('unpipe') +var normalizePackageData = require('normalize-package-data') var npm = require('./npm.js') var mapToRegistry = require('./utils/map-to-registry.js') @@ -68,6 +69,15 @@ module.exports = function fetchPackageMetadata (spec, where, tracker, done) { pkg._where = where if (!pkg._args) pkg._args = [] pkg._args.push([pkg._spec, pkg._where]) + // non-npm registries can and will return unnormalized data, plus + // even the npm registry may have package data normalized with older + // normalization rules. This ensures we get package data in a consistent, + // stable format. + try { + normalizePackageData(pkg) + } catch (ex) { + // don't care + } } logAndFinish(er, pkg) } diff --git a/deps/npm/lib/install/action/finalize.js b/deps/npm/lib/install/action/finalize.js index 62e21cc47db89c..08e9c149c46349 100644 --- a/deps/npm/lib/install/action/finalize.js +++ b/deps/npm/lib/install/action/finalize.js @@ -4,7 +4,23 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var mkdirp = require('mkdirp') var asyncMap = require('slide').asyncMap -var andIgnoreErrors = require('../and-ignore-errors.js') +var iferr = require('iferr') + +function getTree (pkg) { + while (pkg.parent) pkg = pkg.parent + return pkg +} + +function warn (pkg, code, msg) { + var tree = getTree(pkg) + var err = new Error(msg) + err.code = code + tree.warnings.push(err) +} + +function pathToShortname (modpath) { + return modpath.replace(/node_modules[/]/g, '').replace(/[/]/g, ' > ') +} module.exports = function (top, buildpath, pkg, log, next) { log.silly('finalize', pkg.path) @@ -59,15 +75,26 @@ module.exports = function (top, buildpath, pkg, log, next) { function moveModules (mkdirEr, files) { if (mkdirEr) return next(mkdirEr) asyncMap(files, function (file, done) { + // `from` wins over `to`, because if `from` was there it's because the + // module installer wanted it to be there. By contrast, `to` is just + // whatever was bundled in this module. And the intentions of npm's + // installer should always beat out random module contents. var from = path.join(delpath, 'node_modules', file) var to = path.join(pkg.path, 'node_modules', file) - // we ignore errors here, because they can legitimately happen, for instance, - // bundled modules will be in both node_modules folders - fs.rename(from, to, andIgnoreErrors(done)) + fs.stat(to, function (er, info) { + if (er) return fs.rename(from, to, done) + + var shortname = pathToShortname(path.relative(getTree(pkg).path, to)) + warn(pkg, 'EBUNDLEOVERRIDE', 'Replacing bundled ' + shortname + ' with new installed version') + rimraf(to, iferr(done, function () { + fs.rename(from, to, done) + })) + }) }, cleanup) } - function cleanup () { + function cleanup (moveEr) { + if (moveEr) return next(moveEr) rimraf(delpath, afterCleanup) } diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js index d2486419fc146d..3afe8af012f7f1 100644 --- a/deps/npm/lib/install/deps.js +++ b/deps/npm/lib/install/deps.js @@ -38,11 +38,11 @@ function isDep (tree, child) { var name = moduleName(child) var requested = isProdDep(tree, name) var matches - if (requested) matches = doesChildVersionMatch(child, requested) + if (requested) matches = doesChildVersionMatch(child, requested, tree) if (matches) return matches requested = isDevDep(tree, name) if (!requested) return - return doesChildVersionMatch(child, requested) + return doesChildVersionMatch(child, requested, tree) } function isDevDep (tree, name) { @@ -61,10 +61,10 @@ function isProdDep (tree, name) { var registryTypes = { range: true, version: true } -function doesChildVersionMatch (child, requested) { +function doesChildVersionMatch (child, requested, requestor) { // we always consider deps provided by a shrinkwrap as "correct" or else // we'll subvert them if they're intentionally "invalid" - if (child.fromShrinkwrap) return true + if (child.parent === requestor && child.fromShrinkwrap) return true // ranges of * ALWAYS count as a match, because when downloading we allow // prereleases to match * if there are ONLY prereleases if (requested.spec === '*') return true @@ -515,13 +515,14 @@ function validateAllPeerDeps (tree, onInvalid, seen) { // Determine if a module requirement is already met by the tree at or above // our current location in the tree. -var findRequirement = exports.findRequirement = function (tree, name, requested) { - validate('OSO', arguments) +var findRequirement = exports.findRequirement = function (tree, name, requested, requestor) { + validate('OSO', [tree, name, requested]) + if (!requestor) requestor = tree var nameMatch = function (child) { return moduleName(child) === name && child.parent && !child.removed } var versionMatch = function (child) { - return doesChildVersionMatch(child, requested) + return doesChildVersionMatch(child, requested, requestor) } if (nameMatch(tree)) { // this *is* the module, but it doesn't match the version, so a @@ -538,7 +539,7 @@ var findRequirement = exports.findRequirement = function (tree, name, requested) return null } if (!tree.parent) return null - return findRequirement(tree.parent, name, requested) + return findRequirement(tree.parent, name, requested, requestor) } // Find the highest level in the tree that we can install this module in. @@ -554,10 +555,11 @@ var earliestInstallable = exports.earliestInstallable = function (requiredBy, tr // If any of the children of this tree have conflicting // binaries then we need to decline to install this package here. - var binaryMatches = tree.children.some(function (child) { + var binaryMatches = typeof pkg.bin === 'object' && tree.children.some(function (child) { if (child.removed) return false - return Object.keys(child.package.bin || {}).some(function (bin) { - return pkg.bin && pkg.bin[bin] + if (typeof child.package.bin !== 'object') return false + return Object.keys(child.package.bin).some(function (bin) { + return pkg.bin[bin] }) }) if (binaryMatches) return null diff --git a/deps/npm/lib/install/diff-trees.js b/deps/npm/lib/install/diff-trees.js index 9e9d6c44860090..59567bf3193be1 100644 --- a/deps/npm/lib/install/diff-trees.js +++ b/deps/npm/lib/install/diff-trees.js @@ -132,6 +132,7 @@ function diffTrees (oldTree, newTree) { requiredByAllLinked(pkg) if (pkg.fromBundle) { if (npm.config.get('rebuild-bundle')) differences.push(['rebuild', pkg]) + if (pkg.oldPkg) differences.push(['remove', pkg]) } else if (pkg.oldPkg) { if (!pkg.directlyRequested && pkgAreEquiv(pkg.oldPkg.package, pkg.package)) return if (!pkg.isInLink && (isLink(pkg.oldPkg) || isLink(pkg))) { diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index d3a7274bd8cdbe..ea9e7b1c078d05 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "October 2015" "" "" +.TH "NPM" "1" "November 2015" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 925f3a13998520..f1b8bc0e316dd0 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "October 2015" "" "" +.TH "NPM\-ACCESS" "1" "November 2015" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index bea5f3722cffa9..f96eae96bce363 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "October 2015" "" "" +.TH "NPM\-ADDUSER" "1" "November 2015" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index c629415eb883c3..42b2b17d140fa1 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "October 2015" "" "" +.TH "NPM\-BIN" "1" "November 2015" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 9f4626a411cf6d..0d0bf21688ab33 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "October 2015" "" "" +.TH "NPM\-BUGS" "1" "November 2015" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index 7528f1a21cfe58..1bac97e926e4e3 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "October 2015" "" "" +.TH "NPM\-BUILD" "1" "November 2015" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 0e6d0817bfda95..fa54e083415a82 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "October 2015" "" "" +.TH "NPM\-BUNDLE" "1" "November 2015" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index ff3e7c8058b95d..c4bca767c4496a 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "October 2015" "" "" +.TH "NPM\-CACHE" "1" "November 2015" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 0f3b1abf2e7638..ba8d7dd802fefc 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "October 2015" "" "" +.TH "NPM\-COMPLETION" "1" "November 2015" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index d6369755a11316..f3030154303c90 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "October 2015" "" "" +.TH "NPM\-CONFIG" "1" "November 2015" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 0c965e957a9b10..145e27dd49108d 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "October 2015" "" "" +.TH "NPM\-DEDUPE" "1" "November 2015" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index df8c342953c80b..a3992ac1bb6459 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "October 2015" "" "" +.TH "NPM\-DEPRECATE" "1" "November 2015" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 9d7742d8108432..8b30e986a4f78b 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "October 2015" "" "" +.TH "NPM\-DIST\-TAG" "1" "November 2015" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index 74b258d7373b29..d6690800c465d0 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "October 2015" "" "" +.TH "NPM\-DOCS" "1" "November 2015" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 8cb4ea635e8091..dd757fe87817ca 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "October 2015" "" "" +.TH "NPM\-EDIT" "1" "November 2015" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 4b1471748110ac..797c84d737bd7d 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "October 2015" "" "" +.TH "NPM\-EXPLORE" "1" "November 2015" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 8d6f8e42e66b19..88654a1da3ad92 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "October 2015" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "November 2015" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 2f6d09c665531c..8022867ef46a22 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "October 2015" "" "" +.TH "NPM\-HELP" "1" "November 2015" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 56da738cb8d521..8c6bf0397482eb 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "October 2015" "" "" +.TH "NPM\-INIT" "1" "November 2015" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 new file mode 100644 index 00000000000000..e2edecfc03a3bc --- /dev/null +++ b/deps/npm/man/man1/npm-install-test.1 @@ -0,0 +1,32 @@ +.TH "NPM" "" "November 2015" "" "" +.SH "NAME" +\fBnpm\fR +.SH SYNOPSIS +.P +.RS 2 +.nf +npm install\-test (with no args, in package dir) +npm install\-test [<@scope>/] +npm install\-test [<@scope>/]@ +npm install\-test [<@scope>/]@ +npm install\-test [<@scope>/]@ +npm install\-test +npm install\-test +npm install\-test + +alias: npm it +common options: [\-\-save|\-\-save\-dev|\-\-save\-optional] [\-\-save\-exact] [\-\-dry\-run] +.fi +.RE +.SH DESCRIPTION +.P +This command runs an \fBnpm install\fP followed immediately by an \fBnpm test\fP\|\. It +takes exactly the same arguments as \fBnpm install\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help test + +.RE diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 536b9f3c66b47e..9219b7a024ce9a 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "October 2015" "" "" +.TH "NPM\-INSTALL" "1" "November 2015" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index 78c3b75a8e9c56..9d0ea8f47c5ff7 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "October 2015" "" "" +.TH "NPM\-LINK" "1" "November 2015" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index d7a840c5dd36b5..c194188ad64b89 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "October 2015" "" "" +.TH "NPM\-LOGOUT" "1" "November 2015" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 20bf3f57597bad..10dea443864242 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "October 2015" "" "" +.TH "NPM\-LS" "1" "November 2015" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@3.3.10 /path/to/npm +npm@3.3.12 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 493e7a9f21402b..b7ba130cb5e4b1 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "October 2015" "" "" +.TH "NPM\-OUTDATED" "1" "November 2015" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 009121d4eb59b2..1ce148d3fade74 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "October 2015" "" "" +.TH "NPM\-OWNER" "1" "November 2015" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 0ece00cf1f28fa..9bb591cdfe82f2 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "October 2015" "" "" +.TH "NPM\-PACK" "1" "November 2015" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index af69ba3a784219..4d2b9a78bf0fcb 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "October 2015" "" "" +.TH "NPM\-PING" "1" "November 2015" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index 9ce37848d97d52..c6ea5f6fdfa75e 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "October 2015" "" "" +.TH "NPM\-PREFIX" "1" "November 2015" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 051acaab50a1d5..22c831d338dc1f 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "October 2015" "" "" +.TH "NPM\-PRUNE" "1" "November 2015" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 4421c8f45dbce0..cd249e4fe9263e 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "October 2015" "" "" +.TH "NPM\-PUBLISH" "1" "November 2015" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 03d16889aa5482..e850fa647fcf1a 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "October 2015" "" "" +.TH "NPM\-REBUILD" "1" "November 2015" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index fe4418e7e5db84..7ee7d95f8f7831 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "October 2015" "" "" +.TH "NPM\-REPO" "1" "November 2015" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 31e61af29de800..0bc7541ccf80c6 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "October 2015" "" "" +.TH "NPM\-RESTART" "1" "November 2015" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1 new file mode 100644 index 00000000000000..ec0271980a4bee --- /dev/null +++ b/deps/npm/man/man1/npm-rm.1 @@ -0,0 +1,33 @@ +.TH "NPM\-RM" "1" "October 2015" "" "" +.SH "NAME" +\fBnpm-rm\fR \- Remove a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm rm +npm r +npm uninstall +npm un +.fi +.RE +.SH DESCRIPTION +.P +This uninstalls a package, completely removing everything npm installed +on its behalf\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prune +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 6c42d89965e47f..bacb6ffb7de987 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "October 2015" "" "" +.TH "NPM\-ROOT" "1" "November 2015" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 08a675a31117c8..ded6145a1f3480 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "October 2015" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "November 2015" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 87ad71ad5fd0c8..6307a345aa3a6e 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "October 2015" "" "" +.TH "NPM\-SEARCH" "1" "November 2015" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index d8a6049dbd4e20..39784dfe6f6359 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "October 2015" "" "" +.TH "NPM\-SHRINKWRAP" "1" "November 2015" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index fabbfba56e29da..e12124fd5d3dab 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "October 2015" "" "" +.TH "NPM\-STAR" "1" "November 2015" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index f8c7b21410f5f2..c80a0f8a3ea586 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "October 2015" "" "" +.TH "NPM\-STARS" "1" "November 2015" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index eb5f7b8aeac55c..9f027a9ffb9adf 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "October 2015" "" "" +.TH "NPM\-START" "1" "November 2015" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 8e2510625533ac..044bbc066ac905 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "October 2015" "" "" +.TH "NPM\-STOP" "1" "November 2015" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1 index 4d63d7168da677..e70976e800779f 100644 --- a/deps/npm/man/man1/npm-tag.1 +++ b/deps/npm/man/man1/npm-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "1" "October 2015" "" "" +.TH "NPM\-TAG" "1" "November 2015" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 0e6efae707d7a1..69f03d6df160bf 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "October 2015" "" "" +.TH "NPM\-TEAM" "1" "November 2015" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 08720089a6200f..c36e7f42adeeb9 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "October 2015" "" "" +.TH "NPM\-TEST" "1" "November 2015" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 0a6e0640fb4e4b..6bac5b55d0bb5a 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RM" "1" "October 2015" "" "" +.TH "NPM\-RM" "1" "November 2015" "" "" .SH "NAME" \fBnpm-rm\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 9d3236baa2998d..daa61e3a293e3f 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "October 2015" "" "" +.TH "NPM\-UNPUBLISH" "1" "November 2015" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index b700378245c1c8..62b3adc4afcdc0 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "October 2015" "" "" +.TH "NPM\-UPDATE" "1" "November 2015" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index abd22a5e5fd70d..f799cd9111584d 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "October 2015" "" "" +.TH "NPM\-VERSION" "1" "November 2015" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 75caecf28e25b2..9e3e44ff538a94 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "October 2015" "" "" +.TH "NPM\-VIEW" "1" "November 2015" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 1bb605e285cf75..d356fe402373ec 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "October 2015" "" "" +.TH "NPM\-WHOAMI" "1" "November 2015" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index c2df4eb71981bc..16c974e0edf9ff 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "October 2015" "" "" +.TH "NPM" "1" "November 2015" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -3.3.10 +3.3.12 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index bdc08bb2db50f9..e52857ec548c45 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "October 2015" "" "" +.TH "NPM\-FOLDERS" "5" "November 2015" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index bdc08bb2db50f9..e52857ec548c45 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "October 2015" "" "" +.TH "NPM\-FOLDERS" "5" "November 2015" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index e110187fce73d4..ed8bd82a9fdba8 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "October 2015" "" "" +.TH "PACKAGE\.JSON" "5" "November 2015" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 3c00980f3ac3a8..ed6ee372d33622 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "October 2015" "" "" +.TH "NPMRC" "5" "November 2015" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index e110187fce73d4..ed8bd82a9fdba8 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "October 2015" "" "" +.TH "PACKAGE\.JSON" "5" "November 2015" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index b9bf4dbcfb5846..839806a670a4e8 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "October 2015" "" "" +.TH "NPM\-CODING\-STYLE" "7" "November 2015" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index bff35612e7d180..c0d3b2c1373b61 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "October 2015" "" "" +.TH "NPM\-CONFIG" "7" "November 2015" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index 80c6e6e8aba370..703fac404cad66 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "October 2015" "" "" +.TH "NPM\-DEVELOPERS" "7" "November 2015" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index 6deead895a42de..ae17206bcc6d12 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "October 2015" "" "" +.TH "NPM\-DISPUTES" "7" "November 2015" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .SH SYNOPSIS diff --git a/deps/npm/man/man7/npm-faq.7 b/deps/npm/man/man7/npm-faq.7 index f41fdf621d4696..98f7f0ac04517b 100644 --- a/deps/npm/man/man7/npm-faq.7 +++ b/deps/npm/man/man7/npm-faq.7 @@ -1,4 +1,4 @@ -.TH "NPM\-FAQ" "7" "October 2015" "" "" +.TH "NPM\-FAQ" "7" "November 2015" "" "" .SH "NAME" \fBnpm-faq\fR \- Frequently Asked Questions .SH Where can I find these docs in HTML? diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index b9e193195f8c2c..c147e713235609 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "October 2015" "" "" +.TH "NPM\-INDEX" "7" "November 2015" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 1167bcdbed97d3..503a6f35b00753 100644 --- a/deps/npm/man/man7/npm-orgs.7 +++ b/deps/npm/man/man7/npm-orgs.7 @@ -1,4 +1,4 @@ -.TH "NPM\-ORGS" "7" "October 2015" "" "" +.TH "NPM\-ORGS" "7" "November 2015" "" "" .SH "NAME" \fBnpm-orgs\fR \- Working with Teams & Orgs .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index 5cfd79c4a7b6de..3013d956234c77 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "October 2015" "" "" +.TH "NPM\-REGISTRY" "7" "November 2015" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index 2a166acdbacf49..deadca7ba3a212 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "October 2015" "" "" +.TH "NPM\-SCOPE" "7" "November 2015" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index 3cb4e75cd1a84a..a2fe4b952d08d0 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "October 2015" "" "" +.TH "NPM\-SCRIPTS" "7" "November 2015" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index f0324607cf2f84..e26cab123819cd 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "October 2015" "" "" +.TH "NPM\-REMOVAL" "1" "November 2015" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index db93d201df8c07..be2e6f0779c60e 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "October 2015" "" "" +.TH "SEMVER" "7" "November 2015" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage diff --git a/deps/npm/package.json b/deps/npm/package.json index 41374571cd7889..c797942c25f956 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "3.3.10", + "version": "3.3.12", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -187,14 +187,14 @@ "deep-equal": "~1.0.1", "marked": "~0.3.5", "marked-man": "~0.1.5", - "nock": "~2.15.0", + "nock": "~2.17.0", "npm-registry-couchapp": "~2.6.11", "npm-registry-mock": "~1.0.1", "readable-stream": "~2.0.2", "require-inject": "~1.2.1", "sprintf-js": "~1.0.3", "standard": "~5.3.1", - "tap": "~2.1.1" + "tap": "~2.2.0" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", diff --git a/deps/npm/test/tap/bugs.js b/deps/npm/test/tap/bugs.js index dd2c87e2c6b1cb..090c2b9cb21add 100644 --- a/deps/npm/test/tap/bugs.js +++ b/deps/npm/test/tap/bugs.js @@ -120,7 +120,7 @@ test('npm bugs test-repo-url-http - non-github (http://)', function (t) { }) }) -test('npm bugs test-repo-url-https - non-github (https://)', function (t) { +test('npm bugs test-repo-url-https - gitlab (https://)', function (t) { mr({ port: common.port }, function (er, s) { common.npm( [ @@ -136,7 +136,7 @@ test('npm bugs test-repo-url-https - non-github (https://)', function (t) { t.equal(code, 0, 'exit ok') var res = fs.readFileSync(outFile, 'ascii') s.close() - t.equal(res, 'https://www.npmjs.org/package/test-repo-url-https\n') + t.equal(res, 'https://gitlab.com/evanlucas/test-repo-url-https/issues\n') rimraf.sync(outFile) t.end() } @@ -144,7 +144,7 @@ test('npm bugs test-repo-url-https - non-github (https://)', function (t) { }) }) -test('npm bugs test-repo-url-ssh - non-github (ssh://)', function (t) { +test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { mr({ port: common.port }, function (er, s) { common.npm( [ @@ -160,7 +160,7 @@ test('npm bugs test-repo-url-ssh - non-github (ssh://)', function (t) { t.equal(code, 0, 'exit ok') var res = fs.readFileSync(outFile, 'ascii') s.close() - t.equal(res, 'https://www.npmjs.org/package/test-repo-url-ssh\n') + t.equal(res, 'https://gitlab.com/evanlucas/test-repo-url-ssh/issues\n') rimraf.sync(outFile) t.end() } diff --git a/deps/npm/test/tap/override-bundled.js b/deps/npm/test/tap/override-bundled.js new file mode 100644 index 00000000000000..deed57771e1974 --- /dev/null +++ b/deps/npm/test/tap/override-bundled.js @@ -0,0 +1,106 @@ +'use strict' +var test = require('tap').test +var fs = require('fs') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var path = require('path') +var common = require('../common-tap.js') + +var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testjson = { + dependencies: {'top-test': 'file:top-test/'} +} + +var testmod = path.resolve(testdir, 'top-test') +var testmodjson = { + name: 'top-test', + version: '1.0.0', + dependencies: { + 'bundle-update': 'file:bundle-update/', + 'bundle-keep': 'file:bundle-keep/' + }, + bundledDependencies: ['bundle-update', 'bundle-keep'] +} + +var bundleupdatesrc = path.resolve(testmod, 'bundle-update') +var bundleupdateNEW = path.resolve(bundleupdatesrc, 'NEW') +var bundleupdateNEWpostinstall = path.resolve(testdir, 'node_modules', 'top-test', 'node_modules', 'bundle-update', 'NEW') +var bundleupdatebad = path.resolve(testmod, 'node_modules', 'bundle-update') +var bundlekeepsrc = path.resolve(testmod, 'bundle-keep') +var bundlekeep = path.resolve(testmod, 'node_modules', 'bundle-keep') +var bundlekeepOLD = path.resolve(bundlekeep, 'OLD') +var bundlekeepOLDpostinstall = path.resolve(testdir, 'node_modules', 'top-test', 'node_modules', 'bundle-keep', 'OLD') +var bundlejson = { + name: 'bundle-update', + version: '1.0.0' +} +var bundlekeepjson = { + name: 'bundle-keep', + _requested: { + rawSpec: 'file:bundle-keep/' + } +} + +function writepjs (dir, content) { + fs.writeFileSync(path.join(dir, 'package.json'), JSON.stringify(content, null, 2)) +} + +function setup () { + mkdirp.sync(testdir) + writepjs(testdir, testjson) + mkdirp.sync(testmod) + writepjs(testmod, testmodjson) + mkdirp.sync(bundleupdatesrc) + writepjs(bundleupdatesrc, bundlejson) + fs.writeFileSync(bundleupdateNEW, '') + mkdirp.sync(bundleupdatebad) + writepjs(bundleupdatebad, bundlejson) + mkdirp.sync(bundlekeepsrc) + writepjs(bundlekeepsrc, bundlekeepjson) + mkdirp.sync(bundlekeep) + writepjs(bundlekeep, bundlekeepjson) + fs.writeFileSync(bundlekeepOLD, '') +} + +function cleanup () { + rimraf.sync(testdir) +} + +test('setup', function (t) { + cleanup() + setup() + t.end() +}) + +test('bundled', function (t) { + common.npm(['install', '--loglevel=warn'], {cwd: testdir}, function (err, code, stdout, stderr) { + if (err) throw err + t.plan(5) + t.is(code, 0, 'npm itself completed ok') + + // This tests that after the install we have a freshly installed version + // of `bundle-update` (in alignment with the package.json), instead of the + // version that was bundled with `top-test`. + // If npm doesn't do this, and selects the bundled version, things go very + // wrong because npm thinks it has a different module (with different + // metadata) installed in that location and will go off and try to do + // _things_ to it. Things like chmod in particular, which in turn results + // in the dreaded ENOENT errors. + t.like(stderr, /EPACKAGEJSON override-bundled/, "didn't stomp on other warnings") + t.like(stderr, /EBUNDLEOVERRIDE/, 'included warning about bundled dep') + fs.stat(bundleupdateNEWpostinstall, function (missing) { + t.ok(!missing, 'package.json overrode bundle') + }) + + // Relatedly, when upgrading, if a bundled module is replacing an existing + // module we want to choose the bundled version, not the version we're replacing. + fs.stat(bundlekeepOLDpostinstall, function (missing) { + t.ok(!missing, 'package.json overrode bundle') + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) diff --git a/deps/npm/test/tap/shrinkwrap-version-match.js b/deps/npm/test/tap/shrinkwrap-version-match.js new file mode 100644 index 00000000000000..cb4e9255049080 --- /dev/null +++ b/deps/npm/test/tap/shrinkwrap-version-match.js @@ -0,0 +1,120 @@ +'use strict' +var test = require('tap').test +var fs = require('fs') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var path = require('path') +var common = require('../common-tap.js') + +var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var modAdir = path.resolve(testdir, 'modA') +var modB1dir = path.resolve(testdir, 'modB@1') +var modB2dir = path.resolve(testdir, 'modB@2') +var modCdir = path.resolve(testdir, 'modC') +var testjson = { + dependencies: { + modA: 'file://' + modAdir, + modC: 'file://' + modCdir + } +} +var testshrinkwrap = { + dependencies: { + modA: { + version: '1.0.0', + from: 'modA', + resolved: 'file://' + modAdir + }, + modB: { + version: '1.0.0', + from: 'modB@1', + resolved: 'file://' + modB1dir + } + } +} +var modAjson = { + name: 'modA', + version: '1.0.0', + dependencies: { + 'modB': 'file://' + modB1dir + } +} +var modCjson = { + name: 'modC', + version: '1.0.0', + dependencies: { + 'modB': 'file://' + modB2dir + } +} +var modB1json = { + name: 'modB', + version: '1.0.0' +} +var modB2json = { + name: 'modB', + version: '2.0.0' +} + +function writepjson (dir, content) { + writejson(dir, 'package.json', content) +} +function writejson (dir, file, content) { + writefile(dir, file, JSON.stringify(content, null, 2)) +} +function writefile (dir, file, content) { + fs.writeFileSync(path.join(dir, file), content) +} + +function setup () { + mkdirp.sync(testdir) + writepjson(testdir, testjson) + writejson(testdir, 'npm-shrinkwrap.json', testshrinkwrap) + mkdirp.sync(modAdir) + writepjson(modAdir, modAjson) + mkdirp.sync(modB1dir) + writepjson(modB1dir, modB1json) + writefile(modB1dir, 'B1', '') + mkdirp.sync(modB2dir) + writepjson(modB2dir, modB2json) + writefile(modB2dir, 'B2', '') + mkdirp.sync(modCdir) + writepjson(modCdir, modCjson) +} + +function cleanup () { + rimraf.sync(testdir) +} + +test('setup', function (t) { + cleanup() + setup() + t.end() +}) + +// Shrinkwraps need to let you override dependency versions specified in +// package.json files. Indeed, this was already supported, but it was a bit +// to keen on this. Previously, if you had a dep in your shrinkwrap then +// anything that required that dependency would count as a match, regardless +// of version. + +// This test ensures that the broad matching is not done when the matched +// module is not a direct child of the module doing the requiring. + +test('bundled', function (t) { + common.npm(['install'], {cwd: testdir}, function (err, code, out, stderr) { + t.is(err, null, 'No fatal errors running npm') + t.is(code, 0, 'npm itself completed ok') + // Specifically, if B2 exists (or the modB directory under modC at all) + // that means modC was given its own copy of modB. Without the patch + // that went with this test, it wouldn't have been installed because npm + // would have consider modB@1 to have fulfilled modC's requirement. + fs.stat(path.join(testdir, 'node_modules', 'modC', 'node_modules', 'modB', 'B2'), function (missing) { + t.ok(!missing, 'modC got the right version of modB') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) diff --git a/deps/npm/test/tap/version-no-package.js b/deps/npm/test/tap/version-no-package.js index 755f99317e6e09..e4eeda0eebda0f 100644 --- a/deps/npm/test/tap/version-no-package.js +++ b/deps/npm/test/tap/version-no-package.js @@ -25,9 +25,8 @@ test('npm version in a prefix with no package.json', function (t) { t.doesNotThrow(function () { var metadata = JSON.parse(stdout) t.equal(metadata.node, process.versions.node, 'node versions match') - - t.end() }, 'able to reconstitute version object from stdout') + t.end() } ) })