From 632b6ca07556b137c8e4f8522e29ae898a1ae139 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kat=20March=C3=A1n?= Date: Fri, 29 Jan 2016 11:46:48 -0800 Subject: [PATCH] deps: upgrade to npm 2.14.16 PR-URL: https://github.com/nodejs/node/pull/4960 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell --- deps/npm/.travis.yml | 3 +- deps/npm/AUTHORS | 9 + deps/npm/CHANGELOG.md | 121 ++++++++++++++ deps/npm/README.md | 46 ------ deps/npm/bin/node-gyp-bin/node-gyp.cmd | 10 +- deps/npm/doc/cli/npm-dist-tag.md | 25 ++- deps/npm/doc/cli/npm-install.md | 4 +- deps/npm/doc/cli/npm-publish.md | 11 +- deps/npm/doc/cli/npm-update.md | 2 +- deps/npm/doc/files/npm-folders.md | 10 +- deps/npm/doc/files/package.json.md | 4 +- deps/npm/doc/misc/npm-config.md | 2 +- deps/npm/html/doc/README.html | 38 +---- deps/npm/html/doc/api/npm-bin.html | 2 +- deps/npm/html/doc/api/npm-bugs.html | 2 +- deps/npm/html/doc/api/npm-cache.html | 2 +- deps/npm/html/doc/api/npm-commands.html | 2 +- deps/npm/html/doc/api/npm-config.html | 2 +- deps/npm/html/doc/api/npm-deprecate.html | 2 +- deps/npm/html/doc/api/npm-docs.html | 2 +- deps/npm/html/doc/api/npm-edit.html | 2 +- deps/npm/html/doc/api/npm-explore.html | 2 +- deps/npm/html/doc/api/npm-help-search.html | 2 +- deps/npm/html/doc/api/npm-init.html | 2 +- deps/npm/html/doc/api/npm-install.html | 2 +- deps/npm/html/doc/api/npm-link.html | 2 +- deps/npm/html/doc/api/npm-load.html | 2 +- deps/npm/html/doc/api/npm-ls.html | 2 +- deps/npm/html/doc/api/npm-outdated.html | 2 +- deps/npm/html/doc/api/npm-owner.html | 2 +- deps/npm/html/doc/api/npm-pack.html | 2 +- deps/npm/html/doc/api/npm-ping.html | 2 +- deps/npm/html/doc/api/npm-prefix.html | 2 +- deps/npm/html/doc/api/npm-prune.html | 2 +- deps/npm/html/doc/api/npm-publish.html | 2 +- deps/npm/html/doc/api/npm-rebuild.html | 2 +- deps/npm/html/doc/api/npm-repo.html | 2 +- deps/npm/html/doc/api/npm-restart.html | 2 +- deps/npm/html/doc/api/npm-root.html | 2 +- deps/npm/html/doc/api/npm-run-script.html | 2 +- deps/npm/html/doc/api/npm-search.html | 2 +- deps/npm/html/doc/api/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/api/npm-start.html | 2 +- deps/npm/html/doc/api/npm-stop.html | 2 +- deps/npm/html/doc/api/npm-tag.html | 2 +- deps/npm/html/doc/api/npm-test.html | 2 +- deps/npm/html/doc/api/npm-uninstall.html | 2 +- deps/npm/html/doc/api/npm-unpublish.html | 2 +- deps/npm/html/doc/api/npm-update.html | 2 +- deps/npm/html/doc/api/npm-version.html | 2 +- deps/npm/html/doc/api/npm-view.html | 2 +- deps/npm/html/doc/api/npm-whoami.html | 2 +- deps/npm/html/doc/api/npm.html | 4 +- deps/npm/html/doc/cli/npm-access.html | 2 +- deps/npm/html/doc/cli/npm-adduser.html | 2 +- deps/npm/html/doc/cli/npm-bin.html | 2 +- deps/npm/html/doc/cli/npm-bugs.html | 2 +- deps/npm/html/doc/cli/npm-build.html | 2 +- deps/npm/html/doc/cli/npm-bundle.html | 2 +- deps/npm/html/doc/cli/npm-cache.html | 2 +- deps/npm/html/doc/cli/npm-completion.html | 2 +- deps/npm/html/doc/cli/npm-config.html | 2 +- deps/npm/html/doc/cli/npm-dedupe.html | 2 +- deps/npm/html/doc/cli/npm-deprecate.html | 2 +- deps/npm/html/doc/cli/npm-dist-tag.html | 23 ++- deps/npm/html/doc/cli/npm-docs.html | 2 +- deps/npm/html/doc/cli/npm-edit.html | 2 +- deps/npm/html/doc/cli/npm-explore.html | 2 +- deps/npm/html/doc/cli/npm-help-search.html | 2 +- deps/npm/html/doc/cli/npm-help.html | 2 +- deps/npm/html/doc/cli/npm-init.html | 2 +- deps/npm/html/doc/cli/npm-install.html | 6 +- deps/npm/html/doc/cli/npm-link.html | 2 +- deps/npm/html/doc/cli/npm-logout.html | 2 +- deps/npm/html/doc/cli/npm-ls.html | 4 +- deps/npm/html/doc/cli/npm-outdated.html | 2 +- deps/npm/html/doc/cli/npm-owner.html | 2 +- deps/npm/html/doc/cli/npm-pack.html | 2 +- deps/npm/html/doc/cli/npm-ping.html | 2 +- deps/npm/html/doc/cli/npm-prefix.html | 2 +- deps/npm/html/doc/cli/npm-prune.html | 2 +- deps/npm/html/doc/cli/npm-publish.html | 13 +- deps/npm/html/doc/cli/npm-rebuild.html | 2 +- deps/npm/html/doc/cli/npm-repo.html | 2 +- deps/npm/html/doc/cli/npm-restart.html | 2 +- deps/npm/html/doc/cli/npm-rm.html | 2 +- deps/npm/html/doc/cli/npm-root.html | 2 +- deps/npm/html/doc/cli/npm-run-script.html | 2 +- deps/npm/html/doc/cli/npm-search.html | 2 +- deps/npm/html/doc/cli/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/cli/npm-star.html | 2 +- deps/npm/html/doc/cli/npm-stars.html | 2 +- deps/npm/html/doc/cli/npm-start.html | 2 +- deps/npm/html/doc/cli/npm-stop.html | 2 +- deps/npm/html/doc/cli/npm-tag.html | 2 +- deps/npm/html/doc/cli/npm-team.html | 2 +- deps/npm/html/doc/cli/npm-test.html | 2 +- deps/npm/html/doc/cli/npm-uninstall.html | 2 +- deps/npm/html/doc/cli/npm-unpublish.html | 2 +- deps/npm/html/doc/cli/npm-update.html | 4 +- deps/npm/html/doc/cli/npm-version.html | 2 +- deps/npm/html/doc/cli/npm-view.html | 2 +- deps/npm/html/doc/cli/npm-whoami.html | 2 +- deps/npm/html/doc/cli/npm.html | 10 +- deps/npm/html/doc/files/npm-folders.html | 11 +- deps/npm/html/doc/files/npm-global.html | 11 +- deps/npm/html/doc/files/npm-json.html | 6 +- deps/npm/html/doc/files/npmrc.html | 2 +- deps/npm/html/doc/files/package.json.html | 6 +- deps/npm/html/doc/index.html | 2 +- deps/npm/html/doc/misc/npm-coding-style.html | 2 +- deps/npm/html/doc/misc/npm-config.html | 4 +- deps/npm/html/doc/misc/npm-developers.html | 2 +- deps/npm/html/doc/misc/npm-disputes.html | 8 +- deps/npm/html/doc/misc/npm-index.html | 2 +- deps/npm/html/doc/misc/npm-orgs.html | 2 +- deps/npm/html/doc/misc/npm-registry.html | 2 +- deps/npm/html/doc/misc/npm-scope.html | 2 +- deps/npm/html/doc/misc/npm-scripts.html | 2 +- deps/npm/html/doc/misc/removing-npm.html | 2 +- deps/npm/html/doc/misc/semver.html | 2 +- deps/npm/lib/adduser.js | 6 +- deps/npm/lib/cache.js | 3 +- deps/npm/lib/cache/add-local-tarball.js | 4 +- deps/npm/lib/cache/add-remote-tarball.js | 18 +- deps/npm/lib/pack.js | 4 +- deps/npm/lib/utils/correct-mkdir.js | 7 + deps/npm/lib/utils/error-handler.js | 10 +- deps/npm/man/man1/npm-README.1 | 47 ------ deps/npm/man/man1/npm-dist-tag.1 | 25 ++- deps/npm/man/man1/npm-install.1 | 4 +- deps/npm/man/man1/npm-ls.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 11 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man3/npm.3 | 2 +- deps/npm/man/man5/npm-folders.5 | 10 +- deps/npm/man/man5/npm-global.5 | 10 +- deps/npm/man/man5/npm-json.5 | 4 +- deps/npm/man/man5/package.json.5 | 4 +- deps/npm/man/man7/npm-config.7 | 2 +- deps/npm/package.json | 7 +- deps/npm/test/common-tap.js | 2 - deps/npm/test/tap/404-private-registry-scoped.js | 50 ++++-- deps/npm/test/tap/404-private-registry.js | 48 ++++-- .../npm/test/tap/add-named-update-protocol-port.js | 100 +++++++---- deps/npm/test/tap/add-remote-git-fake-windows.js | 5 +- deps/npm/test/tap/add-remote-git-shrinkwrap.js | 9 +- deps/npm/test/tap/add-remote-git.js | 1 + deps/npm/test/tap/adduser-always-auth.js | 184 +++++++++++++++++---- deps/npm/test/tap/adduser-legacy-auth.js | 17 +- deps/npm/test/tap/correct-mkdir.js | 58 +++++++ deps/npm/test/tap/git-dependency-install-link.js | 1 + deps/npm/test/tap/install-link-scripts.js | 3 +- deps/npm/test/tap/noargs-install-config-save.js | 72 ++++---- deps/npm/test/tap/publish-access-scoped.js | 101 +++++------ deps/npm/test/tap/publish-access-unscoped.js | 101 +++++------ deps/npm/test/tap/publish-scoped.js | 126 +++++++------- deps/npm/test/tap/registry.js | 49 +++--- deps/npm/test/tap/sorted-package-json.js | 5 +- 160 files changed, 996 insertions(+), 705 deletions(-) create mode 100644 deps/npm/test/tap/correct-mkdir.js diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 59fddd7..eff4750 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -1,4 +1,5 @@ language: node_js +sudo: false node_js: - "5" - "4" @@ -11,7 +12,7 @@ env: before_install: - "npm config set spin false" - "npm install -g npm/npm#2.x" - - "sudo mkdir -p /var/run/couchdb" + - "mkdir -p /var/run/couchdb" script: "npm run-script test-all" notifications: slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index e1a88d3..2952381 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -329,3 +329,12 @@ ekmartin Rafał Pocztarski Ashley Williams Mark Reeder +Tiago Rodrigues +Chris Rebert +Jeff McMahan +Scott Addie +Julian Simioni +Jimb Esser +Hal Henke +Alexis Campailla +Beau Gunderson diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index f5680c3..9361445 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,124 @@ +### v2.14.16 (2016-01-21): + +Good to see you all again! It's been a while since we had an LTS release, and +the team continues to work hard to both get the issue tracker under control, and +get our test suite to be awesome and reliable. + +This is also the first LTS release of this year. + +We're gonna have an interesting time -- most of our focus this year will be +around stability and maintainability of the CLI, so you might actually end up +seeing a number of updates even over here, just for the sake of making sure +we're stable, that bugs get fixed, and tests have proper coverage. + +What better way to start this effort, then, than getting Travis tests green, fix +a few things here and there, and tweak a bunch of documentation? 😁 + +#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS + +* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) + [#11158](https://github.com/npm/npm/pull/11158) + Fix custom node-gyp env var quoting on Windows. + ([@orangemocha](https://github.com/orangemocha)) +* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) + [#11142](https://github.com/npm/npm/pull/11142) + Fix race condition with `correctMkdir` in the cache directory. + ([@Jimbly](https://github.com/Jimbly)) + +* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) + [#10940](https://github.com/npm/npm/pull/10940) + Ignore failures replacing `package.json`. writeFileAtomic is not atomic in + Windows, it fails if the file is being accessed concurrently. + ([@orangemocha](https://github.com/orangemocha)) +* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) + [#10903](https://github.com/npm/npm/pull/10903) + Add tests for `npm adduser --scope`. + ([@ekmartin](https://github.com/ekmartin)) +* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) + [#10903](https://github.com/npm/npm/pull/10903) + Add a message informing users when they have been successfully logged in. + ([@ekmartin](https://github.com/ekmartin)) +* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) + [#10628](https://github.com/npm/npm/pull/10628) + Tell users how to open an issue with a package that has errored. + ([@trodrigues](https://github.com/trodrigues)) + +#### DOCS DOCS DOCS + +We got a TON of lovely documentation patches, too! Thanks all for submitting! + +* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) + [#11188](https://github.com/npm/npm/pull/11188) + Briefly explain what's included when you publish. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) + [#11150](https://github.com/npm/npm/pull/11150) + Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. + ([@halhenke](https://github.com/halhenke)) +* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) + [#11130](https://github.com/npm/npm/pull/11130) + Nuke "using npm programmatically" section from README. The programmatic npm + API is unsupported, and is not guaranteed not to break in non-major versions. + Removing this section so newcomers aren't encouraged to discover or use it. + ([@ljharb](https://github.com/ljharb)) +* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) + [#11128](https://github.com/npm/npm/pull/11128) + Add link to local paths section indocs for `package.json`. + ([@orangejulius](https://github.com/orangejulius)) +* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) + [#11044](https://github.com/npm/npm/pull/11044) + Update default value documentation for the color option in npm's config. + ([@scottaddie](https://github.com/scottaddie)) +* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) + [#11037](https://github.com/npm/npm/pull/11037) + Correct the name property max length constraint verbiage. + ([@scottaddie](https://github.com/scottaddie)) +* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) + [#10990](https://github.com/npm/npm/pull/10990) + Update folder docs to reflect that process.installPrefix was removed as of + 0.8.x. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) + [#10790](https://github.com/npm/npm/pull/10790) + Clarify that `npm install foo` is the same as `npm install foo@latest` now. + ([@cvrebert](https://github.com/cvrebert)) +* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) + [#10789](https://github.com/npm/npm/pull/10789) + Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the + `pkg@` syntax. + ([@cvrebert](https://github.com/cvrebert)) +* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) + [#10788](https://github.com/npm/npm/pull/10788) + Link to tag docs in docs for `npm publish --tag`. + ([@cvrebert](https://github.com/cvrebert)) +* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) + [#10787](https://github.com/npm/npm/pull/10787) + Explain why the `latest` tag matters. + ([@cvrebert](https://github.com/cvrebert)) +* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) + [#10785](https://github.com/npm/npm/pull/10785) + Replace some quite marks in `npm dist-tag` docs for the sake of consistency. + ([@cvrebert](https://github.com/cvrebert)) + +#### I REALLY LIKE GREEN. CAN YOU TELL? + +So Travis is all green now on `npm@2`, thanks to the removal of nock and a few +other test suite tweaks. This is a fantastic step towards making sure we can all +have confidence in our test suite! 🎉 + +* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) + [#10903](https://github.com/npm/npm/pull/10903) + Get rid of nock from tests, and get Travis green. + ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) +* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) + `npm-registry-couchapp@2.6.12`: + Better 0.8 compatibility, and ability to run in travis docker stuff. This + means the test suite should run a lot faster, too! + ([@iarna](https://github.com/iarna)) +* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) + Get rid of sudo, for Travis! + ([@zkat](https://github.com/zkat)) + ### v2.14.15 (2015-12-10): Did you know that Bob Ross reached the rank of master sergeant in the US Air diff --git a/deps/npm/README.md b/deps/npm/README.md index 43b9da4..5e907a6 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -138,52 +138,6 @@ must remove them yourself manually if you want them gone. Note that this means that future npm installs will not remember the settings that you have chosen. -## Using npm Programmatically - -Although npm can be used programmatically, its API is meant for use by the CLI -*only*, and no guarantees are made regarding its fitness for any other purpose. -If you want to use npm to reliably perform some task, the safest thing to do is -to invoke the desired `npm` command with appropriate arguments. - -The semantic version of npm refers to the CLI itself, rather than the -underlying API. _The internal API is not guaranteed to remain stable even when -npm's version indicates no breaking changes have been made according to -semver._ - -If you _still_ would like to use npm programmatically, it's _possible_. The API -isn't very well documented, but it _is_ rather simple. - -Eventually, npm will be just a thin CLI wrapper around the modules that it -depends on, but for now, there are some things that only the CLI can do. You -should try using one of npm's dependencies first, and only use the API if what -you're trying to do is only supported by npm itself. - -```javascript -var npm = require("npm") -npm.load(myConfigObject, function (er) { - if (er) return handlError(er) - npm.commands.install(["some", "args"], function (er, data) { - if (er) return commandFailed(er) - // command succeeded, and data might have some info - }) - npm.registry.log.on("log", function (message) { .... }) -}) -``` - -The `load` function takes an object hash of the command-line configs. -The various `npm.commands.` functions take an **array** of -positional argument **strings**. The last argument to any -`npm.commands.` function is a callback. Some commands take other -optional arguments. Read the source. - -You cannot set configs individually for any single npm function at this -time. Since `npm` is a singleton, any call to `npm.config.set` will -change the value for *all* npm commands in that process. - -See `./bin/npm-cli.js` for an example of pulling config values off of the -command line arguments using nopt. You may also want to check out `npm -help config` to learn about all the options you can set there. - ## More Docs Check out the [docs](https://docs.npmjs.com/), diff --git a/deps/npm/bin/node-gyp-bin/node-gyp.cmd b/deps/npm/bin/node-gyp-bin/node-gyp.cmd index 83ea8f5..083c9c5 100755 --- a/deps/npm/bin/node-gyp-bin/node-gyp.cmd +++ b/deps/npm/bin/node-gyp-bin/node-gyp.cmd @@ -1,5 +1,5 @@ -if not defined npm_config_node_gyp ( - node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* -) else ( - node %npm_config_node_gyp% %* -) +if not defined npm_config_node_gyp ( + node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* +) else ( + node "%npm_config_node_gyp%" %* +) diff --git a/deps/npm/doc/cli/npm-dist-tag.md b/deps/npm/doc/cli/npm-dist-tag.md index 9213816..06721bb 100644 --- a/deps/npm/doc/cli/npm-dist-tag.md +++ b/deps/npm/doc/cli/npm-dist-tag.md @@ -33,17 +33,30 @@ When installing dependencies, a preferred tagged version may be specified: This also applies to `npm dedupe`. -Publishing a package sets the "latest" tag to the published version unless the +Publishing a package sets the `latest` tag to the published version unless the `--tag` option is used. For example, `npm publish --tag=beta`. +By default, `npm install ` (without any `@` or `@` +specifier) installs the `latest` tag. + ## PURPOSE -Tags can be used to provide an alias instead of version numbers. For -example, `npm` currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version. +Tags can be used to provide an alias instead of version numbers. + +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e.g., `stable`, `beta`, `dev`, `canary`. + +By default, the `latest` tag is used by npm to identify the current version of +a package, and `npm install ` (without any `@` or `@` +specifier) installs the `latest` tag. Typically, projects only use the `latest` +tag for stable release versions, and use other tags for unstable versions such +as prereleases. + +The `next` tag is used by some projects to identify the upcoming version. -A project might choose to have multiple streams of development, e.g., -"stable", "canary". +By default, other than `latest`, no tag has any special significance to npm +itself. ## CAVEATS diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md index 16b31fa..3ae1f0a 100644 --- a/deps/npm/doc/cli/npm-install.md +++ b/deps/npm/doc/cli/npm-install.md @@ -25,7 +25,7 @@ A `package` is: * b) a gzipped tarball containing (a) * c) a url that resolves to (b) * d) a `@` that is published on the registry (see `npm-registry(7)`) with (c) -* e) a `@` that points to (d) +* e) a `@` (see `npm-dist-tag(1)`) that points to (d) * f) a `` that has a "latest" tag satisfying (e) * g) a `` that resolves to (b) @@ -76,7 +76,7 @@ after packing it up into a tarball (b). * `npm install [@/] [--save|--save-dev|--save-optional]`: Do a `@` install, where `` is the "tag" config. (See - `npm-config(7)`.) + `npm-config(7)`. The config's default value is `latest`.) In most cases, this will install the latest version of the module published on npm. diff --git a/deps/npm/doc/cli/npm-publish.md b/deps/npm/doc/cli/npm-publish.md index 8c447d0..cf2f4fe 100644 --- a/deps/npm/doc/cli/npm-publish.md +++ b/deps/npm/doc/cli/npm-publish.md @@ -9,9 +9,11 @@ npm-publish(1) -- Publish a package ## DESCRIPTION -Publishes a package to the registry so that it can be installed by name. See -`npm-developers(7)` for details on what's included in the published package, as -well as details on how the package is built. +Publishes a package to the registry so that it can be installed by name. All +files in the package directory are included if no local `.gitignore` or +`.npmignore` file is present. See `npm-developers(7)` for full details on +what's included in the published package, as well as details on how the package +is built. By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a `npm-scope(7)` in the name @@ -27,7 +29,8 @@ specifying a different default registry or using a `npm-scope(7)` in the name * `[--tag ]` Registers the published package with the given tag, such that `npm install @` will install this version. By default, `npm publish` updates - and `npm install` installs the `latest` tag. + and `npm install` installs the `latest` tag. See `npm-dist-tag(1)` for + details about tags. * `[--access ]` Tells the registry whether this package should be published as public or diff --git a/deps/npm/doc/cli/npm-update.md b/deps/npm/doc/cli/npm-update.md index ce31c28..7285226 100644 --- a/deps/npm/doc/cli/npm-update.md +++ b/deps/npm/doc/cli/npm-update.md @@ -22,7 +22,7 @@ or local) will be updated. As of `npm@2.6.1`, the `npm update` will only inspect top-level packages. Prior versions of `npm` would also recursively inspect all dependencies. -To get the old behavior, use `npm --depth 9999 update`, but be warned that +To get the old behavior, use `npm --depth Infinity update`, but be warned that simultaneous asynchronous update of all packages, including `npm` itself and packages that `npm` depends on, often causes problems up to and including the uninstallation of `npm` itself. diff --git a/deps/npm/doc/files/npm-folders.md b/deps/npm/doc/files/npm-folders.md index 18b7ea5..6846b1f 100644 --- a/deps/npm/doc/files/npm-folders.md +++ b/deps/npm/doc/files/npm-folders.md @@ -20,12 +20,10 @@ This document will tell you what it puts where. ### prefix Configuration The `prefix` config defaults to the location where node is installed. -On most systems, this is `/usr/local`, and most of the time is the same -as node's `process.installPrefix`. - -On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -`{prefix}/bin/node` rather than `{prefix}/node.exe`. +On most systems, this is `/usr/local`. On windows, this is the exact +location of the node.exe binary. On Unix systems, it's one level up, +since node is typically installed at `{prefix}/bin/node` rather than +`{prefix}/node.exe`. When the `global` flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index ff6686b..841e7f4 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -21,7 +21,7 @@ The name is what your thing is called. Some rules: -* The name must be shorter than 214 characters. This includes the scope for +* The name must be less than or equal to 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. @@ -410,7 +410,7 @@ See semver(7) for more details about specifying version ranges. * `git...` See 'Git URLs as Dependencies' below * `user/repo` See 'GitHub URLs' below * `tag` A specific version tagged and published as `tag` See `npm-tag(1)` -* `path/path/path` See Local Paths below +* `path/path/path` See [Local Paths](#local-paths) below For example, these are all valid: diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index 4b9d32b..7647160 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -232,7 +232,7 @@ A client certificate to pass when accessing the registry. ### color -* Default: true on Posix, false on Windows +* Default: true * Type: Boolean or `"always"` If false, never shows colors. If `"always"` then always shows colors. diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 952cd66..3f95219 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -92,42 +92,6 @@ npm config get globalconfig # defaults to /usr/local/etc/npmrc must remove them yourself manually if you want them gone. Note that this means that future npm installs will not remember the settings that you have chosen.

