From df9c4a6a1fe42971e439701a70da61b1155ac57f 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 PR-URL: https://github.com/nodejs/node/pull/3685 Reviewed-By: Jeremiah Senkpiel --- 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 a37a68bd7c9..c12eb8fbc2c 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 e5c8288d6bb..7d191393d4c 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -140,7 +140,7 @@ specific purpose, or lack of malice in any given npm package.

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 @@ will no doubt tell you to put the output in a gist or email.

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 4dc5109437d..001fe175cdd 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@ with an HTTP 402 status code (logically enough), unless you use        - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 6a2cfe30b2d..d3d9c2e6184 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@ precedence over any global configuration.

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 66deeef77ad..c7c39e06c21 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 3012d3bc3be..862cd8ee642 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -53,5 +53,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 20c93e65da2..b6303676288 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@ directly, run:

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index e5451025f4f..8d2e9e4b39b 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@ install packages into the local space.

       - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index f21cd7129ae..989c06bdced 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 97231f7bcb2..150957ba65b 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -44,5 +44,5 @@ completions based on the arguments.

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

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 29a829d8b80..1e161006951 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -59,5 +59,5 @@ result in new modules being installed.

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 3d979c7f6ac..22492af06e6 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@ something like this:

       - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 971b4da97f9..49d06f74a3a 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 @@ begin with a number or the letter v.

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index e8567ed8140..763d17fef4c 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@ the current folder and use the name property.

       - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 5e1c5bab5d9..47581a3260d 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@ or "notepad" on Windows.        - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index ed8115d17f0..d585315aa0f 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@ Windows        - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 945211aa0eb..3d1205c0c3c 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 @@ where the terms were found in the documentation.

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 4c8a49404df..f7cbfd7c22f 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -51,5 +51,5 @@ matches are equivalent to specifying a topic name.

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 8d659da98bf..b23c3b9e5b5 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@ defaults and not prompt you for any options.

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index f9b2466670f..52ffa24fb4f 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -295,5 +295,5 @@ affects a real use-case, it will be investigated.

       - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index bd635316f6a..16505c43314 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -73,5 +73,5 @@ include that scope, e.g.

       - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index c4c06c5f6ca..27f70f529e7 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -55,5 +55,5 @@ that registry at the same time.

       - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 37efcccbda8..2fec3f055aa 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.

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

-
npm@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 @@ project.

       - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 3f2962a7338..69513a8d7bc 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -67,5 +67,5 @@ project.

       - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 896c36ef3fd..99c485c7d9e 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@ that is not implemented at this time.

       - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 33866136f16..b35b2c40f88 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@ overwritten the second time.

       - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 1bdcbae6600..c5a8fb663be 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@        - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index f011cd8cded..9111d20c76f 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@ to contain a package.json file unless -g is also specified.

       - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index bea2e1dcb82..43010bc3c24 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@ negate NODE_ENV being set to production.

       - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 6111db07add..c2d8b0815aa 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -68,5 +68,5 @@ it is removed with npm-unpublish(1).

       - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index c27b9386ab5..9fdabf57478 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@ the new binary.

       - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index b2b723baf08..bf94fde6a53 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 05763c00ede..eb7bf47c5af 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number

       - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 293f363ff1c..eaf93c0ac61 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 9aaf6d9282a..487c086adc7 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 @@ you should write:

       - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 3aaabac7efe..6c31f1b60c1 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@ fall on multiple lines.

       - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 80d619900cc..ab72eb0d71a 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -169,5 +169,5 @@ contents rather than versions.

       - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 912b5c9c921..be7f542964a 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@ a vaguely positive way to show that you care.

       - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index d10998a7bbd..eac253ff8ec 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@ you will most certainly enjoy this command.

       - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 67541cf105a..410364f5fa1 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -34,5 +34,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 272b1671ae9..2c99d664655 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index a1a8fae758f..1bbecd6c694 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -63,5 +63,5 @@ that do not begin with a number or the letter v.

       - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index be30e097d47..dab0a0e1d12 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,4 +67,4 @@ use the npm access command to grant or revoke the appropriate permi        - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 6b14474fe31..206de736c58 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@ true.

       - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 3d27d4c3444..93fe4810f2a 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -60,5 +60,5 @@ npm uninstall dtrace-provider --save-optional        - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index cdc95a6d885..da50613ed6c 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@ package again, a new version number must be used.

       - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 9b943b8a944..fe4e3c178f2 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -120,5 +120,5 @@ be downgraded.

       - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index df22f0ac08b..bc3cf3b5d64 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -99,5 +99,5 @@ and tag up to the server, and deletes the build/temp directory.

       - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index a39eb98aa0f..965b3504e26 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -83,5 +83,5 @@ the field name.

       - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 4461b9e5f97..1b954c864b7 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 56647fa0291..b43ccda47f7 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

SYNOPSIS

npm <command> [args]
 

VERSION

-

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 @@ easily by doing npm view npm contributors.

the issues list or ask on the mailing list.

BUGS

When you find issues, please report them:

