diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index bad45ce52fa5af..7ba0c9e8f9978b 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -272,3 +272,5 @@ Jakob Krigovsky Charmander <~@charmander.me> erik wienhold James Butler +Kevin Kragenbrink +Arnaud Rinquin diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 52ff70465c0298..1c9cc5f4663b77 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,97 @@ +### v2.9.1 (2015-04-30): + +#### WOW! MORE GIT FIXES! YOU LOVE THOSE! + +The first item below is actually a pretty big deal, as it fixes (with a +one-word change and a much, much longer test case (thanks again, +[@iarna](https://github.com/iarna))) a regression that's been around for months +now. If you're depending on multiple branches of a single git dependency in a +single project, you probably want to check out `npm@2.9.1` and verify that +things (again?) work correctly in your project. + +* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) + [#7202](https://github.com/npm/npm/issues/7202) When caching git + dependencies, do so by the whole URL, including the branch name, so that if a + single application depends on multiple branches from the same repository (in + practice, multiple version tags), every install is of the correct version, + instead of reusing whichever branch the caching process happened to check out + first. ([@iarna](https://github.com/iarna)) +* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) + [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, + GitHub, and Gitlab dependencies are installed the same way as non-hosted git + dependencies, fixing `npm install --link`. + ([@laiso](https://github.com/laiso)) + +#### DOCUMENTATION FIXES AND TWEAKS + +These changes may seem simple and small (except Lin's fix to the package name +restrictions, which was more an egregious oversight on our part), but cleaner +documentation makes npm significantly more pleasant to use. I really appreciate +all the typo fixes, clarifications, and formatting tweaks people send us, and +am delighted that we get so many of these pull requests. Thanks, everybody! + +* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) + [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to + clearly document the full restrictions on package names. + [@linclark](https://github.com/linclark) has now fixed that, although we will + take with us to our graves the reasons why the maximum package name length is 214 + characters (well, OK, it was that that was the longest name in the registry + when we decided to put a cap on the name length). + ([@linclark](https://github.com/linclark)) +* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) + [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` + documentation use code formatting for examples consistently. It would be + great to do this for more commands HINT HINT. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) + [#8105](https://github.com/npm/npm/issues/8105) Document that the global + `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. + ([@anttti](https://github.com/anttti)) +* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) + [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run + build` directly (hint: it's different from `npm build`!). + ([@mikemaccana](https://github.com/mikemaccana)) +* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) + [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm + mailing list address out of `package.json`. It seems that people don't have + much trouble figuring out how to report errors to npm. + ([@robertkowalski](https://github.com/robertkowalski)) + +#### ENROBUSTIFICATIONMENT + +* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) + [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion + will only suggest run scripts, instead of including dependencies. If for some + reason you still wanted it to suggest dependencies, let us know. + ([@mantoni](https://github.com/mantoni)) +* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) + [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the + environment's `PATH` in a platform-neutral way. + ([@watilde](https://github.com/watilde)) +* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) + [#8094](https://github.com/npm/npm/issues/8094) When we refactored the + configuration code to split out checking for IPv4 local addresses, we + inadvertently completely broke it by failing to return the values. In + addition, just the call to `os.getInterfaces()` could throw on systems where + querying the network configuration requires elevated privileges (e.g. Amazon + Lambda). Add the return, and trap errors so they don't cause npm to explode. + Thanks to [@mhart](https://github.com/mhart) for bringing this to our + attention! ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT + +* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) + `rimraf@2.3.3`: More informative assertions on argument validation failure. + ([@isaacs](https://github.com/isaacs)) +* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) + `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct + all along. ([@isaacs](https://github.com/isaacs)) +* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) + `minimatch@2.0.7`: Feature detection and test improvements. + ([@isaacs](https://github.com/isaacs)) +* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) + `nock@1.7.1` ([@pgte](https://github.com/pgte)) + ### v2.9.0 (2015-04-23): This week was kind of a breather to concentrate on fixing up the tests on the diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 15655f3e5cfe0f..365d80da081d61 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -235,7 +235,7 @@ authors: git add AUTHORS &&\ git commit -m "update AUTHORS" || true -publish: link doc authors +publish: authors link doc @git push origin :v$(shell npm -v) 2>&1 || true git clean -fd &&\ git push origin $(BRANCH) &&\ diff --git a/deps/npm/doc/cli/npm-build.md b/deps/npm/doc/cli/npm-build.md index 53813c1fd98c7a..4d3467a160dd0c 100644 --- a/deps/npm/doc/cli/npm-build.md +++ b/deps/npm/doc/cli/npm-build.md @@ -12,7 +12,10 @@ npm-build(1) -- Build a package This is the plumbing command called by `npm link` and `npm install`. -It should generally not be called directly. +It should generally be called during installation, but if you need to run it +directly, run: + + npm run-script build ## SEE ALSO diff --git a/deps/npm/doc/cli/npm-shrinkwrap.md b/deps/npm/doc/cli/npm-shrinkwrap.md index e17afcd259d61b..d781a683e7664f 100644 --- a/deps/npm/doc/cli/npm-shrinkwrap.md +++ b/deps/npm/doc/cli/npm-shrinkwrap.md @@ -9,10 +9,10 @@ npm-shrinkwrap(1) -- Lock down dependency versions This command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be -used when your package is installed. The "package.json" file is still -required if you want to use "npm install". +used when your package is installed. The `package.json` file is still +required if you want to use `npm install`. -By default, "npm install" recursively installs the target's +By default, `npm install` recursively installs the target's dependencies (as specified in package.json), choosing the latest available version that satisfies the dependency's semver pattern. In some situations, particularly when shipping software where each change @@ -53,13 +53,13 @@ and package C: } If these are the only versions of A, B, and C available in the -registry, then a normal "npm install A" will install: +registry, then a normal `npm install A` will install: A@0.1.0 `-- B@0.0.1 `-- C@0.0.1 -However, if B@0.0.2 is published, then a fresh "npm install A" will +However, if B@0.0.2 is published, then a fresh `npm install A` will install: A@0.1.0 @@ -96,7 +96,7 @@ This generates npm-shrinkwrap.json, which will look something like this: } The shrinkwrap command has locked down the dependencies based on -what's currently installed in node_modules. When "npm install" +what's currently installed in node_modules. When `npm install` installs a package with a npm-shrinkwrap.json file in the package root, the shrinkwrap file (rather than package.json files) completely drives the installation of that package and all of its dependencies @@ -109,31 +109,31 @@ files. ### Using shrinkwrapped packages Using a shrinkwrapped package is no different than using any other -package: you can "npm install" it by hand, or add a dependency to your -package.json file and "npm install" it. +package: you can `npm install` it by hand, or add a dependency to your +package.json file and `npm install` it. ### Building shrinkwrapped packages To shrinkwrap an existing package: -1. Run "npm install" in the package root to install the current +1. Run `npm install` in the package root to install the current versions of all dependencies. 2. Validate that the package works as expected with these versions. -3. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish +3. Run `npm shrinkwrap`, add npm-shrinkwrap.json to git, and publish your package. To add or update a dependency in a shrinkwrapped package: -1. Run "npm install" in the package root to install the current +1. Run `npm install` in the package root to install the current versions of all dependencies. -2. Add or update dependencies. "npm install" each new or updated +2. Add or update dependencies. `npm install` each new or updated package individually and then update package.json. Note that they must be explicitly named in order to be installed: running `npm install` with no arguments will merely reproduce the existing shrinkwrap. 3. Validate that the package works as expected with the new dependencies. -4. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and +4. Run `npm shrinkwrap`, commit the new npm-shrinkwrap.json, and publish your package. You can use npm-outdated(1) to view dependencies with newer versions @@ -142,13 +142,13 @@ available. ### Other Notes A shrinkwrap file must be consistent with the package's package.json -file. "npm shrinkwrap" will fail if required dependencies are not +file. `npm shrinkwrap` will fail if required dependencies are not already installed, since that would result in a shrinkwrap that wouldn't actually work. Similarly, the command will fail if there are extraneous packages (not referenced by package.json), since that would indicate that package.json is not correct. -Since "npm shrinkwrap" is intended to lock down your dependencies for +Since `npm shrinkwrap` is intended to lock down your dependencies for production use, `devDependencies` will not be included unless you explicitly set the `--dev` flag when you run `npm shrinkwrap`. If installed `devDependencies` are excluded, then npm will print a diff --git a/deps/npm/doc/files/npmrc.md b/deps/npm/doc/files/npmrc.md index a3eb4389f4eb30..345052bad11c6b 100644 --- a/deps/npm/doc/files/npmrc.md +++ b/deps/npm/doc/files/npmrc.md @@ -17,7 +17,7 @@ The four relevant files are: * per-project config file (/path/to/my/project/.npmrc) * per-user config file (~/.npmrc) -* global config file ($PREFIX/npmrc) +* global config file ($PREFIX/etc/npmrc) * npm builtin config file (/path/to/npm/npmrc) All npm config files are an ini-formatted list of `key = value` diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index b1c8f210f49f07..b02773814c0d2a 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -17,14 +17,23 @@ them. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version. -The name is what your thing is called. Some tips: +The name is what your thing is called. +Some rules: + +* The name must be shorter than 214 characters. This includes the scope for + scoped packages. +* The name can't start with a dot or an underscore. +* New packages must not have uppercase letters in the name. +* The name ends up being part of a URL, an argument on the command line, and a + folder name. Therefore, the name can't contain any non-URL-safe characters. + +Some tips: + +* Don't use the same name as a core Node module. * Don't put "js" or "node" in the name. It's assumed that it's js, since you're writing a package.json file, and you can specify the engine using the "engines" field. (See below.) -* The name ends up being part of a URL, an argument on the command line, and a - folder name. Any name with non-url-safe characters will be rejected. - Also, it can't start with a dot or an underscore. * The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive. * You may want to check the npm registry to see if there's something by that name diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index b3989350c4c1e3..707f59fe802c81 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -126,7 +126,7 @@

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

+support@npmjs.com and explain the situation.

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

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index 22b15948dacc53..d3a5e4a264a9f4 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@