-

Using npm Programmatically

-

Although npm can be used programmatically, its API is meant for use by the CLI -only, and no guarantees are made regarding its fitness for any other purpose. -If you want to use npm to reliably perform some task, the safest thing to do is -to invoke the desired npm command with appropriate arguments.

-

The semantic version of npm refers to the CLI itself, rather than the -underlying API. The internal API is not guaranteed to remain stable even when -npm's version indicates no breaking changes have been made according to -semver.

-

If you still would like to use npm programmatically, it's possible. The API -isn't very well documented, but it is rather simple.

-

Eventually, npm will be just a thin CLI wrapper around the modules that it -depends on, but for now, there are some things that only the CLI can do. You -should try using one of npm's dependencies first, and only use the API if what -you're trying to do is only supported by npm itself.

-
var npm = require("npm")
-npm.load(myConfigObject, function (er) {
-  if (er) return handlError(er)
-  npm.commands.install(["some", "args"], function (er, data) {
-    if (er) return commandFailed(er)
-    // command succeeded, and data might have some info
-  })
-  npm.registry.log.on("log", function (message) { .... })
-})
-
-

The load function takes an object hash of the command-line configs. -The various npm.commands.<cmd> functions take an array of -positional argument strings. The last argument to any -npm.commands.<cmd> function is a callback. Some commands take other -optional arguments. Read the source.