@@ -118,7 +118,7 @@ the issues list or ask on the mailing list.

  • 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 @@ will no doubt tell you to put the output in a gist or email.

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

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • @@ -154,5 +154,5 @@ will no doubt tell you to put the output in a gist or email.

             - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index b6573644add..a4e67332769 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -184,5 +184,5 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index b6573644add..a4e67332769 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -184,5 +184,5 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index b901f73b494..92d14ba6c56 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -559,5 +559,5 @@ ignored.

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

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

             - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 9c48c201830..36fcbe74c35 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -162,5 +162,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 5c0b11b268b..757272863d7 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 @@ set to anything."

             - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index c9be4343205..74b3c7bfc65 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -829,5 +829,5 @@ exit successfully.

             - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 93766569250..3da7d916218 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -195,5 +195,5 @@ from a fresh checkout.

             - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 16683231e1f..0962b39b5a9 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

      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 @@ Joe's appropriate course of action in each case is the same.

      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 @@ things into it.        - + diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html index fa5ec1cfc8f..fa0cc22eff9 100644 --- a/deps/npm/html/doc/misc/npm-faq.html +++ b/deps/npm/html/doc/misc/npm-faq.html @@ -237,7 +237,7 @@ that has a package.json in its root, or a git url.

      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 @@ good folks at npm, Inc.

             - + 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 00000000000..ae0950efd7e --- /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 286435bafe9..a42a4863f81 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@        - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 3c14be6e209..9068310aef2 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@ effectively implement the entire CouchDB API anyway.

             - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index d5bab823092..2aac1b177dd 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@ that registry instead.

             - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 2fd860cf635..ed50c1caf8a 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -207,5 +207,5 @@ scripts is for compilation which must be done on the target architecture.        - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index a1c7885b816..90e345a4a29 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@ modules. To track those down, you can do the following:

             - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index f87b8e0a0e0..c73b0534f68 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -282,5 +282,5 @@ range, use the satisfies(version, range) function.

             - + diff --git a/deps/npm/lib/fetch-package-metadata.js b/deps/npm/lib/fetch-package-metadata.js index 103ed2fc6af..9e62cacd914 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 62e21cc47db..08e9c149c46 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 d2486419fc1..3afe8af012f 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 9e9d6c44860..59567bf3193 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 d3a7274bd8c..ea9e7b1c078 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 925f3a13998..f1b8bc0e316 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 bea5f3722cf..f96eae96bce 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 c629415eb88..42b2b17d140 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 9f4626a411c..0d0bf21688a 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 7528f1a21cf..1bac97e926e 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 0e6d0817bfd..fa54e083415 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 ff3e7c8058b..c4bca767c44 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 0f3b1abf2e7..ba8d7dd802f 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 d6369755a11..f3030154303 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 0c965e957a9..145e27dd491 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 df8c342953c..a3992ac1bb6 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 9d7742d8108..8b30e986a4f 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 74b258d7373..d6690800c46 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 8cb4ea635e8..dd757fe8781 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 4b147174811..797c84d737b 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 8d6f8e42e66..88654a1da3a 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 2f6d09c6655..8022867ef46 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 56da738cb8d..8c6bf039748 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 00000000000..e2edecfc03a --- /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 536b9f3c66b..9219b7a024c 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 78c3b75a8e9..9d0ea8f47c5 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 d7a840c5dd3..c194188ad64 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 20bf3f57597..10dea443864 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 493e7a9f214..b7ba130cb5e 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 009121d4eb5..1ce148d3fad 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 0ece00cf1f2..9bb591cdfe8 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 af69ba3a784..4d2b9a78bf0 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 9ce37848d97..c6ea5f6fdfa 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 051acaab50a..22c831d338d 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 4421c8f45db..cd249e4fe92 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 03d16889aa5..e850fa647fc 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 fe4418e7e5d..7ee7d95f8f7 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 31e61af29de..0bc7541ccf8 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 00000000000..ec0271980a4 --- /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 6c42d89965e..bacb6ffb7de 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 08a675a3111..ded6145a1f3 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 87ad71ad5fd..6307a345aa3 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 d8a6049dbd4..39784dfe6f6 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 fabbfba56e2..e12124fd5d3 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 f8c7b21410f..c80a0f8a3ea 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 eb5f7b8aeac..9f027a9ffb9 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 8e251062553..044bbc066ac 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 4d63d7168da..e70976e8007 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 0e6efae707d..69f03d6df16 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 08720089a62..c36e7f42ade 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 0a6e0640fb4..6bac5b55d0b 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 9d3236baa29..daa61e3a293 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 b700378245c..62b3adc4afc 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 abd22a5e5fd..f799cd91115 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 75caecf28e2..9e3e44ff538 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 1bb605e285c..d356fe40237 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 c2df4eb7198..16c974e0edf 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 bdc08bb2db5..e52857ec548 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 bdc08bb2db5..e52857ec548 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 e110187fce7..ed8bd82a9fd 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 3c00980f3ac..ed6ee372d33 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 e110187fce7..ed8bd82a9fd 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 b9bf4dbcfb5..839806a670a 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 bff35612e7d..c0d3b2c1373 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 80c6e6e8aba..703fac404ca 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 6deead895a4..ae17206bcc6 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 f41fdf621d4..98f7f0ac045 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 b9e193195f8..c147e713235 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 1167bcdbed9..503a6f35b00 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 5cfd79c4a7b..3013d956234 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 2a166acdbac..deadca7ba3a 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 3cb4e75cd1a..a2fe4b952d0 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 f0324607cf2..e26cab12381 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 db93d201df8..be2e6f0779c 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 41374571cd7..c797942c25f 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 dd2c87e2c6b..090c2b9cb21 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 00000000000..deed57771e1 --- /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 00000000000..cb4e9255049 --- /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 755f99317e6..e4eeda0eebd 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() } ) })