SYNOPSIS

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

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 7019262025274c..04c603109d2201 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index 570d674d23785d..dc07ab595a71ed 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index 4374a674571bad..db1157da6c938e 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index e1bc622633c864..3991f1f4ae6c49 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index 2c17d9b887ef3c..740014ac8db9b4 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 5b6c09bfef5749..51da57a6dbcf65 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index d4ef21d2cbcb9b..53918c64eb3fcc 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index 8a1edc6da76814..bbb927793c9a8f 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -44,5 +44,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index aa15528237eb1f..8650467ffddede 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index 525a07fa5f1b28..431593b1c30926 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index d4e2d7f7bd4001..95cb3b822c1cf3 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index a77d29087aa0ca..ba0529479a77b1 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 809202f22b6572..abe1cb0ef85bb6 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@

global

       - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 76f7c8c3861f3d..1e1c498a90a4ce 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index 9e782a5835a140..1f7e097f282ba3 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index b137da8f9c1083..9e9009d2ea302d 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 2ad3f0e5ff072a..8d5b6f2837e25b 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 1b94f6894866c4..69f442c782ead1 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index 0ba0f39ac7f700..644d74faa1a32b 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index 6cbe44e756a6c4..85bda647490702 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@

CONFIGURATION

       - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 6e2b20fb3c8b00..974f458643417a 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index 18f3bc170118cb..6bd94fb8c51764 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -52,5 +52,5 @@

SEE ALSO

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

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index 0082a39fcbca1c..618fe180dfe953 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -41,5 +41,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index c5820a80a67f3b..07762aeb89ad3f 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index f473d334ef8e63..4d4773e7ffe6da 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index 7128cf28440b98..35eae82863908f 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index 27e31845e5451d..abdea07bf60e82 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index d71473e4047843..87e7480ccaa6db 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@

SYNOPSIS

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

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 13e084c098e07f..ed865457028806 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 0616bda87cd133..5c80b96b579916 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index d7da1ebb9c9026..81e0ce7b6470b3 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -33,5 +33,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index 0fe37d2ff01894..0aa4c7f2023f3e 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 50372ce667c96f..6d1e58eaa761f6 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@

RETURN VALUE

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

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index ac39fa73041145..0992c27ac98ba1 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@

SYNOPSIS

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

VERSION

-

2.9.0

+

2.9.1

DESCRIPTION

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

ABBREVS

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index d17e739ed38f7b..2715b7e26a8f1e 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -75,5 +75,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index c4e7b57c02529a..611046f7132092 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 fbb826330bd20d..57610bec6a4fa8 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 f59104f9492bb8..6316feebffc494 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 60ff425a0175ae..84842fd34452d1 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -18,8 +18,10 @@

SYNOPSIS

DESCRIPTION

This is the plumbing command called by npm link and npm install.

-

It should generally not be called directly.

-

SEE ALSO

+

It should generally be called during installation, but if you need to run it +directly, run:

+
npm run-script build
+