-

You cannot set configs individually for any single npm function at this -time. Since npm is a singleton, any call to npm.config.set will -change the value for all npm commands in that process.

-

See ./bin/npm-cli.js for an example of pulling config values off of the -command line arguments using nopt. You may also want to check out npm -help config to learn about all the options you can set there.

More Docs

Check out the docs, especially the faq.

@@ -163,5 +127,5 @@ will no doubt tell you to put the output in a gist or email.

       - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index c447623..3d92993 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@ to the npm.bin property.

       - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index 6fd7c58..63271d8 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@ friendly for programmatic use.

       - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 0a37bb2..6cf0017 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@ incrementation.

       - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index c672cb3..433d7da 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@ usage, or man 3 npm-<command> for programmatic usage.

       - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index f8d8ae3..9b6e787 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@ functions instead.

       - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index 4b1c74d..92beadc 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.

       - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index 7d8e3ab..b29244a 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@ friendly for programmatic use.

       - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 0931efe..a28d16f 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@ and how this is used.

       - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index 9840342..f2e43f9 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@ sure to use npm rebuild <pkg> if you make any changes.

       - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index 49b22cd..d4c8c15 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 @@ Name of the file that matched        - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index 3fd3a05..38707e9 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@ then go ahead and use this programmatically.

       - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index 127f9b1..19c83de 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@ installed or when an error has been encountered.

       - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 0cce1cb..2cf378d 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@ the package in the current working directory

       - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 571a758..f1a9f5b 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@ config object.

       - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 8e2854e..1a47dbc 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@ dependency will only be output once.

       - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 40f8da3..dc100ab 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@ currently outdated.

       - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index 3297a9b..ffcf76e 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@ that is not implemented at this time.

       - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index 42da30d..c28bd70 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@ overwritten the second time.

       - + diff --git a/deps/npm/html/doc/api/npm-ping.html b/deps/npm/html/doc/api/npm-ping.html index b91891b..c73766f 100644 --- a/deps/npm/html/doc/api/npm-ping.html +++ b/deps/npm/html/doc/api/npm-ping.html @@ -29,4 +29,4 @@ to npm registries.

       - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 96b6f0e..09abb2e 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 3584f02..270157c 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@ package's dependencies list.

       - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index c9c20e7..fde5686 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@ the registry. Overwrites when the "force" environment variable is set        - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index d2c258f..2120b23 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@ the new binary. If no 'packages' parameter is specify, every package wil        - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 6523acc..d9dd7e1 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@ friendly for programmatic use.

       - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index 3d30112..27eb9bd 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -52,5 +52,5 @@ behavior will be accompanied by an increase in major version number

       - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 82ef516..011375f 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index 7c48379..e592eb9 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 @@ assumed to be the command to run. All other elements are ignored.

       - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 1dbd50a..32b7fc9 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@ like).

       - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index 44bbe67..b8891e7 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@ been saved.

       - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index c4f2b9e..bcd448d 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index c1a4969..af31063 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@ in the packages parameter.

       - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 74b9fdc..4975646 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@ used. For more information about how to set this config, check        - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index a532ca8..bdc9c48 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@ in the packages parameter.

       - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 926f984..d5c225f 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@ uninstalled or when an error has been encountered.

       - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index b07dce8..264c005 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@ the root package entry is removed from the registry entirely.

       - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 44335e5..68280b7 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -33,5 +33,5 @@ parameter will be called when done or when an error occurs.

       - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index b6090ec..00c68be 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@ not have exactly one element. The only element should be a version number.

       - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 82aa620..2c8e33b 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@ the field name.

       - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index bf6a497..151b9c0 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index e00ae9e..c075b2d 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@ npm.load([configObject, ]function (er, npm) { npm.commands.install(["package"], cb) })

VERSION

-

2.14.15

+

2.14.16

DESCRIPTION

This is the API documentation for npm. To find documentation of the command line @@ -109,5 +109,5 @@ method names. Use the npm.deref method to find the real name.

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 927ad46..960f36e 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@ with an HTTP 402 status code (logically enough), unless you use        - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 8db22a9..2f39869 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@ precedence over any global configuration.

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 051a17d..a88f31d 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index e534ce8..42bdbf2 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index d9d13e6..b21c444 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@ directly, run:

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

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

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index b17b42d..c7e98ec 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@ completions based on the arguments.

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 5dd370f..5880af7 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@ global config.

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 7708ab7..9602b2a 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@ versions.

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 1eb1e17..c98a34e 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@ something like this:

       - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 7e6d02e..3b8a8a8 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -35,14 +35,23 @@ of using a specific version number:

When installing dependencies, a preferred tagged version may be specified:

npm install --tag <tag>
 

This also applies to npm dedupe.

-

Publishing a package sets the "latest" tag to the published version unless the +

Publishing a package sets the latest tag to the published version unless the --tag option is used. For example, npm publish --tag=beta.

+

By default, npm install <pkg> (without any @<version> or @<tag> +specifier) installs the latest tag.

PURPOSE

-

Tags can be used to provide an alias instead of version numbers. For -example, npm currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version.

-

A project might choose to have multiple streams of development, e.g., -"stable", "canary".

+

Tags can be used to provide an alias instead of version numbers.

+

For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e.g., stable, beta, dev, canary.

+

By default, the latest tag is used by npm to identify the current version of +a package, and npm install <pkg> (without any @<version> or @<tag> +specifier) installs the latest tag. Typically, projects only use the latest +tag for stable release versions, and use other tags for unstable versions such +as prereleases.

+

The next tag is used by some projects to identify the upcoming version.

+

By default, other than latest, no tag has any special significance to npm +itself.

CAVEATS

This command used to be known as npm tag, which only created new tags, and so had a different syntax.

@@ -76,5 +85,5 @@ begin with a number or the letter v.

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

       - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index feb7936..a7549f5 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@ or "notepad" on Windows.        - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 24ab1f1..0708c27 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@ Windows        - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 9126696..f7bd1b3 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@ where the terms were found in the documentation.

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index be9418f..1d297b8 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@ matches are equivalent to specifying a topic name.

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

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 7281f12..4edb8b1 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -30,7 +30,7 @@ by that. See npm-shrinkwrap(1).

  • b) a gzipped tarball containing (a)
  • c) a url that resolves to (b)
  • d) a <name>@<version> that is published on the registry (see npm-registry(7)) with (c)
  • -
  • e) a <name>@<tag> that points to (d)
  • +
  • e) a <name>@<tag> (see npm-dist-tag(1)) that points to (d)
  • f) a <name> that has a "latest" tag satisfying (e)
  • g) a <git remote url> that resolves to (b)
  • @@ -68,7 +68,7 @@ after packing it up into a tarball (b).

  • npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]:

    Do a <name>@<tag> install, where <tag> is the "tag" config. (See - npm-config(7).)

    + npm-config(7). The config's default value is latest.)

    In most cases, this will install the latest version of the module published on npm.

    Example:

    @@ -279,5 +279,5 @@ affects a real use-case, it will be investigated.

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 89c8d82..7d95007 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -72,5 +72,5 @@ include that scope, e.g.

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

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 74c7c4e..9b4ec16 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,7 @@ installed, as well as their dependencies, in a tree-structure.

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

    -
    npm@2.14.15 /path/to/npm
    +
    npm@2.14.16 /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 @@ project.

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 76687c3..a4e1f6f 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -115,5 +115,5 @@ project.

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 73a4578..cbd00b2 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@ that is not implemented at this time.

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

           - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 0b8ffbf..5283e84 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@        - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 40f4bde..9c6eb2f 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@ to contain a package.json file unless -g is also specified.

           - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 2415adf..cbbf757 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -41,5 +41,5 @@ negate NODE_ENV being set to production.

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index fc7d1f6..1b913f9 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -14,9 +14,11 @@
    npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
     npm publish <folder> [--tag <tag>] [--access <public|restricted>]
     

    DESCRIPTION

    -

    Publishes a package to the registry so that it can be installed by name. See -npm-developers(7) for details on what's included in the published package, as -well as details on how the package is built.

    +

    Publishes a package to the registry so that it can be installed by name. All +files in the package directory are included if no local .gitignore or +.npmignore file is present. See npm-developers(7) for full details on +what's included in the published package, as well as details on how the package +is built.

    By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a npm-scope(7) in the name (see package.json(5)).

    @@ -31,7 +33,8 @@ with a package.json file inside.

  • [--tag <tag>] Registers the published package with the given tag, such that npm install <name>@<tag> will install this version. By default, npm publish updates -and npm install installs the latest tag.

    +and npm install installs the latest tag. See npm-dist-tag(1) for +details about tags.

  • [--access <public|restricted>] Tells the registry whether this package should be published as public or @@ -66,5 +69,5 @@ it is removed with npm-unpublish(1).

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 73066ff..e59fa0b 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@ the new binary.

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 3b99716..f5a16a7 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 35c9e2a..d854a29 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number

           - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 689dcea..fc08c17 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@ on its behalf.

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 1352a2c..aef668a 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index acbddd7..f272d18 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -57,5 +57,5 @@ you should write:

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index f00ebb1..02d8bf9 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@ fall on multiple lines.

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index d5b938e..22783a1 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -164,5 +164,5 @@ contents rather than versions.

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

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 70acbfb..e3c7fb4 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@ you will most certainly enjoy this command.

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index f3c3bc5..0abf602 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@ more details.

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 04cddba..c548457 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 48b7051..79f7585 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -62,5 +62,5 @@ that do not begin with a number or the letter v.

           - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index e9c4342..cde3b3b 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,4 +67,4 @@ use the npm access command to grant or revoke the appropriate permi        - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index d732d76..19803e9 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@ true.

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 22a78bc..dea1476 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -57,5 +57,5 @@ npm uninstall dtrace-provider --save-optional        - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 4152dfb..038ef31 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@ package again, a new version number must be used.

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 8182d49..16f572e 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -24,7 +24,7 @@ packages.

    or local) will be updated.

    As of npm@2.6.1, the npm update will only inspect top-level packages. Prior versions of npm would also recursively inspect all dependencies. -To get the old behavior, use npm --depth 9999 update, but be warned that +To get the old behavior, use npm --depth Infinity update, but be warned that simultaneous asynchronous update of all packages, including npm itself and packages that npm depends on, often causes problems up to and including the uninstallation of npm itself.

    @@ -119,5 +119,5 @@ be downgraded.

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

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 6298ee7..6111cdb 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -82,5 +82,5 @@ the field name.

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 9eb9432..f0d59db 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index bdff00e..9fcca12 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    2.14.15

    +

    2.14.16

    DESCRIPTION

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

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

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

  • web: https://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com
  • Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -128,7 +128,7 @@ will no doubt tell you to put the output in a gist or email.

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

    +i@izs.me

    SEE ALSO

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

             - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 2133bfc..9319a3f 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -25,11 +25,10 @@ is installed.

    prefix Configuration

    The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local, and most of the time is the same -as node's process.installPrefix.

    -

    On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -{prefix}/bin/node rather than {prefix}/node.exe.

    +On most systems, this is /usr/local. On windows, this is the exact +location of the node.exe binary. On Unix systems, it's one level up, +since node is typically installed at {prefix}/bin/node rather than +{prefix}/node.exe.

    When the global flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already.

    @@ -184,5 +183,5 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 2133bfc..9319a3f 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -25,11 +25,10 @@ is installed.

    prefix Configuration

    The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local, and most of the time is the same -as node's process.installPrefix.

    -

    On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -{prefix}/bin/node rather than {prefix}/node.exe.

    +On most systems, this is /usr/local. On windows, this is the exact +location of the node.exe binary. On Unix systems, it's one level up, +since node is typically installed at {prefix}/bin/node rather than +{prefix}/node.exe.

    When the global flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already.

    @@ -184,5 +183,5 @@ cannot be found elsewhere. See
    packa        - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 83c4be7..d6987af 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -24,7 +24,7 @@ changes to the version.

    The name is what your thing is called.

    Some rules:

    For example, these are all valid:

    { "dependencies" :
    @@ -565,5 +565,5 @@ ignored.

           - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index b400267..2bfc4db 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -83,5 +83,5 @@ manner.

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 83c4be7..d6987af 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -24,7 +24,7 @@ changes to the version.

    The name is what your thing is called.

    Some rules:

      -
    • The name must be shorter than 214 characters. This includes the scope for +
    • The name must be less than or equal to 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.
    • @@ -309,7 +309,7 @@ tarball or git URL.

    • git... See 'Git URLs as Dependencies' below
    • user/repo See 'GitHub URLs' below
    • tag A specific version tagged and published as tag See npm-tag(1)
    • -
    • path/path/path See Local Paths below
    • +
    • path/path/path See Local Paths below

    For example, these are all valid:

    { "dependencies" :
    @@ -565,5 +565,5 @@ ignored.

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 84b3862..3b9f85f 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -242,5 +242,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 7fd8a50..7c830fb 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -147,5 +147,5 @@ set to anything."

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index bb6d06f..f164cd5 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -196,7 +196,7 @@ explicitly used, and that only GET requests use the cache.

    A client certificate to pass when accessing the registry.

    color

      -
    • Default: true on Posix, false on Windows
    • +
    • Default: true
    • Type: Boolean or "always"

    If false, never shows colors. If "always" then always shows colors. @@ -799,5 +799,5 @@ exit successfully.

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 1d93978..05897b0 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -195,5 +195,5 @@ from a fresh checkout.

           - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 97b0e47..9c7fc3d 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

    SYNOPSIS

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

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

    @@ -51,12 +51,12 @@ Joe's appropriate course of action in each case is the same.

    owner (Bob).
  • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
  • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
  • @@ -112,5 +112,5 @@ things into it.        - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 1ca8232..e9c9b63 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -242,5 +242,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index d5417ce..8089d1a 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@        - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 79d1aea..405abe5 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@ effectively implement the entire CouchDB API anyway.

           - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 2394c00..082079e 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@ that registry instead.

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

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 9fc9ae1..782b6cb 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -302,5 +302,5 @@ range, use the satisfies(version, range) function.

           - + diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index 367f3ba..42c029e 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -169,7 +169,9 @@ function save (c, u, cb) { }) } - log.info("adduser", "Authorized user %s", u.u) - npm.config.save("user", cb) + log.info('adduser', 'Authorized user %s', u.u) + var scopeMessage = scope ? ' to scope ' + scope : '' + console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + npm.config.save('user', cb) }) } diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 2e11be3..851636c 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -337,6 +337,7 @@ function afterAdd (cb) { return function (er, data) { // Save the resolved, shasum, etc. into the data so that the next // time we load from this cached data, we have all the same info. + // Ignore if it fails. var pj = path.join(cachedPackageRoot(data), "package", "package.json") var done = inflight(pj, cb) @@ -347,7 +348,7 @@ function afterAdd (cb) { return function (er, data) { if (er) return done(er) writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) { if (!er) log.verbose("afterAdd", pj, "written") - return done(er, data) + return done(null, data) }) }) }} diff --git a/deps/npm/lib/cache/add-local-tarball.js b/deps/npm/lib/cache/add-local-tarball.js index e84b66d..f078039 100644 --- a/deps/npm/lib/cache/add-local-tarball.js +++ b/deps/npm/lib/cache/add-local-tarball.js @@ -13,7 +13,7 @@ var mkdir = require("mkdirp") , chownr = require("chownr") , inflight = require("inflight") , once = require("once") - , writeStream = require("fs-write-stream-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") , randomBytes = require("crypto").pseudoRandomBytes // only need uniqueness module.exports = addLocalTarball @@ -166,7 +166,7 @@ function addTmpTarball_ (tgz, data, shasum, cb) { if (er) return cb(er) var read = fs.createReadStream(tgz) - var write = writeStream(target, { mode: npm.modes.file }) + var write = writeStreamAtomic(target, { mode: npm.modes.file }) var fin = cs.uid && cs.gid ? chown : done read.on("error", cb).pipe(write).on("error", cb).on("close", fin) }) diff --git a/deps/npm/lib/cache/add-remote-tarball.js b/deps/npm/lib/cache/add-remote-tarball.js index 66d2200..d04e9da 100644 --- a/deps/npm/lib/cache/add-remote-tarball.js +++ b/deps/npm/lib/cache/add-remote-tarball.js @@ -4,7 +4,8 @@ var mkdir = require("mkdirp") , path = require("path") , sha = require("sha") , retry = require("retry") - , createWriteStream = require("fs-write-stream-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") + , PassThrough = require('readable-stream').PassThrough , npm = require("../npm.js") , inflight = require("inflight") , addLocalTarball = require("./add-local-tarball.js") @@ -78,8 +79,8 @@ function fetchAndShaCheck (u, tmp, shasum, auth, cb) { return cb(er, response) } - var tarball = createWriteStream(tmp, { mode : npm.modes.file }) - tarball.on("error", function (er) { + var tarball = writeStreamAtomic(tmp, { mode: npm.modes.file }) + tarball.on('error', function (er) { cb(er) tarball.destroy() }) @@ -105,6 +106,15 @@ function fetchAndShaCheck (u, tmp, shasum, auth, cb) { }) }) - response.pipe(tarball) + // 0.8 http streams have a bug, where if they're paused with data in + // their buffers when the socket closes, they call `end` before emptying + // those buffers, which results in the entire pipeline ending and thus + // the point that applied backpressure never being able to trigger a + // `resume`. + // We work around this by piping into a pass through stream that has + // unlimited buffering. The pass through stream is from readable-stream + // and is thus a current streams3 implementation that is free of these + // bugs even on 0.8. + response.pipe(PassThrough({highWaterMark: Infinity})).pipe(tarball) }) } diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js index a5ce900..ab81cc2 100644 --- a/deps/npm/lib/pack.js +++ b/deps/npm/lib/pack.js @@ -11,7 +11,7 @@ var npm = require("./npm.js") , chain = require("slide").chain , path = require("path") , cwd = process.cwd() - , writeStream = require('fs-write-stream-atomic') + , writeStreamAtomic = require('fs-write-stream-atomic') , cachedPackageRoot = require("./cache/cached-package-root.js") pack.usage = "npm pack " @@ -52,7 +52,7 @@ function pack_ (pkg, cb) { var cached = path.join(cachedPackageRoot(data), "package.tgz") , from = fs.createReadStream(cached) - , to = writeStream(fname) + , to = writeStreamAtomic(fname) , errState = null from.on("error", cb_) diff --git a/deps/npm/lib/utils/correct-mkdir.js b/deps/npm/lib/utils/correct-mkdir.js index 650c56f..c0a31bd 100644 --- a/deps/npm/lib/utils/correct-mkdir.js +++ b/deps/npm/lib/utils/correct-mkdir.js @@ -10,6 +10,13 @@ var stats = {} var effectiveOwner module.exports = function correctMkdir (path, cb) { cb = dezalgo(cb) + cb = inflight('correctMkdir:' + path, cb) + if (!cb) { + return log.verbose('correctMkdir', path, 'correctMkdir already in flight; waiting') + } else { + log.verbose('correctMkdir', path, 'correctMkdir not in flight; initializing') + } + if (stats[path]) return cb(null, stats[path]) fs.stat(path, function (er, st) { diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index dac6a17..e5daf20 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -11,7 +11,7 @@ var cbCalled = false , exitCode = 0 , rollbacks = npm.rollbacks , chain = require("slide").chain - , writeStream = require("fs-write-stream-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") , nameValidator = require("validate-npm-package-name") @@ -187,8 +187,10 @@ function errorHandler (er) { ,"not with npm itself." ,"Tell the author that this fails on your system:" ," "+er.script - ,"You can get their info via:" - ," npm owner ls "+er.pkgname + ,'You can get information on how to open an issue for this project with:' + ,' npm bugs ' + er.pkgname + ,'Or if that isn\'t available, you can get their info via:', + ,' npm owner ls ' + er.pkgname ,"There is likely additional logging output above." ].join("\n")) break @@ -391,7 +393,7 @@ function writeLogFile (cb) { writingLogFile = true wroteLogFile = true - var fstr = writeStream("npm-debug.log") + var fstr = writeStreamAtomic("npm-debug.log") , os = require("os") , out = "" diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index dae1e04..7cf7be7 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -142,53 +142,6 @@ Uninstalling npm does not remove configuration files by default\. You must remove them yourself manually if you want them gone\. Note that this means that future npm installs will not remember the settings that you have chosen\. -.SH Using npm Programmatically -.P -Although npm can be used programmatically, its API is meant for use by the CLI -\fIonly\fR, and no guarantees are made regarding its fitness for any other purpose\. -If you want to use npm to reliably perform some task, the safest thing to do is -to invoke the desired \fBnpm\fP command with appropriate arguments\. -.P -The semantic version of npm refers to the CLI itself, rather than the -underlying API\. \fIThe internal API is not guaranteed to remain stable even when -npm's version indicates no breaking changes have been made according to -semver\.\fR -.P -If you \fIstill\fR would like to use npm programmatically, it's \fIpossible\fR\|\. The API -isn't very well documented, but it \fIis\fR rather simple\. -.P -Eventually, npm will be just a thin CLI wrapper around the modules that it -depends on, but for now, there are some things that only the CLI can do\. You -should try using one of npm's dependencies first, and only use the API if what -you're trying to do is only supported by npm itself\. -.P -.RS 2 -.nf -var npm = require("npm") -npm\.load(myConfigObject, function (er) { - if (er) return handlError(er) - npm\.commands\.install(["some", "args"], function (er, data) { - if (er) return commandFailed(er) - // command succeeded, and data might have some info - }) - npm\.registry\.log\.on("log", function (message) { \.\.\.\. }) -}) -.fi -.RE -.P -The \fBload\fP function takes an object hash of the command\-line configs\. -The various \fBnpm\.commands\.\fP functions take an \fBarray\fR of -positional argument \fBstrings\fR\|\. The last argument to any -\fBnpm\.commands\.\fP function is a callback\. Some commands take other -optional arguments\. Read the source\. -.P -You cannot set configs individually for any single npm function at this -time\. Since \fBnpm\fP is a singleton, any call to \fBnpm\.config\.set\fP will -change the value for \fIall\fR npm commands in that process\. -.P -See \fB\|\./bin/npm\-cli\.js\fP for an example of pulling config values off of the -command line arguments using nopt\. You may also want to check out \fBnpm -help config\fP to learn about all the options you can set there\. .SH More Docs .P Check out the docs \fIhttps://docs\.npmjs\.com/\fR, diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index a9c7786..3c17975 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -47,16 +47,29 @@ npm install \-\-tag .P This also applies to \fBnpm dedupe\fP\|\. .P -Publishing a package sets the "latest" tag to the published version unless the +Publishing a package sets the \fBlatest\fP tag to the published version unless the \fB\-\-tag\fP option is used\. For example, \fBnpm publish \-\-tag=beta\fP\|\. +.P +By default, \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. .SH PURPOSE .P -Tags can be used to provide an alias instead of version numbers\. For -example, \fBnpm\fP currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version\. +Tags can be used to provide an alias instead of version numbers\. +.P +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e\.g\., \fBstable\fP, \fBbeta\fP, \fBdev\fP, \fBcanary\fP\|\. +.P +By default, the \fBlatest\fP tag is used by npm to identify the current version of +a package, and \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. Typically, projects only use the \fBlatest\fP +tag for stable release versions, and use other tags for unstable versions such +as prereleases\. +.P +The \fBnext\fP tag is used by some projects to identify the upcoming version\. .P -A project might choose to have multiple streams of development, e\.g\., -"stable", "canary"\. +By default, other than \fBlatest\fP, no tag has any special significance to npm +itself\. .SH CAVEATS .P This command used to be known as \fBnpm tag\fP, which only created new tags, and so diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index b93805f..ff754dc 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -33,7 +33,7 @@ c) a url that resolves to (b) .IP \(bu 2 d) a \fB@\fP that is published on the registry (see npm help 7 \fBnpm\-registry\fP) with (c) .IP \(bu 2 -e) a \fB@\fP that points to (d) +e) a \fB@\fP (see npm help \fBnpm\-dist\-tag\fP) that points to (d) .IP \(bu 2 f) a \fB\fP that has a "latest" tag satisfying (e) .IP \(bu 2 @@ -86,7 +86,7 @@ after packing it up into a tarball (b)\. .IP \(bu 2 \fBnpm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional]\fP: Do a \fB@\fP install, where \fB\fP is the "tag" config\. (See - npm help 7 \fBnpm\-config\fP\|\.) + npm help 7 \fBnpm\-config\fP\|\. The config's default value is \fBlatest\fP\|\.) In most cases, this will install the latest version of the module published on npm\. Example: diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index d865fee..9d539a0 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\fP in npm's source tree will show: .P .RS 2 .nf -npm@2.14.15 /path/to/npm +npm@2.14.16 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index a41165a..9da086a 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -11,9 +11,11 @@ npm publish [\-\-tag ] [\-\-access ] .RE .SH DESCRIPTION .P -Publishes a package to the registry so that it can be installed by name\. See -npm help 7 \fBnpm\-developers\fP for details on what's included in the published package, as -well as details on how the package is built\. +Publishes a package to the registry so that it can be installed by name\. All +files in the package directory are included if no local \fB\|\.gitignore\fP or +\fB\|\.npmignore\fP file is present\. See npm help 7 \fBnpm\-developers\fP for full details on +what's included in the published package, as well as details on how the package +is built\. .P By default npm will publish to the public registry\. This can be overridden by specifying a different default registry or using a npm help 7 \fBnpm\-scope\fP in the name @@ -30,7 +32,8 @@ with a package\.json file inside\. \fB[\-\-tag ]\fP Registers the published package with the given tag, such that \fBnpm install @\fP will install this version\. By default, \fBnpm publish\fP updates -and \fBnpm install\fP installs the \fBlatest\fP tag\. +and \fBnpm install\fP installs the \fBlatest\fP tag\. See npm help \fBnpm\-dist\-tag\fP for +details about tags\. .IP \(bu 2 \fB[\-\-access ]\fP Tells the registry whether this package should be published as public or diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 84681d6..e503368 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -25,7 +25,7 @@ or local) will be updated\. .P As of \fBnpm@2\.6\.1\fP, the \fBnpm update\fP will only inspect top\-level packages\. Prior versions of \fBnpm\fP would also recursively inspect all dependencies\. -To get the old behavior, use \fBnpm \-\-depth 9999 update\fP, but be warned that +To get the old behavior, use \fBnpm \-\-depth Infinity update\fP, but be warned that simultaneous asynchronous update of all packages, including \fBnpm\fP itself and packages that \fBnpm\fP depends on, often causes problems up to and including the uninstallation of \fBnpm\fP itself\. diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 994fedd..69c3fc4 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.14.15 +2.14.16 .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 bfa750d..af3395c 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.14.15 +2.14.16 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index f337b9b..a95cd88 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -25,12 +25,10 @@ If you need both, then install it in both places, or use \fBnpm link\fP\|\. .SS prefix Configuration .P The \fBprefix\fP config defaults to the location where node is installed\. -On most systems, this is \fB/usr/local\fP, and most of the time is the same -as node's \fBprocess\.installPrefix\fP\|\. -.P -On windows, this is the exact location of the node\.exe binary\. On Unix -systems, it's one level up, since node is typically installed at -\fB{prefix}/bin/node\fP rather than \fB{prefix}/node\.exe\fP\|\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. .P When the \fBglobal\fP flag is set, npm installs things into this prefix\. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index f337b9b..a95cd88 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -25,12 +25,10 @@ If you need both, then install it in both places, or use \fBnpm link\fP\|\. .SS prefix Configuration .P The \fBprefix\fP config defaults to the location where node is installed\. -On most systems, this is \fB/usr/local\fP, and most of the time is the same -as node's \fBprocess\.installPrefix\fP\|\. -.P -On windows, this is the exact location of the node\.exe binary\. On Unix -systems, it's one level up, since node is typically installed at -\fB{prefix}/bin/node\fP rather than \fB{prefix}/node\.exe\fP\|\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. .P When the \fBglobal\fP flag is set, npm installs things into this prefix\. When it is not set, it uses the root of the current package, or the diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index a08ee53..ba383dd 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -21,7 +21,7 @@ The name is what your thing is called\. Some rules: .RS 0 .IP \(bu 2 -The name must be shorter than 214 characters\. This includes the scope for +The name must be less than or equal to 214 characters\. This includes the scope for scoped packages\. .IP \(bu 2 The name can't start with a dot or an underscore\. @@ -506,7 +506,7 @@ See npm help 7 semver for more details about specifying version ranges\. .IP \(bu 2 \fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP .IP \(bu 2 -\fBpath/path/path\fP See Local Paths below +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below .RE .P diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index a08ee53..ba383dd 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -21,7 +21,7 @@ The name is what your thing is called\. Some rules: .RS 0 .IP \(bu 2 -The name must be shorter than 214 characters\. This includes the scope for +The name must be less than or equal to 214 characters\. This includes the scope for scoped packages\. .IP \(bu 2 The name can't start with a dot or an underscore\. @@ -506,7 +506,7 @@ See npm help 7 semver for more details about specifying version ranges\. .IP \(bu 2 \fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP .IP \(bu 2 -\fBpath/path/path\fP See Local Paths below +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below .RE .P diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index fb33aeb..b932989 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -323,7 +323,7 @@ A client certificate to pass when accessing the registry\. .SS color .RS 0 .IP \(bu 2 -Default: true on Posix, false on Windows +Default: true .IP \(bu 2 Type: Boolean or \fB"always"\fP diff --git a/deps/npm/package.json b/deps/npm/package.json index d6831c8..23bb9f2 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "2.14.15", + "version": "2.14.16", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -173,10 +173,9 @@ ], "devDependencies": { "deep-equal": "~1.0.1", - "marked": "~0.3.3", + "marked": "~0.3.5", "marked-man": "~0.1.5", - "nock": "~1.9.0", - "npm-registry-couchapp": "~2.6.7", + "npm-registry-couchapp": "~2.6.12", "npm-registry-mock": "~1.0.0", "require-inject": "~1.3.0", "sprintf-js": "~1.0.2", diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js index de0a9f4..3537df6 100644 --- a/deps/npm/test/common-tap.js +++ b/deps/npm/test/common-tap.js @@ -18,8 +18,6 @@ process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') process.env.random_env_var = 'foo' -// suppress warnings about using a prerelease version of node -process.env.npm_config_node_version = process.version.replace(/-.*$/, '') var bin = exports.bin = require.resolve('../bin/npm-cli.js') var chain = require('slide').chain diff --git a/deps/npm/test/tap/404-private-registry-scoped.js b/deps/npm/test/tap/404-private-registry-scoped.js index 681fff0..84251b1 100644 --- a/deps/npm/test/tap/404-private-registry-scoped.js +++ b/deps/npm/test/tap/404-private-registry-scoped.js @@ -1,22 +1,38 @@ -var nock = require('nock') var test = require('tap').test -var npm = require('../../') -var addNamed = require('../../lib/cache/add-named') +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var server -test('scoped package names not mangled on error with non-root registry', function test404 (t) { - nock('http://localhost:1337') - .get('/registry/@scope%2ffoo') - .reply(404, { - error: 'not_found', - reason: 'document not found' - }) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed('@scope/foo', '*', null, function checkError (err) { - t.ok(err, 'should error') - t.equal(err.message, '404 Not Found: @scope/foo', 'should have package name in error') - t.equal(err.pkgid, '@scope/foo', 'err.pkgid should match package name') +test('scoped package names not mangled on error with non-root registry', function (t) { + common.npm( + [ + 'cache', + 'add', + '@scope/foo@*', + '--force' + ], + {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'correctly handled 404') + t.equal(code, 1, 'exited with error') + t.match(stderr, /404 Not found/, 'should notify the sort of error as a 404') + t.match(stderr, /@scope\/foo/, 'should have package name in error') t.end() - }) - }) + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server.done() + server.close() + t.end() }) diff --git a/deps/npm/test/tap/404-private-registry.js b/deps/npm/test/tap/404-private-registry.js index 698f5b8..bc716b1 100644 --- a/deps/npm/test/tap/404-private-registry.js +++ b/deps/npm/test/tap/404-private-registry.js @@ -1,25 +1,39 @@ -var nock = require('nock') var test = require('tap').test var path = require('path') -var npm = require('../../') -var addNamed = require('../../lib/cache/add-named') +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var server var packageName = path.basename(__filename,'.js') -test('package names not mangled on error with non-root registry', function test404 (t) { - nock('http://localhost:1337') - .get('/registry/' + packageName) - .reply(404, { - error: 'not_found', - reason: 'document not found' - }) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed(packageName, '*', null, function checkError (err) { - t.ok(err, 'should error') - t.equal(err.message, '404 Not Found: ' + packageName, 'should have package name in error') - t.equal(err.pkgid, packageName, 'err.pkgid should match package name') +test('package names not mangled on error with non-root registry', function (t) { + common.npm( + [ + 'cache', + 'add', + packageName + '@*' + ], + {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'correctly handled 404') + t.equal(code, 1, 'exited with error') + t.match(stderr, packageName, 'should have package name in error') t.end() - }) - }) + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server.done() + server.close() + t.end() }) diff --git a/deps/npm/test/tap/add-named-update-protocol-port.js b/deps/npm/test/tap/add-named-update-protocol-port.js index 52832db..38b500d 100644 --- a/deps/npm/test/tap/add-named-update-protocol-port.js +++ b/deps/npm/test/tap/add-named-update-protocol-port.js @@ -1,9 +1,10 @@ 'use strict' var path = require('path') -var nock = require('nock') var test = require('tap').test -var npm = require('../../') -var addNamed = require('../../lib/cache/add-named') +var common = require('../common-tap') +var mr = require('npm-registry-mock') +var server1 +var server2 var packageName = path.basename(__filename, '.js') @@ -36,46 +37,77 @@ var fooiPkg = { } } -test('tarball paths should update port if updating protocol', function (t) { - nock('http://localhost:1337/registry') - .get('/' + packageName) - .reply(200, fooPkg) - - nock('http://localhost:1337/registry') - .get('/' + packageName + '/-/' + packageName + '-0.0.0.tgz') - .reply(200, '1') - - nock('http://localhost:1338/registry') - .get('/' + packageName + '/-/' + packageName + '-0.0.0.tgz') - .reply(404) - - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed(packageName, '0.0.0', null, function checkPath (err, pkg) { - t.ifError(err, 'addNamed worked') +test('setup', function (t) { + mr({ + port: 1337, + throwOnUnmatched: true + }, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server1 = s + mr({ + port: 1338, + throwOnUnmatched: true + }, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server2 = s t.end() }) }) }) -test('tarball paths should NOT update if different hostname', function (t) { - nock('http://localhost:1337/registry') - .get('/' + iPackageName) - .reply(200, fooiPkg) +test('tarball paths should update port if updating protocol', function (t) { + server1.get('/registry/' + packageName).reply(200, fooPkg) + server1.get( + '/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz' + ).reply(200, '1') - nock('http://127.0.0.1:1338/registry') - .get('/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz') - .reply(200, '1') + common.npm( + [ + 'cache', + 'add', + packageName + '@0.0.0', + '--registry', + 'http://localhost:1337/registry' + ], + {}, + function (er, code, stdout, stderr) { + if (er) { throw er } + t.equal(code, 0, 'addNamed worked') + server1.done() + t.end() + } + ) +}) - nock('http://127.0.0.1:1337/registry') - .get('/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz') - .reply(404) +test('tarball paths should NOT update if different hostname', function (t) { + server1.get('/registry/' + iPackageName).reply(200, fooiPkg) + server2.get( + '/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz' + ).reply(200, '1') - npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { - addNamed(iPackageName, '0.0.0', null, function checkPath (err, pkg) { - t.ifError(err, 'addNamed worked') + common.npm( + [ + 'cache', + 'add', + iPackageName + '@0.0.0', + '--registry', + 'http://localhost:1337/registry' + ], + {}, + function (er, code, stdout, stderr) { + if (er) { throw er } + t.equal(code, 0, 'addNamed worked') + server1.done() + server2.done() t.end() - }) - }) + } + ) +}) +test('cleanup', function (t) { + t.pass('cleaned up') + server1.close() + server2.close() + t.end() }) diff --git a/deps/npm/test/tap/add-remote-git-fake-windows.js b/deps/npm/test/tap/add-remote-git-fake-windows.js index c9c9dd4..66d7080 100644 --- a/deps/npm/test/tap/add-remote-git-fake-windows.js +++ b/deps/npm/test/tap/add-remote-git-fake-windows.js @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - child: 'git://localhost:1233/child.git' + child: 'git://localhost:1234/child.git' } }, null, 2) + '\n' @@ -93,7 +93,8 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', - '--port=1233' + '--reuseaddr', + '--port=1234' ], { cwd: pkg, diff --git a/deps/npm/test/tap/add-remote-git-shrinkwrap.js b/deps/npm/test/tap/add-remote-git-shrinkwrap.js index f298235..e1882d8 100644 --- a/deps/npm/test/tap/add-remote-git-shrinkwrap.js +++ b/deps/npm/test/tap/add-remote-git-shrinkwrap.js @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1235/child.git#master' + 'child': 'git://localhost:1234/child.git#master' } }, null, 2) + '\n' @@ -68,7 +68,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { var shrinkwrap = require(resolve(pkg, 'npm-shrinkwrap.json')) t.equal( shrinkwrap.dependencies.child.from, - 'git://localhost:1235/child.git#master', + 'git://localhost:1234/child.git#master', 'npm shrinkwrapped from correctly' ) @@ -82,7 +82,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { t.equal( shrinkwrap.dependencies.child.resolved, - 'git://localhost:1235/child.git#' + treeish, + 'git://localhost:1234/child.git#' + treeish, 'npm shrinkwrapped resolved correctly' ) @@ -121,7 +121,8 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', - '--port=1235' + '--reuseaddr', + '--port=1234' ], { cwd: pkg, diff --git a/deps/npm/test/tap/add-remote-git.js b/deps/npm/test/tap/add-remote-git.js index e33d09c..24abf33 100644 --- a/deps/npm/test/tap/add-remote-git.js +++ b/deps/npm/test/tap/add-remote-git.js @@ -80,6 +80,7 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', + '--reuseaddr', '--port=1234' ], { diff --git a/deps/npm/test/tap/adduser-always-auth.js b/deps/npm/test/tap/adduser-always-auth.js index 6a451b4..db0e8b4 100644 --- a/deps/npm/test/tap/adduser-always-auth.js +++ b/deps/npm/test/tap/adduser-always-auth.js @@ -14,7 +14,24 @@ var responses = { "Email" : "u@p.me\n" } -function mocks(server) { +function verifyStdout (runner, successMessage, t) { + var remaining = Object.keys(responses).length + return function (chunk) { + if (remaining > 0) { + remaining-- + + var label = chunk.toString('utf8').split(':')[0] + runner.stdin.write(responses[label]) + + if (remaining === 0) runner.stdin.end() + } else { + var message = chunk.toString('utf8').trim() + t.equal(message, successMessage) + } + } +} + +function mocks (server) { server.filteringRequestBody(function (r) { if (r.match(/\"_id\":\"org\.couchdb\.user:u\"/)) { return "auth" @@ -46,17 +63,140 @@ test("npm login", function (t) { }) }) - var o = "", e = "", remaining = Object.keys(responses).length - runner.stdout.on("data", function (chunk) { - remaining-- - o += chunk + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) +}) - var label = chunk.toString("utf8").split(":")[0] - runner.stdin.write(responses[label]) +test('npm login --scope uses :registry as its URI', function (t) { + var port = common.port + 1 + var uri = 'http://localhost:' + port + '/' + var scope = '@myco' + common.npm( + [ + 'config', + '--userconfig', outfile, + 'set', + scope + ':registry', + uri + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') - if (remaining === 0) runner.stdin.end() + mr({ port: port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(scope + ':registry=' + uri), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + scope + ' on ' + uri + '.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) + }) +}) + +test('npm login --scope makes sure is prefixed by an @', function (t) { + var port = common.port + 1 + var uri = 'http://localhost:' + port + '/' + var scope = 'myco' + var prefixedScope = '@' + scope + common.npm( + [ + '--userconfig', outfile, + 'config', + 'set', + prefixedScope + ':registry', + uri + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + + mr({ port: port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(prefixedScope + ':registry=' + uri), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + prefixedScope + ' on ' + uri + '.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) + }) +}) + +test('npm login --scope --registry uses as its URI', function (t) { + var scope = '@myco' + common.npm( + [ + '--userconfig', outfile, + 'config', + 'set', + scope + ':registry', + 'invalidurl' + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + + mr({ port: common.port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--registry', common.registry, + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(scope + ':registry=' + common.registry), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + scope + ' on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) }) - runner.stderr.on("data", function (chunk) { e += chunk }) }) }) @@ -83,17 +223,8 @@ test("npm login --always-auth", function (t) { }) }) - var o = "", e = "", remaining = Object.keys(responses).length - runner.stdout.on("data", function (chunk) { - remaining-- - o += chunk - - var label = chunk.toString("utf8").split(":")[0] - runner.stdin.write(responses[label]) - - if (remaining === 0) runner.stdin.end() - }) - runner.stderr.on("data", function (chunk) { e += chunk }) + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) }) }) @@ -120,17 +251,8 @@ test("npm login --no-always-auth", function (t) { }) }) - var o = "", e = "", remaining = Object.keys(responses).length - runner.stdout.on("data", function (chunk) { - remaining-- - o += chunk - - var label = chunk.toString("utf8").split(":")[0] - runner.stdin.write(responses[label]) - - if (remaining === 0) runner.stdin.end() - }) - runner.stderr.on("data", function (chunk) { e += chunk }) + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) }) }) diff --git a/deps/npm/test/tap/adduser-legacy-auth.js b/deps/npm/test/tap/adduser-legacy-auth.js index f9829c6..890a3fd 100644 --- a/deps/npm/test/tap/adduser-legacy-auth.js +++ b/deps/npm/test/tap/adduser-legacy-auth.js @@ -73,17 +73,20 @@ test('npm login', function (t) { }) }) - var o = '', e = '', remaining = Object.keys(responses).length + var remaining = Object.keys(responses).length runner.stdout.on('data', function (chunk) { - remaining-- - o += chunk + if (remaining > 0) { + remaining-- - var label = chunk.toString('utf8').split(':')[0] - runner.stdin.write(responses[label]) + var label = chunk.toString('utf8').split(':')[0] + runner.stdin.write(responses[label]) - if (remaining === 0) runner.stdin.end() + if (remaining === 0) runner.stdin.end() + } else { + var message = chunk.toString('utf8').trim() + t.equal(message, 'Logged in as u on ' + common.registry + '/.') + } }) - runner.stderr.on('data', function (chunk) { e += chunk }) }) }) diff --git a/deps/npm/test/tap/correct-mkdir.js b/deps/npm/test/tap/correct-mkdir.js new file mode 100644 index 0000000..4bfc6b1 --- /dev/null +++ b/deps/npm/test/tap/correct-mkdir.js @@ -0,0 +1,58 @@ +var test = require('tap').test +var assert = require('assert') +var path = require('path') +var requireInject = require('require-inject') +var cache_dir = path.resolve(__dirname, 'correct-mkdir') + +test('correct-mkdir: no race conditions', function (t) { + var mock_fs = {} + var did_hook = false + mock_fs.stat = function (path, cb) { + if (path === cache_dir) { + // Return a non-matching owner + cb(null, { + uid: +process.uid + 1, + isDirectory: function () { + return true + } + }) + if (!did_hook) { + did_hook = true + doHook() + } + } else { + assert.ok(false, 'Unhandled stat path: ' + path) + } + } + var chown_in_progress = 0 + var mock_chownr = function (path, uid, gid, cb) { + ++chown_in_progress + process.nextTick(function () { + --chown_in_progress + cb(null) + }) + } + var mocks = { + 'graceful-fs': mock_fs, + 'chownr': mock_chownr + } + var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks) + + var calls_in_progress = 3 + function handleCallFinish () { + t.equal(chown_in_progress, 0, 'should not return while chown still in progress') + if (!--calls_in_progress) { + t.end() + } + } + function doHook () { + // This is fired during the first correctMkdir call, after the stat has finished + // but before the chownr has finished + // Buggy old code will fail and return a cached value before initial call is done + correctMkdir(cache_dir, handleCallFinish) + } + // Initial call + correctMkdir(cache_dir, handleCallFinish) + // Immediate call again in case of race condition there + correctMkdir(cache_dir, handleCallFinish) +}) diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js index cbb256d..4fb1415 100644 --- a/deps/npm/test/tap/git-dependency-install-link.js +++ b/deps/npm/test/tap/git-dependency-install-link.js @@ -135,6 +135,7 @@ function setup (cb) { '--listen=localhost', '--export-all', '--base-path=.', + '--reuseaddr', '--port=1234' ], { diff --git a/deps/npm/test/tap/install-link-scripts.js b/deps/npm/test/tap/install-link-scripts.js index bd8b9a3..5ad2fea 100644 --- a/deps/npm/test/tap/install-link-scripts.js +++ b/deps/npm/test/tap/install-link-scripts.js @@ -122,7 +122,8 @@ function setup () { path.join(dep, 'package.json'), JSON.stringify(dependency, null, 2) ) - fs.writeFileSync(path.join(dep, 'bin', 'foo'), foo, { mode: '0755' }) + fs.writeFileSync(path.join(dep, 'bin', 'foo'), foo) + fs.chmod(path.join(dep, 'bin', 'foo'), '0755') } function cleanup () { diff --git a/deps/npm/test/tap/noargs-install-config-save.js b/deps/npm/test/tap/noargs-install-config-save.js index b6900b4..28aa8f2 100644 --- a/deps/npm/test/tap/noargs-install-config-save.js +++ b/deps/npm/test/tap/noargs-install-config-save.js @@ -1,18 +1,14 @@ -var common = require("../common-tap.js") -var test = require("tap").test -var npm = require.resolve("../../bin/npm-cli.js") -var path = require("path") -var fs = require("fs") -var rimraf = require("rimraf") -var mkdirp = require("mkdirp") +var common = require('../common-tap.js') +var test = require('tap').test +var path = require('path') +var fs = require('fs') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') var mr = require("npm-registry-mock") -var spawn = require("child_process").spawn -var node = process.execPath - -var pkg = path.resolve(process.env.npm_config_tmp || "/tmp", - "noargs-install-config-save") +var pkg = path.resolve(process.env.npm_config_tmp || '/tmp', + 'noargs-install-config-save') function writePackageJson() { rimraf.sync(pkg) @@ -29,33 +25,32 @@ function writePackageJson() { }), "utf8") } -function createChild (args) { - var env = { - "npm_config_save": true, - "npm_config_registry": common.registry, - "npm_config_cache": pkg + "/cache", - HOME: process.env.HOME, - Path: process.env.PATH, - PATH: process.env.PATH - } - - if (process.platform === "win32") - env.npm_config_cache = "%APPDATA%\\npm-cache" - - return spawn(node, args, { - cwd: pkg, - env: env - }) +var env = { + 'npm_config_save': true, + 'npm_config_registry': common.registry, + 'npm_config_cache': pkg + '/cache', + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH +} +var OPTS = { + cwd: pkg, + env: env } test("does not update the package.json with empty arguments", function (t) { writePackageJson() - t.plan(1) + t.plan(2) - mr({port : common.port}, function (er, s) { - var child = createChild([npm, "install"]) - child.on("close", function () { - var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) + mr({ port: common.port }, function (er, s) { + common.npm('install', OPTS, function (er, code, stdout, stderr) { + if (er) throw er + t.is(code, 0) + if (code !== 0) { + console.error('#', stdout) + console.error('#', stderr) + } + var text = JSON.stringify(fs.readFileSync(pkg + '/package.json', 'utf8')) s.close() t.ok(text.indexOf("\"dependencies") === -1) }) @@ -64,11 +59,12 @@ test("does not update the package.json with empty arguments", function (t) { test("updates the package.json (adds dependencies) with an argument", function (t) { writePackageJson() - t.plan(1) + t.plan(2) - mr({port : common.port}, function (er, s) { - var child = createChild([npm, "install", "underscore"]) - child.on("close", function () { + mr({ port: common.port }, function (er, s) { + common.npm(['install', 'underscore'], OPTS, function (er, code, stdout, stderr) { + if (er) throw er + t.is(code, 0) s.close() var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) t.ok(text.indexOf("\"dependencies") !== -1) diff --git a/deps/npm/test/tap/publish-access-scoped.js b/deps/npm/test/tap/publish-access-scoped.js index e734ebf..5d2b4e3 100644 --- a/deps/npm/test/tap/publish-access-scoped.js +++ b/deps/npm/test/tap/publish-access-scoped.js @@ -1,81 +1,70 @@ var fs = require("fs") var path = require("path") -var test = require("tap").test -var mkdirp = require("mkdirp") -var rimraf = require("rimraf") -var nock = require("nock") - -var npm = require("../../") -var common = require("../common-tap.js") +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') +var common = require('../common-tap') +var server var pkg = path.join(__dirname, "publish-access") -// TODO: nock uses setImmediate, breaks 0.8: replace with mockRegistry -if (!global.setImmediate) { - global.setImmediate = function () { - var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) - setTimeout.apply(this, args) - } -} - -test("setup", function (t) { - mkdirp(path.join(pkg, "cache"), function () { - var configuration = { - cache : path.join(pkg, "cache"), - loglevel : "silent", - registry : common.registry - } - - npm.load(configuration, next) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + t.pass('setup done') + server = s + t.end() }) +}) - function next (er) { - t.ifError(er, "npm loaded successfully") +test('scoped packages pass public access if set', function (t) { + server.filteringRequestBody(function (body) { + t.doesNotThrow(function () { + var parsed = JSON.parse(body) + t.equal(parsed.access, 'public', 'access level is correct') + }, 'converted body back into object') + return true + }).put('/@bigco%2fpublish-access', true).reply(201, {ok: true}) - process.chdir(pkg) + mkdirp(path.join(pkg, 'cache'), function () { fs.writeFile( path.join(pkg, "package.json"), JSON.stringify({ - name: "@bigco/publish-access", - version: "1.2.5" + name: '@bigco/publish-access', + version: '1.2.5', + public: true }), "ascii", function (er) { - t.ifError(er) - - t.pass("setup done") - t.end() + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', path.join(pkg, 'cache'), + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') + + server.done() + t.end() + } + ) } ) - } -}) - -test("scoped packages pass public access if set", function (t) { - var put = nock(common.registry) - .put("/@bigco%2fpublish-access") - .reply(201, verify) - - npm.config.set("access", "public") - npm.commands.publish([], false, function (er) { - t.ifError(er, "published without error") - - put.done() - t.end() }) - - function verify (_, body) { - t.doesNotThrow(function () { - var parsed = JSON.parse(body) - t.equal(parsed.access, "public", "access level is correct") - }, "converted body back into object") - - return {ok: true} - } }) test("cleanup", function (t) { process.chdir(__dirname) + server.close() rimraf(pkg, function (er) { t.ifError(er) diff --git a/deps/npm/test/tap/publish-access-unscoped.js b/deps/npm/test/tap/publish-access-unscoped.js index 023bfba..4d193cf 100644 --- a/deps/npm/test/tap/publish-access-unscoped.js +++ b/deps/npm/test/tap/publish-access-unscoped.js @@ -1,81 +1,70 @@ var fs = require("fs") var path = require("path") -var test = require("tap").test -var mkdirp = require("mkdirp") -var rimraf = require("rimraf") -var nock = require("nock") - -var npm = require("../../") -var common = require("../common-tap.js") +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') +var common = require('../common-tap') +var server var pkg = path.join(__dirname, "publish-access-unscoped") -// TODO: nock uses setImmediate, breaks 0.8: replace with mockRegistry -if (!global.setImmediate) { - global.setImmediate = function () { - var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) - setTimeout.apply(this, args) - } -} - -test("setup", function (t) { - mkdirp(path.join(pkg, "cache"), function () { - var configuration = { - cache : path.join(pkg, "cache"), - loglevel : "silent", - registry : common.registry - } - - npm.load(configuration, next) +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + t.pass('setup done') + server = s + t.end() }) +}) - function next (er) { - t.ifError(er, "npm loaded successfully") +test('unscoped packages can be explicitly set as public', function (t) { + server.filteringRequestBody(function (body) { + t.doesNotThrow(function () { + var parsed = JSON.parse(body) + t.equal(parsed.access, 'public', 'access level is correct') + }, 'converted body back into object') + return true + }).put('/publish-access', true).reply(201, {ok: true}) - process.chdir(pkg) + mkdirp(path.join(pkg, 'cache'), function () { fs.writeFile( path.join(pkg, "package.json"), JSON.stringify({ - name: "publish-access", - version: "1.2.5" + name: 'publish-access', + version: '1.2.5', + public: true }), "ascii", function (er) { - t.ifError(er) - - t.pass("setup done") - t.end() + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', path.join(pkg, 'cache'), + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') + + server.done() + t.end() + } + ) } ) - } -}) - -test("unscoped packages can be explicitly set as public", function (t) { - var put = nock(common.registry) - .put("/publish-access") - .reply(201, verify) - - npm.config.set("access", "public") - npm.commands.publish([], false, function (er) { - t.ifError(er, "published without error") - - put.done() - t.end() }) - - function verify (_, body) { - t.doesNotThrow(function () { - var parsed = JSON.parse(body) - t.equal(parsed.access, "public", "access level is correct") - }, "converted body back into object") - - return {ok: true} - } }) test("cleanup", function (t) { process.chdir(__dirname) + server.close() rimraf(pkg, function (er) { t.ifError(er) diff --git a/deps/npm/test/tap/publish-scoped.js b/deps/npm/test/tap/publish-scoped.js index f74ca2e..cf0daed 100644 --- a/deps/npm/test/tap/publish-scoped.js +++ b/deps/npm/test/tap/publish-scoped.js @@ -1,68 +1,64 @@ var fs = require("fs") var path = require("path") -var test = require("tap").test -var mkdirp = require("mkdirp") -var rimraf = require("rimraf") -var nock = require("nock") - -var npm = require("../../") -var common = require("../common-tap.js") +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var common = require('../common-tap') +var mr = require('npm-registry-mock') var pkg = path.join(__dirname, "prepublish_package") -test("setup", function (t) { - mkdirp(path.join(pkg, "cache"), next) - - function next () { - process.chdir(pkg) - fs.writeFile( - path.join(pkg, "package.json"), - JSON.stringify({ - name: "@bigco/publish-organized", - version: "1.2.5" - }), - "ascii", - function (er) { - t.ifError(er) - - t.pass("setup done") - t.end() - } - ) - } +var server + +function setup () { + cleanup() + mkdirp.sync(path.join(pkg, 'cache')) + + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify({ + name: '@bigco/publish-organized', + version: '1.2.5' + }, null, 2), + 'ascii') +} + +test('setup', function (t) { + setup() + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) }) -test("npm publish should honor scoping", function (t) { - var put = nock(common.registry) - .put("/@bigco%2fpublish-organized") - .reply(201, verify) - - var configuration = { - cache : path.join(pkg, "cache"), - loglevel : "silent", - registry : "http://nonexistent.lvh.me", - "//localhost:1337/:username" : "username", - "//localhost:1337/:_password" : new Buffer("password").toString("base64"), - "//localhost:1337/:email" : "ogd@aoaioxxysz.net" - } - - npm.load(configuration, onload) - - function onload (er) { - t.ifError(er, "npm bootstrapped successfully") - - npm.config.set("@bigco:registry", common.registry) - npm.commands.publish([], false, function (er) { - t.ifError(er, "published without error") - - put.done() - - t.end() - }) - } +test('npm publish should honor scoping', function (t) { + server.filteringRequestBody(verify) + .put('/@bigco%2fpublish-organized', true) + .reply(201, {ok: true}) + + var configuration = [ + 'progress=false', + 'cache=' + path.join(pkg, 'cache'), + 'registry=http://nonexistent.lvh.me', + '//localhost:1337/:username=username', + '//localhost:1337/:_password=' + new Buffer('password').toString('base64'), + '//localhost:1337/:email=' + 'ogd@aoaioxxysz.net', + '@bigco:registry=' + common.registry + ] + var configFile = path.join(pkg, '.npmrc') + + fs.writeFileSync(configFile, configuration.join('\n') + '\n') + + common.npm(['publish'], {'cwd': pkg}, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'published without error') + server.done() + t.end() + }) - function verify (_, body) { + function verify (body) { t.doesNotThrow(function () { var parsed = JSON.parse(body) var current = parsed.versions["1.2.5"] @@ -79,15 +75,17 @@ test("npm publish should honor scoping", function (t) { ) }, "converted body back into object") - return {ok: true} + return true } }) -test("cleanup", function (t) { - process.chdir(__dirname) - rimraf(pkg, function (er) { - t.ifError(er) - - t.end() - }) +test('cleanup', function (t) { + server.close() + t.end() + cleanup() }) + +function cleanup () { + process.chdir(__dirname) + rimraf.sync(pkg) +} diff --git a/deps/npm/test/tap/registry.js b/deps/npm/test/tap/registry.js index 060d9b6..fef099f 100644 --- a/deps/npm/test/tap/registry.js +++ b/deps/npm/test/tap/registry.js @@ -38,11 +38,14 @@ function runTests () { cwd: ca, stdio: "inherit" } - common.npm(["install"], opts, function (err, code) { + common.npm(["install"], opts, function (err, code, stdout, stderr) { if (err) { throw err } if (code) { return test("need install to work", function (t) { - t.fail("install failed with: " + code) + t.fail( + "install failed with: " + code + + '\nstdout: ' + stdout + + '\nstderr: ' + stderr) t.end() }) @@ -52,24 +55,32 @@ function runTests () { env: env, stdio: "inherit" } - common.npm(["test", "--", "-Rtap"], opts, function (err, code) { - if (err) { throw err } - if (code) { - return test("need test to work", function (t) { - t.fail("test failed with: " + code) - t.end() + common.npm( + [ + "test", "--", "-Rtap" + ], + opts, + function (err, code, stdout, stderr) { + if (err) { throw err } + if (code) { + return test("need test to work", function (t) { + t.fail( + "test failed with: " + code + + '\nstdout: ' + stdout + + '\nstderr: ' + stderr) + t.end() + }) + } + opts = { + cwd: ca, + env: env, + stdio: "inherit" + } + common.npm(["prune", "--production"], opts, function (err, code) { + if (err) { throw err } + process.exit(code || 0) + }) }) } - opts = { - cwd: ca, - env: env, - stdio: "inherit" - } - common.npm(["prune", "--production"], opts, function (err, code) { - if (err) { throw err } - process.exit(code || 0) - }) - }) - } }) } diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js index 6853cf3..726b56f 100644 --- a/deps/npm/test/tap/sorted-package-json.js +++ b/deps/npm/test/tap/sorted-package-json.js @@ -27,7 +27,7 @@ test("sorting dependencies", function (t) { mr({port : common.port}, function (er, s) { // underscore is already in the package.json, // but --save will trigger a rewrite with sort - var child = spawn(node, [npm, "install", "--save", "underscore@1.3.3"], { + var child = spawn(node, [npm, "install", "--save", "underscore@1.3.3", "--no-progress", "--loglevel=error"], { cwd: pkg, env: { "npm_config_registry": common.registry, @@ -38,7 +38,8 @@ test("sorting dependencies", function (t) { HOME: process.env.HOME, Path: process.env.PATH, PATH: process.env.PATH - } + }, + stdio: ['ignore', 'ignore', process.stderr] }) child.on("close", function (code) { -- 2.7.4