SEE ALSO

  • npm-install(1)
  • npm-link(1)
  • @@ -38,5 +40,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 261a96e8c2bfc7..434fa55e74df85 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 f53dc133239dfe..1ee216ea51df47 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 7d6654f6687d62..b873975725bbed 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 6ae8ab153a5798..0fdce7cf919e3f 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index c5ad9c5a381e02..060ab2a8907edf 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 2da3c5622f8791..05c380224b94a3 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 f6e21da71bf3d3..ff080d66c4a6ab 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 15ae5733de0fb1..e94aa6af0e6f13 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 e262c59a9982e8..a49d795c6c9ae9 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 93de19e983143d..2b94434260ac89 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 6e13cb25c9458f..f1beb0a798a53b 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 7269d432e6562d..7d3d6cf8e9773e 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index cf349e9a066115..9fc6f9fc3fc4ea 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 578af6d3bf239c..caf36b9f141575 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -264,5 +264,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index b8631103c06516..8f5c62dad528e0 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -72,5 +72,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 83e13d91d91b30..69906c60378fe0 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 bd0b18ade29388..73893326a4c264 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,7 @@

    SYNOPSIS

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

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

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

    @@ -97,5 +97,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index c679d76b033183..167193d0059c4d 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 aeaf70cde181c1..5537ea2b0c7af5 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 e03243662a3ae1..b160d74c835495 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 75e39a34bf11c3..06bb8c41cb2602 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 cad75dd1ec4694..514ac9ee73192b 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index ad94928eed7e95..4cd0137eefb066 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -66,5 +66,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 0daab74b28a334..f975cc00036813 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index ecd868ffe9cbb8..9032fe301c61f7 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index af0b80f5f0a194..42952359c60b97 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index cb20f2e00dc41a..a291ae07316dc1 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index cb8e3ea3189b77..c49519cbbc4b95 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 ffec40d2ef57c5..ac4433d6c5d1ca 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -56,5 +56,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index ab21fb129559cd..362c2b28a2578a 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 0c7b4e546b72e1..9e2783e54524c5 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -15,9 +15,9 @@

    SYNOPSIS

    DESCRIPTION

    This command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be -used when your package is installed. The "package.json" file is still -required if you want to use "npm install".

    -

    By default, "npm install" recursively installs the target's +used when your package is installed. The package.json file is still +required if you want to use npm install.

    +

    By default, npm install recursively installs the target's dependencies (as specified in package.json), choosing the latest available version that satisfies the dependency's semver pattern. In some situations, particularly when shipping software where each change @@ -51,11 +51,11 @@

    SYNOPSIS

    "version": "0.0.1" }

    If these are the only versions of A, B, and C available in the -registry, then a normal "npm install A" will install:

    +registry, then a normal npm install A will install:

    A@0.1.0
     `-- B@0.0.1
         `-- C@0.0.1
    -

    However, if B@0.0.2 is published, then a fresh "npm install A" will +

    However, if B@0.0.2 is published, then a fresh npm install A will install:

    A@0.1.0
     `-- B@0.0.2
    @@ -85,7 +85,7 @@ 

    SYNOPSIS

    } }

    The shrinkwrap command has locked down the dependencies based on -what's currently installed in node_modules. When "npm install" +what's currently installed in node_modules. When npm install installs a package with a npm-shrinkwrap.json file in the package root, the shrinkwrap file (rather than package.json files) completely drives the installation of that package and all of its dependencies @@ -95,41 +95,41 @@

    SYNOPSIS

    files.

    Using shrinkwrapped packages

    Using a shrinkwrapped package is no different than using any other -package: you can "npm install" it by hand, or add a dependency to your -package.json file and "npm install" it.

    +package: you can npm install it by hand, or add a dependency to your +package.json file and npm install it.

    Building shrinkwrapped packages

    To shrinkwrap an existing package:

      -
    1. Run "npm install" in the package root to install the current +
    2. Run npm install in the package root to install the current versions of all dependencies.
    3. Validate that the package works as expected with these versions.
    4. -
    5. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish +
    6. Run npm shrinkwrap, add npm-shrinkwrap.json to git, and publish your package.

    To add or update a dependency in a shrinkwrapped package:

      -
    1. Run "npm install" in the package root to install the current +
    2. Run npm install in the package root to install the current versions of all dependencies.
    3. -
    4. Add or update dependencies. "npm install" each new or updated +
    5. Add or update dependencies. npm install each new or updated package individually and then update package.json. Note that they must be explicitly named in order to be installed: running npm install with no arguments will merely reproduce the existing shrinkwrap.
    6. Validate that the package works as expected with the new dependencies.
    7. -
    8. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and +
    9. Run npm shrinkwrap, commit the new npm-shrinkwrap.json, and publish your package.

    You can use npm-outdated(1) to view dependencies with newer versions available.

    Other Notes

    A shrinkwrap file must be consistent with the package's package.json -file. "npm shrinkwrap" will fail if required dependencies are not +file. npm shrinkwrap will fail if required dependencies are not already installed, since that would result in a shrinkwrap that wouldn't actually work. Similarly, the command will fail if there are extraneous packages (not referenced by package.json), since that would indicate that package.json is not correct.

    -

    Since "npm shrinkwrap" is intended to lock down your dependencies for +

    Since npm shrinkwrap is intended to lock down your dependencies for production use, devDependencies will not be included unless you explicitly set the --dev flag when you run npm shrinkwrap. If installed devDependencies are excluded, then npm will print a @@ -164,5 +164,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 6988717f6121f3..2d5d0bbe2083f1 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 1daaf68a9bab5b..dd57f622493558 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 2d50184aa7025f..777b8a69670b66 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 f2885fd542995f..6b8d9e84be461c 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 8275bf30cbf24e..cb73a330078326 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -62,5 +62,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 223cc397263610..9d50339debf990 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 b14596bf43167a..d53e1540211fe1 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -57,5 +57,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index b038c3e3942899..a9b8a856dcbc38 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 d6d0648232f530..c10a98e4ba8b1c 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -119,5 +119,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 0fc54b28e2a0af..40f0cbdf3f44fd 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -65,5 +65,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 7e667a589d7a0a..825df1c29a60b2 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -82,5 +82,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 8557a3d8dbf84d..24fd65480b23f2 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 4d0f8b59f6920c..0f74f132fe7ee5 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    2.9.0

    +

    2.9.1

    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 481ac5a1beb43a..b967b55fd83ca8 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 bdf40fd28f08c5..a0d65c02b8106e 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 b0246f1a55cf4e..b48cfd7cb9543b 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -21,14 +21,22 @@

    name

    them. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version.

    -

    The name is what your thing is called. Some tips:

    +

    The name is what your thing is called.

    +

    Some rules:

      +
    • The name must be shorter than 214 characters. This includes the scope for +scoped packages.
    • +
    • The name can't start with a dot or an underscore.
    • +
    • New packages must not have uppercase letters in the name.
    • +
    • The name ends up being part of a URL, an argument on the command line, and a +folder name. Therefore, the name can't contain any non-URL-safe characters.
    • +
    +

    Some tips:

    +
      +
    • Don't use the same name as a core Node module.
    • Don't put "js" or "node" in the name. It's assumed that it's js, since you're writing a package.json file, and you can specify the engine using the "engines" field. (See below.)
    • -
    • The name ends up being part of a URL, an argument on the command line, and a -folder name. Any name with non-url-safe characters will be rejected. -Also, it can't start with a dot or an underscore.
    • The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive.
    • You may want to check the npm registry to see if there's something by that name @@ -502,5 +510,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index e036a32a592ef2..a745e6536b687f 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -21,7 +21,7 @@

      FILES

      • per-project config file (/path/to/my/project/.npmrc)
      • per-user config file (~/.npmrc)
      • -
      • global config file ($PREFIX/npmrc)
      • +
      • global config file ($PREFIX/etc/npmrc)
      • npm builtin config file (/path/to/npm/npmrc)

      All npm config files are an ini-formatted list of key = value @@ -77,5 +77,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index a0de09e440eef8..f435bb7176cd02 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -21,14 +21,22 @@

      name

      them. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version.

      -

      The name is what your thing is called. Some tips:

      +

      The name is what your thing is called.

      +

      Some rules:

        +
      • The name must be shorter than 214 characters. This includes the scope for +scoped packages.
      • +
      • The name can't start with a dot or an underscore.
      • +
      • New packages must not have uppercase letters in the name.
      • +
      • The name ends up being part of a URL, an argument on the command line, and a +folder name. Therefore, the name can't contain any non-URL-safe characters.
      • +
      +

      Some tips:

      +

      DESCRIPTION

      This is the plumbing command called by npm link and npm install.

      -

      It should generally not be called directly.

      -

      SEE ALSO

      +

      It should generally be called during installation, but if you need to run it +directly, run:

      +
      npm run-script build
      +

      SEE ALSO

      • npm-install(1)
      • npm-link(1)
      • diff --git a/deps/npm/html/partial/doc/cli/npm-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html index 13d18f01caf44f..45be4bb595e66b 100644 --- a/deps/npm/html/partial/doc/cli/npm-ls.html +++ b/deps/npm/html/partial/doc/cli/npm-ls.html @@ -11,7 +11,7 @@

        SYNOPSIS

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

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

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

        diff --git a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html index 82bb81f168baec..7857cf85ee8cd3 100644 --- a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html @@ -4,9 +4,9 @@

        SYNOPSIS

        DESCRIPTION

        This command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be -used when your package is installed. The "package.json" file is still -required if you want to use "npm install".

        -

        By default, "npm install" recursively installs the target's +used when your package is installed. The package.json file is still +required if you want to use npm install.

        +

        By default, npm install recursively installs the target's dependencies (as specified in package.json), choosing the latest available version that satisfies the dependency's semver pattern. In some situations, particularly when shipping software where each change @@ -40,11 +40,11 @@

        SYNOPSIS

        "version": "0.0.1" }

        If these are the only versions of A, B, and C available in the -registry, then a normal "npm install A" will install:

        +registry, then a normal npm install A will install:

        A@0.1.0
         `-- B@0.0.1
             `-- C@0.0.1
        -

        However, if B@0.0.2 is published, then a fresh "npm install A" will +

        However, if B@0.0.2 is published, then a fresh npm install A will install:

        A@0.1.0
         `-- B@0.0.2
        @@ -74,7 +74,7 @@ 

        SYNOPSIS

        } }

        The shrinkwrap command has locked down the dependencies based on -what's currently installed in node_modules. When "npm install" +what's currently installed in node_modules. When npm install installs a package with a npm-shrinkwrap.json file in the package root, the shrinkwrap file (rather than package.json files) completely drives the installation of that package and all of its dependencies @@ -84,41 +84,41 @@

        SYNOPSIS

        files.

        Using shrinkwrapped packages

        Using a shrinkwrapped package is no different than using any other -package: you can "npm install" it by hand, or add a dependency to your -package.json file and "npm install" it.

        +package: you can npm install it by hand, or add a dependency to your +package.json file and npm install it.

        Building shrinkwrapped packages

        To shrinkwrap an existing package:

          -
        1. Run "npm install" in the package root to install the current +
        2. Run npm install in the package root to install the current versions of all dependencies.
        3. Validate that the package works as expected with these versions.
        4. -
        5. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish +
        6. Run npm shrinkwrap, add npm-shrinkwrap.json to git, and publish your package.

        To add or update a dependency in a shrinkwrapped package:

          -
        1. Run "npm install" in the package root to install the current +
        2. Run npm install in the package root to install the current versions of all dependencies.
        3. -
        4. Add or update dependencies. "npm install" each new or updated +
        5. Add or update dependencies. npm install each new or updated package individually and then update package.json. Note that they must be explicitly named in order to be installed: running npm install with no arguments will merely reproduce the existing shrinkwrap.
        6. Validate that the package works as expected with the new dependencies.
        7. -
        8. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and +
        9. Run npm shrinkwrap, commit the new npm-shrinkwrap.json, and publish your package.

        You can use npm-outdated(1) to view dependencies with newer versions available.

        Other Notes

        A shrinkwrap file must be consistent with the package's package.json -file. "npm shrinkwrap" will fail if required dependencies are not +file. npm shrinkwrap will fail if required dependencies are not already installed, since that would result in a shrinkwrap that wouldn't actually work. Similarly, the command will fail if there are extraneous packages (not referenced by package.json), since that would indicate that package.json is not correct.

        -

        Since "npm shrinkwrap" is intended to lock down your dependencies for +

        Since npm shrinkwrap is intended to lock down your dependencies for production use, devDependencies will not be included unless you explicitly set the --dev flag when you run npm shrinkwrap. If installed devDependencies are excluded, then npm will print a diff --git a/deps/npm/html/partial/doc/cli/npm.html b/deps/npm/html/partial/doc/cli/npm.html index 1d547bfc2bceb8..61fb642e0dd063 100644 --- a/deps/npm/html/partial/doc/cli/npm.html +++ b/deps/npm/html/partial/doc/cli/npm.html @@ -2,7 +2,7 @@

        npm

        javascript package manager

        SYNOPSIS

        npm <command> [args]
         

        VERSION

        -

        2.9.0

        +

        2.9.1

        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 @@ -99,7 +99,7 @@

        CONTRIBUTIONS

        the issues list or ask on the mailing list.

        BUGS

        When you find issues, please report them:

        @@ -107,7 +107,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.

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

      AUTHOR

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

      +i@izs.me

      SEE ALSO

      • npm-help(1)
      • diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html index ac4bfbc98031b4..f5fadd1b647c36 100644 --- a/deps/npm/html/partial/doc/files/npm-json.html +++ b/deps/npm/html/partial/doc/files/npm-json.html @@ -10,14 +10,22 @@

        name

        them. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version.

        -

        The name is what your thing is called. Some tips:

        +

        The name is what your thing is called.

        +

        Some rules:

          +
        • The name must be shorter than 214 characters. This includes the scope for +scoped packages.
        • +
        • The name can't start with a dot or an underscore.
        • +
        • New packages must not have uppercase letters in the name.
        • +
        • The name ends up being part of a URL, an argument on the command line, and a +folder name. Therefore, the name can't contain any non-URL-safe characters.
        • +
        +

        Some tips:

        +
          +
        • Don't use the same name as a core Node module.
        • Don't put "js" or "node" in the name. It's assumed that it's js, since you're writing a package.json file, and you can specify the engine using the "engines" field. (See below.)
        • -
        • The name ends up being part of a URL, an argument on the command line, and a -folder name. Any name with non-url-safe characters will be rejected. -Also, it can't start with a dot or an underscore.
        • The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive.
        • You may want to check the npm registry to see if there's something by that name diff --git a/deps/npm/html/partial/doc/files/npmrc.html b/deps/npm/html/partial/doc/files/npmrc.html index 988920a4896283..1dd7919df17d63 100644 --- a/deps/npm/html/partial/doc/files/npmrc.html +++ b/deps/npm/html/partial/doc/files/npmrc.html @@ -10,7 +10,7 @@

          FILES

          • per-project config file (/path/to/my/project/.npmrc)
          • per-user config file (~/.npmrc)
          • -
          • global config file ($PREFIX/npmrc)
          • +
          • global config file ($PREFIX/etc/npmrc)
          • npm builtin config file (/path/to/npm/npmrc)

          All npm config files are an ini-formatted list of key = value diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html index ac4bfbc98031b4..f5fadd1b647c36 100644 --- a/deps/npm/html/partial/doc/files/package.json.html +++ b/deps/npm/html/partial/doc/files/package.json.html @@ -10,14 +10,22 @@

          name

          them. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version.

          -

          The name is what your thing is called. Some tips:

          +

          The name is what your thing is called.

          +

          Some rules:

            +
          • The name must be shorter than 214 characters. This includes the scope for +scoped packages.
          • +
          • The name can't start with a dot or an underscore.
          • +
          • New packages must not have uppercase letters in the name.
          • +
          • The name ends up being part of a URL, an argument on the command line, and a +folder name. Therefore, the name can't contain any non-URL-safe characters.
          • +
          +

          Some tips:

          +
            +
          • Don't use the same name as a core Node module.
          • Don't put "js" or "node" in the name. It's assumed that it's js, since you're writing a package.json file, and you can specify the engine using the "engines" field. (See below.)
          • -
          • The name ends up being part of a URL, an argument on the command line, and a -folder name. Any name with non-url-safe characters will be rejected. -Also, it can't start with a dot or an underscore.
          • The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive.
          • You may want to check the npm registry to see if there's something by that name diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html index 517795e3ae549a..07374e1f1b0f37 100644 --- a/deps/npm/html/partial/doc/misc/npm-disputes.html +++ b/deps/npm/html/partial/doc/misc/npm-disputes.html @@ -2,7 +2,7 @@

            npm-disputes

            Handling Module

            SYNOPSIS

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

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

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

            DESCRIPTION

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

            I get ECONNREFUSED a lot. What'

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

            -

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

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

            diff --git a/deps/npm/lib/bin.js b/deps/npm/lib/bin.js index 719e8870dda9c7..5465112d8891e8 100644 --- a/deps/npm/lib/bin.js +++ b/deps/npm/lib/bin.js @@ -1,13 +1,14 @@ module.exports = bin var npm = require("./npm.js") +var osenv = require("osenv") bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)" function bin (args, silent, cb) { if (typeof cb !== "function") cb = silent, silent = false var b = npm.bin - , PATH = (process.env.PATH || "").split(":") + , PATH = osenv.path() if (!silent) console.log(b) process.nextTick(cb.bind(this, null, b)) diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js index 3ec9c46d1e7359..6cfccf8f898e3b 100644 --- a/deps/npm/lib/cache/add-remote-git.js +++ b/deps/npm/lib/cache/add-remote-git.js @@ -115,7 +115,7 @@ function tryClone (from, combinedURL, silent, cb) { // ensure that similarly-named remotes don't collide var repoID = cloneURL.replace(/[^a-zA-Z0-9]+/g, '-') + '-' + - crypto.createHash('sha1').update(cloneURL).digest('hex').slice(0, 8) + crypto.createHash('sha1').update(combinedURL).digest('hex').slice(0, 8) var cachedRemote = path.join(remotes, repoID) cb = inflight(repoID, cb) diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js index 537658fd0487ea..a90d4c22b0a87e 100644 --- a/deps/npm/lib/config/defaults.js +++ b/deps/npm/lib/config/defaults.js @@ -315,10 +315,20 @@ exports.types = , _exit : Boolean } -function getLocalAddresses() { - Object.keys(os.networkInterfaces()).map(function (nic) { - return os.networkInterfaces()[nic].filter(function (addr) { - return addr.family === "IPv4" +function getLocalAddresses () { + var interfaces + // #8094: some environments require elevated permissions to enumerate + // interfaces, and synchronously throw EPERM when run without + // elevated privileges + try { + interfaces = os.networkInterfaces() + } catch (e) { + interfaces = {} + } + + return Object.keys(interfaces).map(function (nic) { + return interfaces[nic].filter(function (addr) { + return addr.family === 'IPv4' }) .map(function (addr) { return addr.address diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index d95cc15712fae0..1777148095ccf5 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -892,7 +892,7 @@ function targetResolver (where, context, deps, devDeps) { return cb(null, []) } - var isGit = npa(what).type === "git" + var isGit = (npa(what).type === "git" || npa(what).type === "hosted") if (!er && data && @@ -918,7 +918,7 @@ function installOne (target, where, context, cb) { // the --link flag makes this a "link" command if it's at the // the top level. var isGit = false - if (target && target._from) isGit = npa(target._from).type === 'git' + if (target && target._from) isGit = (npa(target._from).type === 'git' || npa(target._from).type === 'hosted') if (where === npm.prefix && npm.config.get("link") && !npm.config.get("global") && !isGit) { diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index bf72bf814d1a02..057af2bc69cb73 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -13,7 +13,6 @@ runScript.completion = function (opts, cb) { // see if there's already a package specified. var argv = opts.conf.argv.remain - , installedShallow = require("./utils/completion/installed-shallow.js") if (argv.length >= 4) return cb() @@ -41,33 +40,11 @@ runScript.completion = function (opts, cb) { }) } - // complete against the installed-shallow, and the pwd's scripts. - // but only packages that have scripts - var installed - , scripts - installedShallow(opts, function (d) { - return d.scripts - }, function (er, inst) { - installed = inst - next() - }) - - if (npm.config.get("global")) { - scripts = [] - next() - } - else readJson(path.join(npm.localPrefix, "package.json"), function (er, d) { + readJson(path.join(npm.localPrefix, "package.json"), function (er, d) { if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) d = d || {} - scripts = Object.keys(d.scripts || {}) - next() + cb(null, Object.keys(d.scripts || {})) }) - - function next () { - if (!installed || !scripts) return - - cb(null, scripts.concat(installed)) - } } function runScript (args, cb) { diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index d0cb3b024a4f72..23c8b1d4076679 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -18,7 +18,14 @@ A folder containing a \fBpackage\.json\fR file in its root\. .P This is the plumbing command called by \fBnpm link\fR and \fBnpm install\fR\|\. .P -It should generally not be called directly\. +It should generally be called during installation, but if you need to run it +directly, run: +.P +.RS 2 +.nf +npm run\-script build +.fi +.RE .SH SEE ALSO .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 4f896b2d887957..12b2564d9d75ac 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show: .P .RS 2 .nf -npm@2.9.0 /path/to/npm +npm@2.9.1 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index 3c4538c4ff0372..98440e02472f8a 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -12,10 +12,10 @@ npm shrinkwrap .P This command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be -used when your package is installed\. The "package\.json" file is still -required if you want to use "npm install"\. +used when your package is installed\. The \fBpackage\.json\fR file is still +required if you want to use \fBnpm install\fR\|\. .P -By default, "npm install" recursively installs the target's +By default, \fBnpm install\fR recursively installs the target's dependencies (as specified in package\.json), choosing the latest available version that satisfies the dependency's semver pattern\. In some situations, particularly when shipping software where each change @@ -68,7 +68,7 @@ and package C: .RE .P If these are the only versions of A, B, and C available in the -registry, then a normal "npm install A" will install: +registry, then a normal \fBnpm install A\fR will install: .P .RS 2 .nf @@ -78,7 +78,7 @@ A@0\.1\.0 .fi .RE .P -However, if B@0\.0\.2 is published, then a fresh "npm install A" will +However, if B@0\.0\.2 is published, then a fresh \fBnpm install A\fR will install: .P .RS 2 @@ -127,7 +127,7 @@ This generates npm\-shrinkwrap\.json, which will look something like this: .RE .P The shrinkwrap command has locked down the dependencies based on -what's currently installed in node_modules\. When "npm install" +what's currently installed in node_modules\. When \fBnpm install\fR installs a package with a npm\-shrinkwrap\.json file in the package root, the shrinkwrap file (rather than package\.json files) completely drives the installation of that package and all of its dependencies @@ -138,19 +138,19 @@ files\. .SS Using shrinkwrapped packages .P Using a shrinkwrapped package is no different than using any other -package: you can "npm install" it by hand, or add a dependency to your -package\.json file and "npm install" it\. +package: you can \fBnpm install\fR it by hand, or add a dependency to your +package\.json file and \fBnpm install\fR it\. .SS Building shrinkwrapped packages .P To shrinkwrap an existing package: .RS 0 .IP 1. 3 -Run "npm install" in the package root to install the current +Run \fBnpm install\fR in the package root to install the current versions of all dependencies\. .IP 2. 3 Validate that the package works as expected with these versions\. .IP 3. 3 -Run "npm shrinkwrap", add npm\-shrinkwrap\.json to git, and publish +Run \fBnpm shrinkwrap\fR, add npm\-shrinkwrap\.json to git, and publish your package\. .RE @@ -158,10 +158,10 @@ your package\. To add or update a dependency in a shrinkwrapped package: .RS 0 .IP 1. 3 -Run "npm install" in the package root to install the current +Run \fBnpm install\fR in the package root to install the current versions of all dependencies\. .IP 2. 3 -Add or update dependencies\. "npm install" each new or updated +Add or update dependencies\. \fBnpm install\fR each new or updated package individually and then update package\.json\. Note that they must be explicitly named in order to be installed: running \fBnpm install\fR with no arguments will merely reproduce the existing @@ -170,7 +170,7 @@ shrinkwrap\. Validate that the package works as expected with the new dependencies\. .IP 4. 3 -Run "npm shrinkwrap", commit the new npm\-shrinkwrap\.json, and +Run \fBnpm shrinkwrap\fR, commit the new npm\-shrinkwrap\.json, and publish your package\. .RE @@ -180,13 +180,13 @@ available\. .SS Other Notes .P A shrinkwrap file must be consistent with the package's package\.json -file\. "npm shrinkwrap" will fail if required dependencies are not +file\. \fBnpm shrinkwrap\fR will fail if required dependencies are not already installed, since that would result in a shrinkwrap that wouldn't actually work\. Similarly, the command will fail if there are extraneous packages (not referenced by package\.json), since that would indicate that package\.json is not correct\. .P -Since "npm shrinkwrap" is intended to lock down your dependencies for +Since \fBnpm shrinkwrap\fR is intended to lock down your dependencies for production use, \fBdevDependencies\fR will not be included unless you explicitly set the \fB\-\-dev\fR flag when you run \fBnpm shrinkwrap\fR\|\. If installed \fBdevDependencies\fR are excluded, then npm will print a diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 98991c7d20acae..28c6ceb58bc076 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -2.9.0 +2.9.1 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index fd7d144ae11b6a..4a2fdb6c3811b4 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) { .RE .SH VERSION .P -2.9.0 +2.9.1 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index d6a3959b0f898f..898490e4785d95 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -16,17 +16,32 @@ them\. The name and version together form an identifier that is assumed to be completely unique\. Changes to the package should come along with changes to the version\. .P -The name is what your thing is called\. Some tips: +The name is what your thing is called\. +.P +Some rules: .RS 0 .IP \(bu 2 +The name must be shorter than 214 characters\. This includes the scope for +scoped packages\. +.IP \(bu 2 +The name can't start with a dot or an underscore\. +.IP \(bu 2 +New packages must not have uppercase letters in the name\. +.IP \(bu 2 +The name ends up being part of a URL, an argument on the command line, and a +folder name\. Therefore, the name can't contain any non\-URL\-safe characters\. + +.RE +.P +Some tips: +.RS 0 +.IP \(bu 2 +Don't use the same name as a core Node module\. +.IP \(bu 2 Don't put "js" or "node" in the name\. It's assumed that it's js, since you're writing a package\.json file, and you can specify the engine using the "engines" field\. (See below\.) .IP \(bu 2 -The name ends up being part of a URL, an argument on the command line, and a -folder name\. Any name with non\-url\-safe characters will be rejected\. -Also, it can't start with a dot or an underscore\. -.IP \(bu 2 The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive\. .IP \(bu 2 diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index e670f56e8a4359..eba9ab61ede304 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -19,7 +19,7 @@ per\-project config file (/path/to/my/project/\.npmrc) .IP \(bu 2 per\-user config file (~/\.npmrc) .IP \(bu 2 -global config file ($PREFIX/npmrc) +global config file ($PREFIX/etc/npmrc) .IP \(bu 2 npm builtin config file (/path/to/npm/npmrc) diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index d6a3959b0f898f..898490e4785d95 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -16,17 +16,32 @@ them\. The name and version together form an identifier that is assumed to be completely unique\. Changes to the package should come along with changes to the version\. .P -The name is what your thing is called\. Some tips: +The name is what your thing is called\. +.P +Some rules: .RS 0 .IP \(bu 2 +The name must be shorter than 214 characters\. This includes the scope for +scoped packages\. +.IP \(bu 2 +The name can't start with a dot or an underscore\. +.IP \(bu 2 +New packages must not have uppercase letters in the name\. +.IP \(bu 2 +The name ends up being part of a URL, an argument on the command line, and a +folder name\. Therefore, the name can't contain any non\-URL\-safe characters\. + +.RE +.P +Some tips: +.RS 0 +.IP \(bu 2 +Don't use the same name as a core Node module\. +.IP \(bu 2 Don't put "js" or "node" in the name\. It's assumed that it's js, since you're writing a package\.json file, and you can specify the engine using the "engines" field\. (See below\.) .IP \(bu 2 -The name ends up being part of a URL, an argument on the command line, and a -folder name\. Any name with non\-url\-safe characters will be rejected\. -Also, it can't start with a dot or an underscore\. -.IP \(bu 2 The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive\. .IP \(bu 2 diff --git a/deps/npm/node_modules/lru-cache/bar.js b/deps/npm/node_modules/lru-cache/bar.js new file mode 100644 index 00000000000000..bccb258364f1f8 --- /dev/null +++ b/deps/npm/node_modules/lru-cache/bar.js @@ -0,0 +1 @@ +console.log("bar");module.exports = "bar"; require("./foo.js") diff --git a/deps/npm/node_modules/lru-cache/foo.js b/deps/npm/node_modules/lru-cache/foo.js new file mode 100644 index 00000000000000..c8a77e36ea03de --- /dev/null +++ b/deps/npm/node_modules/lru-cache/foo.js @@ -0,0 +1 @@ +console.log(require(".")) diff --git a/deps/npm/node_modules/lru-cache/lib/lru-cache.js b/deps/npm/node_modules/lru-cache/lib/lru-cache.js index 575b4476c152c0..d66e7a2382f176 100644 --- a/deps/npm/node_modules/lru-cache/lib/lru-cache.js +++ b/deps/npm/node_modules/lru-cache/lib/lru-cache.js @@ -238,7 +238,6 @@ function isStale(self, hit) { function use (self, hit) { shiftLU(self, hit) hit.lu = self._mru ++ - if (self._maxAge) hit.now = Date.now() self._lruList[hit.lu] = hit } diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index f6c859c1eb52a3..c3b70c765197e2 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "2.6.1", + "version": "2.6.2", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" @@ -27,23 +27,23 @@ "type": "MIT", "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" }, - "gitHead": "ff3dfd40e437fa619f09610f45d1ac523bbf27c9", + "gitHead": "278d05fcc714636eeedb3959bca80c20c19a61df", "bugs": { "url": "https://github.com/isaacs/node-lru-cache/issues" }, "homepage": "https://github.com/isaacs/node-lru-cache#readme", - "_id": "lru-cache@2.6.1", - "_shasum": "9933eff15453fae1d27096365143c724e85c6cbd", - "_from": "lru-cache@>=2.6.1 <2.7.0", - "_npmVersion": "2.8.1", + "_id": "lru-cache@2.6.2", + "_shasum": "77741638c6dc972e503dbe41dcb6bfdfba499a38", + "_from": "lru-cache@>=2.6.2 <2.7.0", + "_npmVersion": "2.8.4", "_nodeVersion": "1.4.2", "_npmUser": { "name": "isaacs", "email": "isaacs@npmjs.com" }, "dist": { - "shasum": "9933eff15453fae1d27096365143c724e85c6cbd", - "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.1.tgz" + "shasum": "77741638c6dc972e503dbe41dcb6bfdfba499a38", + "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.2.tgz" }, "maintainers": [ { @@ -52,5 +52,6 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.1.tgz" + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/lru-cache/test/timeout.js b/deps/npm/node_modules/lru-cache/test/timeout.js deleted file mode 100644 index 5dce62a9e3c595..00000000000000 --- a/deps/npm/node_modules/lru-cache/test/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ -var test = require("tap").test -var LRU = require("../") - -var cache = LRU( { - max: 1, - maxAge: 500 -} ); - -test('set the key', function (t) { - cache.set( "1234", 1 ); - t.end() -}) - -for (var i = 0; i < 10; i ++) { - test('get after ' + i + '00ms', function (t) { - setTimeout(function () { - t.equal(cache.get('1234'), 1) - t.end() - }, 100) - }) -} diff --git a/deps/npm/node_modules/minimatch/browser.js b/deps/npm/node_modules/minimatch/browser.js index cf58a3f60cd850..967b45c0d67eba 100644 --- a/deps/npm/node_modules/minimatch/browser.js +++ b/deps/npm/node_modules/minimatch/browser.js @@ -2,35 +2,36 @@ module.exports = minimatch minimatch.Minimatch = Minimatch -var isWindows = false -if (typeof process !== 'undefined' && process.platform === 'win32') - isWindows = true +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , expand = require("brace-expansion") +var expand = require('brace-expansion') - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' - // * => any number of characters - , star = qmark + "*?" +// * => any number of characters +var star = qmark + '*?' - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') // "abc" -> { a:true, b:true, c:true } function charSet (s) { - return s.split("").reduce(function (set, c) { + return s.split('').reduce(function (set, c) { set[c] = true return set }, {}) @@ -81,21 +82,20 @@ Minimatch.defaults = function (def) { return minimatch.defaults(def).Minimatch } - function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') } if (!options) options = {} // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { + if (!options.nocomment && pattern.charAt(0) === '#') { return false } // "" only matches "" - if (pattern.trim() === "") return p === "" + if (pattern.trim() === '') return p === '' return new Minimatch(pattern, options).match(p) } @@ -105,16 +105,17 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') } if (!options) options = {} pattern = pattern.trim() // windows support: need to use /, not \ - if (isWindows) - pattern = pattern.split("\\").join("/") + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } this.options = options this.set = [] @@ -128,7 +129,7 @@ function Minimatch (pattern, options) { this.make() } -Minimatch.prototype.debug = function() {} +Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { @@ -139,7 +140,7 @@ function make () { var options = this.options // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { + if (!options.nocomment && pattern.charAt(0) === '#') { this.comment = true return } @@ -178,7 +179,7 @@ function make () { // filter out everything that didn't compile properly. set = set.filter(function (s) { - return -1 === s.indexOf(false) + return s.indexOf(false) === -1 }) this.debug(this.pattern, set) @@ -189,17 +190,17 @@ function make () { Minimatch.prototype.parseNegate = parseNegate function parseNegate () { var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 + var negate = false + var options = this.options + var negateOffset = 0 if (options.nonegate) return - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { negate = !negate - negateOffset ++ + negateOffset++ } if (negateOffset) this.pattern = pattern.substr(negateOffset) @@ -224,21 +225,22 @@ Minimatch.prototype.braceExpand = braceExpand function braceExpand (pattern, options) { if (!options) { - if (this instanceof Minimatch) + if (this instanceof Minimatch) { options = this.options - else + } else { options = {} + } } - pattern = typeof pattern === "undefined" + pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') } if (options.nobrace || - !pattern.match(/\{.*\}/)) { + !pattern.match(/\{.*\}/)) { // shortcut. no need to expand. return [pattern] } @@ -263,87 +265,86 @@ function parse (pattern, isSub) { var options = this.options // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this function clearStateChar () { if (stateChar) { // we had some state-tracking character // that wasn't consumed by this pass. switch (stateChar) { - case "*": + case '*': re += star hasMagic = true - break - case "?": + break + case '?': re += qmark hasMagic = true - break + break default: - re += "\\"+stateChar - break + re += '\\' + stateChar + break } self.debug('clearStateChar %j %j', stateChar, re) stateChar = false } } - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - this.debug("%s\t%s %s %j", pattern, i, re, c) + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) // skip over any that are escaped. if (escaping && reSpecials[c]) { - re += "\\" + c + re += '\\' + c escaping = false continue } - SWITCH: switch (c) { - case "/": + switch (c) { + case '/': // completely not allowed, even escaped. // Should already be path-split by now. return false - case "\\": + case '\\': clearStateChar() escaping = true - continue + continue // the various stateChar values // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) // all of those are literals inside a class, except that // the glob [!a] means [^a] in regexp if (inClass) { this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" + if (c === '!' && i === classStart + 1) c = '^' re += c continue } @@ -358,70 +359,70 @@ function parse (pattern, isSub) { // just clear the statechar *now*, rather than even diving into // the patternList stuff. if (options.noext) clearStateChar() - continue + continue - case "(": + case '(': if (inClass) { - re += "(" + re += '(' continue } if (!stateChar) { - re += "\\(" + re += '\\(' continue } plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) + patternListStack.push({ type: plType, start: i - 1, reStart: re.length }) // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" + re += stateChar === '!' ? '(?:(?!' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false - continue + continue - case ")": + case ')': if (inClass || !patternListStack.length) { - re += "\\)" + re += '\\)' continue } clearStateChar() hasMagic = true - re += ")" + re += ')' plType = patternListStack.pop().type // negation is (?:(?!js)[^/]*) // The others are (?:) switch (plType) { - case "!": - re += "[^/]*?)" + case '!': + re += '[^/]*?)' break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway } - continue + continue - case "|": + case '|': if (inClass || !patternListStack.length || escaping) { - re += "\\|" + re += '\\|' escaping = false continue } clearStateChar() - re += "|" - continue + re += '|' + continue // these are mostly the same in regexp and glob - case "[": + case '[': // swallow any state-tracking char before the [ clearStateChar() if (inClass) { - re += "\\" + c + re += '\\' + c continue } @@ -429,15 +430,15 @@ function parse (pattern, isSub) { classStart = i reClassStart = re.length re += c - continue + continue - case "]": + case ']': // a right bracket shall lose its special // meaning and represent itself in // a bracket expression if it occurs // first in the list. -- POSIX.2 2.8.3.2 if (i === classStart + 1 || !inClass) { - re += "\\" + c + re += '\\' + c escaping = false continue } @@ -454,11 +455,11 @@ function parse (pattern, isSub) { // to do safely. For now, this is safe and works. var cs = pattern.substring(classStart + 1, i) try { - new RegExp('[' + cs + ']') + RegExp('[' + cs + ']') } catch (er) { // not a valid class! var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]' + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' hasMagic = hasMagic || sp[1] inClass = false continue @@ -469,7 +470,7 @@ function parse (pattern, isSub) { hasMagic = true inClass = false re += c - continue + continue default: // swallow any state char that wasn't consumed @@ -479,8 +480,8 @@ function parse (pattern, isSub) { // no need escaping = false } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" + && !(c === '^' && inClass)) { + re += '\\' } re += c @@ -488,7 +489,6 @@ function parse (pattern, isSub) { } // switch } // for - // handle the case where we left a class open. // "[abc" is valid, equivalent to "\[abc" if (inClass) { @@ -496,9 +496,9 @@ function parse (pattern, isSub) { // this is a huge pita. We now have to re-walk // the contents of the would-be class to re-translate // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] hasMagic = hasMagic || sp[1] } @@ -508,14 +508,13 @@ function parse (pattern, isSub) { // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { + for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + 3) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { if (!$2) { // the | isn't already escaped, so escape it. - $2 = "\\" + $2 = '\\' } // need to escape all those slashes *again*, without escaping the @@ -524,46 +523,44 @@ function parse (pattern, isSub) { // it exactly after itself. That's why this trick works. // // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" + return $1 + $1 + $2 + '|' }) - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail + re = re.slice(0, pl.reStart) + t + '\\(' + tail } // handle trailing things that only matter at the very end. clearStateChar() if (escaping) { // trailing \\ - re += "\\\\" + re += '\\\\' } // only need to apply the nodot start if the re starts with // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true + case '.': + case '[': + case '(': addPatternStart = true } // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re + if (re !== '' && hasMagic) re = '(?=.)' + re if (addPatternStart) re = patternStart + re // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { - return [ re, hasMagic ] + return [re, hasMagic] } // skip the regexp for non-magical patterns @@ -573,8 +570,8 @@ function parse (pattern, isSub) { return globUnescape(pattern) } - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) regExp._glob = pattern regExp._src = re @@ -598,34 +595,38 @@ function makeRe () { // when you just want to work with a regex. var set = this.set - if (!set.length) return this.regexp = false + if (!set.length) { + this.regexp = false + return this.regexp + } var options = this.options var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' var re = set.map(function (pattern) { return pattern.map(function (p) { return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') // must match entire pattern // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" + re = '^(?:' + re + ')$' // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" + if (this.negate) re = '^(?!' + re + ').*$' try { - return this.regexp = new RegExp(re, flags) + this.regexp = new RegExp(re, flags) } catch (ex) { - return this.regexp = false + this.regexp = false } + return this.regexp } minimatch.match = function (list, pattern, options) { @@ -642,23 +643,24 @@ minimatch.match = function (list, pattern, options) { Minimatch.prototype.match = match function match (f, partial) { - this.debug("match", f, this.pattern) + this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. if (this.comment) return false - if (this.empty) return f === "" + if (this.empty) return f === '' - if (f === "/" && partial) return true + if (f === '/' && partial) return true var options = this.options // windows: need to use /, not \ - if (isWindows) - f = f.split("\\").join("/") + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } // treat the test path as a set of pathparts. f = f.split(slashSplit) - this.debug(this.pattern, "split", f) + this.debug(this.pattern, 'split', f) // just ONE of the pattern sets in this.set needs to match // in order for it to be valid. If negating, then just one @@ -666,17 +668,19 @@ function match (f, partial) { // Either way, return on the first hit. var set = this.set - this.debug(this.pattern, "set", set) + this.debug(this.pattern, 'set', set) // Find the basename of the path by looking for the last non-empty segment - var filename; - for (var i = f.length - 1; i >= 0; i--) { + var filename + var i + for (i = f.length - 1; i >= 0; i--) { filename = f[i] if (filename) break } - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f if (options.matchBase && pattern.length === 1) { file = [filename] } @@ -701,23 +705,20 @@ function match (f, partial) { Minimatch.prototype.matchOne = function (file, pattern, partial) { var options = this.options - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) - this.debug("matchOne", file.length, pattern.length) + this.debug('matchOne', file.length, pattern.length) - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") + ; fi++, pi++) { + this.debug('matchOne loop') var p = pattern[pi] - , f = file[fi] + var f = file[fi] this.debug(pattern, p, f) @@ -751,7 +752,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // - matchOne(z/c, c) -> no // - matchOne(c, c) yes, hit var fr = fi - , pr = pi + 1 + var pr = pi + 1 if (pr === pl) { this.debug('** at the end') // a ** at the end will just swallow the rest. @@ -760,19 +761,18 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // options.dot is set. // . and .. are *never* matched by **, for explosively // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false } return true } // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { + while (fr < fl) { var swallowee = file[fr] - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) // XXX remove this slice. Just pass the start index. if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { @@ -782,23 +782,24 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { } else { // can't swallow "." or ".." ever. // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break } // ** swallows a segment, and continue. this.debug('globstar swallow a segment, and continue') - fr ++ + fr++ } } + // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then if (partial) { // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) if (fr === fl) return true } return false @@ -808,16 +809,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. var hit - if (typeof p === "string") { + if (typeof p === 'string') { if (options.nocase) { hit = f.toLowerCase() === p.toLowerCase() } else { hit = f === p } - this.debug("string match", p, f, hit) + this.debug('string match', p, f, hit) } else { hit = f.match(p) - this.debug("pattern match", p, f, hit) + this.debug('pattern match', p, f, hit) } if (!hit) return false @@ -849,26 +850,24 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') return emptyFileEnd } // should be unreachable. - throw new Error("wtf?") + throw new Error('wtf?') } - // replace stuff like \* with * function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") + return s.replace(/\\(.)/g, '$1') } - function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } -},{"brace-expansion":2}],2:[function(require,module,exports){ +},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){ var concatMap = require('concat-map'); var balanced = require('balanced-match'); diff --git a/deps/npm/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/minimatch/minimatch.js index 2bfdf62b7435a3..5e13d6d5b2e62b 100644 --- a/deps/npm/node_modules/minimatch/minimatch.js +++ b/deps/npm/node_modules/minimatch/minimatch.js @@ -1,35 +1,36 @@ module.exports = minimatch minimatch.Minimatch = Minimatch -var isWindows = false -if (typeof process !== 'undefined' && process.platform === 'win32') - isWindows = true +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , expand = require("brace-expansion") +var expand = require('brace-expansion') - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' - // * => any number of characters - , star = qmark + "*?" +// * => any number of characters +var star = qmark + '*?' - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') // "abc" -> { a:true, b:true, c:true } function charSet (s) { - return s.split("").reduce(function (set, c) { + return s.split('').reduce(function (set, c) { set[c] = true return set }, {}) @@ -80,21 +81,20 @@ Minimatch.defaults = function (def) { return minimatch.defaults(def).Minimatch } - function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') } if (!options) options = {} // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { + if (!options.nocomment && pattern.charAt(0) === '#') { return false } // "" only matches "" - if (pattern.trim() === "") return p === "" + if (pattern.trim() === '') return p === '' return new Minimatch(pattern, options).match(p) } @@ -104,16 +104,17 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') } if (!options) options = {} pattern = pattern.trim() // windows support: need to use /, not \ - if (isWindows) - pattern = pattern.split("\\").join("/") + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } this.options = options this.set = [] @@ -127,7 +128,7 @@ function Minimatch (pattern, options) { this.make() } -Minimatch.prototype.debug = function() {} +Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { @@ -138,7 +139,7 @@ function make () { var options = this.options // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { + if (!options.nocomment && pattern.charAt(0) === '#') { this.comment = true return } @@ -177,7 +178,7 @@ function make () { // filter out everything that didn't compile properly. set = set.filter(function (s) { - return -1 === s.indexOf(false) + return s.indexOf(false) === -1 }) this.debug(this.pattern, set) @@ -188,17 +189,17 @@ function make () { Minimatch.prototype.parseNegate = parseNegate function parseNegate () { var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 + var negate = false + var options = this.options + var negateOffset = 0 if (options.nonegate) return - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { negate = !negate - negateOffset ++ + negateOffset++ } if (negateOffset) this.pattern = pattern.substr(negateOffset) @@ -223,21 +224,22 @@ Minimatch.prototype.braceExpand = braceExpand function braceExpand (pattern, options) { if (!options) { - if (this instanceof Minimatch) + if (this instanceof Minimatch) { options = this.options - else + } else { options = {} + } } - pattern = typeof pattern === "undefined" + pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') } if (options.nobrace || - !pattern.match(/\{.*\}/)) { + !pattern.match(/\{.*\}/)) { // shortcut. no need to expand. return [pattern] } @@ -262,87 +264,86 @@ function parse (pattern, isSub) { var options = this.options // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this function clearStateChar () { if (stateChar) { // we had some state-tracking character // that wasn't consumed by this pass. switch (stateChar) { - case "*": + case '*': re += star hasMagic = true - break - case "?": + break + case '?': re += qmark hasMagic = true - break + break default: - re += "\\"+stateChar - break + re += '\\' + stateChar + break } self.debug('clearStateChar %j %j', stateChar, re) stateChar = false } } - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - this.debug("%s\t%s %s %j", pattern, i, re, c) + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) // skip over any that are escaped. if (escaping && reSpecials[c]) { - re += "\\" + c + re += '\\' + c escaping = false continue } - SWITCH: switch (c) { - case "/": + switch (c) { + case '/': // completely not allowed, even escaped. // Should already be path-split by now. return false - case "\\": + case '\\': clearStateChar() escaping = true - continue + continue // the various stateChar values // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) // all of those are literals inside a class, except that // the glob [!a] means [^a] in regexp if (inClass) { this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" + if (c === '!' && i === classStart + 1) c = '^' re += c continue } @@ -357,70 +358,70 @@ function parse (pattern, isSub) { // just clear the statechar *now*, rather than even diving into // the patternList stuff. if (options.noext) clearStateChar() - continue + continue - case "(": + case '(': if (inClass) { - re += "(" + re += '(' continue } if (!stateChar) { - re += "\\(" + re += '\\(' continue } plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) + patternListStack.push({ type: plType, start: i - 1, reStart: re.length }) // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" + re += stateChar === '!' ? '(?:(?!' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false - continue + continue - case ")": + case ')': if (inClass || !patternListStack.length) { - re += "\\)" + re += '\\)' continue } clearStateChar() hasMagic = true - re += ")" + re += ')' plType = patternListStack.pop().type // negation is (?:(?!js)[^/]*) // The others are (?:) switch (plType) { - case "!": - re += "[^/]*?)" + case '!': + re += '[^/]*?)' break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway } - continue + continue - case "|": + case '|': if (inClass || !patternListStack.length || escaping) { - re += "\\|" + re += '\\|' escaping = false continue } clearStateChar() - re += "|" - continue + re += '|' + continue // these are mostly the same in regexp and glob - case "[": + case '[': // swallow any state-tracking char before the [ clearStateChar() if (inClass) { - re += "\\" + c + re += '\\' + c continue } @@ -428,15 +429,15 @@ function parse (pattern, isSub) { classStart = i reClassStart = re.length re += c - continue + continue - case "]": + case ']': // a right bracket shall lose its special // meaning and represent itself in // a bracket expression if it occurs // first in the list. -- POSIX.2 2.8.3.2 if (i === classStart + 1 || !inClass) { - re += "\\" + c + re += '\\' + c escaping = false continue } @@ -453,11 +454,11 @@ function parse (pattern, isSub) { // to do safely. For now, this is safe and works. var cs = pattern.substring(classStart + 1, i) try { - new RegExp('[' + cs + ']') + RegExp('[' + cs + ']') } catch (er) { // not a valid class! var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]' + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' hasMagic = hasMagic || sp[1] inClass = false continue @@ -468,7 +469,7 @@ function parse (pattern, isSub) { hasMagic = true inClass = false re += c - continue + continue default: // swallow any state char that wasn't consumed @@ -478,8 +479,8 @@ function parse (pattern, isSub) { // no need escaping = false } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" + && !(c === '^' && inClass)) { + re += '\\' } re += c @@ -487,7 +488,6 @@ function parse (pattern, isSub) { } // switch } // for - // handle the case where we left a class open. // "[abc" is valid, equivalent to "\[abc" if (inClass) { @@ -495,9 +495,9 @@ function parse (pattern, isSub) { // this is a huge pita. We now have to re-walk // the contents of the would-be class to re-translate // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] hasMagic = hasMagic || sp[1] } @@ -507,14 +507,13 @@ function parse (pattern, isSub) { // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { + for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + 3) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { if (!$2) { // the | isn't already escaped, so escape it. - $2 = "\\" + $2 = '\\' } // need to escape all those slashes *again*, without escaping the @@ -523,46 +522,44 @@ function parse (pattern, isSub) { // it exactly after itself. That's why this trick works. // // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" + return $1 + $1 + $2 + '|' }) - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail + re = re.slice(0, pl.reStart) + t + '\\(' + tail } // handle trailing things that only matter at the very end. clearStateChar() if (escaping) { // trailing \\ - re += "\\\\" + re += '\\\\' } // only need to apply the nodot start if the re starts with // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true + case '.': + case '[': + case '(': addPatternStart = true } // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re + if (re !== '' && hasMagic) re = '(?=.)' + re if (addPatternStart) re = patternStart + re // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { - return [ re, hasMagic ] + return [re, hasMagic] } // skip the regexp for non-magical patterns @@ -572,8 +569,8 @@ function parse (pattern, isSub) { return globUnescape(pattern) } - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) regExp._glob = pattern regExp._src = re @@ -597,34 +594,38 @@ function makeRe () { // when you just want to work with a regex. var set = this.set - if (!set.length) return this.regexp = false + if (!set.length) { + this.regexp = false + return this.regexp + } var options = this.options var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' var re = set.map(function (pattern) { return pattern.map(function (p) { return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') // must match entire pattern // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" + re = '^(?:' + re + ')$' // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" + if (this.negate) re = '^(?!' + re + ').*$' try { - return this.regexp = new RegExp(re, flags) + this.regexp = new RegExp(re, flags) } catch (ex) { - return this.regexp = false + this.regexp = false } + return this.regexp } minimatch.match = function (list, pattern, options) { @@ -641,23 +642,24 @@ minimatch.match = function (list, pattern, options) { Minimatch.prototype.match = match function match (f, partial) { - this.debug("match", f, this.pattern) + this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. if (this.comment) return false - if (this.empty) return f === "" + if (this.empty) return f === '' - if (f === "/" && partial) return true + if (f === '/' && partial) return true var options = this.options // windows: need to use /, not \ - if (isWindows) - f = f.split("\\").join("/") + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } // treat the test path as a set of pathparts. f = f.split(slashSplit) - this.debug(this.pattern, "split", f) + this.debug(this.pattern, 'split', f) // just ONE of the pattern sets in this.set needs to match // in order for it to be valid. If negating, then just one @@ -665,17 +667,19 @@ function match (f, partial) { // Either way, return on the first hit. var set = this.set - this.debug(this.pattern, "set", set) + this.debug(this.pattern, 'set', set) // Find the basename of the path by looking for the last non-empty segment - var filename; - for (var i = f.length - 1; i >= 0; i--) { + var filename + var i + for (i = f.length - 1; i >= 0; i--) { filename = f[i] if (filename) break } - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f if (options.matchBase && pattern.length === 1) { file = [filename] } @@ -700,23 +704,20 @@ function match (f, partial) { Minimatch.prototype.matchOne = function (file, pattern, partial) { var options = this.options - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) - this.debug("matchOne", file.length, pattern.length) + this.debug('matchOne', file.length, pattern.length) - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") + ; fi++, pi++) { + this.debug('matchOne loop') var p = pattern[pi] - , f = file[fi] + var f = file[fi] this.debug(pattern, p, f) @@ -750,7 +751,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // - matchOne(z/c, c) -> no // - matchOne(c, c) yes, hit var fr = fi - , pr = pi + 1 + var pr = pi + 1 if (pr === pl) { this.debug('** at the end') // a ** at the end will just swallow the rest. @@ -759,19 +760,18 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // options.dot is set. // . and .. are *never* matched by **, for explosively // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false } return true } // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { + while (fr < fl) { var swallowee = file[fr] - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) // XXX remove this slice. Just pass the start index. if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { @@ -781,23 +781,24 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { } else { // can't swallow "." or ".." ever. // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break } // ** swallows a segment, and continue. this.debug('globstar swallow a segment, and continue') - fr ++ + fr++ } } + // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then if (partial) { // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) if (fr === fl) return true } return false @@ -807,16 +808,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. var hit - if (typeof p === "string") { + if (typeof p === 'string') { if (options.nocase) { hit = f.toLowerCase() === p.toLowerCase() } else { hit = f === p } - this.debug("string match", p, f, hit) + this.debug('string match', p, f, hit) } else { hit = f.match(p) - this.debug("pattern match", p, f, hit) + this.debug('pattern match', p, f, hit) } if (!hit) return false @@ -848,21 +849,19 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') return emptyFileEnd } // should be unreachable. - throw new Error("wtf?") + throw new Error('wtf?') } - // replace stuff like \* with * function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") + return s.replace(/\\(.)/g, '$1') } - function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json index 4d37a83ebfc535..0b23c287d512a5 100644 --- a/deps/npm/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/minimatch/package.json @@ -6,13 +6,14 @@ }, "name": "minimatch", "description": "a glob matcher in javascript", - "version": "2.0.4", + "version": "2.0.7", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, "main": "minimatch.js", "scripts": { + "pretest": "standard minimatch.js test/*.js", "test": "tap test/*.js", "prepublish": "browserify -o browser.js -e minimatch.js --bare" }, @@ -24,6 +25,7 @@ }, "devDependencies": { "browserify": "^9.0.3", + "standard": "^3.7.2", "tap": "" }, "license": { @@ -34,19 +36,23 @@ "minimatch.js", "browser.js" ], - "gitHead": "c75d17c23df3b6050338ee654a58490255b36ebc", + "gitHead": "4bd6dc22c248c7ea07cc49d63181fe6f6aafae9c", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@2.0.4", - "_shasum": "83bea115803e7a097a78022427287edb762fafed", - "_from": "minimatch@>=2.0.4 <2.1.0", - "_npmVersion": "2.7.1", - "_nodeVersion": "1.4.2", + "_id": "minimatch@2.0.7", + "_shasum": "d23652ab10e663e7d914602e920e21f9f66492be", + "_from": "minimatch@>=2.0.7 <2.1.0", + "_npmVersion": "2.7.6", + "_nodeVersion": "1.7.1", "_npmUser": { "name": "isaacs", - "email": "i@izs.me" + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d23652ab10e663e7d914602e920e21f9f66492be", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.7.tgz" }, "maintainers": [ { @@ -54,10 +60,7 @@ "email": "i@izs.me" } ], - "dist": { - "shasum": "83bea115803e7a097a78022427287edb762fafed", - "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.4.tgz" - }, - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.4.tgz", + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.7.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/rimraf/package.json b/deps/npm/node_modules/rimraf/package.json index 9f836e93040ee9..7b28e7302ac026 100644 --- a/deps/npm/node_modules/rimraf/package.json +++ b/deps/npm/node_modules/rimraf/package.json @@ -1,6 +1,6 @@ { "name": "rimraf", - "version": "2.3.2", + "version": "2.3.3", "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", "author": { @@ -31,19 +31,23 @@ "LICENSE", "README.md" ], - "gitHead": "9d5ab4a8b6986ec909af04f6d91315e98f5893e8", + "gitHead": "ad4efe8102a72c77bf2b13165ecc2229a9a68955", "bugs": { "url": "https://github.com/isaacs/rimraf/issues" }, "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.3.2", - "_shasum": "7304bd9275c401b89103b106b3531c1ef0c02fe9", - "_from": "rimraf@>=2.3.2 <2.4.0", - "_npmVersion": "2.7.0", - "_nodeVersion": "1.4.2", + "_id": "rimraf@2.3.3", + "_shasum": "d0073d8b3010611e8f3ad377b08e9a3c18b98f06", + "_from": "rimraf@>=2.3.3 <2.4.0", + "_npmVersion": "2.7.6", + "_nodeVersion": "1.7.1", "_npmUser": { "name": "isaacs", - "email": "i@izs.me" + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d0073d8b3010611e8f3ad377b08e9a3c18b98f06", + "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.3.3.tgz" }, "maintainers": [ { @@ -51,11 +55,6 @@ "email": "i@izs.me" } ], - "dist": { - "shasum": "7304bd9275c401b89103b106b3531c1ef0c02fe9", - "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.3.2.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.3.2.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.3.3.tgz" } diff --git a/deps/npm/node_modules/rimraf/rimraf.js b/deps/npm/node_modules/rimraf/rimraf.js index c189d5444dc396..8d420d25165ca3 100644 --- a/deps/npm/node_modules/rimraf/rimraf.js +++ b/deps/npm/node_modules/rimraf/rimraf.js @@ -42,13 +42,14 @@ function rimraf (p, options, cb) { cb = options options = {} } - assert(p) - assert(options) - assert(typeof cb === 'function') - defaults(options) + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') - if (!cb) throw new Error("No callback passed to rimraf()") + defaults(options) var busyTries = 0 var errState = null @@ -254,8 +255,9 @@ function rimrafSync (p, options) { options = options || {} defaults(options) - assert(p) - assert(options) + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') var results diff --git a/deps/npm/package.json b/deps/npm/package.json index 6d0c9bc89891e8..304dbc0ff6e42e 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "2.9.0", + "version": "2.9.1", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -19,7 +19,6 @@ "url": "https://github.com/npm/npm" }, "bugs": { - "email": "npm-@googlegroups.com", "url": "http://github.com/npm/npm/issues" }, "directories": { @@ -61,8 +60,8 @@ "ini": "~1.3.3", "init-package-json": "~1.4.2", "lockfile": "~1.0.0", - "lru-cache": "~2.6.1", - "minimatch": "~2.0.4", + "lru-cache": "~2.6.2", + "minimatch": "~2.0.7", "mkdirp": "~0.5.0", "node-gyp": "~1.0.3", "nopt": "~3.0.1", @@ -85,7 +84,7 @@ "realize-package-specifier": "~3.0.0", "request": "~2.55.0", "retry": "~0.6.1", - "rimraf": "~2.3.2", + "rimraf": "~2.3.3", "semver": "~4.3.3", "sha": "~1.3.0", "slide": "~1.1.6", @@ -169,9 +168,10 @@ "write-file-atomic" ], "devDependencies": { + "deep-equal": "~1.0.0", "marked": "~0.3.3", "marked-man": "~0.1.4", - "nock": "~1.6.0", + "nock": "~1.7.1", "npm-registry-couchapp": "~2.6.7", "npm-registry-mock": "~1.0.0", "require-inject": "~1.2.0", diff --git a/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-bar.git.tar.gz b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-bar.git.tar.gz new file mode 100644 index 00000000000000..fb27e17f4812fa Binary files /dev/null and b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-bar.git.tar.gz differ diff --git a/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-buzz.git.tar.gz b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-buzz.git.tar.gz new file mode 100644 index 00000000000000..0ea851fbec946a Binary files /dev/null and b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-buzz.git.tar.gz differ diff --git a/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-foo.git.tar.gz b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-foo.git.tar.gz new file mode 100644 index 00000000000000..8e1abc6d05e704 Binary files /dev/null and b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-dummy-npm-foo.git.tar.gz differ diff --git a/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-npm-git-test.git.tar.gz b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-npm-git-test.git.tar.gz new file mode 100644 index 00000000000000..7a4b9e81317312 Binary files /dev/null and b/deps/npm/test/fixtures/github.amrom.workers.dev-BryanDonovan-npm-git-test.git.tar.gz differ diff --git a/deps/npm/test/tap/bin.js b/deps/npm/test/tap/bin.js new file mode 100644 index 00000000000000..2eb4398432ba2d --- /dev/null +++ b/deps/npm/test/tap/bin.js @@ -0,0 +1,17 @@ +var path = require("path") +var test = require("tap").test +var common = require("../common-tap.js") +var opts = { cwd: __dirname } +var binDir = "../../node_modules/.bin" +var fixture = path.resolve(binDir) + +test('npm bin', function (t) { + common.npm(["bin"], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bin ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = path.resolve(stdout) + t.equal(res, fixture + "\n") + t.end() + }) +}) diff --git a/deps/npm/test/tap/git-races.js b/deps/npm/test/tap/git-races.js new file mode 100644 index 00000000000000..7ac5b233439618 --- /dev/null +++ b/deps/npm/test/tap/git-races.js @@ -0,0 +1,212 @@ +var execFile = require('child_process').execFile +var path = require('path') +var zlib = require('zlib') + +var asyncMap = require('slide').asyncMap +var deepEqual = require('deep-equal') +var fs = require('graceful-fs') +var mkdirp = require('mkdirp') +var once = require('once') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var tar = require('tar') +var test = require('tap').test +var tmpdir = require('osenv').tmpdir +var which = require('which') + +var wd = path.resolve(tmpdir(), 'git-races') +var fixtures = path.resolve(__dirname, '../fixtures') +var testcase = 'github.amrom.workers.dev-BryanDonovan-npm-git-test' +var testcase_git = path.resolve(wd, testcase + '.git') +var testcase_path = path.resolve(wd, testcase) +var testcase_tgz = path.resolve(fixtures, testcase + '.git.tar.gz') + +var testtarballs = [] +var testrepos = {} +var testurls = {} + +/* +This test is specifically for #7202, where the bug was if you tried installing multiple git urls that +pointed at the same repo but had different comittishes, you'd sometimes get the wrong version. +The test cases, provided by @BryanDonovan, have a dependency tree like this: + + top + bar#4.0.0 + buzz#3.0.0 + foo#3.0.0 + buzz#3.0.0 + foo#4.0.0 + buzz#2.0.0 + +But what would happen is that buzz#2.0.0 would end up installed under bar#4.0.0. + +bar#4.0.0 shouldn't have gotten its own copy if buzz, and if it did, it shouldn've been buzz#3.0.0 +*/ + +;['bar', 'foo', 'buzz'].forEach(function (name) { + var mockurl = 'ssh://git@github.com/BryanDonovan/dummy-npm-' + name + '.git' + var realrepo = path.resolve(wd, 'github.amrom.workers.dev-BryanDonovan-dummy-npm-' + name + '.git') + var tgz = path.resolve(fixtures, 'github.amrom.workers.dev-BryanDonovan-dummy-npm-' + name + '.git.tar.gz') + + testrepos[mockurl] = realrepo + testtarballs.push(tgz) +}) + +function cleanup () { + process.chdir(tmpdir()) + rimraf.sync(wd) +} + +var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + // If it's a clone we swap any requests for any of the urls we're mocking + // with the path to the bare repo + if (args[0] === 'clone') { + var m2 = args.length - 2 + var m1 = args.length - 1 + if (testrepos[args[m2]]) { + testurls[args[m1]] = args[m2] + args[m2] = testrepos[args[m2]] + } + execFile(cmd, args, options, cb) + // here, we intercept npm validating the remote origin url on one of the + // clones we've done previously and return the original url that was requested + } else if (args[0] === 'config' && args[1] === '--get' && args[2] === 'remote.origin.url') { + process.nextTick(function () { + cb(null, testurls[options.cwd], '') + }) + } else { + execFile(cmd, args, options, cb) + } + } + } +}) + +function extract (tarball, target, cb) { + cb = once(cb) + fs.createReadStream(tarball).on('error', function (er) { cb(er) }) + .pipe(zlib.createGunzip()).on('error', function (er) { cb(er) }) + .pipe(tar.Extract({path: target})).on('error', function (er) { cb(er) }) + .on('end', function () { + cb() + }) +} + +// Copied from lib/utils/git, because we need to use +// it before calling npm.load and lib/utils/git uses npm.js +// which doesn't allow that. =( =( + +function prefixGitArgs () { + return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : [] +} + +var gitcmd + +function execGit (args, options, cb) { + var fullArgs = prefixGitArgs().concat(args || []) + return execFile(gitcmd, fullArgs, options, cb) +} + +function gitWhichAndExec (args, options, cb) { + if (gitcmd) return execGit(args, options, cb) + + which('git', function (err, pathtogit) { + if (err) { + err.code = 'ENOGIT' + return cb(err) + } + gitcmd = pathtogit + + execGit(args, options, cb) + }) +} + +function andClone (gitdir, repodir, cb) { + return function (er) { + if (er) return cb(er) + gitWhichAndExec(['clone', gitdir, repodir], {}, cb) + } +} + +function setup (cb) { + cleanup() + mkdirp.sync(wd) + + extract(testcase_tgz, wd, andClone(testcase_git, testcase_path, andExtractPackages)) + + function andExtractPackages (er) { + if (er) return cb(er) + asyncMap(testtarballs, function (tgz, done) { + extract(tgz, wd, done) + }, andChdir) + } + function andChdir (er) { + if (er) return cb(er) + process.chdir(testcase_path) + andLoadNpm() + } + function andLoadNpm () { + var opts = { + cache: path.resolve(wd, 'cache') + } + npm.load(opts, cb) + } +} + +test('setup', function (t) { + setup(function (er) { + t.ifError(er, 'setup ran OK') + t.end() + }) +}) + +// there are two (sic) valid trees that can result we don't care which one we +// get in npm@2 +var oneTree = [ + 'npm-git-test@1.0.0', [ + ['dummy-npm-bar@4.0.0', [ + ['dummy-npm-foo@3.0.0', []] + ]], + ['dummy-npm-buzz@3.0.0', []], + ['dummy-npm-foo@4.0.0', [ + ['dummy-npm-buzz@2.0.0', []] + ]] + ] +] +var otherTree = [ + 'npm-git-test@1.0.0', [ + ['dummy-npm-bar@4.0.0', [ + ['dummy-npm-buzz@3.0.0', []], + ['dummy-npm-foo@3.0.0', []] + ]], + ['dummy-npm-buzz@3.0.0', []], + ['dummy-npm-foo@4.0.0', [ + ['dummy-npm-buzz@2.0.0', []] + ]] + ] +] + +test('correct versions are installed for git dependency', function (t) { + t.plan(4) + t.comment('test for https://github.com/npm/npm/issues/7202') + npm.commands.install([], function (er) { + t.ifError(er, 'installed OK') + npm.commands.ls([], true, function (er, result) { + t.ifError(er, 'ls OK') + var simplified = toSimple(result) + t.ok( + deepEqual(simplified, oneTree) || deepEqual(simplified, otherTree), + 'install tree is correct' + ) + }) + }) +}) + +function toSimple (tree) { + var deps = [] + Object.keys(tree.dependencies || {}).forEach(function (dep) { + deps.push(toSimple(tree.dependencies[dep])) + }) + return [ tree['name'] + '@' + tree['version'], deps ] +}