diff options
author | Rebecca Turner <me@re-becca.org> | 2017-01-13 03:58:10 +0300 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2017-01-26 18:56:33 +0300 |
commit | f73bc91756373f4057b3fc139dc5968049fa8c2a (patch) | |
tree | 054d2dc51e9e0950542dae62569ea1aacaf8a015 /deps | |
parent | bfd3c7e626306cc5793618da2b56d37df338eb05 (diff) |
deps: upgrade npm to 4.1.1
PR-URL: https://github.com/nodejs/node/pull/10781
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps')
347 files changed, 4716 insertions, 6785 deletions
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 96d8ecf66c4..c91ce4a2c61 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -445,3 +445,4 @@ Alex Jordan <alex@strugee.net> Ville Lahdenvuo <tuhoojabotti@gmail.com> Natalie Wolfe <nwolfe@newrelic.com> Andrew Schmadel <aschmadel@learningobjects.com> +Jonah Moses <jonahkmoses@gmail.com> diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index fe673ef39c0..5ba932dc6af 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,216 @@ +### v4.1.1 (2016-12-16) + +This fixes a bug in the metrics reporting where, if you had enabled it then +installs would create a metrics reporting process, that would create a +metrics reporting process, that would… well, you get the idea. The only +way to actually kill these processes is to turn off your networking, then +on MacOS/Linux kill them with `kill -9`. Alternatively you can just reboot. + +Anyway, this is a quick release to fix that bug: + +* [`51c393f`](https://github.com/npm/npm/commit/51c393feff5f4908c8a9fb02baef505b1f2259be) + [#15237](https://github.com/npm/npm/pull/15237) + Don't launch a metrics sender process if we're runnning from a metrics + sender process. + ([@iarna](https://github.com/iarna)) + +### v4.1.0 (2016-12-15) + +I'm really excited about `npm@4.1.0`. I know, I know, I'm kinda overexcited +in my changelogs, but this one is GREAT. We've got a WHOLE NEW subcommand, I +mean, when was the last time you saw that? YEARS! And we have the beginnings +of usage metrics reporting. Then there's a fix for a really subtle bug that +resulted in `shasum` errors. And then we also have a few more bug fixes and +other improvements. + +#### ANONYMOUS METRIC REPORTING + +We're adding the ability for you all to help us track the quality of your +experiences using `npm`. Metrics will be sent if you run: + +``` +npm config set send-metrics true +``` + +Then `npm` will report to `registry.npmjs.org` the number of successful and +failed installations you've had. The data contains no identifying +information and npm will not attempt to correlate things like IP address +with the metrics being submitted. + +Currently we only track number of successful and failed installations. In +the future we would like to find additional metrics to help us better +quantify the quality of the `npm` experience. + +* [`190a658`](https://github.com/npm/npm/commit/190a658c4222f6aa904cbc640fc394a5c875e4db) + [#15084](https://github.com/npm/npm/pull/15084) + Add facility for recording and reporting success metrics. + ([@iarna](https://github.com/iarna)) +* [`87afc8b`](https://github.com/npm/npm/commit/87afc8b466f553fb49746c932c259173de48d0a4) + [npm/npm-registry-client#147](https://github.com/npm/npm-registry-client/pull/148) + `npm-registry-client@7.4.5`: + Add support for sending anonymous CLI metrics. + ([@iarna](https://github.com/iarna), + [@sisidovski](https://github.com/sisidovski)) + +### NPM DOCTOR + +<pre> +<u>Check</u> <u>Value</u> <u>Recommendation</u> +npm ping ok +npm -v v4.0.5 +node -v v4.6.1 Use node v6.9.2 +npm config get registry https://registry.npmjs.org/ +which git /Users/rebecca/bin/git +Perms check on cached files ok +Perms check on global node_modules ok +Perms check on local node_modules ok +Checksum cached files ok +</pre> + +It's a rare day that we add a new command to `npm`, so I'm excited to +present to you `npm doctor`. It checks for a number of common problems and +provides some recommended solutions. It was put together through the hard +work of [@watilde](https://github.com/watilde). + +* [`2359505`](https://github.com/npm/npm/commit/23595055669f76c9fe8f5f1cf4a705c2e794f0dc) + [`0209ee5`](https://github.com/npm/npm/commit/0209ee50448441695fbf9699019d34178b69ba73) + [#14582](https://github.com/npm/npm/pull/14582) + Add new `npm doctor` to give your project environment a health check. + ([@watilde](https://github.com/watilde)) + +#### FIX MAJOR SOURCE OF SHASUM ERRORS + +If you've been getting intermittent shasum errors then you'll be pleased to +know that we've tracked down at least one source of them, if not THE source +of them. + +* [`87afc8b`](https://github.com/npm/npm/commit/87afc8b466f553fb49746c932c259173de48d0a4) + [#14626](https://github.com/npm/npm/issues/14626) + [npm/npm-registry-client#148](https://github.com/npm/npm-registry-client/pull/148) + `npm-registry-client@7.4.5`: + Fix a bug where an `ECONNRESET` while fetching a package file would result + in a partial download that would be reported as a "shasum mismatch". It + now throws away the partial download and retries it. + ([@iarna](https://github.com/iarna)) + +#### FILE URLS AND NODE.JS 7 + +When `npm` was formatting `file` URLs we took advantage of `url.format` to +construct them. Node.js 7 changed the behavior in such a way that our use of +`url.format` stopped producing URLs that we could make use of. + +The reasons for this have to do with the `file` URL specification and how +invalid (according to the specification) URLs are handled. How this changed +is most easily explained with a table: + +<table> +<tr><th></th><th>URL</th><th>Node.js <= 6</th><th><tt>npm</tt>'s understanding</th><th>Node.js 7</th><th><tt>npm</tt>'s understanding</th></tr> +<tr><td>VALID</td><td><tt>file:///abc/def</tt></td><td><tt>file:///abc/def</tt></td><td><tt>/abc/def</tt></td><td><tt>file:///abc/def</tt></td><td><tt>/abc/def</tt></td></tr> +<tr><td>invalid</td><td><tt>file:/abc/def</tt></td><td><tt>file:/abc/def</tt></td><td><tt>/abc/def</tt></td><td><tt>file:///abc/def</tt></td><td><tt>/abc/def</tt></td></tr> +<tr><td>invalid</td><td><tt>file:abc/def</tt></td><td><tt>file:abc/def</tt></td><td><tt>$CWD/abc/def</tt></td><td><tt>file://abc/def</tt></td><td><tt>/def</tt> on the <tt>abc</tt> host</td></tr> +<tr><td>invalid</td><td><tt>file:../abc/def</tt></td><td><tt>file:../abc/def</tt></td><td><tt>$CWD/../abc/def</tt></td><td><tt>file://../abc/def</tt></td><td><tt>/abc/def</tt> on the <tt>..</tt> host</td></tr> +</table> + +So the result was that passing a `file` URL that npm had received that used +through Node.js 7's `url.format` changed its meaning as far as `npm` was +concerned. As those kinds of URLs are, per the specification, invalid, how +they should be handled is undefined and so the change in Node.js wasn't a +bug per se. + +Our solution is to stop using `url.format` when constructing this kind of +URL. + +* [`173935b`](https://github.com/npm/npm/commit/173935b4298e09c4fdcb8f3a44b06134d5aff181) + [#15114](https://github.com/npm/npm/issues/15114) + Stop using `url.format` for relative local dep paths. + ([@zkat](https://github.com/zkat)) + +#### EXTRANEOUS LIFECYCLE SCRIPT EXECUTION WHEN REMOVING + +* [`afb1dfd`](https://github.com/npm/npm/commit/afb1dfd944e57add25a05770c0d52d983dc4e96c) + [#15090](https://github.com/npm/npm/pull/15090) + Skip top level lifecycles when uninstalling. + ([@iarna](https://github.com/iarna)) + +#### REFACTORING AND INTERNALS + +* [`c9b279a`](https://github.com/npm/npm/commit/c9b279aca0fcb8d0e483e534c7f9a7250e2a9392) + [#15205](https://github.com/npm/npm/pull/15205) + [#15196](https://github.com/npm/npm/pull/15196) + Only have one function that determines which version of a package to use + given a specifier and a list of versions. + ([@iarna](https://github.com/iarna), + [@zkat](https://github.com/zkat)) + +* [`981ce63`](https://github.com/npm/npm/commit/981ce6395e7892dde2591b44e484e191f8625431) + [#15090](https://github.com/npm/npm/pull/15090) + Rewrite prune to use modern npm plumbing. + ([@iarna](https://github.com/iarna)) + +* [`bc4b739`](https://github.com/npm/npm/commit/bc4b73911f58a11b4a2d28b49e24b4dd7365f95b) + [#15089](https://github.com/npm/npm/pull/15089) + Rename functions and variables in the module that computes what changes to + make to your installation. + ([@iarna](https://github.com/iarna)) + +* [`2449f74`](https://github.com/npm/npm/commit/2449f74a202b3efdb1b2f5a83356a78ea9ecbe35) + [#15089](https://github.com/npm/npm/pull/15089) + When computing changes to make to your installation, use a function to add + new actions to take instead of just pushing on a list. + ([@iarna](https://github.com/iarna)) + +#### IMPROVED LOGGING + +* [`335933a`](https://github.com/npm/npm/commit/335933a05396258eead139d27eea3f7668ccdfab) + [#15089](https://github.com/npm/npm/pull/15089) + Log when we remove obsolete dependencies in the tree. + ([@iarna](https://github.com/iarna)) + +#### DOCUMENTATION + +* [`33ca4e6`](https://github.com/npm/npm/commit/33ca4e6db3c1878cbc40d5e862ab49bb0e82cfb2) + [#15157](https://github.com/npm/npm/pull/15157) + Update `npm cache` docs to use more consistent language + ([@JonahMoses](https://github.com/JonahMoses)) + +#### DEPENDENCY UPDATES + +* [`c2d22fa`](https://github.com/npm/npm/commit/c2d22faf916e8260136a1cc95913ca474421c0d3) + [#15215](https://github.com/npm/npm/pull/15215) + `nopt@4.0.1`: + The breaking change is a small tweak to how empty string values are + handled. See the brand-new + [CHANGELOG.md for nopt](https://github.com/npm/nopt/blob/v4.0.1/CHANGELOG.md) for further + details about what's changed in this release! + ([@adius](https://github.com/adius), + [@samjonester](https://github.com/samjonester), + [@elidoran](https://github.com/elidoran), + [@helio](https://github.com/helio), + [@silkentrance](https://github.com/silkentrance), + [@othiym23](https://github.com/othiym23)) +* [`54d949b`](https://github.com/npm/npm/commit/54d949b05adefffeb7b5b10229c5fe0ccb929ac3) + [npm/lockfile#24](https://github.com/npm/lockfile/pull/24) + `lockfile@1.0.3`: + Handled case where callback was not passed in by the user. + ([@ORESoftware](https://github.com/ORESoftware)) +* [`54acc03`](https://github.com/npm/npm/commit/54acc0389b39850c0725d0868cb5e61317b57503) + `npmlog@4.0.2`: + Documentation update. + ([@helio-frota](https://github.com/helio-frota)) +* [`57f4bc1`](https://github.com/npm/npm/commit/57f4bc1150322294c1ea0a287ad0a8e457c151e6) + `osenv@0.1.4`: + Test changes. + ([@isaacs](https://github.com/isaacs)) +* [`bea1a2d`](https://github.com/npm/npm/commit/bea1a2d0db566560e13ecc1d5f42e55811269c88) + `retry@0.10.1`: + No changes. + ([@tim-kos](https://github.com/tim-kos)) +* [`6749e39`](https://github.com/npm/npm/commit/6749e395f868109afd97f79d36507e6567dd48fb) + [kapouer/marked-man#9](https://github.com/kapouer/marked-man/pull/9) + `marked-man@0.2.0`: + Add table support. + ([@gholk](https://github.com/gholk)) + ### v4.0.5 (2016-12-01) It's that time of year! December is upon us, which means y'all are just going to @@ -49,13 +262,13 @@ On to the actual changes! `EPERM` errors are Windows are now handled more gracefully. Windows users that tended to see these errors due to, say, an antivirus-induced race condition, should see them much more rarely, if at all. - ([@Kat Marchán](https://github.com/Kat Marchán)) + ([@zkatr](https://github.com/zkat)) * [`85b0174`](https://github.com/npm/npm/commit/85b0174ba9842e8e89f3c33d009e4b4a9e877c7d) `request@2.79.0` - ([@Kat Marchán](https://github.com/Kat Marchán)) + ([@zkat](https://github.com/zkat)) * [`9664d36`](https://github.com/npm/npm/commit/9664d36653503247737630440bc2ff657de965c3) `tap@8.0.1` - ([@Kat Marchán](https://github.com/Kat Marchán)) + ([@zkat](https://github.com/zkat)) #### MISCELLANEOUS @@ -596,6 +809,7 @@ sending `Npm-Scope` and `Npm-In-CI` headers in outgoing requests. * [`846f61c`](https://github.com/npm/npm/commit/846f61c1dd4a033f77aa736ab01c27ae6724fe1c) [npm/npm-registry-client#145](https://github.com/npm/npm-registry-client/pull/145) + [npm/npm-registry-client#147](https://github.com/npm/npm-registry-client/pull/147) `npm-registry-client@7.3.0`: * Allow npm to add headers to outgoing requests. * Add `Npm-In-CI` header that reports whether we're running in CI. diff --git a/deps/npm/doc/cli/npm-cache.md b/deps/npm/doc/cli/npm-cache.md index 03b5902bd4c..ea8cb1b9917 100644 --- a/deps/npm/doc/cli/npm-cache.md +++ b/deps/npm/doc/cli/npm-cache.md @@ -11,10 +11,11 @@ npm-cache(1) -- Manipulates packages cache npm cache ls [<path>] npm cache clean [<path>] + aliases: npm cache clear, npm cache rm ## DESCRIPTION -Used to add, list, or clear the npm cache folder. +Used to add, list, or clean the npm cache folder. * add: Add the specified package to the local cache. This command is primarily @@ -29,7 +30,7 @@ Used to add, list, or clear the npm cache folder. * clean: Delete data out of the cache folder. If an argument is provided, then it specifies a subpath to delete. If no argument is provided, then - the entire cache is cleared. + the entire cache is deleted. ## DETAILS diff --git a/deps/npm/doc/cli/npm-doctor.md b/deps/npm/doc/cli/npm-doctor.md new file mode 100644 index 00000000000..1a5738505ce --- /dev/null +++ b/deps/npm/doc/cli/npm-doctor.md @@ -0,0 +1,102 @@ +npm-doctor(1) -- Check your environments +======================================================== + +## SYNOPSIS + + npm doctor + +## DESCRIPTION + +`npm doctor` runs a set of checks to ensure that your npm installation has +what it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does +have some basic requirements that must be met: + ++ Node.js and git must be executable by npm. ++ The primary npm registry, `registry.npmjs.com`, or another service that uses + the registry API, is available. ++ The directories that npm uses, `node_modules` (both locally and globally), + exist and can be written by the current user. ++ The npm cache exists, and the package tarballs within it aren't corrupt. + +Without all of these working properly, npm may not work properly. Many issues +are often attributable to things that are outside npm's code base, so `npm +doctor` confirms that the npm installation is in a good state. + +Also, in addition to this, there are also very many issue reports due to using +old versions of npm. Since npm is constantly improving, running `npm@latest` is +better than an old version. + +`npm doctor` verifies the following items in your environment, and if there are +any recommended changes, it will display them. + +### `npm ping` + +By default, npm installs from the primary npm registry, `registry.npmjs.org`. +`npm doctor` hits a special ping endpoint within the registry. This can also be +checked with `npm ping`. If this check fails, you may be using a proxy that +needs to be configured, or may need to talk to your IT staff to get access over +HTTPS to `registry.npmjs.org`. + +This check is done against whichever registry you've configured (you can see +what that is by running `npm config get registry`), and if you're using a +private registry that doesn't support the `/whoami` endpoint supported by the +primary registry, this check may fail. + +### `npm -v` + +While Node.js may come bundled with a particular version of npm, it's the +policy of the CLI team that we recommend all users run `npm@latest` if they +can. As the CLI is maintained by a small team of contributors, there are only +resources for a single line of development, so npm's own long-term support +releases typically only receive critical security and regression fixes. The +team believes that the latest tested version of npm is almost always likely to +be the most functional and defect-free version of npm. + +### `node -v` + +For most users, in most circumstances, the best version of Node will be the +latest long-term support (LTS) release. Those of you who want access to new +ECMAscript features or bleeding-edge changes to Node's standard library may be +running a newer version, and some of you may be required to run an older +version of Node because of enterprise change control policies. That's OK! But +in general, the npm team recommends that most users run Node.js LTS. + +### `npm config get registry` + +Some of you may be installing from private package registries for your project +or company. That's great! Others of you may be following tutorials or +StackOverflow questions in an effort to troubleshoot problems you may be +having. Sometimes, this may entail changing the registry you're pointing at. +This part of `npm doctor` just lets you, and maybe whoever's helping you with +support, know that you're not using the default registry. + +### `which git` + +While it's documented in the README, it may not be obvious that npm needs Git +installed to do many of the things that it does. Also, in some cases +– especially on Windows – you may have Git set up in such a way that it's not +accessible via your `PATH` so that npm can find it. This check ensures that Git +is available. + +### Permissions checks + +* Your cache must be readable and writable by the user running npm. +* Global package binaries must be writable by the user running npm. +* Your local `node_modules` path, if you're running `npm doctor` with a project + directory, must be readable and writable by the user running npm. + +### Validate the checksums of cached packages + +When an npm package is published, the publishing process generates a checksum +that npm uses at install time to verify that the package didn't get corrupted +in transit. `npm doctor` uses these checksums to validate the package tarballs +in your local cache (you can see where that cache is located with `npm config +get cache`, and see what's in that cache with `npm cache ls` – probably more +than you were expecting!). In the event that there are corrupt packages in your +cache, you should probably run `npm cache clean` and reset the cache. + +## SEE ALSO + +* npm-bugs(1) +* npm-help(1) +* npm-ping(1) diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index 26f7d3c61f9..e93e42a3fb7 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -600,6 +600,13 @@ Commit message which is used by `npm version` when creating version commit. Any "%s" in the message will be replaced with the version number. +### metrics-registry + +* Default: "https://registry.npmjs.org/" +* Type: String + +The registry you want to send cli metrics to if `send-metrics` is true. + ### node-version * Default: process.version @@ -844,6 +851,16 @@ Space-separated options that are always passed to search. The age of the cache, in seconds, before another registry request is made. +### send-metrics + +* Default: false +* Type: Boolean + +If true, success/failure metrics will be reported to the registry stored in +`metrics-registry`. These requests contain the number of successful and +failing runs of the npm CLI and the time period overwhich those counts were +gathered. No identifying information is included in these requests. + ### shell * Default: SHELL environment variable, or "bash" on Posix, or "cmd" on diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md index 775558f4a8c..7569a225c7f 100644 --- a/deps/npm/doc/misc/npm-index.md +++ b/deps/npm/doc/misc/npm-index.md @@ -65,6 +65,10 @@ Modify package distribution tags Docs for a package in a web browser maybe +### npm-doctor(1) + +Check your environments + ### npm-edit(1) Edit an installed package diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 0d97ebb0153..0b00d8b46e8 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -126,5 +126,5 @@ will no doubt tell you to put the output in a gist or email.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer"><a href="../doc/README.html">README</a> — npm@4.0.5</p> +<p id="footer"><a href="../doc/README.html">README</a> — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 80a1da34233..d8d7811a0e1 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 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-access — npm@4.0.5</p> +<p id="footer">npm-access — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 9f6ccada72e..605b3bd2005 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -73,5 +73,5 @@ over any global configuration.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-adduser — npm@4.0.5</p> +<p id="footer">npm-adduser — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 57a372baffc..73370ac7f02 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-bin — npm@4.0.5</p> +<p id="footer">npm-bin — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 607d245c271..db76529b47d 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -55,5 +55,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-bugs — npm@4.0.5</p> +<p id="footer">npm-bugs — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 5f89aca15cb..1f197ee2619 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:</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-build — npm@4.0.5</p> +<p id="footer">npm-build — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 41a4229c999..d1e15012e4a 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.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-bundle — npm@4.0.5</p> +<p id="footer">npm-bundle — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index 1b6b34adb94..272dba868b6 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -19,8 +19,9 @@ npm cache add <name>@<version> npm cache ls [<path>] npm cache clean [<path>] +aliases: npm cache clear, npm cache rm </code></pre><h2 id="description">DESCRIPTION</h2> -<p>Used to add, list, or clear the npm cache folder.</p> +<p>Used to add, list, or clean the npm cache folder.</p> <ul> <li><p>add: Add the specified package to the local cache. This command is primarily @@ -35,7 +36,7 @@ folder. Works a bit like the <code>find</code> program, but limited by the <li><p>clean: Delete data out of the cache folder. If an argument is provided, then it specifies a subpath to delete. If no argument is provided, then -the entire cache is cleared.</p> +the entire cache is deleted.</p> </li> </ul> <h2 id="details">DETAILS</h2> @@ -81,5 +82,5 @@ they do not make an HTTP request to the registry.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-cache — npm@4.0.5</p> +<p id="footer">npm-cache — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 2f5cad2d33b..6ee1bc78a18 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -43,5 +43,5 @@ completions based on the arguments.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-completion — npm@4.0.5</p> +<p id="footer">npm-completion — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 9036bf84d5a..677322af8b6 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -67,5 +67,5 @@ global config.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-config — npm@4.0.5</p> +<p id="footer">npm-config — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index e822dd5e65c..e07dd765416 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -61,5 +61,5 @@ result in new modules being installed.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-dedupe — npm@4.0.5</p> +<p id="footer">npm-dedupe — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 8402c36fca7..82a0c62e493 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:</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-deprecate — npm@4.0.5</p> +<p id="footer">npm-deprecate — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index b1b5c038bf1..573eaf40d3c 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -86,5 +86,5 @@ begin with a number or the letter <code>v</code>.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-dist-tag — npm@4.0.5</p> +<p id="footer">npm-dist-tag — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index a713ca1f3a7..2a61c5ef29d 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 <code>name</code> property.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-docs — npm@4.0.5</p> +<p id="footer">npm-docs — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html new file mode 100644 index 00000000000..d5856b3ffb0 --- /dev/null +++ b/deps/npm/html/doc/cli/npm-doctor.html @@ -0,0 +1,106 @@ +<!doctype html> +<html> + <title>npm-doctor</title> + <meta charset="utf-8"> + <link rel="stylesheet" type="text/css" href="../../static/style.css"> + <link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-doctor.html"> + <script async=true src="../../static/toc.js"></script> + + <body> + <div id="wrapper"> + +<h1><a href="../cli/npm-doctor.html">npm-doctor</a></h1> <p>Check your environments</p> +<h2 id="synopsis">SYNOPSIS</h2> +<pre><code>npm doctor +</code></pre><h2 id="description">DESCRIPTION</h2> +<p><code>npm doctor</code> runs a set of checks to ensure that your npm installation has +what it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does +have some basic requirements that must be met:</p> +<ul> +<li>Node.js and git must be executable by npm.</li> +<li>The primary npm registry, <code>registry.npmjs.com</code>, or another service that uses +the registry API, is available.</li> +<li>The directories that npm uses, <code>node_modules</code> (both locally and globally), +exist and can be written by the current user.</li> +<li>The npm cache exists, and the package tarballs within it aren't corrupt.</li> +</ul> +<p>Without all of these working properly, npm may not work properly. Many issues +are often attributable to things that are outside npm's code base, so <code>npm +doctor</code> confirms that the npm installation is in a good state.</p> +<p>Also, in addition to this, there are also very many issue reports due to using +old versions of npm. Since npm is constantly improving, running <code>npm@latest</code> is +better than an old version.</p> +<p><code>npm doctor</code> verifies the following items in your environment, and if there are +any recommended changes, it will display them.</p> +<h3 id="-npm-ping-"><code>npm ping</code></h3> +<p>By default, npm installs from the primary npm registry, <code>registry.npmjs.org</code>. +<code>npm doctor</code> hits a special ping endpoint within the registry. This can also be +checked with <code>npm ping</code>. If this check fails, you may be using a proxy that +needs to be configured, or may need to talk to your IT staff to get access over +HTTPS to <code>registry.npmjs.org</code>.</p> +<p>This check is done against whichever registry you've configured (you can see +what that is by running <code>npm config get registry</code>), and if you're using a +private registry that doesn't support the <code>/whoami</code> endpoint supported by the +primary registry, this check may fail.</p> +<h3 id="-npm-v-"><code>npm -v</code></h3> +<p>While Node.js may come bundled with a particular version of npm, it's the +policy of the CLI team that we recommend all users run <code>npm@latest</code> if they +can. As the CLI is maintained by a small team of contributors, there are only +resources for a single line of development, so npm's own long-term support +releases typically only receive critical security and regression fixes. The +team believes that the latest tested version of npm is almost always likely to +be the most functional and defect-free version of npm.</p> +<h3 id="-node-v-"><code>node -v</code></h3> +<p>For most users, in most circumstances, the best version of Node will be the +latest long-term support (LTS) release. Those of you who want access to new +ECMAscript features or bleeding-edge changes to Node's standard library may be +running a newer version, and some of you may be required to run an older +version of Node because of enterprise change control policies. That's OK! But +in general, the npm team recommends that most users run Node.js LTS.</p> +<h3 id="-npm-config-get-registry-"><code>npm config get registry</code></h3> +<p>Some of you may be installing from private package registries for your project +or company. That's great! Others of you may be following tutorials or +StackOverflow questions in an effort to troubleshoot problems you may be +having. Sometimes, this may entail changing the registry you're pointing at. +This part of <code>npm doctor</code> just lets you, and maybe whoever's helping you with +support, know that you're not using the default registry.</p> +<h3 id="-which-git-"><code>which git</code></h3> +<p>While it's documented in the <a href="../../doc/README.html">README</a>, it may not be obvious that npm needs Git +installed to do many of the things that it does. Also, in some cases +– especially on Windows – you may have Git set up in such a way that it's not +accessible via your <code>PATH</code> so that npm can find it. This check ensures that Git +is available.</p> +<h3 id="permissions-checks">Permissions checks</h3> +<ul> +<li>Your cache must be readable and writable by the user running npm.</li> +<li>Global package binaries must be writable by the user running npm.</li> +<li>Your local <code>node_modules</code> path, if you're running <code>npm doctor</code> with a project +directory, must be readable and writable by the user running npm.</li> +</ul> +<h3 id="validate-the-checksums-of-cached-packages">Validate the checksums of cached packages</h3> +<p>When an npm package is published, the publishing process generates a checksum +that npm uses at install time to verify that the package didn't get corrupted +in transit. <code>npm doctor</code> uses these checksums to validate the package tarballs +in your local cache (you can see where that cache is located with <code>npm config +get cache</code>, and see what's in that cache with <code>npm cache ls</code> – probably more +than you were expecting!). In the event that there are corrupt packages in your +cache, you should probably run <code>npm cache clean</code> and reset the cache.</p> +<h2 id="see-also">SEE ALSO</h2> +<ul> +<li><a href="../cli/npm-bugs.html">npm-bugs(1)</a></li> +<li><a href="../cli/npm-help.html">npm-help(1)</a></li> +<li><a href="../cli/npm-ping.html">npm-ping(1)</a></li> +</ul> + +</div> + +<table border=0 cellspacing=0 cellpadding=0 id=npmlogo> +<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18> </td></tr> +<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td colspan=6 style="width:60px;height:10px;background:#fff"> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td></tr> +<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2> </td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff" rowspan=2> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff"> </td></tr> +<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> +<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> +</table> +<p id="footer">npm-doctor — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index db4eba41111..19fb66ce3f4 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@ or <code>"notepad"</code> on Windows.</li> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-edit — npm@4.0.5</p> +<p id="footer">npm-edit — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 2fb651064c2..3debd5cbd52 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@ Windows</li> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-explore — npm@4.0.5</p> +<p id="footer">npm-explore — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 7a7980a97de..8bec9e964f6 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -45,5 +45,5 @@ where the terms were found in the documentation.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-help-search — npm@4.0.5</p> +<p id="footer">npm-help-search — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 7249903ccc9..9a1249def7c 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -50,5 +50,5 @@ matches are equivalent to specifying a topic name.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-help — npm@4.0.5</p> +<p id="footer">npm-help — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index b4cec6b4168..d0d01a25aeb 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.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-init — npm@4.0.5</p> +<p id="footer">npm-init — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index d283317a71b..cf890c785a2 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -42,5 +42,5 @@ takes exactly the same arguments as <code>npm install</code>.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-install-test — npm@4.0.5</p> +<p id="footer">npm-install-test — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index c647781dcf7..b6c8f17dd8e 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -316,5 +316,5 @@ affects a real use-case, it will be investigated.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-install — npm@4.0.5</p> +<p id="footer">npm-install — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index f10b790bc2b..7a14f9f6841 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -74,5 +74,5 @@ include that scope, e.g.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-link — npm@4.0.5</p> +<p id="footer">npm-link — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 6543b578511..87b893a3c0c 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -51,5 +51,5 @@ it takes precedence.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-logout — npm@4.0.5</p> +<p id="footer">npm-logout — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 1b5d61bd380..b8d712b9e4e 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.</p> limit the results to only the paths to the packages named. Note that nested packages will <em>also</em> show the paths to the specified packages. For example, running <code>npm ls promzard</code> in npm's source tree will show:</p> -<pre><code>npm@4.0.5 /path/to/npm +<pre><code>npm@4.1.1 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 </code></pre><p>It will print out extraneous, missing, and invalid packages.</p> @@ -104,5 +104,5 @@ project.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-ls — npm@4.0.5</p> +<p id="footer">npm-ls — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 04a0da5155d..245963b0adf 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -116,5 +116,5 @@ project.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-outdated — npm@4.0.5</p> +<p id="footer">npm-outdated — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 9f6d4db959d..43a57fc970a 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -51,5 +51,5 @@ that is not implemented at this time.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-owner — npm@4.0.5</p> +<p id="footer">npm-owner — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 92cea267476..2a95f40f343 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.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-pack — npm@4.0.5</p> +<p id="footer">npm-pack — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index f094762e629..28f7e8d2819 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,5 +32,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-ping — npm@4.0.5</p> +<p id="footer">npm-ping — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 906de75ff82..d12526e41e2 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 <code>-g</code> is also specified.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-prefix — npm@4.0.5</p> +<p id="footer">npm-prefix — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 9e40f281030..c74844bef4a 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@ negate <code>NODE_ENV</code> being set to <code>production</code>.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-prune — npm@4.0.5</p> +<p id="footer">npm-prune — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index a6959ce0a45..a9114445ae0 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -76,5 +76,5 @@ packs them into a tarball to be uploaded to the registry.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-publish — npm@4.0.5</p> +<p id="footer">npm-publish — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index b2d06701895..12cb20fd200 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@ the new binary.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-rebuild — npm@4.0.5</p> +<p id="footer">npm-rebuild — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 83af6875167..ad6b9be6761 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-repo — npm@4.0.5</p> +<p id="footer">npm-repo — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 6d4c455659c..5039bb60f69 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</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-restart — npm@4.0.5</p> +<p id="footer">npm-restart — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 343790ab579..d808ebad289 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-root — npm@4.0.5</p> +<p id="footer">npm-root — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index d68504647a7..0becbfee74e 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -66,5 +66,5 @@ you will be given a warning to run <code>npm install</code>, just in case you <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-run-script — npm@4.0.5</p> +<p id="footer">npm-run-script — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 015d4a3ddb9..e3902c1ba2a 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -109,5 +109,5 @@ setting.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-search — npm@4.0.5</p> +<p id="footer">npm-search — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 0f80895acf1..4eb28f3690f 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -180,5 +180,5 @@ contents rather than versions.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-shrinkwrap — npm@4.0.5</p> +<p id="footer">npm-shrinkwrap — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 2564d61dfcc..181a4d38526 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.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-star — npm@4.0.5</p> +<p id="footer">npm-star — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index a4889bd84da..a514a3fbda7 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@ you will most certainly enjoy this command.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-stars — npm@4.0.5</p> +<p id="footer">npm-stars — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 65c229ec95b..b51180e9b36 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.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-start — npm@4.0.5</p> +<p id="footer">npm-start — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 277b5a845ed..d2529c828c7 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-stop — npm@4.0.5</p> +<p id="footer">npm-stop — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index 2fea57d08e5..2fef0f9df10 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,5 +67,5 @@ use the <code>npm access</code> command to grant or revoke the appropriate permi <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-team — npm@4.0.5</p> +<p id="footer">npm-team — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 041ce2130bb..aef313191fb 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -36,5 +36,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-test — npm@4.0.5</p> +<p id="footer">npm-test — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index b1d9de78099..32480a20268 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -60,5 +60,5 @@ npm uninstall dtrace-provider --save-optional <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-uninstall — npm@4.0.5</p> +<p id="footer">npm-uninstall — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 147e42221ad..69c6fe1d4a3 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.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-unpublish — npm@4.0.5</p> +<p id="footer">npm-unpublish — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index c2b8b18d486..419f217d8b6 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -118,5 +118,5 @@ be <em>downgraded</em>.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-update — npm@4.0.5</p> +<p id="footer">npm-update — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index adbfb7ab7c9..b3e269033bb 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -107,5 +107,5 @@ and tag up to the server, and deletes the <code>build/temp</code> directory.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-version — npm@4.0.5</p> +<p id="footer">npm-version — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index f1de2303d02..29bbdc482a1 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -86,5 +86,5 @@ the field name.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-view — npm@4.0.5</p> +<p id="footer">npm-view — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 50ff32f00cd..da5bfd2cad1 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-whoami — npm@4.0.5</p> +<p id="footer">npm-whoami — npm@4.1.1</p> diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 44685d4a296..a38d766a028 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@ <h2 id="synopsis">SYNOPSIS</h2> <pre><code>npm <command> [args] </code></pre><h2 id="version">VERSION</h2> -<p>4.0.5</p> +<p>4.1.1</p> <h2 id="description">DESCRIPTION</h2> <p>npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -126,7 +126,7 @@ will no doubt tell you to put the output in a gist or email.</p> <p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> :: <a href="https://github.com/isaacs/">isaacs</a> :: <a href="http://twitter.com/izs">@izs</a> :: -<a href="mailto:i@izs.me">i@izs.me</a></p> +<a href="mailto:i@izs.me">i@izs.me</a></p> <h2 id="see-also">SEE ALSO</h2> <ul> <li><a href="../cli/npm-help.html">npm-help(1)</a></li> @@ -150,5 +150,5 @@ will no doubt tell you to put the output in a gist or email.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm — npm@4.0.5</p> +<p id="footer">npm — npm@4.1.1</p> diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index b54e1a3f4d8..bb323c56870 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -182,5 +182,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-folders — npm@4.0.5</p> +<p id="footer">npm-folders — npm@4.1.1</p> diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index b54e1a3f4d8..bb323c56870 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -182,5 +182,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-folders — npm@4.0.5</p> +<p id="footer">npm-folders — npm@4.1.1</p> diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 392d8552f84..47b01715456 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -586,5 +586,5 @@ ignored.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">package.json — npm@4.0.5</p> +<p id="footer">package.json — npm@4.1.1</p> diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 8385a103a35..365ec642c4b 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -85,5 +85,5 @@ manner.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npmrc — npm@4.0.5</p> +<p id="footer">npmrc — npm@4.1.1</p> diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 392d8552f84..47b01715456 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -586,5 +586,5 @@ ignored.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">package.json — npm@4.0.5</p> +<p id="footer">package.json — npm@4.1.1</p> diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 83baa43e6e6..21dd422c9c2 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -42,6 +42,8 @@ <p>Modify package distribution tags</p> <h3 id="npm-docs-1-"><a href="cli/npm-docs.html">npm-docs(1)</a></h3> <p>Docs for a package in a web browser maybe</p> +<h3 id="npm-doctor-1-"><a href="cli/npm-doctor.html">npm-doctor(1)</a></h3> +<p>Check your environments</p> <h3 id="npm-edit-1-"><a href="cli/npm-edit.html">npm-edit(1)</a></h3> <p>Edit an installed package</p> <h3 id="npm-explore-1-"><a href="cli/npm-explore.html">npm-explore(1)</a></h3> @@ -160,5 +162,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-index — npm@4.0.5</p> +<p id="footer">npm-index — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 0873b5f82fb..99571a2db95 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -153,5 +153,5 @@ set to anything."</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-coding-style — npm@4.0.5</p> +<p id="footer">npm-coding-style — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index c4dca1bc183..ba35d4acb35 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -517,6 +517,12 @@ combination). Passed to the <code>http</code> <code>Agent</code> used to make th </ul> <p>Commit message which is used by <code>npm version</code> when creating version commit.</p> <p>Any "%s" in the message will be replaced with the version number.</p> +<h3 id="metrics-registry">metrics-registry</h3> +<ul> +<li>Default: "<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>"</li> +<li>Type: String</li> +</ul> +<p>The registry you want to send cli metrics to if <code>send-metrics</code> is true.</p> <h3 id="node-version">node-version</h3> <ul> <li>Default: process.version</li> @@ -722,6 +728,15 @@ first on the <code>PATH</code> are different.</p> <li>Type: Number</li> </ul> <p>The age of the cache, in seconds, before another registry request is made.</p> +<h3 id="send-metrics">send-metrics</h3> +<ul> +<li>Default: false</li> +<li>Type: Boolean</li> +</ul> +<p>If true, success/failure metrics will be reported to the registry stored in +<code>metrics-registry</code>. These requests contain the number of successful and +failing runs of the npm CLI and the time period overwhich those counts were +gathered. No identifying information is included in these requests.</p> <h3 id="shell">shell</h3> <ul> <li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on @@ -872,5 +887,5 @@ exit successfully.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-config — npm@4.0.5</p> +<p id="footer">npm-config — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 3b04dffacf9..e80cb62ae51 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -194,5 +194,5 @@ from a fresh checkout.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-developers — npm@4.0.5</p> +<p id="footer">npm-developers — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 3db7ef27db6..e70b5c6cd74 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -20,7 +20,7 @@ Conduct.</p> <h2 id="tl-dr">TL;DR</h2> <ol> <li>Get the author email with <code>npm owner ls <pkgname></code></li> -<li>Email the author, CC <a href="mailto:support@npmjs.com">support@npmjs.com</a></li> +<li>Email the author, CC <a href="mailto:support@npmjs.com">support@npmjs.com</a></li> <li>After a few weeks, if there's no resolution, we'll sort it out.</li> </ol> <p>Don't squat on package names. Publish code or move out of the way.</p> @@ -55,12 +55,12 @@ because Yusuf's <code>foo</code> is in the way.</p> </li> <li>Alice emails Yusuf, explaining the situation <strong>as respectfully as possible</strong>, and what she would like to do with the module name. She adds the npm support -staff <a href="mailto:support@npmjs.com">support@npmjs.com</a> to the CC list of the email. Mention in the email +staff <a href="mailto:support@npmjs.com">support@npmjs.com</a> to the CC list of the email. Mention in the email that Yusuf can run npm owner <code>add alice foo</code> to add Alice as an owner of the foo package.</li> <li>After a reasonable amount of time, if Yusuf has not responded, or if Yusuf and Alice can't come to any sort of resolution, email support -<a href="mailto:support@npmjs.com">support@npmjs.com</a> and we'll sort it out. ("Reasonable" is usually at least +<a href="mailto:support@npmjs.com">support@npmjs.com</a> and we'll sort it out. ("Reasonable" is usually at least 4 weeks.)</li> </ol> <h2 id="reasoning">REASONING</h2> @@ -96,12 +96,12 @@ application database or otherwise putting non-packagey things into it.</li> <a href="https://www.npmjs.com/policies/conduct">Code of Conduct</a> such as hateful language, pornographic content, or harassment.</li> </ol> -<p>If you see bad behavior like this, please report it to <a href="mailto:abuse@npmjs.com">abuse@npmjs.com</a> right +<p>If you see bad behavior like this, please report it to <a href="mailto:abuse@npmjs.com">abuse@npmjs.com</a> right away. <strong>You are never expected to resolve abusive behavior on your own. We are here to help.</strong></p> <h2 id="trademarks">TRADEMARKS</h2> <p>If you think another npm publisher is infringing your trademark, such as by -using a confusingly similar package name, email <a href="mailto:abuse@npmjs.com">abuse@npmjs.com</a> with a link to +using a confusingly similar package name, email <a href="mailto:abuse@npmjs.com">abuse@npmjs.com</a> with a link to the package or user account on <a href="https://npmjs.com">https://npmjs.com</a>. Attach a copy of your trademark registration certificate.</p> <p>If we see that the package's publisher is intentionally misleading others by @@ -134,5 +134,5 @@ License.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-disputes — npm@4.0.5</p> +<p id="footer">npm-disputes — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 4e590dabe7c..b43baa725fd 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -42,6 +42,8 @@ <p>Modify package distribution tags</p> <h3 id="npm-docs-1-"><a href="../cli/npm-docs.html">npm-docs(1)</a></h3> <p>Docs for a package in a web browser maybe</p> +<h3 id="npm-doctor-1-"><a href="../cli/npm-doctor.html">npm-doctor(1)</a></h3> +<p>Check your environments</p> <h3 id="npm-edit-1-"><a href="../cli/npm-edit.html">npm-edit(1)</a></h3> <p>Edit an installed package</p> <h3 id="npm-explore-1-"><a href="../cli/npm-explore.html">npm-explore(1)</a></h3> @@ -160,5 +162,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-index — npm@4.0.5</p> +<p id="footer">npm-index — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index 92aa4257e8d..da42d045e9f 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,5 +86,5 @@ <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-orgs — npm@4.0.5</p> +<p id="footer">npm-orgs — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index a780c98a458..edd4fdf8baf 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -90,5 +90,5 @@ effectively implement the entire CouchDB API anyway.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-registry — npm@4.0.5</p> +<p id="footer">npm-registry — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 7295c81fd8c..6e0f08cf94e 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -94,5 +94,5 @@ that registry instead.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-scope — npm@4.0.5</p> +<p id="footer">npm-scope — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index c140ea2152b..533668be1ab 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -237,5 +237,5 @@ scripts is for compilation which must be done on the target architecture.</li> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">npm-scripts — npm@4.0.5</p> +<p id="footer">npm-scripts — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 63d0648844c..90766246098 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:</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">removing-npm — npm@4.0.5</p> +<p id="footer">removing-npm — npm@4.1.1</p> diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 2ae0288f994..f64da6a6fd3 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -325,5 +325,5 @@ range, use the <code>satisfies(version, range)</code> function.</p> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> </table> -<p id="footer">semver — npm@4.0.5</p> +<p id="footer">semver — npm@4.1.1</p> diff --git a/deps/npm/lib/cache/add-named.js b/deps/npm/lib/cache/add-named.js index f0e5e2c33a8..3a48b42e7f6 100644 --- a/deps/npm/lib/cache/add-named.js +++ b/deps/npm/lib/cache/add-named.js @@ -14,6 +14,7 @@ var cachedPackageRoot = require('./cached-package-root.js') var mapToRegistry = require('../utils/map-to-registry.js') var pulseTillDone = require('../utils/pulse-till-done.js') var packageId = require('../utils/package-id.js') +var pickManifestFromRegistryMetadata = require('../utils/pick-manifest-from-registry-metadata.js') module.exports = addNamed @@ -252,28 +253,10 @@ function addNameRange (name, range, data, cb) { log.silly('addNameRange', 'versions' , [data.name, Object.keys(data.versions || {})]) - // if the tagged version satisfies, then use that. - var tagged = data['dist-tags'][npm.config.get('tag')] - if (tagged && - data.versions[tagged] && - semver.satisfies(tagged, range, true)) { - return addNamed(name, tagged, data.versions[tagged], cb) - } - - // find the max satisfying version. - var versions = Object.keys(data.versions || {}) - var ms = semver.maxSatisfying(versions, range, true) - if (!ms) { - if (range === '*' && versions.length) { - return addNameTag(name, 'latest', data, cb) - } else { - return cb(installTargetsError(range, data)) - } - } - - // if we don't have a registry connection, try to see if - // there's a cached copy that will be ok. - addNamed(name, ms, data.versions[ms], cb) + var versions = Object.keys(data.versions).filter(function (v) { return semver.valid(v) }) + var picked = pickManifestFromRegistryMetadata(range, npm.config.get('tag'), versions, data) + if (picked) return addNamed(name, picked.resolvedTo, picked.manifest, cb) + return cb(installTargetsError(range, data)) } } diff --git a/deps/npm/lib/config/cmd-list.js b/deps/npm/lib/config/cmd-list.js index eb79e9df065..a1abe80fb0b 100644 --- a/deps/npm/lib/config/cmd-list.js +++ b/deps/npm/lib/config/cmd-list.js @@ -98,7 +98,8 @@ var cmdList = [ 'start', 'restart', 'run-script', - 'completion' + 'completion', + 'doctor' ] var plumbing = [ diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js index 05a06a4e202..81ead08b6f9 100644 --- a/deps/npm/lib/config/defaults.js +++ b/deps/npm/lib/config/defaults.js @@ -167,6 +167,7 @@ Object.defineProperty(exports, 'defaults', {get: function () { long: false, maxsockets: 50, message: '%s', + 'metrics-registry': 'https://registry.npmjs.org/', 'node-version': process.version, 'onload-script': false, only: null, @@ -196,6 +197,7 @@ Object.defineProperty(exports, 'defaults', {get: function () { searchopts: '', searchexclude: null, searchstaleness: 15 * 60, + 'send-metrics': false, shell: osenv.shell(), shrinkwrap: true, 'sign-git-tag': false, @@ -279,6 +281,7 @@ exports.types = { long: Boolean, maxsockets: Number, message: String, + 'metrics-registry': String, 'node-version': [null, semver], 'onload-script': [null, String], only: [null, 'dev', 'development', 'prod', 'production'], @@ -303,6 +306,7 @@ exports.types = { searchopts: String, searchexclude: [null, String], searchstaleness: Number, + 'send-metrics': Boolean, shell: String, shrinkwrap: Boolean, 'sign-git-tag': Boolean, diff --git a/deps/npm/lib/doctor.js b/deps/npm/lib/doctor.js new file mode 100644 index 00000000000..f2037ab86c0 --- /dev/null +++ b/deps/npm/lib/doctor.js @@ -0,0 +1,109 @@ +var path = require('path') +var chain = require('slide').chain +var table = require('text-table') +var color = require('ansicolors') +var styles = require('ansistyles') +var semver = require('semver') +var npm = require('./npm.js') +var log = require('npmlog') +var ansiTrim = require('./utils/ansi-trim.js') +var output = require('./utils/output.js') +var defaultRegistry = require('./config/defaults.js').defaults.registry +var checkPing = require('./doctor/check-ping.js') +var getGitPath = require('./doctor/get-git-path.js') +var checksumCachedFiles = require('./doctor/checksum-cached-files.js') +var checkFilesPermission = require('./doctor/check-files-permission.js') +var getLatestNodejsVersion = require('./doctor/get-latest-nodejs-version.js') +var getLatestNpmVersion = require('./doctor/get-latest-npm-version') +var globalNodeModules = path.join(npm.config.globalPrefix, 'lib', 'node_modules') +var localNodeModules = path.join(npm.config.localPrefix, 'node_modules') + +module.exports = doctor + +doctor.usage = 'npm doctor' + +function doctor (args, silent, cb) { + args = args || {} + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + var actionsToRun = [ + [checkPing], + [getLatestNpmVersion], + [getLatestNodejsVersion, args['node-url']], + [getGitPath], + [checkFilesPermission, npm.cache, 6], + [checkFilesPermission, globalNodeModules, 4], + [checkFilesPermission, localNodeModules, 6], + [checksumCachedFiles] + ] + + log.info('doctor', 'Running checkup') + chain(actionsToRun, function (stderr, stdout) { + if (stderr && stderr.message !== 'not found: git') return cb(stderr) + var outHead = ['Check', 'Value', 'Recommendation'] + var list = makePretty(stdout) + var outBody = list + + if (npm.color) { + outHead = outHead.map(function (item) { + return styles.underline(item) + }) + outBody = outBody.map(function (item) { + if (item[2]) { + item[0] = color.red(item[0]) + item[2] = color.magenta(item[2]) + } + return item + }) + } + + var outTable = [outHead].concat(outBody) + var tableOpts = { + stringLength: function (s) { return ansiTrim(s).length } + } + + if (!silent) output(table(outTable, tableOpts)) + + cb(null, list) + }) +} + +function makePretty (p) { + var ping = p[0] ? 'ok' : 'notOk' + var npmLTS = p[1] + var nodeLTS = p[2].replace('v', '') + var whichGit = p[3] || 'not installed' + var readbleCaches = p[4] ? 'ok' : 'notOk' + var executableGlobalModules = p[5] ? 'ok' : 'notOk' + var executableLocalModules = p[6] ? 'ok' : 'notOk' + var checksumCachedFiles = p[7] ? 'ok' : 'notOk' + var npmV = npm.version + var nodeV = process.version.replace('v', '') + var registry = npm.config.get('registry') + var list = [ + ['npm ping', ping], + ['npm -v', 'v' + npmV], + ['node -v', 'v' + nodeV], + ['npm config get registry', registry], + ['which git', whichGit], + ['Perms check on cached files', readbleCaches], + ['Perms check on global node_modules', executableGlobalModules], + ['Perms check on local node_modules', executableLocalModules], + ['Checksum cached files', checksumCachedFiles] + ] + + if (ping !== 'ok') list[0][2] = 'Check your internet connection' + if (!semver.satisfies(npmV, '>=' + npmLTS)) list[1][2] = 'Use npm v' + npmLTS + if (!semver.satisfies(nodeV, '>=' + nodeLTS)) list[2][2] = 'Use node v' + nodeLTS + if (registry !== defaultRegistry) list[3][2] = 'Try `npm config set registry ' + defaultRegistry + if (whichGit === 'not installed') list[4][2] = 'Install git and ensure it\'s in your PATH.' + if (readbleCaches !== 'ok') list[5][2] = 'Check the permissions of your files in ' + npm.config.get('cache') + if (executableGlobalModules !== 'ok') list[6][2] = globalNodeModules + ' must be readable and writable by the current user.' + if (executableLocalModules !== 'ok') list[7][2] = localNodeModules + ' must be readable and writable by the current user.' + if (checksumCachedFiles !== 'ok') list[8][2] = 'You have some broken packages in your cache.' + + return list +} diff --git a/deps/npm/lib/doctor/check-files-permission.js b/deps/npm/lib/doctor/check-files-permission.js new file mode 100644 index 00000000000..ac3bb40bc6d --- /dev/null +++ b/deps/npm/lib/doctor/check-files-permission.js @@ -0,0 +1,55 @@ +var fs = require('fs') +var path = require('path') +var getUid = require('uid-number') +var chain = require('slide').chain +var log = require('npmlog') +var npm = require('../npm.js') +var fileCompletion = require('../utils/completion/file-completion.js') + +function checkFilesPermission (root, mask, cb) { + if (process.platform === 'win32') return cb(null, true) + getUid(npm.config.get('user'), npm.config.get('group'), function (e, uid, gid) { + if (e) { + tracker.finish() + tracker.warn('checkFilePermissions', 'Error looking up user and group:', e) + return cb(e) + } + var tracker = log.newItem('checkFilePermissions', 1) + tracker.info('checkFilePermissions', 'Building file list of ' + root) + fileCompletion(root, '.', Infinity, function (e, files) { + if (e) { + tracker.warn('checkFilePermissions', 'Error building file list:', e) + tracker.finish() + return cb(e) + } + tracker.addWork(files.length) + tracker.completeWork(1) + chain(files.map(andCheckFile), function (er) { + tracker.finish() + cb(null, !er) + }) + function andCheckFile (f) { + return [checkFile, f] + } + function checkFile (f, next) { + var file = path.join(root, f) + tracker.silly('checkFilePermissions', f) + fs.stat(file, function (e, stat) { + tracker.completeWork(1) + if (e) return next(e) + if (!stat.isFile()) return next() + var mode = stat.mode + var isGroup = stat.gid ? stat.gid === gid : true + var isUser = stat.uid ? stat.uid === uid : true + if ((mode & parseInt('000' + mask, 8))) return next() + if ((isGroup && mode & parseInt('00' + mask + '0', 8))) return next() + if ((isUser && mode & parseInt('0' + mask + '00', 8))) return next() + tracker.error('checkFilePermissions', 'Missing permissions on (' + isGroup + ', ' + isUser + ', ' + mode + ')', file) + return next(new Error('Missing permissions for ' + file)) + }) + } + }) + }) +} + +module.exports = checkFilesPermission diff --git a/deps/npm/lib/doctor/check-ping.js b/deps/npm/lib/doctor/check-ping.js new file mode 100644 index 00000000000..99e4ea2ba26 --- /dev/null +++ b/deps/npm/lib/doctor/check-ping.js @@ -0,0 +1,13 @@ +var log = require('npmlog') +var ping = require('../ping.js') + +function checkPing (cb) { + var tracker = log.newItem('checkPing', 1) + tracker.info('checkPing', 'Pinging registry') + ping({}, true, function (err, pong) { + tracker.finish() + cb(err, pong) + }) +} + +module.exports = checkPing diff --git a/deps/npm/lib/doctor/checksum-cached-files.js b/deps/npm/lib/doctor/checksum-cached-files.js new file mode 100644 index 00000000000..d50c3268521 --- /dev/null +++ b/deps/npm/lib/doctor/checksum-cached-files.js @@ -0,0 +1,62 @@ +var crypto = require('crypto') +var fs = require('fs') +var path = require('path') +var chain = require('slide').chain +var log = require('npmlog') +var npm = require('../npm') +var fileCompletion = require('../utils/completion/file-completion.js') + +function checksum (str) { + return crypto + .createHash('sha1') + .update(str, 'utf8') + .digest('hex') +} + +function checksumCachedFiles (cb) { + var tracker = log.newItem('checksumCachedFiles', 1) + tracker.info('checksumCachedFiles', 'Building file list of ' + npm.cache) + fileCompletion(npm.cache, '.', Infinity, function (e, files) { + if (e) { + tracker.finish() + return cb(e) + } + tracker.addWork(files.length) + tracker.completeWork(1) + chain(files.map(andChecksumFile), function (er) { + tracker.finish() + cb(null, !er) + }) + function andChecksumFile (f) { + return [function (next) { process.nextTick(function () { checksumFile(f, next) }) }] + } + function checksumFile (f, next) { + var file = path.join(npm.cache, f) + tracker.silly('checksumFile', f) + if (!/.tgz$/.test(file)) { + tracker.completeWork(1) + return next() + } + fs.readFile(file, function (err, tgz) { + tracker.completeWork(1) + if (err) return next(err) + try { + var pkgJSON = fs.readFileSync(path.join(path.dirname(file), 'package/package.json')) + } catch (e) { + return next() // no package.json in cche is ok + } + try { + var pkg = JSON.parse(pkgJSON) + var shasum = (pkg.dist && pkg.dist.shasum) || pkg._shasum + var actual = checksum(tgz) + if (actual !== shasum) return next(new Error('Checksum mismatch on ' + file + ', expected: ' + shasum + ', got: ' + shasum)) + return next() + } catch (e) { + return next(new Error('Error parsing JSON in ' + file + ': ' + e)) + } + }) + } + }) +} + +module.exports = checksumCachedFiles diff --git a/deps/npm/lib/doctor/get-git-path.js b/deps/npm/lib/doctor/get-git-path.js new file mode 100644 index 00000000000..5b00e9d54e6 --- /dev/null +++ b/deps/npm/lib/doctor/get-git-path.js @@ -0,0 +1,13 @@ +var log = require('npmlog') +var which = require('which') + +function getGitPath (cb) { + var tracker = log.newItem('getGitPath', 1) + tracker.info('getGitPath', 'Finding git in your PATH') + which('git', function (err, path) { + tracker.finish() + cb(err, path) + }) +} + +module.exports = getGitPath diff --git a/deps/npm/lib/doctor/get-latest-nodejs-version.js b/deps/npm/lib/doctor/get-latest-nodejs-version.js new file mode 100644 index 00000000000..a21229692fb --- /dev/null +++ b/deps/npm/lib/doctor/get-latest-nodejs-version.js @@ -0,0 +1,26 @@ +var log = require('npmlog') +var request = require('request') + +function getLatestNodejsVersion (url, cb) { + var tracker = log.newItem('getLatestNodejsVersion', 1) + tracker.info('getLatestNodejsVersion', 'Getting Node.js release information') + var version = '' + url = url || 'https://nodejs.org/dist/index.json' + request(url, function (e, res, index) { + tracker.finish() + if (e) return cb(e) + if (res.statusCode !== 200) { + return cb(new Error('Status not 200, ' + res.statusCode)) + } + try { + JSON.parse(index).forEach(function (item) { + if (item.lts && item.version > version) version = item.version + }) + cb(null, version) + } catch (e) { + cb(e) + } + }) +} + +module.exports = getLatestNodejsVersion diff --git a/deps/npm/lib/doctor/get-latest-npm-version.js b/deps/npm/lib/doctor/get-latest-npm-version.js new file mode 100644 index 00000000000..4df0fee0fa3 --- /dev/null +++ b/deps/npm/lib/doctor/get-latest-npm-version.js @@ -0,0 +1,13 @@ +var log = require('npmlog') +var fetchPackageMetadata = require('../fetch-package-metadata') + +function getLatestNpmVersion (cb) { + var tracker = log.newItem('getLatestNpmVersion', 1) + tracker.info('getLatestNpmVersion', 'Getting npm package information') + fetchPackageMetadata('npm@latest', '.', function (e, d) { + tracker.finish() + cb(e, d.version) + }) +} + +module.exports = getLatestNpmVersion diff --git a/deps/npm/lib/fetch-package-metadata.js b/deps/npm/lib/fetch-package-metadata.js index 85322304d5f..bd6e47e17c1 100644 --- a/deps/npm/lib/fetch-package-metadata.js +++ b/deps/npm/lib/fetch-package-metadata.js @@ -26,6 +26,7 @@ var getCacheStat = require('./cache/get-stat.js') var unpack = require('./utils/tar.js').unpack var pulseTillDone = require('./utils/pulse-till-done.js') var parseJSON = require('./utils/parse-json.js') +var pickManifestFromRegistryMetadata = require('./utils/pick-manifest-from-registry-metadata.js') function andLogAndFinish (spec, tracker, done) { validate('SF', [spec, done]) @@ -113,7 +114,7 @@ function fetchNamedPackageData (dep, next) { } else { npm.registry.get(url, {auth: auth}, pulseTillDone('fetchMetadata', iferr(next, pickVersionFromRegistryDocument))) } - function returnAndAddMetadata (pkg) { + function thenAddMetadata (pkg) { pkg._from = dep.raw pkg._resolved = pkg.dist.tarball pkg._shasum = pkg.dist.shasum @@ -130,35 +131,14 @@ function fetchNamedPackageData (dep, next) { 'You should delete or re-publish the invalid versions.', pkg.name, invalidVersions.join(', ')) } - versions = versions.filter(function (v) { return semver.valid(v) }).sort(semver.rcompare) + versions = versions.filter(function (v) { return semver.valid(v) }) if (dep.type === 'tag') { var tagVersion = pkg['dist-tags'][dep.spec] - if (pkg.versions[tagVersion]) return returnAndAddMetadata(pkg.versions[tagVersion]) + if (pkg.versions[tagVersion]) return thenAddMetadata(pkg.versions[tagVersion]) } else { - var latestVersion = pkg['dist-tags'][npm.config.get('tag')] || versions[0] - - // Find the the most recent version less than or equal - // to latestVersion that satisfies our spec - for (var ii = 0; ii < versions.length; ++ii) { - if (semver.gt(versions[ii], latestVersion)) continue - if (semver.satisfies(versions[ii], dep.spec)) { - return returnAndAddMetadata(pkg.versions[versions[ii]]) - } - } - - // Failing that, try finding the most recent version that matches - // our spec - for (var jj = 0; jj < versions.length; ++jj) { - if (semver.satisfies(versions[jj], dep.spec)) { - return returnAndAddMetadata(pkg.versions[versions[jj]]) - } - } - - // Failing THAT, if the range was '*' uses latestVersion - if (dep.spec === '*') { - return returnAndAddMetadata(pkg.versions[latestVersion]) - } + var picked = pickManifestFromRegistryMetadata(dep.spec, npm.config.get('tag'), versions, pkg) + if (picked) return thenAddMetadata(picked.manifest) } // We didn't manage to find a compatible version diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 0cf6a2b2d63..1b0601d9f45 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -114,6 +114,7 @@ var unlock = locker.unlock var ls = require('./ls.js') var parseJSON = require('./utils/parse-json.js') var output = require('./utils/output.js') +var saveMetrics = require('./utils/metrics.js').save // install specific libraries var copyTree = require('./install/copy-tree.js') @@ -216,9 +217,14 @@ function Installer (where, dryrun, args) { } Installer.prototype = {} -Installer.prototype.run = function (cb) { +Installer.prototype.run = function (_cb) { validate('F', arguments) + var cb = function (err) { + saveMetrics(!err) + return _cb.apply(this, arguments) + } + // FIXME: This is bad and I should feel bad. // lib/install needs to have some way of sharing _limited_ // state with the things it calls. Passing the object is too diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js index bdbd8170074..a31976a50d7 100644 --- a/deps/npm/lib/install/deps.js +++ b/deps/npm/lib/install/deps.js @@ -188,9 +188,13 @@ function addRequiredDep (tree, child, cb) { } exports.removeObsoleteDep = removeObsoleteDep -function removeObsoleteDep (child) { +function removeObsoleteDep (child, log) { if (child.removed) return child.removed = true + if (log) { + log.silly('removeObsoleteDep', 'removing ' + packageId(child) + + ' from the tree as its been replaced by a newer version or is no longer required') + } // remove from physical tree if (child.parent) { child.parent.children = child.parent.children.filter(function (pchild) { return pchild !== child }) @@ -199,7 +203,7 @@ function removeObsoleteDep (child) { var requires = child.requires || [] requires.forEach(function (requirement) { requirement.requiredBy = requirement.requiredBy.filter(function (reqBy) { return reqBy !== child }) - if (requirement.requiredBy.length === 0) removeObsoleteDep(requirement) + if (requirement.requiredBy.length === 0) removeObsoleteDep(requirement, log) }) } diff --git a/deps/npm/lib/install/diff-trees.js b/deps/npm/lib/install/diff-trees.js index db4fb3ce312..1429c71dcb8 100644 --- a/deps/npm/lib/install/diff-trees.js +++ b/deps/npm/lib/install/diff-trees.js @@ -23,7 +23,7 @@ function pkgAreEquiv (aa, bb) { return false } -function getNameAndVersion (pkg) { +function getUniqueId (pkg) { var versionspec = pkg._shasum if (!versionspec && nonRegistrySource(pkg)) { @@ -113,21 +113,25 @@ var sortActions = module.exports.sortActions = function (differences) { return sorted } +function setAction (differences, action, pkg) { + differences.push([action, pkg]) +} + var diffTrees = module.exports._diffTrees = function (oldTree, newTree) { validate('OO', arguments) var differences = [] var flatOldTree = flattenTree(oldTree) var flatNewTree = flattenTree(newTree) var toRemove = {} - var toRemoveByNameAndVer = {} + var toRemoveByUniqueId = {} // find differences Object.keys(flatOldTree).forEach(function (flatname) { if (flatNewTree[flatname]) return var pkg = flatOldTree[flatname] toRemove[flatname] = pkg - var namever = getNameAndVersion(pkg.package) - if (!toRemoveByNameAndVer[namever]) toRemoveByNameAndVer[namever] = [] - toRemoveByNameAndVer[namever].push(flatname) + var pkgunique = getUniqueId(pkg.package) + if (!toRemoveByUniqueId[pkgunique]) toRemoveByUniqueId[pkgunique] = [] + toRemoveByUniqueId[pkgunique].push(flatname) }) Object.keys(flatNewTree).forEach(function (path) { var pkg = flatNewTree[path] @@ -138,21 +142,21 @@ var diffTrees = module.exports._diffTrees = function (oldTree, newTree) { if (pkg.oldPkg) { if (!pkg.userRequired && pkgAreEquiv(pkg.oldPkg.package, pkg.package)) return if (!pkg.isInLink && (isLink(pkg.oldPkg) || isLink(pkg))) { - differences.push(['update-linked', pkg]) + setAction(differences, 'update-linked', pkg) } else { - differences.push(['update', pkg]) + setAction(differences, 'update', pkg) } } else { - var vername = getNameAndVersion(pkg.package) - var removing = toRemoveByNameAndVer[vername] && toRemoveByNameAndVer[vername].length + var vername = getUniqueId(pkg.package) + var removing = toRemoveByUniqueId[vername] && toRemoveByUniqueId[vername].length var bundlesOrFromBundle = pkg.fromBundle || pkg.package.bundleDependencies if (removing && !bundlesOrFromBundle) { - var flatname = toRemoveByNameAndVer[vername].shift() + var flatname = toRemoveByUniqueId[vername].shift() pkg.fromPath = toRemove[flatname].path - differences.push(['move', pkg]) + setAction(differences, 'move', pkg) delete toRemove[flatname] } else { - differences.push(['add', pkg]) + setAction(differences, 'add', pkg) } } }) @@ -160,7 +164,7 @@ var diffTrees = module.exports._diffTrees = function (oldTree, newTree) { .keys(toRemove) .map(function (path) { return toRemove[path] }) .forEach(function (pkg) { - differences.push(['remove', pkg]) + setAction(differences, 'remove', pkg) }) return differences } diff --git a/deps/npm/lib/install/save.js b/deps/npm/lib/install/save.js index d5c97bfaa26..18028a3c26f 100644 --- a/deps/npm/lib/install/save.js +++ b/deps/npm/lib/install/save.js @@ -167,11 +167,7 @@ function computeVersionSpec (child) { pathname: requested.spec }) } else { - return url.format({ - protocol: 'file', - slashes: false, - pathname: relativePath - }) + return 'file:' + relativePath } } else if (requested.type === 'hosted') { return requested.spec diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 05749b3fd26..d0af64b1957 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -35,6 +35,7 @@ var cmdList = require('./config/cmd-list').cmdList var plumbing = require('./config/cmd-list').plumbing var output = require('./utils/output.js') + var startMetrics = require('./utils/metrics.js').start npm.config = { loaded: false, @@ -308,6 +309,8 @@ // go ahead and spin up the registry client. npm.registry = new CachingRegClient(npm.config) + startMetrics() + return cb(null, npm) }) }) diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index 9f6a8b75eb0..a4a0d15abbf 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -41,6 +41,7 @@ var isExtraneous = require('./install/is-extraneous.js') var recalculateMetadata = require('./install/deps.js').recalculateMetadata var moduleName = require('./utils/module-name.js') var output = require('./utils/output.js') +var ansiTrim = require('./utils/ansi-trim') function uniqName (item) { return item[0].path + '|' + item[1] + '|' + item[7] @@ -149,12 +150,6 @@ function makePretty (p) { return columns } -function ansiTrim (str) { - var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' + - '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g') - return str.replace(r, '') -} - function makeParseable (list) { return list.map(function (p) { var dep = p[0] diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js index 46373742f59..6d103fc5086 100644 --- a/deps/npm/lib/prune.js +++ b/deps/npm/lib/prune.js @@ -1,54 +1,66 @@ // prune extraneous packages. module.exports = prune +module.exports.Pruner = Pruner prune.usage = 'npm prune [[<@scope>/]<pkg>...] [--production]' -var readInstalled = require('read-installed') var npm = require('./npm.js') -var path = require('path') -var readJson = require('read-package-json') var log = require('npmlog') +var util = require('util') +var moduleName = require('./utils/module-name.js') +var Installer = require('./install.js').Installer +var isExtraneous = require('./install/is-extraneous.js') +var isDev = require('./install/is-dev-dep.js') +var removeDeps = require('./install/deps.js').removeDeps +var loadExtraneous = require('./install/deps.js').loadExtraneous +var chain = require('slide').chain prune.completion = require('./utils/completion/installed-deep.js') function prune (args, cb) { - // check if is a valid package.json file - var jsonFile = path.resolve(npm.dir, '..', 'package.json') - readJson(jsonFile, log.warn, function (er) { - if (er) return cb(er) - next() - }) - - function next () { - var opt = { - depth: npm.config.get('depth'), - dev: !npm.config.get('production') || npm.config.get('dev') - } - readInstalled(npm.prefix, opt, function (er, data) { - if (er) return cb(er) - prune_(args, data, cb) - }) - } + var dryrun = !!npm.config.get('dry-run') + new Pruner('.', dryrun, args).run(cb) } -function prune_ (args, data, cb) { - npm.commands.unbuild(prunables(args, data, []), cb) +function Pruner (where, dryrun, args) { + Installer.call(this, where, dryrun, args) } +util.inherits(Pruner, Installer) + +Pruner.prototype.loadAllDepsIntoIdealTree = function (cb) { + log.silly('uninstall', 'loadAllDepsIntoIdealtree') + + var cg = this.progress.loadAllDepsIntoIdealTree + var steps = [] -function prunables (args, data, seen) { - var deps = data.dependencies || {} - return Object.keys(deps).map(function (d) { - if (typeof deps[d] !== 'object' || seen.indexOf(deps[d]) !== -1) return null - seen.push(deps[d]) - if (deps[d].extraneous && (args.length === 0 || args.indexOf(d) !== -1)) { - var extra = deps[d] - delete deps[d] - return extra.path - } - return prunables(args, deps[d], seen) - }).filter(function (d) { return d !== null }) - .reduce(function FLAT (l, r) { - return l.concat(Array.isArray(r) ? r.reduce(FLAT, []) : r) - }, []) + var self = this + var excludeDev = npm.config.get('production') || /^prod(uction)?$/.test(npm.config.get('only')) + function shouldPrune (child) { + if (isExtraneous(child)) return true + if (!excludeDev) return false + var childName = moduleName(child) + var isChildDev = function (parent) { return isDev(parent, childName) } + if (child.requiredBy.every(isChildDev)) return true + } + function getModuleName (child) { + // wrapping because moduleName doesn't like extra args and we're called + // from map. + return moduleName(child) + } + function matchesArg (name) { + return self.args.length === 0 || self.args.indexOf(name) !== -1 + } + function nameObj (name) { + return {name: name} + } + var toPrune = this.currentTree.children.filter(shouldPrune).map(getModuleName).filter(matchesArg).map(nameObj) + + steps.push( + [removeDeps, toPrune, this.idealTree, null, cg.newGroup('removeDeps')], + [loadExtraneous, this.idealTree, cg.newGroup('loadExtraneous')]) + chain(steps, cb) } + +Pruner.prototype.runPreinstallTopLevelLifecycles = function (cb) { cb() } +Pruner.prototype.runPostinstallTopLevelLifecycles = function (cb) { cb() } diff --git a/deps/npm/lib/uninstall.js b/deps/npm/lib/uninstall.js index 9a05e6697fb..2176048843f 100644 --- a/deps/npm/lib/uninstall.js +++ b/deps/npm/lib/uninstall.js @@ -74,3 +74,6 @@ Uninstaller.prototype.loadAllDepsIntoIdealTree = function (cb) { [loadExtraneous, this.idealTree, cg.newGroup('loadExtraneous')]) chain(steps, cb) } + +Uninstaller.prototype.runPreinstallTopLevelLifecycles = function (cb) { cb() } +Uninstaller.prototype.runPostinstallTopLevelLifecycles = function (cb) { cb() } diff --git a/deps/npm/lib/utils/ansi-trim.js b/deps/npm/lib/utils/ansi-trim.js new file mode 100644 index 00000000000..7f9a6c30ec9 --- /dev/null +++ b/deps/npm/lib/utils/ansi-trim.js @@ -0,0 +1,7 @@ +function ansiTrim (str) { + var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' + + '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g') + return str.replace(r, '') +} + +module.exports = ansiTrim diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index 6b2bf1c72d2..f3cfc3c5ea2 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -13,10 +13,15 @@ var rollbacks = npm.rollbacks var chain = require('slide').chain var writeStreamAtomic = require('fs-write-stream-atomic') var errorMessage = require('./error-message.js') +var stopMetrics = require('./metrics.js').stop process.on('exit', function (code) { log.disableProgress() if (!npm.config || !npm.config.loaded) return + + // kill any outstanding stats reporter if it hasn't finished yet + stopMetrics() + if (code) itWorked = false if (itWorked) log.info('ok') else { diff --git a/deps/npm/lib/utils/metrics-launch.js b/deps/npm/lib/utils/metrics-launch.js new file mode 100644 index 00000000000..821f8bc7e4f --- /dev/null +++ b/deps/npm/lib/utils/metrics-launch.js @@ -0,0 +1,39 @@ +'use strict' +module.exports = launchSendMetrics +var fs = require('graceful-fs') +var child_process = require('child_process') + +if (require.main === module) main() + +function launchSendMetrics () { + var path = require('path') + var npm = require('../npm.js') + try { + if (!npm.config.get('send-metrics')) return + var cliMetrics = path.join(npm.config.get('cache'), 'anonymous-cli-metrics.json') + var targetRegistry = npm.config.get('metrics-registry') + fs.statSync(cliMetrics) + return runInBackground(__filename, [cliMetrics, targetRegistry]) + } catch (ex) { + // if the metrics file doesn't exist, don't run + } +} + +function runInBackground (js, args, opts) { + if (!args) args = [] + args.unshift(js) + if (!opts) opts = {} + opts.stdio = 'ignore' + opts.detached = true + var child = child_process.spawn(process.execPath, args, opts) + child.unref() + return child +} + +function main () { + var sendMetrics = require('./metrics.js').send + var metricsFile = process.argv[2] + var metricsRegistry = process.argv[3] + + sendMetrics(metricsFile, metricsRegistry) +} diff --git a/deps/npm/lib/utils/metrics.js b/deps/npm/lib/utils/metrics.js new file mode 100644 index 00000000000..c51136e78cd --- /dev/null +++ b/deps/npm/lib/utils/metrics.js @@ -0,0 +1,73 @@ +'use strict' +exports.start = startMetrics +exports.stop = stopMetrics +exports.save = saveMetrics +exports.send = sendMetrics + +var fs = require('fs') +var path = require('path') +var npm = require('../npm.js') +var uuid = require('uuid') + +var inMetrics = false + +function startMetrics () { + if (inMetrics) return + // loaded on demand to avoid any recursive deps when `./metrics-launch` requires us. + var metricsLaunch = require('./metrics-launch.js') + npm.metricsProcess = metricsLaunch() +} + +function stopMetrics () { + if (inMetrics) return + if (npm.metricsProcess) npm.metricsProcess.kill('SIGKILL') +} + +function saveMetrics (itWorked) { + if (inMetrics) return + // If the metrics reporter hasn't managed to PUT yet then kill it so that it doesn't + // step on our updating the anonymous-cli-metrics json + stopMetrics() + var metricsFile = path.join(npm.config.get('cache'), 'anonymous-cli-metrics.json') + var metrics + try { + metrics = JSON.parse(fs.readFileSync(metricsFile)) + metrics.metrics.to = new Date().toISOString() + if (itWorked) { + ++metrics.metrics.successfulInstalls + } else { + ++metrics.metrics.failedInstalls + } + } catch (ex) { + metrics = { + metricId: uuid.v4(), + metrics: { + from: new Date().toISOString(), + to: new Date().toISOString(), + successfulInstalls: itWorked ? 1 : 0, + failedInstalls: itWorked ? 0 : 1 + } + } + } + try { + fs.writeFileSync(metricsFile, JSON.stringify(metrics)) + } catch (ex) { + // we couldn't write the error metrics file, um, well, oh well. + } +} + +function sendMetrics (metricsFile, metricsRegistry) { + inMetrics = true + var cliMetrics = JSON.parse(fs.readFileSync(metricsFile)) + npm.load({}, function (err) { + if (err) return + npm.registry.config.retry.retries = 0 + npm.registry.sendAnonymousCLIMetrics(metricsRegistry, cliMetrics, function (err) { + if (err) { + fs.writeFileSync(path.join(path.dirname(metricsFile), 'last-send-metrics-error.txt'), err.stack) + } else { + fs.unlinkSync(metricsFile) + } + }) + }) +} diff --git a/deps/npm/lib/utils/pick-manifest-from-registry-metadata.js b/deps/npm/lib/utils/pick-manifest-from-registry-metadata.js new file mode 100644 index 00000000000..e2c0d2e5aa4 --- /dev/null +++ b/deps/npm/lib/utils/pick-manifest-from-registry-metadata.js @@ -0,0 +1,26 @@ +'use strict' +module.exports = pickManifestFromRegistryMetadata + +var log = require('npmlog') +var semver = require('semver') + +function pickManifestFromRegistryMetadata (spec, tag, versions, metadata) { + log.silly('pickManifestFromRegistryMetadata', 'spec', spec, 'tag', tag, 'versions', versions) + + // if the tagged version satisfies, then use that. + var tagged = metadata['dist-tags'][tag] + if (tagged && + metadata.versions[tagged] && + semver.satisfies(tagged, spec, true)) { + return {resolvedTo: tag, manifest: metadata.versions[tagged]} + } + // find the max satisfying version. + var ms = semver.maxSatisfying(versions, spec, true) + if (ms) { + return {resolvedTo: ms, manifest: metadata.versions[ms]} + } else if (spec === '*' && versions.length && tagged && metadata.versions[tagged]) { + return {resolvedTo: tag, manifest: metadata.versions[tagged]} + } else { + return + } +} diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 264624dfa12..b7c50819f83 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "December 2016" "" "" +.TH "NPM" "1" "January 2017" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index dfe958dbb0e..049e228e4fd 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "December 2016" "" "" +.TH "NPM\-ACCESS" "1" "January 2017" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index e1142dd49b6..3b68c1efff1 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "December 2016" "" "" +.TH "NPM\-ADDUSER" "1" "January 2017" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index 1fc8994c8cf..c10997f3f63 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "December 2016" "" "" +.TH "NPM\-BIN" "1" "January 2017" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 3a9eb1352e9..f95d7383862 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "December 2016" "" "" +.TH "NPM\-BUGS" "1" "January 2017" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index b6f860139e5..5016086c62f 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "December 2016" "" "" +.TH "NPM\-BUILD" "1" "January 2017" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 72e8deb5473..f42848ce47f 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "December 2016" "" "" +.TH "NPM\-BUNDLE" "1" "January 2017" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 29b5a1f89dd..6ece7506032 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "December 2016" "" "" +.TH "NPM\-CACHE" "1" "January 2017" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS @@ -13,11 +13,12 @@ npm cache add <name>@<version> npm cache ls [<path>] npm cache clean [<path>] +aliases: npm cache clear, npm cache rm .fi .RE .SH DESCRIPTION .P -Used to add, list, or clear the npm cache folder\. +Used to add, list, or clean the npm cache folder\. .RS 0 .IP \(bu 2 add: @@ -33,7 +34,7 @@ folder\. Works a bit like the \fBfind\fP program, but limited by the clean: Delete data out of the cache folder\. If an argument is provided, then it specifies a subpath to delete\. If no argument is provided, then -the entire cache is cleared\. +the entire cache is deleted\. .RE .SH DETAILS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 241ab9cf5c5..f3e72de7100 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "December 2016" "" "" +.TH "NPM\-COMPLETION" "1" "January 2017" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index 5b69e6d9da1..b6088f4b42b 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "December 2016" "" "" +.TH "NPM\-CONFIG" "1" "January 2017" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 4a9c1af29e1..964aa929aaa 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "December 2016" "" "" +.TH "NPM\-DEDUPE" "1" "January 2017" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 6dbeebabc8a..6408c1095de 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "December 2016" "" "" +.TH "NPM\-DEPRECATE" "1" "January 2017" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index af30e6634af..418a383d2b5 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "December 2016" "" "" +.TH "NPM\-DIST\-TAG" "1" "January 2017" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index a6e879031df..89d3cfb5b24 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "December 2016" "" "" +.TH "NPM\-DOCS" "1" "January 2017" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 new file mode 100644 index 00000000000..72ec355e472 --- /dev/null +++ b/deps/npm/man/man1/npm-doctor.1 @@ -0,0 +1,113 @@ +.TH "NPM\-DOCTOR" "1" "January 2017" "" "" +.SH "NAME" +\fBnpm-doctor\fR \- Check your environments +.SH SYNOPSIS +.P +.RS 2 +.nf +npm doctor +.fi +.RE +.SH DESCRIPTION +.P +\fBnpm doctor\fP runs a set of checks to ensure that your npm installation has +what it needs to manage your JavaScript packages\. npm is mostly a standalone tool, but it does +have some basic requirements that must be met: +.RS 0 +.IP \(bu 2 +Node\.js and git must be executable by npm\. +.IP \(bu 2 +The primary npm registry, \fBregistry\.npmjs\.com\fP, or another service that uses +the registry API, is available\. +.IP \(bu 2 +The directories that npm uses, \fBnode_modules\fP (both locally and globally), +exist and can be written by the current user\. +.IP \(bu 2 +The npm cache exists, and the package tarballs within it aren't corrupt\. + +.RE +.P +Without all of these working properly, npm may not work properly\. Many issues +are often attributable to things that are outside npm's code base, so \fBnpm +doctor\fP confirms that the npm installation is in a good state\. +.P +Also, in addition to this, there are also very many issue reports due to using +old versions of npm\. Since npm is constantly improving, running \fBnpm@latest\fP is +better than an old version\. +.P +\fBnpm doctor\fP verifies the following items in your environment, and if there are +any recommended changes, it will display them\. +.SS \fBnpm ping\fP +.P +By default, npm installs from the primary npm registry, \fBregistry\.npmjs\.org\fP\|\. +\fBnpm doctor\fP hits a special ping endpoint within the registry\. This can also be +checked with \fBnpm ping\fP\|\. If this check fails, you may be using a proxy that +needs to be configured, or may need to talk to your IT staff to get access over +HTTPS to \fBregistry\.npmjs\.org\fP\|\. +.P +This check is done against whichever registry you've configured (you can see +what that is by running \fBnpm config get registry\fP), and if you're using a +private registry that doesn't support the \fB/whoami\fP endpoint supported by the +primary registry, this check may fail\. +.SS \fBnpm \-v\fP +.P +While Node\.js may come bundled with a particular version of npm, it's the +policy of the CLI team that we recommend all users run \fBnpm@latest\fP if they +can\. As the CLI is maintained by a small team of contributors, there are only +resources for a single line of development, so npm's own long\-term support +releases typically only receive critical security and regression fixes\. The +team believes that the latest tested version of npm is almost always likely to +be the most functional and defect\-free version of npm\. +.SS \fBnode \-v\fP +.P +For most users, in most circumstances, the best version of Node will be the +latest long\-term support (LTS) release\. Those of you who want access to new +ECMAscript features or bleeding\-edge changes to Node's standard library may be +running a newer version, and some of you may be required to run an older +version of Node because of enterprise change control policies\. That's OK! But +in general, the npm team recommends that most users run Node\.js LTS\. +.SS \fBnpm config get registry\fP +.P +Some of you may be installing from private package registries for your project +or company\. That's great! Others of you may be following tutorials or +StackOverflow questions in an effort to troubleshoot problems you may be +having\. Sometimes, this may entail changing the registry you're pointing at\. +This part of \fBnpm doctor\fP just lets you, and maybe whoever's helping you with +support, know that you're not using the default registry\. +.SS \fBwhich git\fP +.P +While it's documented in the README, it may not be obvious that npm needs Git +installed to do many of the things that it does\. Also, in some cases +– especially on Windows – you may have Git set up in such a way that it's not +accessible via your \fBPATH\fP so that npm can find it\. This check ensures that Git +is available\. +.SS Permissions checks +.RS 0 +.IP \(bu 2 +Your cache must be readable and writable by the user running npm\. +.IP \(bu 2 +Global package binaries must be writable by the user running npm\. +.IP \(bu 2 +Your local \fBnode_modules\fP path, if you're running \fBnpm doctor\fP with a project +directory, must be readable and writable by the user running npm\. + +.RE +.SS Validate the checksums of cached packages +.P +When an npm package is published, the publishing process generates a checksum +that npm uses at install time to verify that the package didn't get corrupted +in transit\. \fBnpm doctor\fP uses these checksums to validate the package tarballs +in your local cache (you can see where that cache is located with \fBnpm config +get cache\fP, and see what's in that cache with \fBnpm cache ls\fP – probably more +than you were expecting!)\. In the event that there are corrupt packages in your +cache, you should probably run \fBnpm cache clean\fP and reset the cache\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help bugs +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help ping + +.RE diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 11d8960e0ec..6476986e929 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "December 2016" "" "" +.TH "NPM\-EDIT" "1" "January 2017" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 72e5cebc94c..0d9ec036a74 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "December 2016" "" "" +.TH "NPM\-EXPLORE" "1" "January 2017" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 7e2a432e1f0..5b5412f22ed 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "December 2016" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "January 2017" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 7f420d43bf6..bbdb7a1f6be 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "December 2016" "" "" +.TH "NPM\-HELP" "1" "January 2017" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 81edab5534c..246516e8b40 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "December 2016" "" "" +.TH "NPM\-INIT" "1" "January 2017" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index b1899955163..b68e51af87e 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "December 2016" "" "" +.TH "NPM" "" "January 2017" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index bacdea8c0ea..7fed7744662 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "December 2016" "" "" +.TH "NPM\-INSTALL" "1" "January 2017" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index fe7ac0aebba..9d8eb459d4c 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "December 2016" "" "" +.TH "NPM\-LINK" "1" "January 2017" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 39b9f212db6..e79ccba5a86 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "December 2016" "" "" +.TH "NPM\-LOGOUT" "1" "January 2017" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index d0d5ed1022d..1562b80f83d 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "December 2016" "" "" +.TH "NPM\-LS" "1" "January 2017" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@4.0.5 /path/to/npm +npm@4.1.1 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index e3e84a9cb14..d324f09f821 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "December 2016" "" "" +.TH "NPM\-OUTDATED" "1" "January 2017" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index d35ed5b7e8e..62d4a85f087 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "December 2016" "" "" +.TH "NPM\-OWNER" "1" "January 2017" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 8efafd0b519..623dec83a4c 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "December 2016" "" "" +.TH "NPM\-PACK" "1" "January 2017" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 79eccd8840b..24262c25804 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "December 2016" "" "" +.TH "NPM\-PING" "1" "January 2017" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index f293b2e4477..da1569e50e2 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "December 2016" "" "" +.TH "NPM\-PREFIX" "1" "January 2017" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 1e448536e6d..895327b41e2 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "December 2016" "" "" +.TH "NPM\-PRUNE" "1" "January 2017" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index da13f889e4d..cd3ddf45aea 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "December 2016" "" "" +.TH "NPM\-PUBLISH" "1" "January 2017" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index cd55fa53378..16cbea997d0 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "December 2016" "" "" +.TH "NPM\-REBUILD" "1" "January 2017" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index fe119dafd8f..e8b6f6e8f07 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "December 2016" "" "" +.TH "NPM\-REPO" "1" "January 2017" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 9297a445332..b326b4f9744 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "December 2016" "" "" +.TH "NPM\-RESTART" "1" "January 2017" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 49c650dd919..3f9fd2a2b80 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "December 2016" "" "" +.TH "NPM\-ROOT" "1" "January 2017" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index d86fa8d5024..471a82425cb 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "December 2016" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "January 2017" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index c994847e669..bdd3028bc7a 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "December 2016" "" "" +.TH "NPM\-SEARCH" "1" "January 2017" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index edcfbee8baf..ddf341356f8 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "December 2016" "" "" +.TH "NPM\-SHRINKWRAP" "1" "January 2017" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index cfb2056ae75..fde504ee600 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "December 2016" "" "" +.TH "NPM\-STAR" "1" "January 2017" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index 554e01c0d11..a2e44c9bc4c 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "December 2016" "" "" +.TH "NPM\-STARS" "1" "January 2017" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index b98a6338309..9571756354f 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "December 2016" "" "" +.TH "NPM\-START" "1" "January 2017" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index c52f34e46df..4c2d64802ef 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "December 2016" "" "" +.TH "NPM\-STOP" "1" "January 2017" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 71b9081ab1d..88a71c41bdb 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "December 2016" "" "" +.TH "NPM\-TEAM" "1" "January 2017" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index dea00f178c0..ee2f896ec5b 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "December 2016" "" "" +.TH "NPM\-TEST" "1" "January 2017" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index c32a9cf82ee..fb89c977f1e 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "1" "December 2016" "" "" +.TH "NPM\-UNINSTALL" "1" "January 2017" "" "" .SH "NAME" \fBnpm-uninstall\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index edee140ab7a..ff7d0f7c120 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "December 2016" "" "" +.TH "NPM\-UNPUBLISH" "1" "January 2017" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 7dcdde27144..4ba2029e5ee 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "December 2016" "" "" +.TH "NPM\-UPDATE" "1" "January 2017" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 7d503e90b8c..b5b65dc5b63 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "December 2016" "" "" +.TH "NPM\-VERSION" "1" "January 2017" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 5b9b04c2fc3..4913e0bd42b 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "December 2016" "" "" +.TH "NPM\-VIEW" "1" "January 2017" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 39a55d8b679..21207f0f786 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "December 2016" "" "" +.TH "NPM\-WHOAMI" "1" "January 2017" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 7d249f4229f..48c8d9d0008 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "December 2016" "" "" +.TH "NPM" "1" "January 2017" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm <command> [args] .RE .SH VERSION .P -4.0.5 +4.1.1 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index d7be6670002..93ab0441319 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "December 2016" "" "" +.TH "NPM\-FOLDERS" "5" "January 2017" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index d7be6670002..93ab0441319 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "December 2016" "" "" +.TH "NPM\-FOLDERS" "5" "January 2017" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 7464f9609f4..5bb1b64f410 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "December 2016" "" "" +.TH "PACKAGE\.JSON" "5" "January 2017" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 45aa7ace8f8..e47da0d5167 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "December 2016" "" "" +.TH "NPMRC" "5" "January 2017" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 7464f9609f4..5bb1b64f410 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "December 2016" "" "" +.TH "PACKAGE\.JSON" "5" "January 2017" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index 614cd60ddc7..d6854ea9efa 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "December 2016" "" "" +.TH "NPM\-CODING\-STYLE" "7" "January 2017" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 25bb498c626..13cd8676301 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "December 2016" "" "" +.TH "NPM\-CONFIG" "7" "January 2017" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION @@ -831,6 +831,16 @@ Type: String Commit message which is used by \fBnpm version\fP when creating version commit\. .P Any "%s" in the message will be replaced with the version number\. +.SS metrics\-registry +.RS 0 +.IP \(bu 2 +Default: "https://registry\.npmjs\.org/" +.IP \(bu 2 +Type: String + +.RE +.P +The registry you want to send cli metrics to if \fBsend\-metrics\fP is true\. .SS node\-version .RS 0 .IP \(bu 2 @@ -1151,6 +1161,19 @@ Type: Number .RE .P The age of the cache, in seconds, before another registry request is made\. +.SS send\-metrics +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If true, success/failure metrics will be reported to the registry stored in +\fBmetrics\-registry\fP\|\. These requests contain the number of successful and +failing runs of the npm CLI and the time period overwhich those counts were +gathered\. No identifying information is included in these requests\. .SS shell .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index 58c1298d969..a56bd183b4e 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "December 2016" "" "" +.TH "NPM\-DEVELOPERS" "7" "January 2017" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index bdd922b03b5..fc0634dfba5 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "December 2016" "" "" +.TH "NPM\-DISPUTES" "7" "January 2017" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .P diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index f2a76256dff..e70504241ae 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "December 2016" "" "" +.TH "NPM\-INDEX" "7" "January 2017" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README @@ -49,6 +49,9 @@ Modify package distribution tags .SS npm help docs .P Docs for a package in a web browser maybe +.SS npm help doctor +.P +Check your environments .SS npm help edit .P Edit an installed package diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 11d12adf51c..5948bf85304 100644 --- a/deps/npm/man/man7/npm-orgs.7 +++ b/deps/npm/man/man7/npm-orgs.7 @@ -1,4 +1,4 @@ -.TH "NPM\-ORGS" "7" "December 2016" "" "" +.TH "NPM\-ORGS" "7" "January 2017" "" "" .SH "NAME" \fBnpm-orgs\fR \- Working with Teams & Orgs .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index 88d802a9dca..639395eee65 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "December 2016" "" "" +.TH "NPM\-REGISTRY" "7" "January 2017" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index a18f0673a64..5d362460c6a 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "December 2016" "" "" +.TH "NPM\-SCOPE" "7" "January 2017" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index efcf992f953..4f8554367aa 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "December 2016" "" "" +.TH "NPM\-SCRIPTS" "7" "January 2017" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index 7bbdc633991..f6df37784c6 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "December 2016" "" "" +.TH "NPM\-REMOVAL" "1" "January 2017" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index 23c46f16658..e71137f4739 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "December 2016" "" "" +.TH "SEMVER" "7" "January 2017" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage diff --git a/deps/npm/node_modules/lockfile/CHANGELOG.md b/deps/npm/node_modules/lockfile/CHANGELOG.md index 6d9005b1d03..38f44af041e 100644 --- a/deps/npm/node_modules/lockfile/CHANGELOG.md +++ b/deps/npm/node_modules/lockfile/CHANGELOG.md @@ -1,11 +1,16 @@ # Changes +## v1.0.3 + +* handle the case where callback is not passed by user + ## v1.0.2 * git ignore coverage and node_modules * update tap to v7 * build a changelog +* package: fix repository link * pass tests on 0.8 * before_script needs to be before_install * tap 1.2.0 and travis diff --git a/deps/npm/node_modules/lockfile/lockfile.js b/deps/npm/node_modules/lockfile/lockfile.js index 0c2c6f597ad..fd49717b8c3 100644 --- a/deps/npm/node_modules/lockfile/lockfile.js +++ b/deps/npm/node_modules/lockfile/lockfile.js @@ -58,7 +58,7 @@ exports.unlock = function (path, cb) { debug('unlock', path) // best-effort. unlocking an already-unlocked lock is a noop delete locks[path] - fs.unlink(path, function (unlinkEr) { cb() }) + fs.unlink(path, function (unlinkEr) { cb && cb() }) } exports.unlockSync = function (path) { diff --git a/deps/npm/node_modules/lockfile/package.json b/deps/npm/node_modules/lockfile/package.json index 0fa61f34b0d..e559a82165a 100644 --- a/deps/npm/node_modules/lockfile/package.json +++ b/deps/npm/node_modules/lockfile/package.json @@ -2,49 +2,49 @@ "_args": [ [ { - "raw": "lockfile@1.0.2", + "raw": "lockfile@^1.0.3", "scope": null, "escapedName": "lockfile", "name": "lockfile", - "rawSpec": "1.0.2", - "spec": "1.0.2", - "type": "version" + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" }, "/Users/rebecca/code/npm" ] ], - "_from": "lockfile@1.0.2", - "_id": "lockfile@1.0.2", + "_from": "lockfile@>=1.0.3 <2.0.0", + "_id": "lockfile@1.0.3", "_inCache": true, "_location": "/lockfile", "_nodeVersion": "6.5.0", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lockfile-1.0.2.tgz_1474488698320_0.008735276060178876" + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/lockfile-1.0.3.tgz_1481132515120_0.9350064944010228" }, "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, - "_npmVersion": "3.10.7", + "_npmVersion": "3.10.9", "_phantomChildren": {}, "_requested": { - "raw": "lockfile@1.0.2", + "raw": "lockfile@^1.0.3", "scope": null, "escapedName": "lockfile", "name": "lockfile", - "rawSpec": "1.0.2", - "spec": "1.0.2", - "type": "version" + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.2.tgz", - "_shasum": "97e1990174f696cbe0a3acd58a43b84aa30c7c83", + "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.3.tgz", + "_shasum": "2638fc39a0331e9cac1a04b71799931c9c50df79", "_shrinkwrap": null, - "_spec": "lockfile@1.0.2", + "_spec": "lockfile@^1.0.3", "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", @@ -52,7 +52,7 @@ "url": "http://blog.izs.me/" }, "bugs": { - "url": "https://github.com/isaacs/lockfile/issues" + "url": "https://github.com/npm/lockfile/issues" }, "dependencies": {}, "description": "A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.", @@ -64,11 +64,11 @@ "test": "test" }, "dist": { - "shasum": "97e1990174f696cbe0a3acd58a43b84aa30c7c83", - "tarball": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.2.tgz" + "shasum": "2638fc39a0331e9cac1a04b71799931c9c50df79", + "tarball": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.3.tgz" }, - "gitHead": "a25076ca142a08951a9265bc1091e715e9bc7f05", - "homepage": "https://github.com/isaacs/lockfile#readme", + "gitHead": "96549505fcca4b8b0ff0e833719720bd463306d7", + "homepage": "https://github.com/npm/lockfile#readme", "keywords": [ "lockfile", "lock", @@ -93,12 +93,12 @@ "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "git://github.com/isaacs/lockfile.git" + "url": "git+https://github.com/npm/lockfile.git" }, "scripts": { "changelog": "bash gen-changelog.sh", "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", "test": "tap test/*.js --cov" }, - "version": "1.0.2" + "version": "1.0.3" } diff --git a/deps/npm/node_modules/lockfile/test/unlock-no-cb.js b/deps/npm/node_modules/lockfile/test/unlock-no-cb.js new file mode 100644 index 00000000000..df160923ebc --- /dev/null +++ b/deps/npm/node_modules/lockfile/test/unlock-no-cb.js @@ -0,0 +1,10 @@ +var t = require('tap') +if (/0\.(10|8)/.test(process.version)) { + t.pass('just a dummy test, no beforeExit in this node version') +} else { + process.on('beforeExit', function (code) { + t.equal(code, 0, 'did not throw') + }) +} +var lf = require('lockfile') +lf.unlock('no-file-no-cb') diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore new file mode 100644 index 00000000000..3c3629e647f --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml b/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml new file mode 100644 index 00000000000..99f2bbf5068 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE index 19129e315fe..19129e315fe 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/LICENSE +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md b/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md new file mode 100644 index 00000000000..f21a4b31c5d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md @@ -0,0 +1,211 @@ +If you want to write an option parser, and have it be good, there are +two ways to do it. The Right Way, and the Wrong Way. + +The Wrong Way is to sit down and write an option parser. We've all done +that. + +The Right Way is to write some complex configurable program with so many +options that you hit the limit of your frustration just trying to +manage them all, and defer it with duct-tape solutions until you see +exactly to the core of the problem, and finally snap and write an +awesome option parser. + +If you want to write an option parser, don't write an option parser. +Write a package manager, or a source control system, or a service +restarter, or an operating system. You probably won't end up with a +good one of those, but if you don't give up, and you are relentless and +diligent enough in your procrastination, you may just end up with a very +nice option parser. + +## USAGE + + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) + +This would give you support for any of the following: + +```bash +$ node my-program.js --foo "blerp" --no-flag +{ "foo" : "blerp", "flag" : false } + +$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag +{ bar: 7, foo: "Mr. Hand", flag: true } + +$ node my-program.js --foo "blerp" -f -----p +{ foo: "blerp", flag: true, pick: true } + +$ node my-program.js -fp --foofoo +{ foo: "Mr. Foo", flag: true, pick: true } + +$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. +{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } + +$ node my-program.js --blatzk -fp # unknown opts are ok. +{ blatzk: true, flag: true, pick: true } + +$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +{ blatzk: 1000, flag: true, pick: true } + +$ node my-program.js --no-blatzk -fp # unless they start with "no-" +{ blatzk: false, flag: true, pick: true } + +$ node my-program.js --baz b/a/z # known paths are resolved. +{ baz: "/Users/isaacs/b/a/z" } + +# if Array is one of the types, then it can take many +# values, and will always be an array. The other types provided +# specify what types are allowed in the list. + +$ node my-program.js --many1 5 --many1 null --many1 foo +{ many1: ["5", "null", "foo"] } + +$ node my-program.js --many2 foo --many2 bar +{ many2: ["/path/to/foo", "path/to/bar"] } +``` + +Read the tests at the bottom of `lib/nopt.js` for more examples of +what this puppy can do. + +## Types + +The following types are supported, and defined on `nopt.typeDefs` + +* String: A normal string. No parsing is done. +* path: A file system path. Gets resolved against cwd if not absolute. +* url: A url. If it doesn't parse, it isn't accepted. +* Number: Must be numeric. +* Date: Must parse as a date. If it does, and `Date` is one of the options, + then it will return a Date object, not a string. +* Boolean: Must be either `true` or `false`. If an option is a boolean, + then it does not need a value, and its presence will imply `true` as + the value. To negate boolean flags, do `--no-whatever` or `--whatever + false` +* NaN: Means that the option is strictly not allowed. Any value will + fail. +* Stream: An object matching the "Stream" class in node. Valuable + for use when validating programmatically. (npm uses this to let you + supply any WriteStream on the `outfd` and `logfd` config options.) +* Array: If `Array` is specified as one of the types, then the value + will be parsed as a list of options. This means that multiple values + can be specified, and that the value will always be an array. + +If a type is an array of values not on this list, then those are +considered valid values. For instance, in the example above, the +`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, +and any other value will be rejected. + +When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be +interpreted as their JavaScript equivalents. + +You can also mix types and values, or multiple types, in a list. For +instance `{ blah: [Number, null] }` would allow a value to be set to +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. + +To define a new type, add it to `nopt.typeDefs`. Each item in that +hash is an object with a `type` member and a `validate` method. The +`type` member is an object that matches what goes in the type list. The +`validate` method is a function that gets called with `validate(data, +key, val)`. Validate methods should assign `data[key]` to the valid +value of `val` if it can be handled properly, or return boolean +`false` if it cannot. + +You can also call `nopt.clean(data, types, typeDefs)` to clean up a +config object and remove its invalid properties. + +## Error Handling + +By default, nopt outputs a warning to standard error when invalid values for +known options are found. You can change this behavior by assigning a method +to `nopt.invalidHandler`. This method will be called with +the offending `nopt.invalidHandler(key, val, types)`. + +If no `nopt.invalidHandler` is assigned, then it will console.error +its whining. If it is assigned to boolean `false` then the warning is +suppressed. + +## Abbreviations + +Yes, they are supported. If you define options like this: + +```javascript +{ "foolhardyelephants" : Boolean +, "pileofmonkeys" : Boolean } +``` + +Then this will work: + +```bash +node program.js --foolhar --pil +node program.js --no-f --pileofmon +# etc. +``` + +## Shorthands + +Shorthands are a hash of shorter option names to a snippet of args that +they expand to. + +If multiple one-character shorthands are all combined, and the +combination does not unambiguously match any other option or shorthand, +then they will be broken up into their constituent parts. For example: + +```json +{ "s" : ["--loglevel", "silent"] +, "g" : "--global" +, "f" : "--force" +, "p" : "--parseable" +, "l" : "--long" +} +``` + +```bash +npm ls -sgflp +# just like doing this: +npm ls --loglevel silent --global --force --long --parseable +``` + +## The Rest of the args + +The config object returned by nopt is given a special member called +`argv`, which is an object with the following fields: + +* `remain`: The remaining args after all the parsing has occurred. +* `original`: The args as they originally appeared. +* `cooked`: The args after flags and shorthands are expanded. + +## Slicing + +Node programs are called with more or less the exact argv as it appears +in C land, after the v8 and node-specific options have been plucked off. +As such, `argv[0]` is always `node` and `argv[1]` is always the +JavaScript program being run. + +That's usually not very useful to you. So they're sliced off by +default. If you want them, then you can pass in `0` as the last +argument, or any other number that you'd like to slice off the start of +the list. diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js b/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js new file mode 100755 index 00000000000..3232d4c570f --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js @@ -0,0 +1,54 @@ +#!/usr/bin/env node +var nopt = require("../lib/nopt") + , path = require("path") + , types = { num: Number + , bool: Boolean + , help: Boolean + , list: Array + , "num-list": [Number, Array] + , "str-list": [String, Array] + , "bool-list": [Boolean, Array] + , str: String + , clear: Boolean + , config: Boolean + , length: Number + , file: path + } + , shorthands = { s: [ "--str", "astring" ] + , b: [ "--bool" ] + , nb: [ "--no-bool" ] + , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] + , "?": ["--help"] + , h: ["--help"] + , H: ["--help"] + , n: [ "--num", "125" ] + , c: ["--config"] + , l: ["--length"] + , f: ["--file"] + } + , parsed = nopt( types + , shorthands + , process.argv + , 2 ) + +console.log("parsed", parsed) + +if (parsed.help) { + console.log("") + console.log("nopt cli tester") + console.log("") + console.log("types") + console.log(Object.keys(types).map(function M (t) { + var type = types[t] + if (Array.isArray(type)) { + return [t, type.map(function (type) { return type.name })] + } + return [t, type && type.name] + }).reduce(function (s, i) { + s[i[0]] = i[1] + return s + }, {})) + console.log("") + console.log("shorthands") + console.log(shorthands) +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js b/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js new file mode 100755 index 00000000000..142447e18e7 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +//process.env.DEBUG_NOPT = 1 + +// my-program.js +var nopt = require("../lib/nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag", "true"] + , "g" : ["--flag"] + , "s" : "--flag" + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + +console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js b/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js new file mode 100644 index 00000000000..97707e78424 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js @@ -0,0 +1,415 @@ +// info about each config option. + +var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG + ? function () { console.error.apply(console, arguments) } + : function () {} + +var url = require("url") + , path = require("path") + , Stream = require("stream").Stream + , abbrev = require("abbrev") + +module.exports = exports = nopt +exports.clean = clean + +exports.typeDefs = + { String : { type: String, validate: validateString } + , Boolean : { type: Boolean, validate: validateBoolean } + , url : { type: url, validate: validateUrl } + , Number : { type: Number, validate: validateNumber } + , path : { type: path, validate: validatePath } + , Stream : { type: Stream, validate: validateStream } + , Date : { type: Date, validate: validateDate } + } + +function nopt (types, shorthands, args, slice) { + args = args || process.argv + types = types || {} + shorthands = shorthands || {} + if (typeof slice !== "number") slice = 2 + + debug(types, shorthands, args, slice) + + args = args.slice(slice) + var data = {} + , key + , remain = [] + , cooked = args + , original = args.slice(0) + + parse(args, data, remain, types, shorthands) + // now data is full + clean(data, types, exports.typeDefs) + data.argv = {remain:remain,cooked:cooked,original:original} + Object.defineProperty(data.argv, 'toString', { value: function () { + return this.original.map(JSON.stringify).join(" ") + }, enumerable: false }) + return data +} + +function clean (data, types, typeDefs) { + typeDefs = typeDefs || exports.typeDefs + var remove = {} + , typeDefault = [false, true, null, String, Array] + + Object.keys(data).forEach(function (k) { + if (k === "argv") return + var val = data[k] + , isArray = Array.isArray(val) + , type = types[k] + if (!isArray) val = [val] + if (!type) type = typeDefault + if (type === Array) type = typeDefault.concat(Array) + if (!Array.isArray(type)) type = [type] + + debug("val=%j", val) + debug("types=", type) + val = val.map(function (val) { + // if it's an unknown value, then parse false/true/null/numbers/dates + if (typeof val === "string") { + debug("string %j", val) + val = val.trim() + if ((val === "null" && ~type.indexOf(null)) + || (val === "true" && + (~type.indexOf(true) || ~type.indexOf(Boolean))) + || (val === "false" && + (~type.indexOf(false) || ~type.indexOf(Boolean)))) { + val = JSON.parse(val) + debug("jsonable %j", val) + } else if (~type.indexOf(Number) && !isNaN(val)) { + debug("convert to number", val) + val = +val + } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { + debug("convert to date", val) + val = new Date(val) + } + } + + if (!types.hasOwnProperty(k)) { + return val + } + + // allow `--no-blah` to set 'blah' to null if null is allowed + if (val === false && ~type.indexOf(null) && + !(~type.indexOf(false) || ~type.indexOf(Boolean))) { + val = null + } + + var d = {} + d[k] = val + debug("prevalidated val", d, val, types[k]) + if (!validate(d, k, val, types[k], typeDefs)) { + if (exports.invalidHandler) { + exports.invalidHandler(k, val, types[k], data) + } else if (exports.invalidHandler !== false) { + debug("invalid: "+k+"="+val, types[k]) + } + return remove + } + debug("validated val", d, val, types[k]) + return d[k] + }).filter(function (val) { return val !== remove }) + + if (!val.length) delete data[k] + else if (isArray) { + debug(isArray, data[k], val) + data[k] = val + } else data[k] = val[0] + + debug("k=%s val=%j", k, val, data[k]) + }) +} + +function validateString (data, k, val) { + data[k] = String(val) +} + +function validatePath (data, k, val) { + if (val === true) return false + if (val === null) return true + + val = String(val) + var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// + if (val.match(homePattern) && process.env.HOME) { + val = path.resolve(process.env.HOME, val.substr(2)) + } + data[k] = path.resolve(String(val)) + return true +} + +function validateNumber (data, k, val) { + debug("validate Number %j %j %j", k, val, isNaN(val)) + if (isNaN(val)) return false + data[k] = +val +} + +function validateDate (data, k, val) { + debug("validate Date %j %j %j", k, val, Date.parse(val)) + var s = Date.parse(val) + if (isNaN(s)) return false + data[k] = new Date(val) +} + +function validateBoolean (data, k, val) { + if (val instanceof Boolean) val = val.valueOf() + else if (typeof val === "string") { + if (!isNaN(val)) val = !!(+val) + else if (val === "null" || val === "false") val = false + else val = true + } else val = !!val + data[k] = val +} + +function validateUrl (data, k, val) { + val = url.parse(String(val)) + if (!val.host) return false + data[k] = val.href +} + +function validateStream (data, k, val) { + if (!(val instanceof Stream)) return false + data[k] = val +} + +function validate (data, k, val, type, typeDefs) { + // arrays are lists of types. + if (Array.isArray(type)) { + for (var i = 0, l = type.length; i < l; i ++) { + if (type[i] === Array) continue + if (validate(data, k, val, type[i], typeDefs)) return true + } + delete data[k] + return false + } + + // an array of anything? + if (type === Array) return true + + // NaN is poisonous. Means that something is not allowed. + if (type !== type) { + debug("Poison NaN", k, val, type) + delete data[k] + return false + } + + // explicit list of values + if (val === type) { + debug("Explicitly allowed %j", val) + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + return true + } + + // now go through the list of typeDefs, validate against each one. + var ok = false + , types = Object.keys(typeDefs) + for (var i = 0, l = types.length; i < l; i ++) { + debug("test type %j %j %j", k, val, types[i]) + var t = typeDefs[types[i]] + if (t && + ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { + var d = {} + ok = false !== t.validate(d, k, val) + val = d[k] + if (ok) { + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + break + } + } + } + debug("OK? %j (%j %j %j)", ok, k, val, types[i]) + + if (!ok) delete data[k] + return ok +} + +function parse (args, data, remain, types, shorthands) { + debug("parse", args, data, remain) + + var key = null + , abbrevs = abbrev(Object.keys(types)) + , shortAbbr = abbrev(Object.keys(shorthands)) + + for (var i = 0; i < args.length; i ++) { + var arg = args[i] + debug("arg", arg) + + if (arg.match(/^-{2,}$/)) { + // done with keys. + // the rest are args. + remain.push.apply(remain, args.slice(i + 1)) + args[i] = "--" + break + } + var hadEq = false + if (arg.charAt(0) === "-" && arg.length > 1) { + if (arg.indexOf("=") !== -1) { + hadEq = true + var v = arg.split("=") + arg = v.shift() + v = v.join("=") + args.splice.apply(args, [i, 1].concat([arg, v])) + } + + // see if it's a shorthand + // if so, splice and back up to re-parse it. + var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) + debug("arg=%j shRes=%j", arg, shRes) + if (shRes) { + debug(arg, shRes) + args.splice.apply(args, [i, 1].concat(shRes)) + if (arg !== shRes[0]) { + i -- + continue + } + } + arg = arg.replace(/^-+/, "") + var no = null + while (arg.toLowerCase().indexOf("no-") === 0) { + no = !no + arg = arg.substr(3) + } + + if (abbrevs[arg]) arg = abbrevs[arg] + + var isArray = types[arg] === Array || + Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 + + // allow unknown things to be arrays if specified multiple times. + if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { + if (!Array.isArray(data[arg])) + data[arg] = [data[arg]] + isArray = true + } + + var val + , la = args[i + 1] + + var isBool = typeof no === 'boolean' || + types[arg] === Boolean || + Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || + (typeof types[arg] === 'undefined' && !hadEq) || + (la === "false" && + (types[arg] === null || + Array.isArray(types[arg]) && ~types[arg].indexOf(null))) + + if (isBool) { + // just set and move along + val = !no + // however, also support --bool true or --bool false + if (la === "true" || la === "false") { + val = JSON.parse(la) + la = null + if (no) val = !val + i ++ + } + + // also support "foo":[Boolean, "bar"] and "--foo bar" + if (Array.isArray(types[arg]) && la) { + if (~types[arg].indexOf(la)) { + // an explicit type + val = la + i ++ + } else if ( la === "null" && ~types[arg].indexOf(null) ) { + // null allowed + val = null + i ++ + } else if ( !la.match(/^-{2,}[^-]/) && + !isNaN(la) && + ~types[arg].indexOf(Number) ) { + // number + val = +la + i ++ + } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { + // string + val = la + i ++ + } + } + + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + continue + } + + if (types[arg] === String && la === undefined) + la = "" + + if (la && la.match(/^-{2,}$/)) { + la = undefined + i -- + } + + val = la === undefined ? true : la + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + i ++ + continue + } + remain.push(arg) + } +} + +function resolveShort (arg, shorthands, shortAbbr, abbrevs) { + // handle single-char shorthands glommed together, like + // npm ls -glp, but only if there is one dash, and only if + // all of the chars are single-char shorthands, and it's + // not a match to some other abbrev. + arg = arg.replace(/^-+/, '') + + // if it's an exact known option, then don't go any further + if (abbrevs[arg] === arg) + return null + + // if it's an exact known shortopt, same deal + if (shorthands[arg]) { + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] + } + + // first check to see if this arg is a set of single-char shorthands + var singles = shorthands.___singles + if (!singles) { + singles = Object.keys(shorthands).filter(function (s) { + return s.length === 1 + }).reduce(function (l,r) { + l[r] = true + return l + }, {}) + shorthands.___singles = singles + debug('shorthand singles', singles) + } + + var chrs = arg.split("").filter(function (c) { + return singles[c] + }) + + if (chrs.join("") === arg) return chrs.map(function (c) { + return shorthands[c] + }).reduce(function (l, r) { + return l.concat(r) + }, []) + + + // if it's an arg abbrev, and not a literal shorthand, then prefer the arg + if (abbrevs[arg] && !shorthands[arg]) + return null + + // if it's an abbr for a shorthand, then use that + if (shortAbbr[arg]) + arg = shortAbbr[arg] + + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json b/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json new file mode 100644 index 00000000000..8973e66ffdc --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "nopt@2 || 3", + "scope": null, + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "2 || 3", + "spec": ">=2.0.0 <3.0.0||>=3.0.0 <4.0.0", + "type": "range" + }, + "/Users/ogd/Documents/projects/npm/npm/node_modules/node-gyp" + ] + ], + "_from": "nopt@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", + "_id": "nopt@3.0.6", + "_inCache": true, + "_location": "/node-gyp/nopt", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "_npmVersion": "2.14.10", + "_phantomChildren": {}, + "_requested": { + "raw": "nopt@2 || 3", + "scope": null, + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "2 || 3", + "spec": ">=2.0.0 <3.0.0||>=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp" + ], + "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "_shrinkwrap": null, + "_spec": "nopt@2 || 3", + "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/node-gyp", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "nopt": "./bin/nopt.js" + }, + "bugs": { + "url": "https://github.com/npm/nopt/issues" + }, + "dependencies": { + "abbrev": "1" + }, + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": {}, + "dist": { + "shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "tarball": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" + }, + "gitHead": "10a750c9bb99c1950160353459e733ac2aa18cb6", + "homepage": "https://github.com/npm/nopt#readme", + "license": "ISC", + "main": "lib/nopt.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "nopt", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/nopt.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "3.0.6" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js b/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js new file mode 100644 index 00000000000..d399de92099 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js @@ -0,0 +1,273 @@ +var nopt = require("../") + , test = require('tap').test + + +test("passing a string results in a string", function (t) { + var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) + t.same(parsed.key, "myvalue") + t.end() +}) + +// https://github.com/npm/nopt/issues/31 +test("Empty String results in empty string, not true", function (t) { + var parsed = nopt({ empty: String }, {}, ["--empty"], 0) + t.same(parsed.empty, "") + t.end() +}) + +test("~ path is resolved to $HOME", function (t) { + var path = require("path") + if (!process.env.HOME) process.env.HOME = "/tmp" + var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) + t.same(parsed.key, path.resolve(process.env.HOME, "val")) + t.end() +}) + +// https://github.com/npm/nopt/issues/24 +test("Unknown options are not parsed as numbers", function (t) { + var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0) + t.equal(parsed['leave-as-is'], '1.20') + t.equal(parsed['parse-me'], 1.2) + t.end() +}); + +// https://github.com/npm/nopt/issues/48 +test("Check types based on name of type", function (t) { + var parsed = nopt({"parse-me": {name: "Number"}}, null, ['--parse-me=1.20'], 0) + t.equal(parsed['parse-me'], 1.2) + t.end() +}) + + +test("Missing types are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("Types passed without a name are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("other tests", function (t) { + + var util = require("util") + , Stream = require("stream") + , path = require("path") + , url = require("url") + + , shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + } + + , types = + { aoa: Array + , nullstream: [null, Stream] + , date: Date + , str: String + , browser : String + , cache : path + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : path + , force : Boolean + , global : Boolean + , globalconfig : path + , group : [String, Number] + , gzipbin : String + , logfd : [Number, Stream] + , loglevel : ["silent","win","error","warn","info","verbose","silly"] + , long : Boolean + , "node-version" : [false, String] + , npaturl : url + , npat : Boolean + , "onload-script" : [false, String] + , outfd : [Number, Stream] + , parseable : Boolean + , pre: Boolean + , prefix: path + , proxy : url + , "rebuild-bundle" : Boolean + , registry : url + , searchopts : String + , searchexclude: [null, String] + , shell : path + , t: [Array, String] + , tag : String + , tar : String + , tmp : path + , "unsafe-perm" : Boolean + , usage : Boolean + , user : String + , username : String + , userconfig : path + , version : Boolean + , viewer: path + , _exit : Boolean + , path: path + } + + ; [["-v", {version:true}, []] + ,["---v", {version:true}, []] + ,["ls -s --no-reg connect -d", + {loglevel:"info",registry:null},["ls","connect"]] + ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] + ,["ls --registry blargle", {}, ["ls"]] + ,["--no-registry", {registry:null}, []] + ,["--no-color true", {color:false}, []] + ,["--no-color false", {color:true}, []] + ,["--no-color", {color:false}, []] + ,["--color false", {color:false}, []] + ,["--color --logfd 7", {logfd:7,color:true}, []] + ,["--color=true", {color:true}, []] + ,["--logfd=10", {logfd:10}, []] + ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] + ,["--tmp=tmp -tar=gtar", + {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] + ,["--logfd x", {}, []] + ,["a -true -- -no-false", {true:true},["a","-no-false"]] + ,["a -no-false", {false:false},["a"]] + ,["a -no-no-true", {true:true}, ["a"]] + ,["a -no-no-no-false", {false:false}, ["a"]] + ,["---NO-no-No-no-no-no-nO-no-no"+ + "-No-no-no-no-no-no-no-no-no"+ + "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ + "-no-body-can-do-the-boogaloo-like-I-do" + ,{"body-can-do-the-boogaloo-like-I-do":false}, []] + ,["we are -no-strangers-to-love "+ + "--you-know=the-rules --and=so-do-i "+ + "---im-thinking-of=a-full-commitment "+ + "--no-you-would-get-this-from-any-other-guy "+ + "--no-gonna-give-you-up "+ + "-no-gonna-let-you-down=true "+ + "--no-no-gonna-run-around false "+ + "--desert-you=false "+ + "--make-you-cry false "+ + "--no-tell-a-lie "+ + "--no-no-and-hurt-you false" + ,{"strangers-to-love":false + ,"you-know":"the-rules" + ,"and":"so-do-i" + ,"you-would-get-this-from-any-other-guy":false + ,"gonna-give-you-up":false + ,"gonna-let-you-down":false + ,"gonna-run-around":false + ,"desert-you":false + ,"make-you-cry":false + ,"tell-a-lie":false + ,"and-hurt-you":false + },["we", "are"]] + ,["-t one -t two -t three" + ,{t: ["one", "two", "three"]} + ,[]] + ,["-t one -t null -t three four five null" + ,{t: ["one", "null", "three"]} + ,["four", "five", "null"]] + ,["-t foo" + ,{t:["foo"]} + ,[]] + ,["--no-t" + ,{t:["false"]} + ,[]] + ,["-no-no-t" + ,{t:["true"]} + ,[]] + ,["-aoa one -aoa null -aoa 100" + ,{aoa:["one", null, '100']} + ,[]] + ,["-str 100" + ,{str:"100"} + ,[]] + ,["--color always" + ,{color:"always"} + ,[]] + ,["--no-nullstream" + ,{nullstream:null} + ,[]] + ,["--nullstream false" + ,{nullstream:null} + ,[]] + ,["--notadate=2011-01-25" + ,{notadate: "2011-01-25"} + ,[]] + ,["--date 2011-01-25" + ,{date: new Date("2011-01-25")} + ,[]] + ,["-cl 1" + ,{config: true, length: 1} + ,[] + ,{config: Boolean, length: Number, clear: Boolean} + ,{c: "--config", l: "--length"}] + ,["--acount bla" + ,{"acount":true} + ,["bla"] + ,{account: Boolean, credentials: Boolean, options: String} + ,{a:"--account", c:"--credentials",o:"--options"}] + ,["--clear" + ,{clear:true} + ,[] + ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} + ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] + ,["--file -" + ,{"file":"-"} + ,[] + ,{file:String} + ,{}] + ,["--file -" + ,{"file":true} + ,["-"] + ,{file:Boolean} + ,{}] + ,["--path" + ,{"path":null} + ,[]] + ,["--path ." + ,{"path":process.cwd()} + ,[]] + ].forEach(function (test) { + var argv = test[0].split(/\s+/) + , opts = test[1] + , rem = test[2] + , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) + , parsed = actual.argv + delete actual.argv + for (var i in opts) { + var e = JSON.stringify(opts[i]) + , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) + if (e && typeof e === "object") { + t.deepEqual(e, a) + } else { + t.equal(e, a) + } + } + t.deepEqual(rem, parsed.remain) + }) + t.end() +}) diff --git a/deps/npm/node_modules/nopt/.travis.yml b/deps/npm/node_modules/nopt/.travis.yml index 99f2bbf5068..a1cef591c3c 100644 --- a/deps/npm/node_modules/nopt/.travis.yml +++ b/deps/npm/node_modules/nopt/.travis.yml @@ -1,9 +1,8 @@ language: node_js -language: node_js node_js: - - '0.8' - - '0.10' - '0.12' - - 'iojs' + - '4' + - '6' + - '7' before_install: - npm install -g npm@latest diff --git a/deps/npm/node_modules/nopt/CHANGELOG.md b/deps/npm/node_modules/nopt/CHANGELOG.md new file mode 100644 index 00000000000..82a09fb4bf8 --- /dev/null +++ b/deps/npm/node_modules/nopt/CHANGELOG.md @@ -0,0 +1,58 @@ +### v4.0.1 (2016-12-14) + +#### WHOOPS + +* [`fb9b1ce`](https://github.com/npm/nopt/commit/fb9b1ce57b3c69b4f7819015be87719204f77ef6) + Merged so many patches at once that the code fencing + ([@adius](https://github.com/adius)) added got broken. Sorry, + ([@adius](https://github.com/adius))! + ([@othiym23](https://github.com/othiym23)) + +### v4.0.0 (2016-12-13) + +#### BREAKING CHANGES + +* [`651d447`](https://github.com/npm/nopt/commit/651d4473946096d341a480bbe56793de3fc706aa) + When parsing String-typed arguments, if the next value is `""`, don't simply + swallow it. ([@samjonester](https://github.com/samjonester)) + +#### PERFORMANCE TWEAKS + +* [`3370ce8`](https://github.com/npm/nopt/commit/3370ce87a7618ba228883861db84ddbcdff252a9) + Simplify initialization. ([@elidoran](https://github.com/elidoran)) +* [`356e58e`](https://github.com/npm/nopt/commit/356e58e3b3b431a4b1af7fd7bdee44c2c0526a09) + Store `Array.isArray(types[arg])` for reuse. + ([@elidoran](https://github.com/elidoran)) +* [`0d95e90`](https://github.com/npm/nopt/commit/0d95e90515844f266015b56d2c80b94e5d14a07e) + Interpret single-item type arrays as a single type. + ([@samjonester](https://github.com/samjonester)) +* [`07c69d3`](https://github.com/npm/nopt/commit/07c69d38b5186450941fbb505550becb78a0e925) + Simplify key-value extraction. ([@elidoran](https://github.com/elidoran)) +* [`39b6e5c`](https://github.com/npm/nopt/commit/39b6e5c65ac47f60cd43a1fbeece5cd4c834c254) + Only call `Date.parse(val)` once. ([@elidoran](https://github.com/elidoran)) +* [`934943d`](https://github.com/npm/nopt/commit/934943dffecb55123a2b15959fe2a359319a5dbd) + Use `osenv.home()` to find a user's home directory instead of assuming it's + always `$HOME`. ([@othiym23](https://github.com/othiym23)) + +#### TEST & CI IMPROVEMENTS + +* [`326ffff`](https://github.com/npm/nopt/commit/326ffff7f78a00bcd316adecf69075f8a8093619) + Fix `/tmp` test to work on Windows. + ([@elidoran](https://github.com/elidoran)) +* [`c89d31a`](https://github.com/npm/nopt/commit/c89d31a49d14f2238bc6672db08da697bbc57f1b) + Only run Windows tests on Windows, only run Unix tests on a Unix. + ([@elidoran](https://github.com/elidoran)) +* [`affd3d1`](https://github.com/npm/nopt/commit/affd3d1d0addffa93006397b2013b18447339366) + Refresh Travis to run the tests against the currently-supported batch of npm + versions. ([@helio](https://github.com/helio)-frota) +* [`55f9449`](https://github.com/npm/nopt/commit/55f94497d163ed4d16dd55fd6c4fb95cc440e66d) + `tap@8.0.1` ([@othiym23](https://github.com/othiym23)) + +#### DOC TWEAKS + +* [`5271229`](https://github.com/npm/nopt/commit/5271229ee7c810217dd51616c086f5d9ab224581) + Use JavaScript code block for syntax highlighting. + ([@adius](https://github.com/adius)) +* [`c0d156f`](https://github.com/npm/nopt/commit/c0d156f229f9994c5dfcec4a8886eceff7a07682) + The code sample in the README had `many2: [ oneThing ]`, and now it has + `many2: [ two, things ]`. ([@silkentrance](https://github.com/silkentrance)) diff --git a/deps/npm/node_modules/nopt/README.md b/deps/npm/node_modules/nopt/README.md index f21a4b31c5d..a99531c0465 100644 --- a/deps/npm/node_modules/nopt/README.md +++ b/deps/npm/node_modules/nopt/README.md @@ -19,35 +19,37 @@ nice option parser. ## USAGE - // my-program.js - var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many1" : [String, Array] - , "many2" : [path] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - console.log(parsed) +```javascript +// my-program.js +var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path, Array] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) +console.log(parsed) +``` This would give you support for any of the following: -```bash +```console $ node my-program.js --foo "blerp" --no-flag { "foo" : "blerp", "flag" : false } diff --git a/deps/npm/node_modules/nopt/lib/nopt.js b/deps/npm/node_modules/nopt/lib/nopt.js index 97707e78424..1fb113514f3 100644 --- a/deps/npm/node_modules/nopt/lib/nopt.js +++ b/deps/npm/node_modules/nopt/lib/nopt.js @@ -8,6 +8,7 @@ var url = require("url") , path = require("path") , Stream = require("stream").Stream , abbrev = require("abbrev") + , osenv = require("osenv") module.exports = exports = nopt exports.clean = clean @@ -33,14 +34,16 @@ function nopt (types, shorthands, args, slice) { args = args.slice(slice) var data = {} , key - , remain = [] - , cooked = args - , original = args.slice(0) + , argv = { + remain: [], + cooked: args, + original: args.slice(0) + } - parse(args, data, remain, types, shorthands) + parse(args, data, argv.remain, types, shorthands) // now data is full clean(data, types, exports.typeDefs) - data.argv = {remain:remain,cooked:cooked,original:original} + data.argv = argv Object.defineProperty(data.argv, 'toString', { value: function () { return this.original.map(JSON.stringify).join(" ") }, enumerable: false }) @@ -129,11 +132,16 @@ function validatePath (data, k, val) { if (val === null) return true val = String(val) - var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// - if (val.match(homePattern) && process.env.HOME) { - val = path.resolve(process.env.HOME, val.substr(2)) + + var isWin = process.platform === 'win32' + , homePattern = isWin ? /^~(\/|\\)/ : /^~\// + , home = osenv.home() + + if (home && val.match(homePattern)) { + data[k] = path.resolve(home, val.substr(2)) + } else { + data[k] = path.resolve(val) } - data[k] = path.resolve(String(val)) return true } @@ -144,8 +152,8 @@ function validateNumber (data, k, val) { } function validateDate (data, k, val) { - debug("validate Date %j %j %j", k, val, Date.parse(val)) var s = Date.parse(val) + debug("validate Date %j %j %j", k, val, s) if (isNaN(s)) return false data[k] = new Date(val) } @@ -246,12 +254,12 @@ function parse (args, data, remain, types, shorthands) { } var hadEq = false if (arg.charAt(0) === "-" && arg.length > 1) { - if (arg.indexOf("=") !== -1) { + var at = arg.indexOf('=') + if (at > -1) { hadEq = true - var v = arg.split("=") - arg = v.shift() - v = v.join("=") - args.splice.apply(args, [i, 1].concat([arg, v])) + var v = arg.substr(at + 1) + arg = arg.substr(0, at) + args.splice(i, 1, arg, v) } // see if it's a shorthand @@ -275,8 +283,15 @@ function parse (args, data, remain, types, shorthands) { if (abbrevs[arg]) arg = abbrevs[arg] - var isArray = types[arg] === Array || - Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 + var argType = types[arg] + var isTypeArray = Array.isArray(argType) + if (isTypeArray && argType.length === 1) { + isTypeArray = false + argType = argType[0] + } + + var isArray = argType === Array || + isTypeArray && argType.indexOf(Array) !== -1 // allow unknown things to be arrays if specified multiple times. if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { @@ -289,12 +304,12 @@ function parse (args, data, remain, types, shorthands) { , la = args[i + 1] var isBool = typeof no === 'boolean' || - types[arg] === Boolean || - Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || - (typeof types[arg] === 'undefined' && !hadEq) || + argType === Boolean || + isTypeArray && argType.indexOf(Boolean) !== -1 || + (typeof argType === 'undefined' && !hadEq) || (la === "false" && - (types[arg] === null || - Array.isArray(types[arg]) && ~types[arg].indexOf(null))) + (argType === null || + isTypeArray && ~argType.indexOf(null))) if (isBool) { // just set and move along @@ -308,22 +323,22 @@ function parse (args, data, remain, types, shorthands) { } // also support "foo":[Boolean, "bar"] and "--foo bar" - if (Array.isArray(types[arg]) && la) { - if (~types[arg].indexOf(la)) { + if (isTypeArray && la) { + if (~argType.indexOf(la)) { // an explicit type val = la i ++ - } else if ( la === "null" && ~types[arg].indexOf(null) ) { + } else if ( la === "null" && ~argType.indexOf(null) ) { // null allowed val = null i ++ } else if ( !la.match(/^-{2,}[^-]/) && !isNaN(la) && - ~types[arg].indexOf(Number) ) { + ~argType.indexOf(Number) ) { // number val = +la i ++ - } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { + } else if ( !la.match(/^-[^-]/) && ~argType.indexOf(String) ) { // string val = la i ++ @@ -336,8 +351,14 @@ function parse (args, data, remain, types, shorthands) { continue } - if (types[arg] === String && la === undefined) - la = "" + if (argType === String) { + if (la === undefined) { + la = "" + } else if (la.match(/^-{1,2}[^-]+/)) { + la = "" + i -- + } + } if (la && la.match(/^-{2,}$/)) { la = undefined diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/.npmignore b/deps/npm/node_modules/nopt/node_modules/osenv/.npmignore new file mode 100644 index 00000000000..8c23deeb34b --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/.travis.yml b/deps/npm/node_modules/nopt/node_modules/osenv/.travis.yml new file mode 100644 index 00000000000..99f2bbf5068 --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE b/deps/npm/node_modules/nopt/node_modules/osenv/LICENSE index f4be44d881b..19129e315fe 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE +++ b/deps/npm/node_modules/nopt/node_modules/osenv/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2015, Rebecca Turner <me@re-becca.org> +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -9,6 +11,5 @@ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/README.md b/deps/npm/node_modules/nopt/node_modules/osenv/README.md new file mode 100644 index 00000000000..3935519cc2f --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/README.md @@ -0,0 +1,63 @@ +# osenv + +Look up environment settings specific to different operating systems. + +## Usage + +```javascript +var osenv = require('osenv') +var path = osenv.path() +var user = osenv.user() +// etc. + +// Some things are not reliably in the env, and have a fallback command: +var h = osenv.hostname(function (er, hostname) { + h = hostname +}) +// This will still cause it to be memoized, so calling osenv.hostname() +// is now an immediate operation. + +// You can always send a cb, which will get called in the nextTick +// if it's been memoized, or wait for the fallback data if it wasn't +// found in the environment. +osenv.hostname(function (er, hostname) { + if (er) console.error('error looking up hostname') + else console.log('this machine calls itself %s', hostname) +}) +``` + +## osenv.hostname() + +The machine name. Calls `hostname` if not found. + +## osenv.user() + +The currently logged-in user. Calls `whoami` if not found. + +## osenv.prompt() + +Either PS1 on unix, or PROMPT on Windows. + +## osenv.tmpdir() + +The place where temporary files should be created. + +## osenv.home() + +No place like it. + +## osenv.path() + +An array of the places that the operating system will search for +executables. + +## osenv.editor() + +Return the executable name of the editor program. This uses the EDITOR +and VISUAL environment variables, and falls back to `vi` on Unix, or +`notepad.exe` on Windows. + +## osenv.shell() + +The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' +or 'cmd'. diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/index.js b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/index.js new file mode 100644 index 00000000000..33066166fe6 --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/index.js @@ -0,0 +1,24 @@ +'use strict'; +var os = require('os'); + +function homedir() { + var env = process.env; + var home = env.HOME; + var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME; + + if (process.platform === 'win32') { + return env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); + } + + return home || null; +} + +module.exports = typeof os.homedir === 'function' ? os.homedir : homedir; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/license index 654d0bfe943..654d0bfe943 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/license diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/package.json b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/package.json new file mode 100644 index 00000000000..e5b18d1c60f --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "os-homedir@^1.0.0", + "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/ogd/Documents/projects/npm/npm/node_modules/nopt/node_modules/osenv" + ] + ], + "_from": "os-homedir@>=1.0.0 <2.0.0", + "_id": "os-homedir@1.0.2", + "_inCache": true, + "_location": "/nopt/osenv/os-homedir", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/os-homedir-1.0.2.tgz_1475211519628_0.7873868853785098" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "os-homedir@^1.0.0", + "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/nopt/osenv" + ], + "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", + "_shrinkwrap": null, + "_spec": "os-homedir@^1.0.0", + "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/nopt/node_modules/osenv", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-homedir/issues" + }, + "dependencies": {}, + "description": "Node.js 4 `os.homedir()` ponyfill", + "devDependencies": { + "ava": "*", + "path-exists": "^2.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", + "tarball": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "b1b0ae70a5965fef7005ff6509a5dd1a78c95e36", + "homepage": "https://github.com/sindresorhus/os-homedir#readme", + "keywords": [ + "builtin", + "core", + "ponyfill", + "polyfill", + "shim", + "os", + "homedir", + "home", + "dir", + "directory", + "folder", + "user", + "path" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-homedir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-homedir.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/readme.md b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/readme.md new file mode 100644 index 00000000000..856ae615b0c --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-homedir/readme.md @@ -0,0 +1,31 @@ +# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir) + +> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save os-homedir +``` + + +## Usage + +```js +const osHomedir = require('os-homedir'); + +console.log(osHomedir()); +//=> '/Users/sindresorhus' +``` + + +## Related + +- [user-home](https://github.com/sindresorhus/user-home) - Same as this module but caches the result +- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/index.js b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/index.js new file mode 100644 index 00000000000..2077b1ce747 --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/index.js @@ -0,0 +1,25 @@ +'use strict'; +var isWindows = process.platform === 'win32'; +var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; + +// https://github.com/nodejs/node/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 +module.exports = function () { + var path; + + if (isWindows) { + path = process.env.TEMP || + process.env.TMP || + (process.env.SystemRoot || process.env.windir) + '\\temp'; + } else { + path = process.env.TMPDIR || + process.env.TMP || + process.env.TEMP || + '/tmp'; + } + + if (trailingSlashRe.test(path)) { + path = path.slice(0, -1); + } + + return path; +}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/license index 654d0bfe943..654d0bfe943 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/license diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/package.json b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/package.json new file mode 100644 index 00000000000..73ae4a3bd89 --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "os-tmpdir@^1.0.0", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/ogd/Documents/projects/npm/npm/node_modules/nopt/node_modules/osenv" + ] + ], + "_from": "os-tmpdir@>=1.0.0 <2.0.0", + "_id": "os-tmpdir@1.0.2", + "_inCache": true, + "_location": "/nopt/osenv/os-tmpdir", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/os-tmpdir-1.0.2.tgz_1475211274587_0.14931037812493742" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "os-tmpdir@^1.0.0", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/nopt/osenv" + ], + "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "_shrinkwrap": null, + "_spec": "os-tmpdir@^1.0.0", + "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/nopt/node_modules/osenv", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-tmpdir/issues" + }, + "dependencies": {}, + "description": "Node.js os.tmpdir() ponyfill", + "devDependencies": { + "ava": "*", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "tarball": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "1abf9cf5611b4be7377060ea67054b45cbf6813c", + "homepage": "https://github.com/sindresorhus/os-tmpdir#readme", + "keywords": [ + "built-in", + "core", + "ponyfill", + "polyfill", + "shim", + "os", + "tmpdir", + "tempdir", + "tmp", + "temp", + "dir", + "directory", + "env", + "environment" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-tmpdir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-tmpdir.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/readme.md b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/readme.md new file mode 100644 index 00000000000..c09f7ed8d5f --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/node_modules/os-tmpdir/readme.md @@ -0,0 +1,32 @@ +# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir) + +> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) [ponyfill](https://ponyfill.com) + +Use this instead of `require('os').tmpdir()` to get a consistent behavior on different Node.js versions (even 0.8). + + +## Install + +``` +$ npm install --save os-tmpdir +``` + + +## Usage + +```js +const osTmpdir = require('os-tmpdir'); + +osTmpdir(); +//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T' +``` + + +## API + +See the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir). + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/osenv.js b/deps/npm/node_modules/nopt/node_modules/osenv/osenv.js new file mode 100644 index 00000000000..702a95b98aa --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/osenv.js @@ -0,0 +1,72 @@ +var isWindows = process.platform === 'win32' +var path = require('path') +var exec = require('child_process').exec +var osTmpdir = require('os-tmpdir') +var osHomedir = require('os-homedir') + +// looking up envs is a bit costly. +// Also, sometimes we want to have a fallback +// Pass in a callback to wait for the fallback on failures +// After the first lookup, always returns the same thing. +function memo (key, lookup, fallback) { + var fell = false + var falling = false + exports[key] = function (cb) { + var val = lookup() + if (!val && !fell && !falling && fallback) { + fell = true + falling = true + exec(fallback, function (er, output, stderr) { + falling = false + if (er) return // oh well, we tried + val = output.trim() + }) + } + exports[key] = function (cb) { + if (cb) process.nextTick(cb.bind(null, null, val)) + return val + } + if (cb && !falling) process.nextTick(cb.bind(null, null, val)) + return val + } +} + +memo('user', function () { + return ( isWindows + ? process.env.USERDOMAIN + '\\' + process.env.USERNAME + : process.env.USER + ) +}, 'whoami') + +memo('prompt', function () { + return isWindows ? process.env.PROMPT : process.env.PS1 +}) + +memo('hostname', function () { + return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME +}, 'hostname') + +memo('tmpdir', function () { + return osTmpdir() +}) + +memo('home', function () { + return osHomedir() +}) + +memo('path', function () { + return (process.env.PATH || + process.env.Path || + process.env.path).split(isWindows ? ';' : ':') +}) + +memo('editor', function () { + return process.env.EDITOR || + process.env.VISUAL || + (isWindows ? 'notepad.exe' : 'vi') +}) + +memo('shell', function () { + return isWindows ? process.env.ComSpec || 'cmd' + : process.env.SHELL || 'bash' +}) diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/package.json b/deps/npm/node_modules/nopt/node_modules/osenv/package.json new file mode 100644 index 00000000000..002d5ff062f --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "osenv@^0.1.4", + "scope": null, + "escapedName": "osenv", + "name": "osenv", + "rawSpec": "^0.1.4", + "spec": ">=0.1.4 <0.2.0", + "type": "range" + }, + "/Users/ogd/Documents/projects/npm/npm/node_modules/nopt" + ] + ], + "_from": "osenv@>=0.1.4 <0.2.0", + "_id": "osenv@0.1.4", + "_inCache": true, + "_location": "/nopt/osenv", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/osenv-0.1.4.tgz_1481655889868_0.3980878754518926" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "osenv@^0.1.4", + "scope": null, + "escapedName": "osenv", + "name": "osenv", + "rawSpec": "^0.1.4", + "spec": ">=0.1.4 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/nopt" + ], + "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "_shasum": "42fe6d5953df06c8064be6f176c3d05aaaa34644", + "_shrinkwrap": null, + "_spec": "osenv@^0.1.4", + "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/nopt", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/osenv/issues" + }, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "description": "Look up environment settings specific to different operating systems", + "devDependencies": { + "tap": "^8.0.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "42fe6d5953df06c8064be6f176c3d05aaaa34644", + "tarball": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz" + }, + "gitHead": "ef718f0d20e38d45ec452b7faeefc692d3cd1062", + "homepage": "https://github.com/npm/osenv#readme", + "keywords": [ + "environment", + "variable", + "home", + "tmpdir", + "path", + "prompt", + "ps1" + ], + "license": "ISC", + "main": "osenv.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "name": "osenv", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/osenv.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.4" +} diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/test/unix.js b/deps/npm/node_modules/nopt/node_modules/osenv/test/unix.js new file mode 100644 index 00000000000..94d4aaafb4f --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/test/unix.js @@ -0,0 +1,71 @@ +// only run this test on windows +// pretending to be another platform is too hacky, since it breaks +// how the underlying system looks up module paths and runs +// child processes, and all that stuff is cached. +var tap = require('tap') + + +if (process.platform === 'win32') { + tap.plan(0, 'Skip unix tests, this is not unix') + process.exit(0) +} + +// like unix, but funny +process.env.USER = 'sirUser' +process.env.HOME = '/home/sirUser' +process.env.HOSTNAME = 'my-machine' +process.env.TMPDIR = '/tmpdir' +process.env.TMP = '/tmp' +process.env.TEMP = '/temp' +process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin' +process.env.PS1 = '(o_o) $ ' +process.env.EDITOR = 'edit' +process.env.VISUAL = 'visualedit' +process.env.SHELL = 'zsh' + +tap.test('basic unix sanity test', function (t) { + var osenv = require('../osenv.js') + + t.equal(osenv.user(), process.env.USER) + t.equal(osenv.home(), process.env.HOME) + t.equal(osenv.hostname(), process.env.HOSTNAME) + t.same(osenv.path(), process.env.PATH.split(':')) + t.equal(osenv.prompt(), process.env.PS1) + t.equal(osenv.tmpdir(), process.env.TMPDIR) + + // mildly evil, but it's for a test. + process.env.TMPDIR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TMP) + + process.env.TMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TEMP) + + process.env.TEMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + osenv.home = function () { return null } + t.equal(osenv.tmpdir(), '/tmp') + + t.equal(osenv.editor(), 'edit') + process.env.EDITOR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'visualedit') + + process.env.VISUAL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'vi') + + t.equal(osenv.shell(), 'zsh') + process.env.SHELL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.shell(), 'bash') + + t.end() +}) diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/test/windows.js b/deps/npm/node_modules/nopt/node_modules/osenv/test/windows.js new file mode 100644 index 00000000000..c9d837a32d4 --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/test/windows.js @@ -0,0 +1,74 @@ +// only run this test on windows +// pretending to be another platform is too hacky, since it breaks +// how the underlying system looks up module paths and runs +// child processes, and all that stuff is cached. +if (process.platform !== 'win32') { + console.log('TAP version 13\n' + + '1..0 # Skip windows tests, this is not windows\n') + return +} + +// load this before clubbing the platform name. +var tap = require('tap') + +process.env.windir = 'c:\\windows' +process.env.USERDOMAIN = 'some-domain' +process.env.USERNAME = 'sirUser' +process.env.USERPROFILE = 'C:\\Users\\sirUser' +process.env.COMPUTERNAME = 'my-machine' +process.env.TMPDIR = 'C:\\tmpdir' +process.env.TMP = 'C:\\tmp' +process.env.TEMP = 'C:\\temp' +process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin' +process.env.PROMPT = '(o_o) $ ' +process.env.EDITOR = 'edit' +process.env.VISUAL = 'visualedit' +process.env.ComSpec = 'some-com' + +tap.test('basic windows sanity test', function (t) { + var osenv = require('../osenv.js') + + t.equal(osenv.user(), + process.env.USERDOMAIN + '\\' + process.env.USERNAME) + t.equal(osenv.home(), process.env.USERPROFILE) + t.equal(osenv.hostname(), process.env.COMPUTERNAME) + t.same(osenv.path(), process.env.Path.split(';')) + t.equal(osenv.prompt(), process.env.PROMPT) + t.equal(osenv.tmpdir(), process.env.TMPDIR) + + // mildly evil, but it's for a test. + process.env.TMPDIR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TMP) + + process.env.TMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TEMP) + + process.env.TEMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + osenv.home = function () { return null } + t.equal(osenv.tmpdir(), 'c:\\windows\\temp') + + t.equal(osenv.editor(), 'edit') + process.env.EDITOR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'visualedit') + + process.env.VISUAL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'notepad.exe') + + t.equal(osenv.shell(), 'some-com') + process.env.ComSpec = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.shell(), 'cmd') + + t.end() +}) diff --git a/deps/npm/node_modules/nopt/node_modules/osenv/x.tap b/deps/npm/node_modules/nopt/node_modules/osenv/x.tap new file mode 100644 index 00000000000..90d84720871 --- /dev/null +++ b/deps/npm/node_modules/nopt/node_modules/osenv/x.tap @@ -0,0 +1,39 @@ +TAP version 13 + # Subtest: test/unix.js + TAP version 13 + # Subtest: basic unix sanity test + ok 1 - should be equal + ok 2 - should be equal + ok 3 - should be equal + ok 4 - should be equivalent + ok 5 - should be equal + ok 6 - should be equal + ok 7 - should be equal + ok 8 - should be equal + ok 9 - should be equal + ok 10 - should be equal + ok 11 - should be equal + ok 12 - should be equal + ok 13 - should be equal + ok 14 - should be equal + 1..14 + ok 1 - basic unix sanity test # time=10.712ms + + 1..1 + # time=18.422ms +ok 1 - test/unix.js # time=169.827ms + + # Subtest: test/windows.js + TAP version 13 + 1..0 # Skip windows tests, this is not windows + +ok 2 - test/windows.js # SKIP Skip windows tests, this is not windows + + # Subtest: test/nada.js + TAP version 13 + 1..0 + +ok 2 - test/nada.js + +1..3 +# time=274.247ms diff --git a/deps/npm/node_modules/nopt/package.json b/deps/npm/node_modules/nopt/package.json index ada51ba4bf3..c29a2ad44cb 100644 --- a/deps/npm/node_modules/nopt/package.json +++ b/deps/npm/node_modules/nopt/package.json @@ -1,44 +1,54 @@ { "_args": [ [ - "nopt@~3.0.6", - "/Users/ogd/Documents/projects/npm/npm" + { + "raw": "nopt@4.0.1", + "scope": null, + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "4.0.1", + "spec": "4.0.1", + "type": "version" + }, + "/Users/rebecca/code/npm" ] ], - "_from": "nopt@>=3.0.6 <3.1.0", - "_id": "nopt@3.0.6", + "_from": "nopt@4.0.1", + "_id": "nopt@4.0.1", "_inCache": true, - "_installable": true, "_location": "/nopt", - "_nodeVersion": "4.2.1", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/nopt-4.0.1.tgz_1481739985863_0.18861285015009344" + }, "_npmUser": { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, - "_npmVersion": "2.14.10", + "_npmVersion": "4.0.5", "_phantomChildren": {}, "_requested": { - "name": "nopt", - "raw": "nopt@~3.0.6", - "rawSpec": "~3.0.6", + "raw": "nopt@4.0.1", "scope": null, - "spec": ">=3.0.6 <3.1.0", - "type": "range" + "escapedName": "nopt", + "name": "nopt", + "rawSpec": "4.0.1", + "spec": "4.0.1", + "type": "version" }, "_requiredBy": [ - "/", - "/node-gyp", - "/standard/standard-format/esformatter-jsx/js-beautify", - "/tap/nyc/istanbul" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "_resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "_shasum": "d0d4685afd5415193c8c7505602d0d17cd64474d", "_shrinkwrap": null, - "_spec": "nopt@~3.0.6", - "_where": "/Users/ogd/Documents/projects/npm/npm", + "_spec": "nopt@4.0.1", + "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bin": { @@ -48,18 +58,19 @@ "url": "https://github.com/npm/nopt/issues" }, "dependencies": { - "abbrev": "1" + "abbrev": "1", + "osenv": "^0.1.4" }, "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", "devDependencies": { - "tap": "^1.2.0" + "tap": "^8.0.1" }, "directories": {}, "dist": { - "shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", - "tarball": "http://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" + "shasum": "d0d4685afd5415193c8c7505602d0d17cd64474d", + "tarball": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz" }, - "gitHead": "10a750c9bb99c1950160353459e733ac2aa18cb6", + "gitHead": "24921187dc52825d628042c9708bbd8e8734698c", "homepage": "https://github.com/npm/nopt#readme", "license": "ISC", "main": "lib/nopt.js", @@ -87,5 +98,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "3.0.6" + "version": "4.0.1" } diff --git a/deps/npm/node_modules/nopt/test/basic.js b/deps/npm/node_modules/nopt/test/basic.js index 17fb286951d..5c18ac0fc6a 100644 --- a/deps/npm/node_modules/nopt/test/basic.js +++ b/deps/npm/node_modules/nopt/test/basic.js @@ -1,6 +1,6 @@ var nopt = require("../") , test = require('tap').test - + , isWin = process.platform === 'win32' test("passing a string results in a string", function (t) { var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) @@ -15,11 +15,41 @@ test("Empty String results in empty string, not true", function (t) { t.end() }) -test("~ path is resolved to $HOME", function (t) { +// https://github.com/npm/nopt/issues/65 +test("Empty String should not swallow next flag", function (t) { + var parsed = nopt({ empty: String, foo: String }, {}, ["--empty", "--foo"], 0) + t.same(parsed.empty, "") + t.same(parsed.foo, "") + t.end() +}) + +// https://github.com/npm/nopt/issues/66 +test("Empty String should not be true when type is single item Array", function (t) { + var parsed = nopt({ 'foo': [String] }, {}, ["--foo"], 0) + t.same(parsed.foo, "") + t.end() +}) + +test("~ path is resolved to " + (isWin ? '%USERPROFILE%' : '$HOME'), function (t) { var path = require("path") - if (!process.env.HOME) process.env.HOME = "/tmp" - var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) - t.same(parsed.key, path.resolve(process.env.HOME, "val")) + , the + + if (isWin) { + the = { + key: 'USERPROFILE', + dir: 'C:\\temp', + val: '~\\val' + } + } else { + the = { + key: 'HOME', + dir: '/tmp', + val: '~/val' + } + } + if (!process.env[the.key]) process.env[the.key] = v.dir + var parsed = nopt({key: path}, {}, ["--key=" + the.val], 0) + t.same(parsed.key, path.resolve(process.env[the.key], "val")) t.end() }) @@ -106,6 +136,8 @@ test("other tests", function (t) { , loglevel : ["silent","win","error","warn","info","verbose","silly"] , long : Boolean , "node-version" : [false, String] + , npaturl : url + , npat : Boolean , "onload-script" : [false, String] , outfd : [Number, Stream] , parseable : Boolean @@ -146,7 +178,7 @@ test("other tests", function (t) { ,["--color --logfd 7", {logfd:7,color:true}, []] ,["--color=true", {color:true}, []] ,["--logfd=10", {logfd:10}, []] - ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] + ,["--tmp=/tmp -tar=gtar", {tmp: isWin ? "C:\\tmp" : "/tmp",tar:"gtar"},[]] ,["--tmp=tmp -tar=gtar", {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] ,["--logfd x", {}, []] diff --git a/deps/npm/node_modules/npm-registry-client/.travis.yml b/deps/npm/node_modules/npm-registry-client/.travis.yml index 2993ae58c9a..6841bf14433 100644 --- a/deps/npm/node_modules/npm-registry-client/.travis.yml +++ b/deps/npm/node_modules/npm-registry-client/.travis.yml @@ -1,8 +1,8 @@ language: node_js node_js: - - "4" - "6" - - "0.10" + - "4" + - "7" - "0.12" script: "npm test" sudo: false diff --git a/deps/npm/node_modules/npm-registry-client/README.md b/deps/npm/node_modules/npm-registry-client/README.md index e14159cd07f..74bd6e1da78 100644 --- a/deps/npm/node_modules/npm-registry-client/README.md +++ b/deps/npm/node_modules/npm-registry-client/README.md @@ -38,7 +38,7 @@ Every call to the client follows the same pattern: ### Credentials -Many requests to the registry can by authenticated, and require credentials +Many requests to the registry can be authenticated, and require credentials for authorization. These credentials always look the same: * `username` {String} @@ -183,6 +183,20 @@ Publish a package to the registry. Note that this does not create the tarball from a folder. +### client.sendAnonymousCLIMetrics(uri, params, cb) + +- `uri` {String} Base URL for the registry. +- `params` {Object} Object containing per-request properties. + - `metricId` {String} A uuid unique to this dataset. + - `metrics` {Object} The metrics to share with the registry, with the following properties: + - `from` {Date} When the first data in this report was collected. + - `to` {Date} When the last data in this report was collected. Usually right now. + - `successfulInstalls` {Number} The number of successful installs in this period. + - `failedInstalls` {Number} The number of installs that ended in error in this period. +- `cb` {Function} + +PUT a metrics object to the `/-/npm/anon-metrics/v1/` endpoint on the registry. + ### client.star(uri, params, cb) * `uri` {String} The complete registry URI for the package to star. diff --git a/deps/npm/node_modules/npm-registry-client/index.js b/deps/npm/node_modules/npm-registry-client/index.js index a199801f98d..8de76f5aaa5 100644 --- a/deps/npm/node_modules/npm-registry-client/index.js +++ b/deps/npm/node_modules/npm-registry-client/index.js @@ -54,7 +54,7 @@ function RegClient (config) { // lib/group-name/operation.js -> client.groupName.operation var stat = fs.statSync(entry) if (stat.isDirectory()) { - var groupName = f.replace(/-([a-z])/, dashToCamel) + var groupName = f.replace(/-([a-z])/gi, dashToCamel) fs.readdirSync(entry).forEach(function (f) { if (!f.match(/\.js$/)) return @@ -62,14 +62,14 @@ function RegClient (config) { // keep client.groupName.operation from stomping client.operation client[groupName] = Object.create(client) } - var name = f.replace(/\.js$/, '').replace(/-([a-z])/, dashToCamel) + var name = f.replace(/\.js$/, '').replace(/-([a-z])/gi, dashToCamel) client[groupName][name] = require(join(entry, f)) }) return } if (!f.match(/\.js$/)) return - var name = f.replace(/\.js$/, '').replace(/-([a-z])/, dashToCamel) + var name = f.replace(/\.js$/, '').replace(/-([a-z])/gi, dashToCamel) client[name] = require(entry) }) } diff --git a/deps/npm/node_modules/npm-registry-client/lib/adduser.js b/deps/npm/node_modules/npm-registry-client/lib/adduser.js index a6a779d8ca9..fd6f5302ae7 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/adduser.js +++ b/deps/npm/node_modules/npm-registry-client/lib/adduser.js @@ -2,6 +2,7 @@ module.exports = adduser var url = require('url') var assert = require('assert') +var extend = Object.assign || require('util')._extend function adduser (uri, params, cb) { assert(typeof uri === 'string', 'must pass registry URI to adduser') @@ -67,7 +68,7 @@ function adduser (uri, params, cb) { } this.request( uri, - options, + extend({}, options), function (error, data, json, response) { if (!error || !response || response.statusCode !== 409) { return cb(error, data, json, response) diff --git a/deps/npm/node_modules/npm-registry-client/lib/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/fetch.js index e931d371ee7..ff3ee216b7f 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/fetch.js +++ b/deps/npm/node_modules/npm-registry-client/lib/fetch.js @@ -18,16 +18,19 @@ function fetch (uri, params, cb) { makeRequest.call(client, uri, params, function (er, req) { if (er) return cb(er) - req.on('error', function (er) { + req.once('error', retryOnError) + + function retryOnError (er) { if (operation.retry(er)) { client.log.info('retry', 'will retry, error on last attempt: ' + er) } else { cb(er) } - }) + } req.on('response', function (res) { client.log.http('fetch', '' + res.statusCode, uri) + req.removeListener('error', retryOnError) var er var statusCode = res && res.statusCode @@ -37,6 +40,10 @@ function fetch (uri, params, cb) { res.resume() if (process.version === 'v0.10.0') unstick(res) + req.once('error', function (er) { + res.emit('error', er) + }) + return cb(null, res) // Only retry on 408, 5xx or no `response`. } else if (statusCode === 408) { diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js index 04be044d6a0..8d456259a76 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/request.js +++ b/deps/npm/node_modules/npm-registry-client/lib/request.js @@ -42,23 +42,25 @@ function regRequest (uri, params, cb_) { return cb(new Error('trying to change user document without writing(?!)')) } - // new users can *not* use auth, because they don't *have* auth yet - if (isUserChange) { - this.log.verbose('request', 'updating existing user; sending authorization') - params.authed = true - } else if (isNewUser) { - this.log.verbose('request', "new user, so can't send auth") - params.authed = false - } else if (alwaysAuth) { - this.log.verbose('request', 'always-auth set; sending authorization') - params.authed = true - } else if (isWrite) { - this.log.verbose('request', 'sending authorization for write operation') - params.authed = true - } else { - // most of the time we don't want to auth - this.log.verbose('request', 'no auth needed') - params.authed = false + if (params.authed == null) { + // new users can *not* use auth, because they don't *have* auth yet + if (isUserChange) { + this.log.verbose('request', 'updating existing user; sending authorization') + params.authed = true + } else if (isNewUser) { + this.log.verbose('request', "new user, so can't send auth") + params.authed = false + } else if (alwaysAuth) { + this.log.verbose('request', 'always-auth set; sending authorization') + params.authed = true + } else if (isWrite) { + this.log.verbose('request', 'sending authorization for write operation') + params.authed = true + } else { + // most of the time we don't want to auth + this.log.verbose('request', 'no auth needed') + params.authed = false + } } var self = this diff --git a/deps/npm/node_modules/npm-registry-client/lib/send-anonymous-CLI-metrics.js b/deps/npm/node_modules/npm-registry-client/lib/send-anonymous-CLI-metrics.js new file mode 100644 index 00000000000..b5b7a1dca15 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/lib/send-anonymous-CLI-metrics.js @@ -0,0 +1,19 @@ +module.exports = send + +var assert = require('assert') +var url = require('url') + +function send (registryUrl, params, cb) { + assert(typeof registryUrl === 'string', 'must pass registry URI') + assert(params && typeof params === 'object', 'must pass params') + assert(typeof cb === 'function', 'must pass callback') + + var uri = url.resolve(registryUrl, '-/npm/anon-metrics/v1/' + + encodeURIComponent(params.metricId)) + + this.request(uri, { + method: 'PUT', + body: JSON.stringify(params.metrics), + authed: false + }, cb) +} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/CHANGELOG.md deleted file mode 100644 index f549a1f3de8..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/CHANGELOG.md +++ /dev/null @@ -1,36 +0,0 @@ -### v3.1.2 - -* Update to `gauge@1.6.0` adding support for default values for template - items. - -### v3.1.1 - -* Update to `gauge@1.5.3` to fix to `1.x` compatibility when it comes to - when a progress bar is enabled. In `1.x` if you didn't have a TTY the - progress bar was never shown. In `2.x` it merely defaults to disabled, - but you can enable it explicitly if you still want progress updates. - -### v3.1.0 - -* Update to `gauge@2.5.2`: - * Updates the `signal-exit` dependency which fixes an incompatibility with - the node profiler. - * Uses externalizes its ansi code generation in `console-control-strings` -* Make the default progress bar include the last line printed, colored as it - would be when printing to a tty. - -### v3.0.0 - -* Switch to `gauge@2.0.0`, for better performance, better look. -* Set stderr/stdout blocking if they're tty's, so that we can hide a - progress bar going to stderr and then safely print to stdout. Without - this the two can end up overlapping producing confusing and sometimes - corrupted output. - -### v2.0.0 - -* Make the `error` event non-fatal so that folks can use it as a prefix. - -### v1.0.0 - -* Add progress bar with `gauge@1.1.0` diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/README.md deleted file mode 100644 index dba35501614..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/README.md +++ /dev/null @@ -1,210 +0,0 @@ -# npmlog - -The logger util that npm uses. - -This logger is very basic. It does the logging for npm. It supports -custom levels and colored output. - -By default, logs are written to stderr. If you want to send log messages -to outputs other than streams, then you can change the `log.stream` -member, or you can just listen to the events that it emits, and do -whatever you want with them. - -# Basic Usage - -``` -var log = require('npmlog') - -// additional stuff ---------------------------+ -// message ----------+ | -// prefix ----+ | | -// level -+ | | | -// v v v v - log.info('fyi', 'I have a kitty cat: %j', myKittyCat) -``` - -## log.level - -* {String} - -The level to display logs at. Any logs at or above this level will be -displayed. The special level `silent` will prevent anything from being -displayed ever. - -## log.record - -* {Array} - -An array of all the log messages that have been entered. - -## log.maxRecordSize - -* {Number} - -The maximum number of records to keep. If log.record gets bigger than -10% over this value, then it is sliced down to 90% of this value. - -The reason for the 10% window is so that it doesn't have to resize a -large array on every log entry. - -## log.prefixStyle - -* {Object} - -A style object that specifies how prefixes are styled. (See below) - -## log.headingStyle - -* {Object} - -A style object that specifies how the heading is styled. (See below) - -## log.heading - -* {String} Default: "" - -If set, a heading that is printed at the start of every line. - -## log.stream - -* {Stream} Default: `process.stderr` - -The stream where output is written. - -## log.enableColor() - -Force colors to be used on all messages, regardless of the output -stream. - -## log.disableColor() - -Disable colors on all messages. - -## log.enableProgress() - -Enable the display of log activity spinner and progress bar - -## log.disableProgress() - -Disable the display of a progress bar - -## log.enableUnicode() - -Force the unicode theme to be used for the progress bar. - -## log.disableUnicode() - -Disable the use of unicode in the progress bar. - -## log.setGaugeTemplate(template) - -Set a template for outputting the progress bar. See the [gauge documentation] for details. - -[gauge documentation]: https://npmjs.com/package/gauge - -## log.setGaugeThemeset(themes) - -Select a themeset to pick themes from for the progress bar. See the [gauge documentation] for details. - -## log.pause() - -Stop emitting messages to the stream, but do not drop them. - -## log.resume() - -Emit all buffered messages that were written while paused. - -## log.log(level, prefix, message, ...) - -* `level` {String} The level to emit the message at -* `prefix` {String} A string prefix. Set to "" to skip. -* `message...` Arguments to `util.format` - -Emit a log message at the specified level. - -## log\[level](prefix, message, ...) - -For example, - -* log.silly(prefix, message, ...) -* log.verbose(prefix, message, ...) -* log.info(prefix, message, ...) -* log.http(prefix, message, ...) -* log.warn(prefix, message, ...) -* log.error(prefix, message, ...) - -Like `log.log(level, prefix, message, ...)`. In this way, each level is -given a shorthand, so you can do `log.info(prefix, message)`. - -## log.addLevel(level, n, style, disp) - -* `level` {String} Level indicator -* `n` {Number} The numeric level -* `style` {Object} Object with fg, bg, inverse, etc. -* `disp` {String} Optional replacement for `level` in the output. - -Sets up a new level with a shorthand function and so forth. - -Note that if the number is `Infinity`, then setting the level to that -will cause all log messages to be suppressed. If the number is -`-Infinity`, then the only way to show it is to enable all log messages. - -## log.newItem(name, todo, weight) - -* `name` {String} Optional; progress item name. -* `todo` {Number} Optional; total amount of work to be done. Default 0. -* `weight` {Number} Optional; the weight of this item relative to others. Default 1. - -This adds a new `are-we-there-yet` item tracker to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `Tracker` object. - -## log.newStream(name, todo, weight) - -This adds a new `are-we-there-yet` stream tracker to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `TrackerStream` object. - -## log.newGroup(name, weight) - -This adds a new `are-we-there-yet` tracker group to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `TrackerGroup` object. - -# Events - -Events are all emitted with the message object. - -* `log` Emitted for all messages -* `log.<level>` Emitted for all messages with the `<level>` level. -* `<prefix>` Messages with prefixes also emit their prefix as an event. - -# Style Objects - -Style objects can have the following fields: - -* `fg` {String} Color for the foreground text -* `bg` {String} Color for the background -* `bold`, `inverse`, `underline` {Boolean} Set the associated property -* `bell` {Boolean} Make a noise (This is pretty annoying, probably.) - -# Message Objects - -Every log event is emitted with a message object, and the `log.record` -list contains all of them that have been created. They have the -following fields: - -* `id` {Number} -* `level` {String} -* `prefix` {String} -* `message` {String} Result of `util.format()` -* `messageRaw` {Array} Arguments to `util.format()` - -# Blocking TTYs - -We use [`set-blocking`](https://npmjs.com/package/set-blocking) to set -stderr and stdout blocking if they are tty's and have the setBlocking call. -This is a work around for an issue in early versions of Node.js 6.x, which -made stderr and stdout non-blocking on OSX. (They are always blocking -Windows and were never blocking on Linux.) `npmlog` needs them to be blocking -so that it can allow output to stdout and stderr to be interlaced. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/log.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/log.js deleted file mode 100644 index e5b70f1f80b..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/log.js +++ /dev/null @@ -1,298 +0,0 @@ -'use strict' -var Progress = require('are-we-there-yet') -var Gauge = require('gauge') -var EE = require('events').EventEmitter -var log = exports = module.exports = new EE() -var util = require('util') - -var setBlocking = require('set-blocking') -var consoleControl = require('console-control-strings') - -setBlocking(true) -var stream = process.stderr -Object.defineProperty(log, 'stream', { - set: function (newStream) { - stream = newStream - if (this.gauge) this.gauge.setWriteTo(stream, stream) - }, - get: function () { - return stream - } -}) - -// by default, decide based on tty-ness. -var colorEnabled -log.useColor = function () { - return colorEnabled != null ? colorEnabled : stream.isTTY -} - -log.enableColor = function () { - colorEnabled = true - this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) -} -log.disableColor = function () { - colorEnabled = false - this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) -} - -// default level -log.level = 'info' - -log.gauge = new Gauge(stream, { - theme: {hasColor: log.useColor()}, - template: [ - {type: 'progressbar', length: 20}, - {type: 'activityIndicator', kerning: 1, length: 1}, - {type: 'section', default: ''}, - ':', - {type: 'logline', kerning: 1, default: ''} - ] -}) - -log.tracker = new Progress.TrackerGroup() - -// no progress bars unless asked -log.progressEnabled = false - -var unicodeEnabled - -log.enableUnicode = function () { - unicodeEnabled = true - this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) -} - -log.disableUnicode = function () { - unicodeEnabled = false - this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) -} - -log.setGaugeThemeset = function (themes) { - this.gauge.setThemeset(themes) -} - -log.setGaugeTemplate = function (template) { - this.gauge.setTemplate(template) -} - -log.enableProgress = function () { - if (this.progressEnabled) return - this.progressEnabled = true - if (this._pause) return - this.tracker.on('change', this.showProgress) - this.gauge.enable() - this.showProgress() -} - -log.disableProgress = function () { - if (!this.progressEnabled) return - this.clearProgress() - this.progressEnabled = false - this.tracker.removeListener('change', this.showProgress) - this.gauge.disable() -} - -var trackerConstructors = ['newGroup', 'newItem', 'newStream'] - -var mixinLog = function (tracker) { - // mixin the public methods from log into the tracker - // (except: conflicts and one's we handle specially) - Object.keys(log).forEach(function (P) { - if (P[0] === '_') return - if (trackerConstructors.filter(function (C) { return C === P }).length) return - if (tracker[P]) return - if (typeof log[P] !== 'function') return - var func = log[P] - tracker[P] = function () { - return func.apply(log, arguments) - } - }) - // if the new tracker is a group, make sure any subtrackers get - // mixed in too - if (tracker instanceof Progress.TrackerGroup) { - trackerConstructors.forEach(function (C) { - var func = tracker[C] - tracker[C] = function () { return mixinLog(func.apply(tracker, arguments)) } - }) - } - return tracker -} - -// Add tracker constructors to the top level log object -trackerConstructors.forEach(function (C) { - log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } -}) - -log.clearProgress = function (cb) { - if (!this.progressEnabled) return cb && process.nextTick(cb) - this.gauge.hide(cb) -} - -log.showProgress = function (name, completed) { - if (!this.progressEnabled) return - var values = {} - if (name) values.section = name - var last = log.record[log.record.length - 1] - if (last) { - values.subsection = last.prefix - var disp = log.disp[last.level] || last.level - var logline = this._format(disp, log.style[last.level]) - if (last.prefix) logline += ' ' + this._format(last.prefix, this.prefixStyle) - logline += ' ' + last.message.split(/\r?\n/)[0] - values.logline = logline - } - values.completed = completed || this.tracker.completed() - this.gauge.show(values) -}.bind(log) // bind for use in tracker's on-change listener - -// temporarily stop emitting, but don't drop -log.pause = function () { - this._paused = true -} - -log.resume = function () { - if (!this._paused) return - this._paused = false - - var b = this._buffer - this._buffer = [] - b.forEach(function (m) { - this.emitLog(m) - }, this) - if (this.progressEnabled) this.enableProgress() -} - -log._buffer = [] - -var id = 0 -log.record = [] -log.maxRecordSize = 10000 -log.log = function (lvl, prefix, message) { - var l = this.levels[lvl] - if (l === undefined) { - return this.emit('error', new Error(util.format( - 'Undefined log level: %j', lvl))) - } - - var a = new Array(arguments.length - 2) - var stack = null - for (var i = 2; i < arguments.length; i++) { - var arg = a[i - 2] = arguments[i] - - // resolve stack traces to a plain string. - if (typeof arg === 'object' && arg && - (arg instanceof Error) && arg.stack) { - arg.stack = stack = arg.stack + '' - } - } - if (stack) a.unshift(stack + '\n') - message = util.format.apply(util, a) - - var m = { id: id++, - level: lvl, - prefix: String(prefix || ''), - message: message, - messageRaw: a } - - this.emit('log', m) - this.emit('log.' + lvl, m) - if (m.prefix) this.emit(m.prefix, m) - - this.record.push(m) - var mrs = this.maxRecordSize - var n = this.record.length - mrs - if (n > mrs / 10) { - var newSize = Math.floor(mrs * 0.9) - this.record = this.record.slice(-1 * newSize) - } - - this.emitLog(m) -}.bind(log) - -log.emitLog = function (m) { - if (this._paused) { - this._buffer.push(m) - return - } - if (this.progressEnabled) this.gauge.pulse(m.prefix) - var l = this.levels[m.level] - if (l === undefined) return - if (l < this.levels[this.level]) return - if (l > 0 && !isFinite(l)) return - - var disp = log.disp[m.level] || m.level - this.clearProgress() - m.message.split(/\r?\n/).forEach(function (line) { - if (this.heading) { - this.write(this.heading, this.headingStyle) - this.write(' ') - } - this.write(disp, log.style[m.level]) - var p = m.prefix || '' - if (p) this.write(' ') - this.write(p, this.prefixStyle) - this.write(' ' + line + '\n') - }, this) - this.showProgress() -} - -log._format = function (msg, style) { - if (!stream) return - - var output = '' - if (this.useColor()) { - style = style || {} - var settings = [] - if (style.fg) settings.push(style.fg) - if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1)) - if (style.bold) settings.push('bold') - if (style.underline) settings.push('underline') - if (style.inverse) settings.push('inverse') - if (settings.length) output += consoleControl.color(settings) - if (style.beep) output += consoleControl.beep() - } - output += msg - if (this.useColor()) { - output += consoleControl.color('reset') - } - return output -} - -log.write = function (msg, style) { - if (!stream) return - - stream.write(this._format(msg, style)) -} - -log.addLevel = function (lvl, n, style, disp) { - if (!disp) disp = lvl - this.levels[lvl] = n - this.style[lvl] = style - if (!this[lvl]) { - this[lvl] = function () { - var a = new Array(arguments.length + 1) - a[0] = lvl - for (var i = 0; i < arguments.length; i++) { - a[i + 1] = arguments[i] - } - return this.log.apply(this, a) - }.bind(this) - } - this.disp[lvl] = disp -} - -log.prefixStyle = { fg: 'magenta' } -log.headingStyle = { fg: 'white', bg: 'black' } - -log.style = {} -log.levels = {} -log.disp = {} -log.addLevel('silly', -Infinity, { inverse: true }, 'sill') -log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb') -log.addLevel('info', 2000, { fg: 'green' }) -log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) -log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') -log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') -log.addLevel('silent', Infinity) - -// allow 'error' prefix -log.on('error', function () {}) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore deleted file mode 100644 index bc818974f86..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -*~ -.#* -node_modules -coverage -.nyc_output diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md deleted file mode 100644 index e990b86ddfb..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md +++ /dev/null @@ -1,19 +0,0 @@ -Hi, figured we could actually use a changelog now: - -## 1.1.1 2016-01-29 - -* Fix a typo in stream completion tracker - -## 1.1.0 2016-01-29 - -* Rewrote completion percent computation to be low impact– no more walking a - tree of completion groups every time we need this info. Previously, with - medium sized tree of completion groups, even a relatively modest number of - calls to the top level `completed()` method would result in absurd numbers - of calls overall as it walked down the tree. We now, instead, keep track as - we bubble up changes, so the computation is limited to when data changes and - to the depth of that one branch, instead of _every_ node. (Plus, we were already - incurring _this_ cost, since we already bubbled out changes.) -* Moved different tracker types out to their own files. -* Made tests test for TOO MANY events too. -* Standarized the source code formatting diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE deleted file mode 100644 index af4588069db..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/README.md deleted file mode 100644 index c41d3922924..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/README.md +++ /dev/null @@ -1,194 +0,0 @@ -are-we-there-yet ----------------- - -Track complex hiearchies of asynchronous task completion statuses. This is -intended to give you a way of recording and reporting the progress of the big -recursive fan-out and gather type workflows that are so common in async. - -What you do with this completion data is up to you, but the most common use case is to -feed it to one of the many progress bar modules. - -Most progress bar modules include a rudamentary version of this, but my -needs were more complex. - -Usage -===== - -```javascript -var TrackerGroup = require("are-we-there-yet").TrackerGroup - -var top = new TrackerGroup("program") - -var single = top.newItem("one thing", 100) -single.completeWork(20) - -console.log(top.completed()) // 0.2 - -fs.stat("file", function(er, stat) { - if (er) throw er - var stream = top.newStream("file", stat.size) - console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete - // and 50% * 20% == 10% - fs.createReadStream("file").pipe(stream).on("data", function (chunk) { - // do stuff with chunk - }) - top.on("change", function (name) { - // called each time a chunk is read from "file" - // top.completed() will start at 0.1 and fill up to 0.6 as the file is read - }) -}) -``` - -Shared Methods -============== - -All tracker objects described below have the following methods, they, along -with the event comprise the interface for consumers of tracker objects. - -* var completed = tracker.completed() - -Returns the ratio of completed work to work to be done. Range of 0 to 1. - -* tracker.finish() - -Marks the tracker as completed. With a TrackerGroup this marks all of its -components as completed. - -Marks all of the components of this tracker as finished, which in turn means -that `tracker.completed()` for this will now be 1. - -This will result in one or more `change` events being emitted. - -Events -====== - -All tracker objects emit `change` events with the following arguments: - -``` -function (name, completed, tracker) -``` - -`name` is the name of the tracker that originally emitted the event, -or if it didn't have one, the first containing tracker group that had one. - -`completed` is the percent complete (as returned by `tracker.completed()` method). - -`tracker` is the tracker object that you are listening for events on. - -TrackerGroup -============ - -* var tracker = new TrackerGroup(**name**) - - * **name** *(optional)* - The name of this tracker group, used in change - notifications if the component updating didn't have a name. Defaults to undefined. - -Creates a new empty tracker aggregation group. These are trackers whose -completion status is determined by the completion status of other trackers. - -* tracker.addUnit(**otherTracker**, **weight**) - - * **otherTracker** - Any of the other are-we-there-yet tracker objects - * **weight** *(optional)* - The weight to give the tracker, defaults to 1. - -Adds the **otherTracker** to this aggregation group. The weight determines -how long you expect this tracker to take to complete in proportion to other -units. So for instance, if you add one tracker with a weight of 1 and -another with a weight of 2, you're saying the second will take twice as long -to complete as the first. As such, the first will account for 33% of the -completion of this tracker and the second will account for the other 67%. - -Returns **otherTracker**. - -* var subGroup = tracker.newGroup(**name**, **weight**) - -The above is exactly equivalent to: - -```javascript - var subGroup = tracker.addUnit(new TrackerGroup(name), weight) -``` - -* var subItem = tracker.newItem(**name**, **todo**, **weight**) - -The above is exactly equivalent to: - -```javascript - var subItem = tracker.addUnit(new Tracker(name, todo), weight) -``` - -* var subStream = tracker.newStream(**name**, **todo**, **weight**) - -The above is exactly equivalent to: - -```javascript - var subStream = tracker.addUnit(new TrackerStream(name, todo), weight) -``` - -* console.log( tracker.debug() ) - -Returns a tree showing the completion of this tracker group and all of its -children, including recursively entering all of the children. - -Tracker -======= - -* var tracker = new Tracker(**name**, **todo**) - - * **name** *(optional)* The name of this counter to report in change - events. Defaults to undefined. - * **todo** *(optional)* The amount of work todo (a number). Defaults to 0. - -Ordinarily these are constructed as a part of a tracker group (via -`newItem`). - -* var completed = tracker.completed() - -Returns the ratio of completed work to work to be done. Range of 0 to 1. If -total work to be done is 0 then it will return 0. - -* tracker.addWork(**todo**) - - * **todo** A number to add to the amount of work to be done. - -Increases the amount of work to be done, thus decreasing the completion -percentage. Triggers a `change` event. - -* tracker.completeWork(**completed**) - - * **completed** A number to add to the work complete - -Increase the amount of work complete, thus increasing the completion percentage. -Will never increase the work completed past the amount of work todo. That is, -percentages > 100% are not allowed. Triggers a `change` event. - -* tracker.finish() - -Marks this tracker as finished, tracker.completed() will now be 1. Triggers -a `change` event. - -TrackerStream -============= - -* var tracker = new TrackerStream(**name**, **size**, **options**) - - * **name** *(optional)* The name of this counter to report in change - events. Defaults to undefined. - * **size** *(optional)* The number of bytes being sent through this stream. - * **options** *(optional)* A hash of stream options - -The tracker stream object is a pass through stream that updates an internal -tracker object each time a block passes through. It's intended to track -downloads, file extraction and other related activities. You use it by piping -your data source into it and then using it as your data source. - -If your data has a length attribute then that's used as the amount of work -completed when the chunk is passed through. If it does not (eg, object -streams) then each chunk counts as completing 1 unit of work, so your size -should be the total number of objects being streamed. - -* tracker.addWork(**todo**) - - * **todo** Increase the expected overall size by **todo** bytes. - -Increases the amount of work to be done, thus decreasing the completion -percentage. Triggers a `change` event. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/index.js deleted file mode 100644 index 57d8743fdad..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -exports.TrackerGroup = require('./tracker-group.js') -exports.Tracker = require('./tracker.js') -exports.TrackerStream = require('./tracker-stream.js') diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore deleted file mode 100644 index c2658d7d1b3..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md deleted file mode 100644 index 25959eab67b..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md +++ /dev/null @@ -1,22 +0,0 @@ - -1.0.0 / 2015-12-14 -================== - - * Merge pull request #12 from kasicka/master - * Add license text - -0.1.0 / 2014-10-17 -================== - - * adds `.fluent()` to api - -0.0.3 / 2014-01-13 -================== - - * fix receiver for .method() - -0.0.2 / 2014-01-13 -================== - - * Object.defineProperty() sucks - * Initial commit diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License deleted file mode 100644 index 60de60addbe..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2015 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile deleted file mode 100644 index a9dcfd50dbd..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec \ - --bail - -.PHONY: test
\ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md deleted file mode 100644 index ab8cf4ace15..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md +++ /dev/null @@ -1,94 +0,0 @@ - -# delegates - - Node method and accessor delegation utilty. - -## Installation - -``` -$ npm install delegates -``` - -## Example - -```js -var delegate = require('delegates'); - -... - -delegate(proto, 'request') - .method('acceptsLanguages') - .method('acceptsEncodings') - .method('acceptsCharsets') - .method('accepts') - .method('is') - .access('querystring') - .access('idempotent') - .access('socket') - .access('length') - .access('query') - .access('search') - .access('status') - .access('method') - .access('path') - .access('body') - .access('host') - .access('url') - .getter('subdomains') - .getter('protocol') - .getter('header') - .getter('stale') - .getter('fresh') - .getter('secure') - .getter('ips') - .getter('ip') -``` - -# API - -## Delegate(proto, prop) - -Creates a delegator instance used to configure using the `prop` on the given -`proto` object. (which is usually a prototype) - -## Delegate#method(name) - -Allows the given method `name` to be accessed on the host. - -## Delegate#getter(name) - -Creates a "getter" for the property with the given `name` on the delegated -object. - -## Delegate#setter(name) - -Creates a "setter" for the property with the given `name` on the delegated -object. - -## Delegate#access(name) - -Creates an "accessor" (ie: both getter *and* setter) for the property with the -given `name` on the delegated object. - -## Delegate#fluent(name) - -A unique type of "accessor" that works for a "fluent" API. When called as a -getter, the method returns the expected value. However, if the method is called -with a value, it will return itself so it can be chained. For example: - -```js -delegate(proto, 'request') - .fluent('query') - -// getter -var q = request.query(); - -// setter (chainable) -request - .query({ a: 1 }) - .query({ b: 2 }); -``` - -# License - - MIT diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js deleted file mode 100644 index 17c222d5293..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js +++ /dev/null @@ -1,121 +0,0 @@ - -/** - * Expose `Delegator`. - */ - -module.exports = Delegator; - -/** - * Initialize a delegator. - * - * @param {Object} proto - * @param {String} target - * @api public - */ - -function Delegator(proto, target) { - if (!(this instanceof Delegator)) return new Delegator(proto, target); - this.proto = proto; - this.target = target; - this.methods = []; - this.getters = []; - this.setters = []; - this.fluents = []; -} - -/** - * Delegate method `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.method = function(name){ - var proto = this.proto; - var target = this.target; - this.methods.push(name); - - proto[name] = function(){ - return this[target][name].apply(this[target], arguments); - }; - - return this; -}; - -/** - * Delegator accessor `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.access = function(name){ - return this.getter(name).setter(name); -}; - -/** - * Delegator getter `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.getter = function(name){ - var proto = this.proto; - var target = this.target; - this.getters.push(name); - - proto.__defineGetter__(name, function(){ - return this[target][name]; - }); - - return this; -}; - -/** - * Delegator setter `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.setter = function(name){ - var proto = this.proto; - var target = this.target; - this.setters.push(name); - - proto.__defineSetter__(name, function(val){ - return this[target][name] = val; - }); - - return this; -}; - -/** - * Delegator fluent accessor - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.fluent = function (name) { - var proto = this.proto; - var target = this.target; - this.fluents.push(name); - - proto[name] = function(val){ - if ('undefined' != typeof val) { - this[target][name] = val; - return this; - } else { - return this[target][name]; - } - }; - - return this; -}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json deleted file mode 100644 index 8c2c0ef2c31..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "delegates@^1.0.0", - "scope": null, - "escapedName": "delegates", - "name": "delegates", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/are-we-there-yet" - ], - [ - { - "raw": "delegates@^1.0.0", - "scope": null, - "escapedName": "delegates", - "name": "delegates", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet" - ] - ], - "_from": "delegates@^1.0.0", - "_id": "delegates@1.0.0", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/are-we-there-yet/delegates", - "_nodeVersion": "4.2.1", - "_npmUser": { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "raw": "delegates@^1.0.0", - "scope": null, - "escapedName": "delegates", - "name": "delegates", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/are-we-there-yet" - ], - "_resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", - "_shrinkwrap": null, - "_spec": "delegates@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet", - "bugs": { - "url": "https://github.com/visionmedia/node-delegates/issues" - }, - "dependencies": {}, - "description": "delegate methods and accessors to another property", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", - "tarball": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" - }, - "gitHead": "c4dc07ef1ed51c2b2a63f3585e5ef949ee577a49", - "homepage": "https://github.com/visionmedia/node-delegates#readme", - "keywords": [ - "delegate", - "delegation" - ], - "license": "MIT", - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "dominicbarnes", - "email": "dominic@dbarnes.info" - } - ], - "name": "delegates", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/visionmedia/node-delegates.git" - }, - "scripts": {}, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js deleted file mode 100644 index 7b6e3d4df19..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js +++ /dev/null @@ -1,94 +0,0 @@ - -var assert = require('assert'); -var delegate = require('..'); - -describe('.method(name)', function(){ - it('should delegate methods', function(){ - var obj = {}; - - obj.request = { - foo: function(bar){ - assert(this == obj.request); - return bar; - } - }; - - delegate(obj, 'request').method('foo'); - - obj.foo('something').should.equal('something'); - }) -}) - -describe('.getter(name)', function(){ - it('should delegate getters', function(){ - var obj = {}; - - obj.request = { - get type() { - return 'text/html'; - } - } - - delegate(obj, 'request').getter('type'); - - obj.type.should.equal('text/html'); - }) -}) - -describe('.setter(name)', function(){ - it('should delegate setters', function(){ - var obj = {}; - - obj.request = { - get type() { - return this._type.toUpperCase(); - }, - - set type(val) { - this._type = val; - } - } - - delegate(obj, 'request').setter('type'); - - obj.type = 'hey'; - obj.request.type.should.equal('HEY'); - }) -}) - -describe('.access(name)', function(){ - it('should delegate getters and setters', function(){ - var obj = {}; - - obj.request = { - get type() { - return this._type.toUpperCase(); - }, - - set type(val) { - this._type = val; - } - } - - delegate(obj, 'request').access('type'); - - obj.type = 'hey'; - obj.type.should.equal('HEY'); - }) -}) - -describe('.fluent(name)', function () { - it('should delegate in a fluent fashion', function () { - var obj = { - settings: { - env: 'development' - } - }; - - delegate(obj, 'settings').fluent('env'); - - obj.env().should.equal('development'); - obj.env('production').should.equal(obj); - obj.settings.env.should.equal('production'); - }) -}) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/package.json deleted file mode 100644 index f4fba2ad433..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "are-we-there-yet@~1.1.2", - "scope": null, - "escapedName": "are-we-there-yet", - "name": "are-we-there-yet", - "rawSpec": "~1.1.2", - "spec": ">=1.1.2 <1.2.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog" - ], - [ - { - "raw": "are-we-there-yet@~1.1.2", - "scope": null, - "escapedName": "are-we-there-yet", - "name": "are-we-there-yet", - "rawSpec": "~1.1.2", - "spec": ">=1.1.2 <1.2.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog" - ] - ], - "_from": "are-we-there-yet@~1.1.2", - "_id": "are-we-there-yet@1.1.2", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/are-we-there-yet", - "_nodeVersion": "4.2.2", - "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/are-we-there-yet-1.1.2.tgz_1458084397358_0.15847722673788667" - }, - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "_npmVersion": "3.8.1", - "_phantomChildren": {}, - "_requested": { - "raw": "are-we-there-yet@~1.1.2", - "scope": null, - "escapedName": "are-we-there-yet", - "name": "are-we-there-yet", - "rawSpec": "~1.1.2", - "spec": ">=1.1.2 <1.2.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog" - ], - "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", - "_shasum": "80e470e95a084794fe1899262c5667c6e88de1b3", - "_shrinkwrap": null, - "_spec": "are-we-there-yet@~1.1.2", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog", - "author": { - "name": "Rebecca Turner", - "url": "http://re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/are-we-there-yet/issues" - }, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.0 || ^1.1.13" - }, - "description": "Keep track of the overall completion of many dispirate processes", - "devDependencies": { - "standard": "^6.0.8", - "tap": "^5.7.0" - }, - "directories": {}, - "dist": { - "shasum": "80e470e95a084794fe1899262c5667c6e88de1b3", - "tarball": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz" - }, - "gitHead": "dd5706e2204cb681e78031d0ffe156ed4cc75823", - "homepage": "https://github.com/iarna/are-we-there-yet", - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "name": "are-we-there-yet", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/are-we-there-yet.git" - }, - "scripts": { - "test": "standard && tap test/*.js" - }, - "version": "1.1.2" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js deleted file mode 100644 index 2aa7c05c586..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict' -var util = require('util') - -module.exports = function (obj, event, next) { - var timeout = setTimeout(gotTimeout, 10) - obj.once(event, gotResult) - - function gotTimeout () { - obj.removeListener(event, gotResult) - next(new Error('Timeout listening for ' + event)) - } - var result = [] - function gotResult () { - result = Array.prototype.slice.call(arguments) - clearTimeout(timeout) - timeout = setTimeout(gotNoMoreResults, 10) - obj.once(event, gotTooManyResults) - } - function gotNoMoreResults () { - obj.removeListener(event, gotTooManyResults) - var args = [null].concat(result) - next.apply(null, args) - } - function gotTooManyResults () { - var secondResult = Array.prototype.slice.call(arguments) - clearTimeout(timeout) - next(new Error('Got too many results, first ' + util.inspect(result) + ' and then ' + util.inspect(secondResult))) - } -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js deleted file mode 100644 index 374c7739d0c..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict' -var test = require('tap').test -var Tracker = require('../index.js').Tracker - -var testEvent = require('./lib/test-event.js') - -var name = 'test' - -test('initialization', function (t) { - var simple = new Tracker(name) - - t.is(simple.completed(), 0, 'Nothing todo is 0 completion') - t.done() -}) - -var track -var todo = 100 -test('completion', function (t) { - track = new Tracker(name, todo) - t.is(track.completed(), 0, 'Nothing done is 0 completion') - - testEvent(track, 'change', afterCompleteWork) - - track.completeWork(todo) - t.is(track.completed(), 1, 'completeWork: 100% completed') - - function afterCompleteWork (er, onChangeName) { - t.is(er, null, 'completeWork: on change event fired') - t.is(onChangeName, name, 'completeWork: on change emits the correct name') - t.done() - } -}) - -test('add more work', function (t) { - testEvent(track, 'change', afterAddWork) - track.addWork(todo) - t.is(track.completed(), 0.5, 'addWork: 50% completed') - function afterAddWork (er, onChangeName) { - t.is(er, null, 'addWork: on change event fired') - t.is(onChangeName, name, 'addWork: on change emits the correct name') - t.done() - } -}) - -test('complete more work', function (t) { - track.completeWork(200) - t.is(track.completed(), 1, 'completeWork: Over completion is still only 100% complete') - t.done() -}) - -test('finish is always 100%', function (t) { - var finishtest = new Tracker(name, todo) - finishtest.completeWork(50) - finishtest.finish() - t.is(finishtest.completed(), 1, 'finish: Explicitly finishing moves to 100%') - t.done() -}) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js deleted file mode 100644 index 799a7670b65..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict' -var test = require('tap').test -var TrackerGroup = require('../index.js').TrackerGroup -var testEvent = require('./lib/test-event.js') - -test('TrackerGroup', function (t) { - var name = 'test' - - var track = new TrackerGroup(name) - t.is(track.completed(), 0, 'Nothing todo is 0 completion') - testEvent(track, 'change', afterFinishEmpty) - track.finish() - var a, b - function afterFinishEmpty (er, onChangeName, completion) { - t.is(er, null, 'finishEmpty: on change event fired') - t.is(onChangeName, name, 'finishEmpty: on change emits the correct name') - t.is(completion, 1, 'finishEmpty: passed through completion was correct') - t.is(track.completed(), 1, 'finishEmpty: Finishing an empty group actually finishes it') - - track = new TrackerGroup(name) - a = track.newItem('a', 10, 1) - b = track.newItem('b', 10, 1) - t.is(track.completed(), 0, 'Initially empty') - testEvent(track, 'change', afterCompleteWork) - a.completeWork(5) - } - function afterCompleteWork (er, onChangeName, completion) { - t.is(er, null, 'on change event fired') - t.is(onChangeName, 'a', 'on change emits the correct name') - t.is(completion, 0.25, 'Complete half of one is a quarter overall') - t.is(track.completed(), 0.25, 'Complete half of one is a quarter overall') - testEvent(track, 'change', afterFinishAll) - track.finish() - } - function afterFinishAll (er, onChangeName, completion) { - t.is(er, null, 'finishAll: on change event fired') - t.is(onChangeName, name, 'finishAll: on change emits the correct name') - t.is(completion, 1, 'Finishing everything ') - t.is(track.completed(), 1, 'Finishing everything ') - - track = new TrackerGroup(name) - a = track.newItem('a', 10, 2) - b = track.newItem('b', 10, 1) - t.is(track.completed(), 0, 'weighted: Initially empty') - testEvent(track, 'change', afterWeightedCompleteWork) - a.completeWork(5) - } - function afterWeightedCompleteWork (er, onChangeName, completion) { - t.is(er, null, 'weighted: on change event fired') - t.is(onChangeName, 'a', 'weighted: on change emits the correct name') - t.is(Math.floor(completion * 100), 33, 'weighted: Complete half of double weighted') - t.is(Math.floor(track.completed() * 100), 33, 'weighted: Complete half of double weighted') - testEvent(track, 'change', afterWeightedFinishAll) - track.finish() - } - function afterWeightedFinishAll (er, onChangeName, completion) { - t.is(er, null, 'weightedFinishAll: on change event fired') - t.is(onChangeName, name, 'weightedFinishAll: on change emits the correct name') - t.is(completion, 1, 'weightedFinishaAll: Finishing everything ') - t.is(track.completed(), 1, 'weightedFinishaAll: Finishing everything ') - - track = new TrackerGroup(name) - a = track.newGroup('a', 10) - b = track.newGroup('b', 10) - var a1 = a.newItem('a.1', 10) - a1.completeWork(5) - t.is(track.completed(), 0.25, 'nested: Initially quarter done') - testEvent(track, 'change', afterNestedComplete) - b.finish() - } - function afterNestedComplete (er, onChangeName, completion) { - t.is(er, null, 'nestedComplete: on change event fired') - t.is(onChangeName, 'b', 'nestedComplete: on change emits the correct name') - t.is(completion, 0.75, 'nestedComplete: Finishing everything ') - t.is(track.completed(), 0.75, 'nestedComplete: Finishing everything ') - t.end() - } -}) - -test('cycles', function (t) { - var track = new TrackerGroup('top') - testCycle(track, track) - var layer1 = track.newGroup('layer1') - testCycle(layer1, track) - t.end() - - function testCycle (addTo, toAdd) { - try { - addTo.addUnit(toAdd) - t.fail(toAdd.name) - } catch (ex) { - console.log(ex) - t.pass(toAdd.name) - } - } -}) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js deleted file mode 100644 index 65f04b03769..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict' -var test = require('tap').test -var util = require('util') -var stream = require('readable-stream') -var TrackerStream = require('../index.js').TrackerStream -var testEvent = require('./lib/test-event.js') - -var Sink = function () { - stream.Writable.apply(this, arguments) -} -util.inherits(Sink, stream.Writable) -Sink.prototype._write = function (data, encoding, cb) { - cb() -} - -test('TrackerStream', function (t) { - t.plan(9) - - var name = 'test' - var track = new TrackerStream(name) - - t.is(track.completed(), 0, 'Nothing todo is 0 completion') - - var todo = 10 - track = new TrackerStream(name, todo) - t.is(track.completed(), 0, 'Nothing done is 0 completion') - - track.pipe(new Sink()) - - testEvent(track, 'change', afterCompleteWork) - track.write('0123456789') - function afterCompleteWork (er, onChangeName) { - t.is(er, null, 'write: on change event fired') - t.is(onChangeName, name, 'write: on change emits the correct name') - t.is(track.completed(), 1, 'write: 100% completed') - - testEvent(track, 'change', afterAddWork) - track.addWork(10) - } - function afterAddWork (er, onChangeName) { - t.is(er, null, 'addWork: on change event fired') - t.is(track.completed(), 0.5, 'addWork: 50% completed') - - testEvent(track, 'change', afterAllWork) - track.write('ABCDEFGHIJKLMNOPQRST') - } - function afterAllWork (er) { - t.is(er, null, 'allWork: on change event fired') - t.is(track.completed(), 1, 'allWork: 100% completed') - } -}) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js deleted file mode 100644 index 6f436875578..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -var EventEmitter = require('events').EventEmitter -var util = require('util') - -var trackerId = 0 -var TrackerBase = module.exports = function (name) { - EventEmitter.call(this) - this.id = ++trackerId - this.name = name -} -util.inherits(TrackerBase, EventEmitter) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js deleted file mode 100644 index 9759e1226db..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict' -var util = require('util') -var TrackerBase = require('./tracker-base.js') -var Tracker = require('./tracker.js') -var TrackerStream = require('./tracker-stream.js') - -var TrackerGroup = module.exports = function (name) { - TrackerBase.call(this, name) - this.parentGroup = null - this.trackers = [] - this.completion = {} - this.weight = {} - this.totalWeight = 0 - this.finished = false - this.bubbleChange = bubbleChange(this) -} -util.inherits(TrackerGroup, TrackerBase) - -function bubbleChange (trackerGroup) { - return function (name, completed, tracker) { - trackerGroup.completion[tracker.id] = completed - if (trackerGroup.finished) return - trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup) - } -} - -TrackerGroup.prototype.nameInTree = function () { - var names = [] - var from = this - while (from) { - names.unshift(from.name) - from = from.parentGroup - } - return names.join('/') -} - -TrackerGroup.prototype.addUnit = function (unit, weight) { - if (unit.addUnit) { - var toTest = this - while (toTest) { - if (unit === toTest) { - throw new Error( - 'Attempted to add tracker group ' + - unit.name + ' to tree that already includes it ' + - this.nameInTree(this)) - } - toTest = toTest.parentGroup - } - unit.parentGroup = this - } - this.weight[unit.id] = weight || 1 - this.totalWeight += this.weight[unit.id] - this.trackers.push(unit) - this.completion[unit.id] = unit.completed() - unit.on('change', this.bubbleChange) - if (!this.finished) this.emit('change', unit.name, this.completion[unit.id], unit) - return unit -} - -TrackerGroup.prototype.completed = function () { - if (this.trackers.length === 0) return 0 - var valPerWeight = 1 / this.totalWeight - var completed = 0 - for (var ii = 0; ii < this.trackers.length; ii++) { - var trackerId = this.trackers[ii].id - completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId] - } - return completed -} - -TrackerGroup.prototype.newGroup = function (name, weight) { - return this.addUnit(new TrackerGroup(name), weight) -} - -TrackerGroup.prototype.newItem = function (name, todo, weight) { - return this.addUnit(new Tracker(name, todo), weight) -} - -TrackerGroup.prototype.newStream = function (name, todo, weight) { - return this.addUnit(new TrackerStream(name, todo), weight) -} - -TrackerGroup.prototype.finish = function () { - this.finished = true - if (!this.trackers.length) this.addUnit(new Tracker(), 1, true) - for (var ii = 0; ii < this.trackers.length; ii++) { - var tracker = this.trackers[ii] - tracker.finish() - tracker.removeListener('change', this.bubbleChange) - } - this.emit('change', this.name, 1, this) -} - -var buffer = ' ' -TrackerGroup.prototype.debug = function (depth) { - depth = depth || 0 - var indent = depth ? buffer.substr(0, depth) : '' - var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n' - this.trackers.forEach(function (tracker) { - if (tracker instanceof TrackerGroup) { - output += tracker.debug(depth + 1) - } else { - output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n' - } - }) - return output -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js deleted file mode 100644 index fb9598ed4e9..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict' -var util = require('util') -var stream = require('readable-stream') -var delegate = require('delegates') -var Tracker = require('./tracker.js') - -var TrackerStream = module.exports = function (name, size, options) { - stream.Transform.call(this, options) - this.tracker = new Tracker(name, size) - this.name = name - this.id = this.tracker.id - this.tracker.on('change', delegateChange(this)) -} -util.inherits(TrackerStream, stream.Transform) - -function delegateChange (trackerStream) { - return function (name, completion, tracker) { - trackerStream.emit('change', name, completion, trackerStream) - } -} - -TrackerStream.prototype._transform = function (data, encoding, cb) { - this.tracker.completeWork(data.length ? data.length : 1) - this.push(data) - cb() -} - -TrackerStream.prototype._flush = function (cb) { - this.tracker.finish() - cb() -} - -delegate(TrackerStream.prototype, 'tracker') - .method('completed') - .method('addWork') diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js deleted file mode 100644 index 68c2339b454..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict' -var util = require('util') -var TrackerBase = require('./tracker-base.js') - -var Tracker = module.exports = function (name, todo) { - TrackerBase.call(this, name) - this.workDone = 0 - this.workTodo = todo || 0 -} -util.inherits(Tracker, TrackerBase) - -Tracker.prototype.completed = function () { - return this.workTodo === 0 ? 0 : this.workDone / this.workTodo -} - -Tracker.prototype.addWork = function (work) { - this.workTodo += work - this.emit('change', this.name, this.completed(), this) -} - -Tracker.prototype.completeWork = function (work) { - this.workDone += work - if (this.workDone > this.workTodo) this.workDone = this.workTodo - this.emit('change', this.name, this.completed(), this) -} - -Tracker.prototype.finish = function () { - this.workTodo = this.workDone = 1 - this.emit('change', this.name, 1, this) -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/LICENSE deleted file mode 100644 index e756052969b..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2014, Rebecca Turner <me@re-becca.org> - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/README.md deleted file mode 100644 index f58cc8d8925..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/README.md +++ /dev/null @@ -1,145 +0,0 @@ -# Console Control Strings - -A library of cross-platform tested terminal/console command strings for -doing things like color and cursor positioning. This is a subset of both -ansi and vt100. All control codes included work on both Windows & Unix-like -OSes, except where noted. - -## Usage - -```js -var consoleControl = require('console-control-strings') - -console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset')) -process.stdout.write(consoleControl.goto(75, 10)) -``` - -## Why Another? - -There are tons of libraries similar to this one. I wanted one that was: - -1. Very clear about compatibility goals. -2. Could emit, for instance, a start color code without an end one. -3. Returned strings w/o writing to streams. -4. Was not weighed down with other unrelated baggage. - -## Functions - -### var code = consoleControl.up(_num = 1_) - -Returns the escape sequence to move _num_ lines up. - -### var code = consoleControl.down(_num = 1_) - -Returns the escape sequence to move _num_ lines down. - -### var code = consoleControl.forward(_num = 1_) - -Returns the escape sequence to move _num_ lines righ. - -### var code = consoleControl.back(_num = 1_) - -Returns the escape sequence to move _num_ lines left. - -### var code = consoleControl.nextLine(_num = 1_) - -Returns the escape sequence to move _num_ lines down and to the beginning of -the line. - -### var code = consoleControl.previousLine(_num = 1_) - -Returns the escape sequence to move _num_ lines up and to the beginning of -the line. - -### var code = consoleControl.eraseData() - -Returns the escape sequence to erase everything from the current cursor -position to the bottom right of the screen. This is line based, so it -erases the remainder of the current line and all following lines. - -### var code = consoleControl.eraseLine() - -Returns the escape sequence to erase to the end of the current line. - -### var code = consoleControl.goto(_x_, _y_) - -Returns the escape sequence to move the cursor to the designated position. -Note that the origin is _1, 1_ not _0, 0_. - -### var code = consoleControl.gotoSOL() - -Returns the escape sequence to move the cursor to the beginning of the -current line. (That is, it returns a carriage return, `\r`.) - -### var code = consoleControl.beep() - -Returns the escape sequence to cause the termianl to beep. (That is, it -returns unicode character `\x0007`, a Control-G.) - -### var code = consoleControl.hideCursor() - -Returns the escape sequence to hide the cursor. - -### var code = consoleControl.showCursor() - -Returns the escape sequence to show the cursor. - -### var code = consoleControl.color(_colors = []_) - -### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_) - -Returns the escape sequence to set the current terminal display attributes -(mostly colors). Arguments can either be a list of attributes or an array -of attributes. The difference between passing in an array or list of colors -and calling `.color` separately for each one, is that in the former case a -single escape sequence will be produced where as in the latter each change -will have its own distinct escape sequence. Each attribute can be one of: - -* Reset: - * **reset** – Reset all attributes to the terminal default. -* Styles: - * **bold** – Display text as bold. In some terminals this means using a - bold font, in others this means changing the color. In some it means - both. - * **italic** – Display text as italic. This is not available in most Windows terminals. - * **underline** – Underline text. This is not available in most Windows Terminals. - * **inverse** – Invert the foreground and background colors. - * **stopBold** – Do not display text as bold. - * **stopItalic** – Do not display text as italic. - * **stopUnderline** – Do not underline text. - * **stopInverse** – Do not invert foreground and background. -* Colors: - * **white** - * **black** - * **blue** - * **cyan** - * **green** - * **magenta** - * **red** - * **yellow** - * **grey** / **brightBlack** - * **brightRed** - * **brightGreen** - * **brightYellow** - * **brightBlue** - * **brightMagenta** - * **brightCyan** - * **brightWhite** -* Background Colors: - * **bgWhite** - * **bgBlack** - * **bgBlue** - * **bgCyan** - * **bgGreen** - * **bgMagenta** - * **bgRed** - * **bgYellow** - * **bgGrey** / **bgBrightBlack** - * **bgBrightRed** - * **bgBrightGreen** - * **bgBrightYellow** - * **bgBrightBlue** - * **bgBrightMagenta** - * **bgBrightCyan** - * **bgBrightWhite** - diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/index.js deleted file mode 100644 index bf890348ec6..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict' - -// These tables borrowed from `ansi` - -var prefix = '\x1b[' - -exports.up = function up (num) { - return prefix + (num || '') + 'A' -} - -exports.down = function down (num) { - return prefix + (num || '') + 'B' -} - -exports.forward = function forward (num) { - return prefix + (num || '') + 'C' -} - -exports.back = function back (num) { - return prefix + (num || '') + 'D' -} - -exports.nextLine = function nextLine (num) { - return prefix + (num || '') + 'E' -} - -exports.previousLine = function previousLine (num) { - return prefix + (num || '') + 'F' -} - -exports.horizontalAbsolute = function horizontalAbsolute (num) { - if (num == null) throw new Error('horizontalAboslute requires a column to position to') - return prefix + num + 'G' -} - -exports.eraseData = function eraseData () { - return prefix + 'J' -} - -exports.eraseLine = function eraseLine () { - return prefix + 'K' -} - -exports.goto = function (x, y) { - return prefix + y + ';' + x + 'H' -} - -exports.gotoSOL = function () { - return '\r' -} - -exports.beep = function () { - return '\x07' -} - -exports.hideCursor = function hideCursor () { - return prefix + '?25l' -} - -exports.showCursor = function showCursor () { - return prefix + '?25h' -} - -var colors = { - reset: 0, -// styles - bold: 1, - italic: 3, - underline: 4, - inverse: 7, -// resets - stopBold: 22, - stopItalic: 23, - stopUnderline: 24, - stopInverse: 27, -// colors - white: 37, - black: 30, - blue: 34, - cyan: 36, - green: 32, - magenta: 35, - red: 31, - yellow: 33, - bgWhite: 47, - bgBlack: 40, - bgBlue: 44, - bgCyan: 46, - bgGreen: 42, - bgMagenta: 45, - bgRed: 41, - bgYellow: 43, - - grey: 90, - brightBlack: 90, - brightRed: 91, - brightGreen: 92, - brightYellow: 93, - brightBlue: 94, - brightMagenta: 95, - brightCyan: 96, - brightWhite: 97, - - bgGrey: 100, - bgBrightBlack: 100, - bgBrightRed: 101, - bgBrightGreen: 102, - bgBrightYellow: 103, - bgBrightBlue: 104, - bgBrightMagenta: 105, - bgBrightCyan: 106, - bgBrightWhite: 107 -} - -exports.color = function color (colorWith) { - if (arguments.length !== 1 || !Array.isArray(colorWith)) { - colorWith = Array.prototype.slice.call(arguments) - } - return prefix + colorWith.map(colorNameToCode).join(';') + 'm' -} - -function colorNameToCode (color) { - if (colors[color] != null) return colors[color] - throw new Error('Unknown color or style name: ' + color) -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/package.json deleted file mode 100644 index a76eecadec3..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/console-control-strings/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "console-control-strings@~1.1.0", - "scope": null, - "escapedName": "console-control-strings", - "name": "console-control-strings", - "rawSpec": "~1.1.0", - "spec": ">=1.1.0 <1.2.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog" - ], - [ - { - "raw": "console-control-strings@~1.1.0", - "scope": null, - "escapedName": "console-control-strings", - "name": "console-control-strings", - "rawSpec": "~1.1.0", - "spec": ">=1.1.0 <1.2.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog" - ] - ], - "_from": "console-control-strings@~1.1.0", - "_id": "console-control-strings@1.1.0", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/console-control-strings", - "_nodeVersion": "4.4.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/console-control-strings-1.1.0.tgz_1466033396831_0.9470485949423164" - }, - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "_npmVersion": "3.9.2", - "_phantomChildren": {}, - "_requested": { - "raw": "console-control-strings@~1.1.0", - "scope": null, - "escapedName": "console-control-strings", - "name": "console-control-strings", - "rawSpec": "~1.1.0", - "spec": ">=1.1.0 <1.2.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog", - "/npm-registry-client/npmlog/gauge" - ], - "_resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "_shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e", - "_shrinkwrap": null, - "_spec": "console-control-strings@~1.1.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/iarna/console-control-strings/issues" - }, - "dependencies": {}, - "description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.", - "devDependencies": { - "standard": "^7.1.2", - "tap": "^5.7.2" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e", - "tarball": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" - }, - "files": [ - "LICENSE", - "index.js" - ], - "gitHead": "722439b4998d2964ac3d3f9ec175c008aa9b7b4b", - "homepage": "https://github.com/iarna/console-control-strings#readme", - "keywords": [], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "name": "console-control-strings", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/console-control-strings.git" - }, - "scripts": { - "test": "standard && tap test/*.js" - }, - "version": "1.1.0" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/CHANGELOG.md deleted file mode 100644 index efd08fc7c19..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/CHANGELOG.md +++ /dev/null @@ -1,131 +0,0 @@ -### v2.6.0 - -* Bug fix: Don't run the code associated with `enable`/`disable` if the gauge - is already enabled or disabled respectively. This prevents leaking event - listeners, amongst other weirdness. -* New feature: Template items can have default values that will be used if no - value was otherwise passed in. - -### v2.5.3 - -* Default to `enabled` only if we have a tty. Users can always override - this by passing in the `enabled` option explicitly or by calling calling - `gauge.enable()`. - -### v2.5.2 - -* Externalized `./console-strings.js` into `console-control-strings`. - -### v2.5.1 - -* Update to `signal-exit@3.0.0`, which fixes a compatibility bug with the - node profiler. -* [#39](https://github.com/iarna/gauge/pull/39) Fix tests on 0.10 and add - a missing devDependency. ([@helloyou2012](https://github.com/helloyou2012)) - -### v2.5.0 - -* Add way to programmatically fetch a list of theme names in a themeset - (`Themeset.getThemeNames`). - -### v2.4.0 - -* Add support for setting themesets on existing gauge objects. -* Add post-IO callback to `gauge.hide()` as it is somtetimes necessary when - your terminal is interleaving output from multiple filehandles (ie, stdout - & stderr). - -### v2.3.1 - -* Fix a refactor bug in setTheme where it wasn't accepting the various types - of args it should. - -### v2.3.0 - -#### FEATURES - -* Add setTemplate & setTheme back in. -* Add support for named themes, you can now ask for things like 'colorASCII' - and 'brailleSpinner'. Of course, you can still pass in theme objects. - Additionally you can now pass in an object with `hasUnicode`, `hasColor` and - `platform` keys in order to override our guesses as to those values when - selecting a default theme from the themeset. -* Make the output stream optional (it defaults to `process.stderr` now). -* Add `setWriteTo(stream[, tty])` to change the output stream and, - optionally, tty. - -#### BUG FIXES & REFACTORING - -* Abort the display phase early if we're supposed to be hidden and we are. -* Stop printing a bunch of spaces at the end of lines, since we're already - using an erase-to-end-of-line code anyway. -* The unicode themes were missing the subsection separator. - -### v2.2.1 - -* Fix image in readme - -### v2.2.0 - -* All new themes API– reference themes by name and pass in custom themes and - themesets (themesets get platform support autodetection done on them to - select the best theme). Theme mixins let you add features to all existing - themes. -* Much, much improved test coverage. - -### v2.1.0 - -* Got rid of ░ in the default platform, noUnicode, hasColor theme. Thanks - to @yongtw123 for pointing out this had snuck in. -* Fiddled with the demo output to make it easier to see the spinner spin. Also - added prints before each platforms test output. -* I forgot to include `signal-exit` in our deps. <.< Thank you @KenanY for - finding this. Then I was lazy and made a new commit instead of using his - PR. Again, thank you for your patience @KenenY. -* Drastically speed up travis testing. -* Add a small javascript demo (demo.js) for showing off the various themes - (and testing them on diff platforms). -* Change: The subsection separator from ⁄ and / (different chars) to >. -* Fix crasher: A show or pulse without a label would cause the template renderer - to complain about a missing value. -* New feature: Add the ability to disable the clean-up-on-exit behavior. - Not something I expect to be widely desirable, but important if you have - multiple distinct gauge instances in your app. -* Use our own color support detection. - The `has-color` module proved too magic for my needs, making assumptions - as to which stream we write to and reading command line arguments. - -### v2.0.0 - -This is a major rewrite of the internals. Externally there are fewer -changes: - -* On node>0.8 gauge object now prints updates at a fixed rate. This means - that when you call `show` it may wate up to `updateInterval` ms before it - actually prints an update. You override this behavior with the - `fixedFramerate` option. -* The gauge object now keeps the cursor hidden as long as it's enabled and - shown. -* The constructor's arguments have changed, now it takes a mandatory output - stream and an optional options object. The stream no longer needs to be - an `ansi`ified stream, although it can be if you want (but we won't make - use of its special features). -* Previously the gauge was disabled by default if `process.stdout` wasn't a - tty. Now it always defaults to enabled. If you want the previous - behavior set the `enabled` option to `process.stdout.isTTY`. -* The constructor's options have changed– see the docs for details. -* Themes are entirely different. If you were using a custom theme, or - referring to one directly (eg via `Gauge.unicode` or `Gauge.ascii`) then - you'll need to change your code. You can get the equivalent of the latter - with: - ``` - var themes = require('gauge/themes') - var unicodeTheme = themes(true, true) // returns the color unicode theme for your platform - ``` - The default themes no longer use any ambiguous width characters, so even - if you choose to display those as wide your progress bar should still - display correctly. -* Templates are entirely different and if you were using a custom one, you - should consult the documentation to learn how to recreate it. If you were - using the default, be aware that it has changed and the result looks quite - a bit different. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/LICENSE deleted file mode 100644 index e756052969b..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2014, Rebecca Turner <me@re-becca.org> - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/README.md deleted file mode 100644 index bf87d189f1b..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/README.md +++ /dev/null @@ -1,395 +0,0 @@ -gauge -===== - -A nearly stateless terminal based horizontal gauge / progress bar. - -```javascript -var Gauge = require("gauge") - -var gauge = new Gauge() - -gauge.show("test", 0.20) - -gauge.pulse("this") - -gauge.hide() -``` - -![](gauge-demo.gif) - - -### CHANGES FROM 1.x - -Gauge 2.x is breaking release, please see the [changelog] for details on -what's changed if you were previously a user of this module. - -[changelog]: CHANGELOG.md - -### THE GAUGE CLASS - -This is the typical interface to the module– it provides a pretty -fire-and-forget interface to displaying your status information. - -``` -var Gauge = require("gauge") - -var gauge = new Gauge([stream], [options]) -``` - -* **stream** – *(optional, default STDERR)* A stream that progress bar - updates are to be written to. Gauge honors backpressure and will pause - most writing if it is indicated. -* **options** – *(optional)* An option object. - -Constructs a new gauge. Gauges are drawn on a single line, and are not drawn -if **stream** isn't a tty and a tty isn't explicitly provided. - -If **stream** is a terminal or if you pass in **tty** to **options** then we -will detect terminal resizes and redraw to fit. We do this by watching for -`resize` events on the tty. (To work around a bug in verisons of Node prior -to 2.5.0, we watch for them on stdout if the tty is stderr.) Resizes to -larger window sizes will be clean, but shrinking the window will always -result in some cruft. - -**IMPORTANT:** If you prevously were passing in a non-tty stream but you still -want output (for example, a stream wrapped by the `ansi` module) then you -need to pass in the **tty** option below, as `gauge` needs access to -the underlying tty in order to do things like terminal resizes and terminal -width detection. - -The **options** object can have the following properties, all of which are -optional: - -* **updateInterval**: How often gauge updates should be drawn, in miliseconds. -* **fixedFramerate**: Defaults to false on node 0.8, true on everything - else. When this is true a timer is created to trigger once every - `updateInterval` ms, when false, updates are printed as soon as they come - in but updates more often than `updateInterval` are ignored. The reason - 0.8 doesn't have this set to true is that it can't `unref` its timer and - so it would stop your program from exiting– if you want to use this - feature with 0.8 just make sure you call `gauge.disable()` before you - expect your program to exit. -* **themes**: A themeset to use when selecting the theme to use. Defaults - to `gauge/themes`, see the [themes] documentation for details. -* **theme**: Select a theme for use, it can be a: - * Theme object, in which case the **themes** is not used. - * The name of a theme, which will be looked up in the current *themes* - object. - * A configuration object with any of `hasUnicode`, `hasColor` or - `platform` keys, which if wlll be used to override our guesses when making - a default theme selection. - - If no theme is selected then a default is picked using a combination of our - best guesses at your OS, color support and unicode support. -* **template**: Describes what you want your gauge to look like. The - default is what npm uses. Detailed [documentation] is later in this - document. -* **hideCursor**: Defaults to true. If true, then the cursor will be hidden - while the gauge is displayed. -* **tty**: The tty that you're ultimately writing to. Defaults to the same - as **stream**. This is used for detecting the width of the terminal and - resizes. The width used is `tty.columns - 1`. If no tty is available then - a width of `79` is assumed. -* **enabled**: Defaults to true if `tty` is a TTY, false otherwise. If true - the gauge starts enabled. If disabled then all update commands are - ignored and no gauge will be printed until you call `.enable()`. -* **Plumbing**: The class to use to actually generate the gauge for - printing. This defaults to `require('gauge/plumbing')` and ordinarly you - shouldn't need to override this. -* **cleanupOnExit**: Defaults to true. Ordinarily we register an exit - handler to make sure your cursor is turned back on and the progress bar - erased when your process exits, even if you Ctrl-C out or otherwise exit - unexpectedly. You can disable this and it won't register the exit handler. - -[has-unicode]: https://www.npmjs.com/package/has-unicode -[themes]: #themes -[documentation]: #templates - -#### `gauge.show(section | status, [completed])` - -The first argument is either the section, the name of the current thing -contributing to progress, or an object with keys like **section**, -**subsection** & **completed** (or any others you have types for in a custom -template). If you don't want to update or set any of these you can pass -`null` and it will be ignored. - -The second argument is the percent completed as a value between 0 and 1. -Without it, completion is just not updated. You'll also note that completion -can be passed in as part of a status object as the first argument. If both -it and the completed argument are passed in, the completed argument wins. - -#### `gauge.hide([cb])` - -Removes the gauge from the terminal. Optionally, callback `cb` after IO has -had an opportunity to happen (currently this just means after `setImmediate` -has called back.) - -It turns out this is important when you're pausing the progress bar on one -filehandle and printing to another– otherwise (with a big enough print) node -can end up printing the "end progress bar" bits to the progress bar filehandle -while other stuff is printing to another filehandle. These getting interleaved -can cause corruption in some terminals. - -#### `gauge.pulse([subsection])` - -* **subsection** – *(optional)* The specific thing that triggered this pulse - -Spins the spinner in the gauge to show output. If **subsection** is -included then it will be combined with the last name passed to `gauge.show`. - -#### `gauge.disable()` - -Hides the gauge and ignores further calls to `show` or `pulse`. - -#### `gauge.enable()` - -Shows the gauge and resumes updating when `show` or `pulse` is called. - -#### `gauge.setThemeset(themes)` - -Change the themeset to select a theme from. The same as the `themes` option -used in the constructor. The theme will be reselected from this themeset. - -#### `gauge.setTheme(theme)` - -Change the active theme, will be displayed with the next show or pulse. This can be: - -* Theme object, in which case the **themes** is not used. -* The name of a theme, which will be looked up in the current *themes* - object. -* A configuration object with any of `hasUnicode`, `hasColor` or - `platform` keys, which if wlll be used to override our guesses when making - a default theme selection. - -If no theme is selected then a default is picked using a combination of our -best guesses at your OS, color support and unicode support. - -#### `gauge.setTemplate(template)` - -Change the active template, will be displayed with the next show or pulse - -### Tracking Completion - -If you have more than one thing going on that you want to track completion -of, you may find the related [are-we-there-yet] helpful. It's `change` -event can be wired up to the `show` method to get a more traditional -progress bar interface. - -[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet - -### THEMES - -``` -var themes = require('gauge/themes') - -// fetch the default color unicode theme for this platform -var ourTheme = themes({hasUnicode: true, hasColor: true}) - -// fetch the default non-color unicode theme for osx -var ourTheme = themes({hasUnicode: true, hasColor: false, platform: 'darwin'}) - -// create a new theme based on the color ascii theme for this platform -// that brackets the progress bar with arrows -var ourTheme = themes.newTheme(theme(hasUnicode: false, hasColor: true}), { - preProgressbar: '→', - postProgressbar: '←' -}) -``` - -The object returned by `gauge/themes` is an instance of the `ThemeSet` class. - -``` -var ThemeSet = require('gauge/theme-set') -var themes = new ThemeSet() -// or -var themes = require('gauge/themes') -var mythemes = themes.newThemeset() // creates a new themeset based on the default themes -``` - -#### themes(opts) -#### themes.getDefault(opts) - -Theme objects are a function that fetches the default theme based on -platform, unicode and color support. - -Options is an object with the following properties: - -* **hasUnicode** - If true, fetch a unicode theme, if no unicode theme is - available then a non-unicode theme will be used. -* **hasColor** - If true, fetch a color theme, if no color theme is - available a non-color theme will be used. -* **platform** (optional) - Defaults to `process.platform`. If no - platform match is available then `fallback` is used instead. - -If no compatible theme can be found then an error will be thrown with a -`code` of `EMISSINGTHEME`. - -#### themes.addTheme(themeName, themeObj) -#### themes.addTheme(themeName, [parentTheme], newTheme) - -Adds a named theme to the themeset. You can pass in either a theme object, -as returned by `themes.newTheme` or the arguments you'd pass to -`themes.newTheme`. - -#### themes.getThemeNames() - -Return a list of all of the names of the themes in this themeset. Suitable -for use in `themes.getTheme(…)`. - -#### themes.getTheme(name) - -Returns the theme object from this theme set named `name`. - -If `name` does not exist in this themeset an error will be thrown with -a `code` of `EMISSINGTHEME`. - -#### themes.setDefault([opts], themeName) - -`opts` is an object with the following properties. - -* **platform** - Defaults to `'fallback'`. If your theme is platform - specific, specify that here with the platform from `process.platform`, eg, - `win32`, `darwin`, etc. -* **hasUnicode** - Defaults to `false`. If your theme uses unicode you - should set this to true. -* **hasColor** - Defaults to `false`. If your theme uses color you should - set this to true. - -`themeName` is the name of the theme (as given to `addTheme`) to use for -this set of `opts`. - -#### themes.newTheme([parentTheme,] newTheme) - -Create a new theme object based on `parentTheme`. If no `parentTheme` is -provided then a minimal parentTheme that defines functions for rendering the -activity indicator (spinner) and progress bar will be defined. (This -fallback parent is defined in `gauge/base-theme`.) - -newTheme should be a bare object– we'll start by discussing the properties -defined by the default themes: - -* **preProgressbar** - displayed prior to the progress bar, if the progress - bar is displayed. -* **postProgressbar** - displayed after the progress bar, if the progress bar - is displayed. -* **progressBarTheme** - The subtheme passed through to the progress bar - renderer, it's an object with `complete` and `remaining` properties - that are the strings you want repeated for those sections of the progress - bar. -* **activityIndicatorTheme** - The theme for the activity indicator (spinner), - this can either be a string, in which each character is a different step, or - an array of strings. -* **preSubsection** - Displayed as a separator between the `section` and - `subsection` when the latter is printed. - -More generally, themes can have any value that would be a valid value when rendering -templates. The properties in the theme are used when their name matches a type in -the template. Their values can be: - -* **strings & numbers** - They'll be included as is -* **function (values, theme, width)** - Should return what you want in your output. - *values* is an object with values provided via `gauge.show`, - *theme* is the theme specific to this item (see below) or this theme object, - and *width* is the number of characters wide your result should be. - -There are a couple of special prefixes: - -* **pre** - Is shown prior to the property, if its displayed. -* **post** - Is shown after the property, if its displayed. - -And one special suffix: - -* **Theme** - Its value is passed to a function-type item as the theme. - -#### themes.addToAllThemes(theme) - -This *mixes-in* `theme` into all themes currently defined. It also adds it -to the default parent theme for this themeset, so future themes added to -this themeset will get the values from `theme` by default. - -#### themes.newThemeset() - -Copy the current themeset into a new one. This allows you to easily inherit -one themeset from another. - -### TEMPLATES - -A template is an array of objects and strings that, after being evaluated, -will be turned into the gauge line. The default template is: - -```javascript -[ - {type: 'progressbar', length: 20}, - {type: 'activityIndicator', kerning: 1, length: 1}, - {type: 'section', kerning: 1, default: ''}, - {type: 'subsection', kerning: 1, default: ''} -] -``` - -The various template elements can either be **plain strings**, in which case they will -be be included verbatum in the output, or objects with the following properties: - -* *type* can be any of the following plus any keys you pass into `gauge.show` plus - any keys you have on a custom theme. - * `section` – What big thing you're working on now. - * `subsection` – What component of that thing is currently working. - * `activityIndicator` – Shows a spinner using the `activityIndicatorTheme` - from your active theme. - * `progressbar` – A progress bar representing your current `completed` - using the `progressbarTheme` from your active theme. -* *kerning* – Number of spaces that must be between this item and other - items, if this item is displayed at all. -* *maxLength* – The maximum length for this element. If its value is longer it - will be truncated. -* *minLength* – The minimum length for this element. If its value is shorter it - will be padded according to the *align* value. -* *align* – (Default: left) Possible values "left", "right" and "center". Works - as you'd expect from word processors. -* *length* – Provides a single value for both *minLength* and *maxLength*. If both - *length* and *minLength or *maxLength* are specifed then the latter take precedence. -* *value* – A literal value to use for this template item. -* *default* – A default value to use for this template item if a value - wasn't otherwise passed in. - -### PLUMBING - -This is the super simple, assume nothing, do no magic internals used by gauge to -implement its ordinary interface. - -``` -var Plumbing = require('gauge/plumbing') -var gauge = new Plumbing(theme, template, width) -``` - -* **theme**: The theme to use. -* **template**: The template to use. -* **width**: How wide your gauge should be - -#### `gauge.setTheme(theme)` - -Change the active theme. - -#### `gauge.setTemplate(template)` - -Change the active template. - -#### `gauge.setWidth(width)` - -Change the width to render at. - -#### `gauge.hide()` - -Return the string necessary to hide the progress bar - -#### `gauge.hideCursor()` - -Return a string to hide the cursor. - -#### `gauge.showCursor()` - -Return a string to show the cursor. - -#### `gauge.show(status)` - -Using `status` for values, render the provided template with the theme and return -a string that is suitable for printing to update the gauge. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/base-theme.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/base-theme.js deleted file mode 100644 index 0b67638e021..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/base-theme.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' -var spin = require('./spin.js') -var progressBar = require('./progress-bar.js') - -module.exports = { - activityIndicator: function (values, theme, width) { - if (values.spun == null) return - return spin(theme, values.spun) - }, - progressbar: function (values, theme, width) { - if (values.completed == null) return - return progressBar(theme, width, values.completed) - } -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/error.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/error.js deleted file mode 100644 index d9914ba5335..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/error.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' -var util = require('util') - -var User = exports.User = function User (msg) { - var err = new Error(msg) - Error.captureStackTrace(err, User) - err.code = 'EGAUGE' - return err -} - -exports.MissingTemplateValue = function MissingTemplateValue (item, values) { - var err = new User(util.format('Missing template value "%s"', item.type)) - Error.captureStackTrace(err, MissingTemplateValue) - err.template = item - err.values = values - return err -} - -exports.Internal = function Internal (msg) { - var err = new Error(msg) - Error.captureStackTrace(err, Internal) - err.code = 'EGAUGEINTERNAL' - return err -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/has-color.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/has-color.js deleted file mode 100644 index e283a256f26..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/has-color.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -module.exports = isWin32() || isColorTerm() - -function isWin32 () { - return process.platform === 'win32' -} - -function isColorTerm () { - var termHasColor = /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i - return !!process.env.COLORTERM || termHasColor.test(process.env.TERM) -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/index.js deleted file mode 100644 index 7eefb9507bb..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/index.js +++ /dev/null @@ -1,226 +0,0 @@ -'use strict' -var Plumbing = require('./plumbing.js') -var hasUnicode = require('has-unicode') -var hasColor = require('./has-color.js') -var onExit = require('signal-exit') -var defaultThemes = require('./themes') -var setInterval = require('./set-interval.js') -var process = require('./process.js') -var setImmediate = require('./set-immediate') - -module.exports = Gauge - -function callWith (obj, method) { - return function () { - return method.call(obj) - } -} - -function Gauge (arg1, arg2) { - var options, writeTo - if (arg1 && arg1.write) { - writeTo = arg1 - options = arg2 || {} - } else if (arg2 && arg2.write) { - writeTo = arg2 - options = arg1 || {} - } else { - writeTo = process.stderr - options = arg1 || arg2 || {} - } - - this._status = { - spun: 0, - section: '', - subsection: '' - } - this._paused = false // are we paused for back pressure? - this._disabled = true // are all progress bar updates disabled? - this._showing = false // do we WANT the progress bar on screen - this._onScreen = false // IS the progress bar on screen - this._needsRedraw = false // should we print something at next tick? - this._hideCursor = options.hideCursor == null ? true : options.hideCursor - this._fixedFramerate = options.fixedFramerate == null - ? !(/^v0\.8\./.test(process.version)) - : options.fixedFramerate - this._lastUpdateAt = null - this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval - - this._themes = options.themes || defaultThemes - this._theme = options.theme - var theme = this._computeTheme(options.theme) - var template = options.template || [ - {type: 'progressbar', length: 20}, - {type: 'activityIndicator', kerning: 1, length: 1}, - {type: 'section', kerning: 1, default: ''}, - {type: 'subsection', kerning: 1, default: ''} - ] - this.setWriteTo(writeTo, options.tty) - var PlumbingClass = options.Plumbing || Plumbing - this._gauge = new PlumbingClass(theme, template, this.getWidth()) - - this._$$doRedraw = callWith(this, this._doRedraw) - this._$$handleSizeChange = callWith(this, this._handleSizeChange) - - if (options.cleanupOnExit == null || options.cleanupOnExit) { - onExit(callWith(this, this.disable)) - } - - if (options.enabled || (options.enabled == null && this._tty && this._tty.isTTY)) { - this.enable() - } else { - this.disable() - } -} -Gauge.prototype = {} - -Gauge.prototype.setTemplate = function (template) { - this._gauge.setTemplate(template) - if (this._showing) this._requestRedraw() -} - -Gauge.prototype._computeTheme = function (theme) { - if (!theme) theme = {} - if (theme && (Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null)) { - var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode - var useColor = theme.hasColor == null ? hasColor : theme.hasColor - theme = this._themes.getDefault({hasUnicode: useUnicode, hasColor: useColor, platform: theme.platform}) - } else if (typeof theme === 'string') { - theme = this._themes.getTheme(theme) - } - return theme -} - -Gauge.prototype.setThemeset = function (themes) { - this._themes = themes - this.setTheme(this._theme) -} - -Gauge.prototype.setTheme = function (theme) { - this._gauge.setTheme(this._computeTheme(theme)) - if (this._showing) this._requestRedraw() - this._theme = theme -} - -Gauge.prototype._requestRedraw = function () { - this._needsRedraw = true - if (!this._fixedFramerate) this._doRedraw() -} - -Gauge.prototype.getWidth = function () { - return ((this._tty && this._tty.columns) || 80) - 1 -} - -Gauge.prototype.setWriteTo = function (writeTo, tty) { - var enabled = !this._disabled - if (enabled) this.disable() - this._writeTo = writeTo - this._tty = tty || - (writeTo === process.stderr && process.stdout.isTTY && process.stdout) || - (writeTo.isTTY && writeTo) || - this._tty - if (this._gauge) this._gauge.setWidth(this.getWidth()) - if (enabled) this.enable() -} - -Gauge.prototype.enable = function () { - if (!this._disabled) return - this._disabled = false - if (this._tty) this._enableEvents() - if (this._showing) this.show() -} - -Gauge.prototype.disable = function () { - if (this._disabled) return - if (this._showing) { - this._lastUpdateAt = null - this._showing = false - this._doRedraw() - this._showing = true - } - this._disabled = true - if (this._tty) this._disableEvents() -} - -Gauge.prototype._enableEvents = function () { - this._tty.on('resize', this._$$handleSizeChange) - if (this._fixedFramerate) { - this.redrawTracker = setInterval(this._$$doRedraw, this._updateInterval) - if (this.redrawTracker.unref) this.redrawTracker.unref() - } -} - -Gauge.prototype._disableEvents = function () { - this._tty.removeListener('resize', this._$$handleSizeChange) - if (this._fixedFramerate) clearInterval(this.redrawTracker) -} - -Gauge.prototype.hide = function (cb) { - if (this._disabled) return cb && process.nextTick(cb) - if (!this._showing) return cb && process.nextTick(cb) - this._showing = false - this._doRedraw() - cb && setImmediate(cb) -} - -Gauge.prototype.show = function (section, completed) { - if (this._disabled) return - this._showing = true - if (typeof section === 'string') { - this._status.section = section - } else if (typeof section === 'object') { - var sectionKeys = Object.keys(section) - for (var ii = 0; ii < sectionKeys.length; ++ii) { - var key = sectionKeys[ii] - this._status[key] = section[key] - } - } - if (completed != null) this._status.completed = completed - this._requestRedraw() -} - -Gauge.prototype.pulse = function (subsection) { - if (this._disabled) return - if (!this._showing) return - this._status.subsection = subsection || '' - this._status.spun ++ - this._requestRedraw() -} - -Gauge.prototype._handleSizeChange = function () { - this._gauge.setWidth(this._tty.columns - 1) - this._requestRedraw() -} - -Gauge.prototype._doRedraw = function () { - if (this._disabled || this._paused) return - if (!this._fixedFramerate) { - var now = Date.now() - if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval) return - this._lastUpdateAt = now - } - if (!this._showing && this._onScreen) { - this._onScreen = false - var result = this._gauge.hide() - if (this._hideCursor) { - result += this._gauge.showCursor() - } - return this._writeTo.write(result) - } - if (!this._showing && !this._onScreen) return - if (this._showing && !this._onScreen) { - this._onScreen = true - this._needsRedraw = true - if (this._hideCursor) { - this._writeTo.write(this._gauge.hideCursor()) - } - } - if (!this._needsRedraw) return - if (!this._writeTo.write(this._gauge.show(this._status))) { - this._paused = true - this._writeTo.on('drain', callWith(this, function () { - this._paused = false - this._doRedraw() - })) - } -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json deleted file mode 100644 index 8e08278c65b..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "has-color@^0.1.7", - "scope": null, - "escapedName": "has-color", - "name": "has-color", - "rawSpec": "^0.1.7", - "spec": ">=0.1.7 <0.2.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/gauge" - ], - [ - { - "raw": "has-color@^0.1.7", - "scope": null, - "escapedName": "has-color", - "name": "has-color", - "rawSpec": "^0.1.7", - "spec": ">=0.1.7 <0.2.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge" - ] - ], - "_from": "has-color@^0.1.7", - "_id": "has-color@0.1.7", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/has-color", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "1.4.6", - "_phantomChildren": {}, - "_requested": { - "raw": "has-color@^0.1.7", - "scope": null, - "escapedName": "has-color", - "name": "has-color", - "rawSpec": "^0.1.7", - "spec": ">=0.1.7 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge" - ], - "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", - "_shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", - "_shrinkwrap": null, - "_spec": "has-color@^0.1.7", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "dependencies": {}, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", - "tarball": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "has-color", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.1.7" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md deleted file mode 100644 index 37bbd8991a6..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -```bash -$ npm install --save has-color -``` - - -## Usage - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - - -## License - -[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js deleted file mode 100644 index 508504840dc..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; -/* eslint-disable no-unused-vars */ -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (e) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (Object.getOwnPropertySymbols) { - symbols = Object.getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json deleted file mode 100644 index 16651a0ab52..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "object-assign@^4.1.0", - "scope": null, - "escapedName": "object-assign", - "name": "object-assign", - "rawSpec": "^4.1.0", - "spec": ">=4.1.0 <5.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/gauge" - ], - [ - { - "raw": "object-assign@^4.1.0", - "scope": null, - "escapedName": "object-assign", - "name": "object-assign", - "rawSpec": "^4.1.0", - "spec": ">=4.1.0 <5.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge" - ] - ], - "_from": "object-assign@^4.1.0", - "_id": "object-assign@4.1.0", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/object-assign", - "_nodeVersion": "4.1.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/object-assign-4.1.0.tgz_1462212593641_0.3332549517508596" - }, - "_npmUser": { - "name": "spicyj", - "email": "ben@benalpert.com" - }, - "_npmVersion": "2.14.19", - "_phantomChildren": {}, - "_requested": { - "raw": "object-assign@^4.1.0", - "scope": null, - "escapedName": "object-assign", - "name": "object-assign", - "rawSpec": "^4.1.0", - "spec": ">=4.1.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge" - ], - "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "_shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", - "_shrinkwrap": null, - "_spec": "object-assign@^4.1.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/object-assign/issues" - }, - "dependencies": {}, - "description": "ES2015 Object.assign() ponyfill", - "devDependencies": { - "lodash": "^4.8.2", - "matcha": "^0.7.0", - "mocha": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", - "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "72fe21c86911758f3342fdf41c2a57860d5829bc", - "homepage": "https://github.com/sindresorhus/object-assign#readme", - "keywords": [ - "object", - "assign", - "extend", - "properties", - "es2015", - "ecmascript", - "harmony", - "ponyfill", - "prollyfill", - "polyfill", - "shim", - "browser" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "spicyj", - "email": "ben@benalpert.com" - } - ], - "name": "object-assign", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/object-assign.git" - }, - "scripts": { - "bench": "matcha bench.js", - "test": "xo && mocha" - }, - "version": "4.1.0" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md deleted file mode 100644 index 13c097734cf..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) - -> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method - - -## Install - -``` -$ npm install --save object-assign -``` - - -## Usage - -```js -const objectAssign = require('object-assign'); - -objectAssign({foo: 0}, {bar: 1}); -//=> {foo: 0, bar: 1} - -// multiple sources -objectAssign({foo: 0}, {bar: 1}, {baz: 2}); -//=> {foo: 0, bar: 1, baz: 2} - -// overwrites equal keys -objectAssign({foo: 0}, {foo: 1}, {foo: 2}); -//=> {foo: 2} - -// ignores null and undefined sources -objectAssign({foo: 0}, null, {bar: 1}, undefined); -//=> {foo: 0, bar: 1} -``` - - -## API - -### objectAssign(target, source, [source, ...]) - -Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. - - -## Resources - -- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) - - -## Related - -- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md deleted file mode 100644 index e2f70d22503..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -<a name="3.0.1"></a> -## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) - - -### Bug Fixes - -* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb)) - - - -<a name="3.0.0"></a> -# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) - - -### Bug Fixes - -* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) -* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) - - -### BREAKING CHANGES - -* signal-exit no longer wires into SIGPROF diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt deleted file mode 100644 index eead04a1216..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md deleted file mode 100644 index 8ebccabecae..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# signal-exit - -[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) -[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) -[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) -[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - -When you want to fire an event no matter how a process exits: - -* reaching the end of execution. -* explicitly having `process.exit(code)` called. -* having `process.kill(pid, sig)` called. -* receiving a fatal signal from outside the process - -Use `signal-exit`. - -```js -var onExit = require('signal-exit') - -onExit(function (code, signal) { - console.log('process exited!') -}) -``` - -## API - -`var remove = onExit(function (code, signal) {}, options)` - -The return value of the function is a function that will remove the -handler. - -Note that the function *only* fires for signals if the signal would -cause the proces to exit. That is, there are no other listeners, and -it is a fatal signal. - -## Options - -* `alwaysLast`: Run this handler after any other signal or exit - handlers. This causes `process.emit` to be monkeypatched. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js deleted file mode 100644 index 7dd8d917dc5..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js +++ /dev/null @@ -1,148 +0,0 @@ -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -var assert = require('assert') -var signals = require('./signals.js') - -var EE = require('events') -/* istanbul ignore if */ -if (typeof EE !== 'function') { - EE = EE.EventEmitter -} - -var emitter -if (process.__signal_exit_emitter__) { - emitter = process.__signal_exit_emitter__ -} else { - emitter = process.__signal_exit_emitter__ = new EE() - emitter.count = 0 - emitter.emitted = {} -} - -module.exports = function (cb, opts) { - assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') - - if (loaded === false) { - load() - } - - var ev = 'exit' - if (opts && opts.alwaysLast) { - ev = 'afterexit' - } - - var remove = function () { - emitter.removeListener(ev, cb) - if (emitter.listeners('exit').length === 0 && - emitter.listeners('afterexit').length === 0) { - unload() - } - } - emitter.on(ev, cb) - - return remove -} - -module.exports.unload = unload -function unload () { - if (!loaded) { - return - } - loaded = false - - signals.forEach(function (sig) { - try { - process.removeListener(sig, sigListeners[sig]) - } catch (er) {} - }) - process.emit = originalProcessEmit - process.reallyExit = originalProcessReallyExit - emitter.count -= 1 -} - -function emit (event, code, signal) { - if (emitter.emitted[event]) { - return - } - emitter.emitted[event] = true - emitter.emit(event, code, signal) -} - -// { <signal>: <listener fn>, ... } -var sigListeners = {} -signals.forEach(function (sig) { - sigListeners[sig] = function listener () { - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - var listeners = process.listeners(sig) - if (listeners.length === emitter.count) { - unload() - emit('exit', null, sig) - /* istanbul ignore next */ - emit('afterexit', null, sig) - /* istanbul ignore next */ - process.kill(process.pid, sig) - } - } -}) - -module.exports.signals = function () { - return signals -} - -module.exports.load = load - -var loaded = false - -function load () { - if (loaded) { - return - } - loaded = true - - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - emitter.count += 1 - - signals = signals.filter(function (sig) { - try { - process.on(sig, sigListeners[sig]) - return true - } catch (er) { - return false - } - }) - - process.emit = processEmit - process.reallyExit = processReallyExit -} - -var originalProcessReallyExit = process.reallyExit -function processReallyExit (code) { - process.exitCode = code || 0 - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - originalProcessReallyExit.call(process, process.exitCode) -} - -var originalProcessEmit = process.emit -function processEmit (ev, arg) { - if (ev === 'exit') { - if (arg !== undefined) { - process.exitCode = arg - } - var ret = originalProcessEmit.apply(this, arguments) - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - return ret - } else { - return originalProcessEmit.apply(this, arguments) - } -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json deleted file mode 100644 index d4ba8c44305..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "signal-exit@^3.0.0", - "scope": null, - "escapedName": "signal-exit", - "name": "signal-exit", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/rebecca/code/npm2/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" - ], - [ - { - "raw": "signal-exit@^3.0.0", - "scope": null, - "escapedName": "signal-exit", - "name": "signal-exit", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/rebecca/code/npm2/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge" - ] - ], - "_from": "signal-exit@^3.0.0", - "_id": "signal-exit@3.0.1", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/signal-exit", - "_nodeVersion": "6.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/signal-exit-3.0.1.tgz_1473354783379_0.4592130535747856" - }, - "_npmUser": { - "name": "bcoe", - "email": "ben@npmjs.com" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "raw": "signal-exit@^3.0.0", - "scope": null, - "escapedName": "signal-exit", - "name": "signal-exit", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge" - ], - "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.1.tgz", - "_shasum": "5a4c884992b63a7acd9badb7894c3ee9cfccad81", - "_shrinkwrap": null, - "_spec": "signal-exit@^3.0.0", - "_where": "/Users/rebecca/code/npm2/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/tapjs/signal-exit/issues" - }, - "dependencies": {}, - "description": "when you want to fire an event no matter how a process exits.", - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.10", - "nyc": "^8.1.0", - "standard": "^7.1.2", - "standard-version": "^2.3.0", - "tap": "^7.1.0" - }, - "directories": {}, - "dist": { - "shasum": "5a4c884992b63a7acd9badb7894c3ee9cfccad81", - "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.1.tgz" - }, - "files": [ - "index.js", - "signals.js" - ], - "gitHead": "6859aff54f5198c63fff91baef279b86026bde69", - "homepage": "https://github.com/tapjs/signal-exit", - "keywords": [ - "signal", - "exit" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "bcoe", - "email": "ben@npmjs.com" - }, - { - "name": "isaacs", - "email": "isaacs@npmjs.com" - } - ], - "name": "signal-exit", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/tapjs/signal-exit.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "release": "standard-version", - "test": "tap --timeout=240 ./test/*.js --cov" - }, - "version": "3.0.1" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js deleted file mode 100644 index 3bd67a8a554..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js +++ /dev/null @@ -1,53 +0,0 @@ -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -// -// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised -// artificially, inherently leave the process in a -// state from which it is not safe to try and enter JS -// listeners. -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGHUP', - 'SIGINT', - 'SIGTERM' -] - -if (process.platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) -} - -if (process.platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js deleted file mode 100644 index b9bec62440a..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; -var stripAnsi = require('strip-ansi'); -var codePointAt = require('code-point-at'); -var isFullwidthCodePoint = require('is-fullwidth-code-point'); - -// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345 -module.exports = function (str) { - if (typeof str !== 'string' || str.length === 0) { - return 0; - } - - var width = 0; - - str = stripAnsi(str); - - for (var i = 0; i < str.length; i++) { - var code = codePointAt(str, i); - - // ignore control characters - if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { - continue; - } - - // surrogates - if (code >= 0x10000) { - i++; - } - - if (isFullwidthCodePoint(code)) { - width += 2; - } else { - width++; - } - } - - return width; -}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js deleted file mode 100644 index 03351179772..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; -var numberIsNan = require('number-is-nan'); - -module.exports = function (str, pos) { - if (str === null || str === undefined) { - throw TypeError(); - } - - str = String(str); - - var size = str.length; - var i = pos ? Number(pos) : 0; - - if (numberIsNan(i)) { - i = 0; - } - - if (i < 0 || i >= size) { - return undefined; - } - - var first = str.charCodeAt(i); - - if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) { - var second = str.charCodeAt(i + 1); - - if (second >= 0xDC00 && second <= 0xDFFF) { - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - - return first; -}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js deleted file mode 100644 index 79be4b9cb8c..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = Number.isNaN || function (x) { - return x !== x; -}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json deleted file mode 100644 index 77e053e2f95..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "number-is-nan@^1.0.0", - "scope": null, - "escapedName": "number-is-nan", - "name": "number-is-nan", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at" - ] - ], - "_from": "number-is-nan@>=1.0.0 <2.0.0", - "_id": "number-is-nan@1.0.1", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/string-width/code-point-at/number-is-nan", - "_nodeVersion": "4.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/number-is-nan-1.0.1.tgz_1475212313367_0.9480371843092144" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.15.9", - "_phantomChildren": {}, - "_requested": { - "raw": "number-is-nan@^1.0.0", - "scope": null, - "escapedName": "number-is-nan", - "name": "number-is-nan", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge/string-width/code-point-at" - ], - "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "_shasum": "097b602b53422a522c1afb8790318336941a011d", - "_shrinkwrap": null, - "_spec": "number-is-nan@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/number-is-nan/issues" - }, - "dependencies": {}, - "description": "ES2015 Number.isNaN() ponyfill", - "devDependencies": { - "ava": "*" - }, - "directories": {}, - "dist": { - "shasum": "097b602b53422a522c1afb8790318336941a011d", - "tarball": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "ed9cdac3f428cc929b61bb230da42c87477af4b9", - "homepage": "https://github.com/sindresorhus/number-is-nan#readme", - "keywords": [ - "es2015", - "ecmascript", - "ponyfill", - "polyfill", - "shim", - "number", - "is", - "nan", - "not" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "number-is-nan", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/number-is-nan.git" - }, - "scripts": { - "test": "ava" - }, - "version": "1.0.1" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md deleted file mode 100644 index 24635087120..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) - -> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save number-is-nan -``` - - -## Usage - -```js -var numberIsNan = require('number-is-nan'); - -numberIsNan(NaN); -//=> true - -numberIsNan('unicorn'); -//=> false -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json deleted file mode 100644 index 59e66434676..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "code-point-at@^1.0.0", - "scope": null, - "escapedName": "code-point-at", - "name": "code-point-at", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width" - ] - ], - "_from": "code-point-at@>=1.0.0 <2.0.0", - "_id": "code-point-at@1.0.1", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/string-width/code-point-at", - "_nodeVersion": "4.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/code-point-at-1.0.1.tgz_1475223183649_0.724906453397125" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.15.9", - "_phantomChildren": {}, - "_requested": { - "raw": "code-point-at@^1.0.0", - "scope": null, - "escapedName": "code-point-at", - "name": "code-point-at", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge/string-width" - ], - "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.1.tgz", - "_shasum": "1104cd34f9b5b45d3eba88f1babc1924e1ce35fb", - "_shrinkwrap": null, - "_spec": "code-point-at@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/code-point-at/issues" - }, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "description": "ES2015 String#codePointAt() ponyfill", - "devDependencies": { - "ava": "*" - }, - "directories": {}, - "dist": { - "shasum": "1104cd34f9b5b45d3eba88f1babc1924e1ce35fb", - "tarball": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "502d72c5a959275e5d90f9c6641589756af44085", - "homepage": "https://github.com/sindresorhus/code-point-at#readme", - "keywords": [ - "es2015", - "ponyfill", - "polyfill", - "shim", - "string", - "str", - "code", - "point", - "at", - "codepoint", - "unicode" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "code-point-at", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/code-point-at.git" - }, - "scripts": { - "test": "ava" - }, - "version": "1.0.1" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md deleted file mode 100644 index ef9713f1b01..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md +++ /dev/null @@ -1,32 +0,0 @@ -# code-point-at [![Build Status](https://travis-ci.org/sindresorhus/code-point-at.svg?branch=master)](https://travis-ci.org/sindresorhus/code-point-at) - -> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save code-point-at -``` - - -## Usage - -```js -var codePointAt = require('code-point-at'); - -codePointAt('🐴'); -//=> 128052 - -codePointAt('abc', 2); -//=> 99 -``` - -## API - -### codePointAt(input, [position]) - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js deleted file mode 100644 index a7d3e3855f1..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; -var numberIsNan = require('number-is-nan'); - -module.exports = function (x) { - if (numberIsNan(x)) { - return false; - } - - // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369 - - // code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - if (x >= 0x1100 && ( - x <= 0x115f || // Hangul Jamo - 0x2329 === x || // LEFT-POINTING ANGLE BRACKET - 0x232a === x || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - 0x3250 <= x && x <= 0x4dbf || - // CJK Unified Ideographs .. Yi Radicals - 0x4e00 <= x && x <= 0xa4c6 || - // Hangul Jamo Extended-A - 0xa960 <= x && x <= 0xa97c || - // Hangul Syllables - 0xac00 <= x && x <= 0xd7a3 || - // CJK Compatibility Ideographs - 0xf900 <= x && x <= 0xfaff || - // Vertical Forms - 0xfe10 <= x && x <= 0xfe19 || - // CJK Compatibility Forms .. Small Form Variants - 0xfe30 <= x && x <= 0xfe6b || - // Halfwidth and Fullwidth Forms - 0xff01 <= x && x <= 0xff60 || - 0xffe0 <= x && x <= 0xffe6 || - // Kana Supplement - 0x1b000 <= x && x <= 0x1b001 || - // Enclosed Ideographic Supplement - 0x1f200 <= x && x <= 0x1f251 || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - 0x20000 <= x && x <= 0x3fffd)) { - return true; - } - - return false; -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js deleted file mode 100644 index 79be4b9cb8c..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = Number.isNaN || function (x) { - return x !== x; -}; diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json deleted file mode 100644 index cf107ae74bd..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "number-is-nan@^1.0.0", - "scope": null, - "escapedName": "number-is-nan", - "name": "number-is-nan", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at" - ], - [ - { - "raw": "number-is-nan@^1.0.0", - "scope": null, - "escapedName": "number-is-nan", - "name": "number-is-nan", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point" - ] - ], - "_from": "number-is-nan@^1.0.0", - "_id": "number-is-nan@1.0.1", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/string-width/is-fullwidth-code-point/number-is-nan", - "_nodeVersion": "4.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/number-is-nan-1.0.1.tgz_1475212313367_0.9480371843092144" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.15.9", - "_phantomChildren": {}, - "_requested": { - "raw": "number-is-nan@^1.0.0", - "scope": null, - "escapedName": "number-is-nan", - "name": "number-is-nan", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge/string-width/is-fullwidth-code-point" - ], - "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "_shasum": "097b602b53422a522c1afb8790318336941a011d", - "_shrinkwrap": null, - "_spec": "number-is-nan@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/number-is-nan/issues" - }, - "dependencies": {}, - "description": "ES2015 Number.isNaN() ponyfill", - "devDependencies": { - "ava": "*" - }, - "directories": {}, - "dist": { - "shasum": "097b602b53422a522c1afb8790318336941a011d", - "tarball": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "ed9cdac3f428cc929b61bb230da42c87477af4b9", - "homepage": "https://github.com/sindresorhus/number-is-nan#readme", - "keywords": [ - "es2015", - "ecmascript", - "ponyfill", - "polyfill", - "shim", - "number", - "is", - "nan", - "not" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "number-is-nan", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/number-is-nan.git" - }, - "scripts": { - "test": "ava" - }, - "version": "1.0.1" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md deleted file mode 100644 index 24635087120..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) - -> ES2015 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save number-is-nan -``` - - -## Usage - -```js -var numberIsNan = require('number-is-nan'); - -numberIsNan(NaN); -//=> true - -numberIsNan('unicorn'); -//=> false -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json deleted file mode 100644 index 983c8887608..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "is-fullwidth-code-point@^1.0.0", - "scope": null, - "escapedName": "is-fullwidth-code-point", - "name": "is-fullwidth-code-point", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width" - ], - [ - { - "raw": "is-fullwidth-code-point@^1.0.0", - "scope": null, - "escapedName": "is-fullwidth-code-point", - "name": "is-fullwidth-code-point", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width" - ] - ], - "_from": "is-fullwidth-code-point@^1.0.0", - "_id": "is-fullwidth-code-point@1.0.0", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/string-width/is-fullwidth-code-point", - "_nodeVersion": "0.12.5", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "raw": "is-fullwidth-code-point@^1.0.0", - "scope": null, - "escapedName": "is-fullwidth-code-point", - "name": "is-fullwidth-code-point", - "rawSpec": "^1.0.0", - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge/string-width" - ], - "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", - "_shrinkwrap": null, - "_spec": "is-fullwidth-code-point@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" - }, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "devDependencies": { - "ava": "0.0.4", - "code-point-at": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", - "tarball": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "f2152d357f41f82785436d428e4f8ede143b7548", - "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point", - "keywords": [ - "fullwidth", - "full-width", - "full", - "width", - "unicode", - "character", - "char", - "string", - "str", - "codepoint", - "code", - "point", - "is", - "detect", - "check" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "is-fullwidth-code-point", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md deleted file mode 100644 index 4936464b1b4..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) - -> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) - - -## Install - -``` -$ npm install --save is-fullwidth-code-point -``` - - -## Usage - -```js -var isFullwidthCodePoint = require('is-fullwidth-code-point'); - -isFullwidthCodePoint('谢'.codePointAt()); -//=> true - -isFullwidthCodePoint('a'.codePointAt()); -//=> false -``` - - -## API - -### isFullwidthCodePoint(input) - -#### input - -Type: `number` - -[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json deleted file mode 100644 index 3f8334f0294..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "string-width@^1.0.1", - "scope": null, - "escapedName": "string-width", - "name": "string-width", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/gauge" - ], - [ - { - "raw": "string-width@^1.0.1", - "scope": null, - "escapedName": "string-width", - "name": "string-width", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge" - ] - ], - "_from": "string-width@^1.0.1", - "_id": "string-width@1.0.2", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/string-width", - "_nodeVersion": "4.4.5", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/string-width-1.0.2.tgz_1471188233009_0.6573935742489994" - }, - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "_npmVersion": "2.15.5", - "_phantomChildren": {}, - "_requested": { - "raw": "string-width@^1.0.1", - "scope": null, - "escapedName": "string-width", - "name": "string-width", - "rawSpec": "^1.0.1", - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge", - "/npm-registry-client/npmlog/gauge/wide-align" - ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", - "_shrinkwrap": null, - "_spec": "string-width@^1.0.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/string-width/issues" - }, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "description": "Get the visual width of a string - the number of columns required to display it", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", - "tarball": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "282cf3d53918a92cc3ee0778dcf938039bcbc47b", - "homepage": "https://github.com/sindresorhus/string-width#readme", - "keywords": [ - "string", - "str", - "character", - "char", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "license": "MIT", - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - } - ], - "name": "string-width", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/string-width.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.2" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md deleted file mode 100644 index 1ab42c93580..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) - -> Get the visual width of a string - the number of columns required to display it - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - -Useful to be able to measure the actual width of command-line output. - - -## Install - -``` -$ npm install --save string-width -``` - - -## Usage - -```js -const stringWidth = require('string-width'); - -stringWidth('古'); -//=> 2 - -stringWidth('\u001b[1m古\u001b[22m'); -//=> 2 - -stringWidth('a'); -//=> 1 -``` - - -## Related - -- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module -- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string -- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore deleted file mode 100644 index d1a6b0054bc..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -*~ -/node_modules -.#* -/.nyc_output -/coverage diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md deleted file mode 100644 index 32f1be04f09..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md +++ /dev/null @@ -1,47 +0,0 @@ -wide-align ----------- - -A wide-character aware text alignment function for use in terminals / on the -console. - -### Usage - -``` -var align = require('wide-align') - -// Note that if you view this on a unicode console, all of the slashes are -// aligned. This is because on a console, all narrow characters are -// an en wide and all wide characters are an em. In browsers, this isn't -// held to and wide characters like "古" can be less than two narrow -// characters even with a fixed width font. - -console.log(align.center('abc', 10)) // ' abc ' -console.log(align.center('古古古', 10)) // ' 古古古 ' -console.log(align.left('abc', 10)) // 'abc ' -console.log(align.left('古古古', 10)) // '古古古 ' -console.log(align.right('abc', 10)) // ' abc' -console.log(align.right('古古古', 10)) // ' 古古古' -``` - -### Functions - -#### `align.center(str, length)` → `str` - -Returns *str* with spaces added to both sides such that that it is *length* -chars long and centered in the spaces. - -#### `align.left(str, length)` → `str` - -Returns *str* with spaces to the right such that it is *length* chars long. - -### `align.right(str, length)` → `str` - -Returns *str* with spaces to the left such that it is *length* chars long. - -### Origins - -These functions were originally taken from -[cliui](https://npmjs.com/package/cliui). Changes include switching to the -MUCH faster pad generation function from -[lodash](https://npmjs.com/package/lodash), making center alignment pad -both sides and adding left alignment. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js deleted file mode 100644 index 4f94ca4cde1..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict' -var stringWidth = require('string-width') - -exports.center = alignCenter -exports.left = alignLeft -exports.right = alignRight - -// lodash's way of generating pad characters. - -function createPadding (width) { - var result = '' - var string = ' ' - var n = width - do { - if (n % 2) { - result += string; - } - n = Math.floor(n / 2); - string += string; - } while (n); - - return result; -} - -function alignLeft (str, width) { - var trimmed = str.trimRight() - if (trimmed.length === 0 && str.length >= width) return str - var padding = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - padding = createPadding(width - strWidth) - } - - return trimmed + padding -} - -function alignRight (str, width) { - var trimmed = str.trimLeft() - if (trimmed.length === 0 && str.length >= width) return str - var padding = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - padding = createPadding(width - strWidth) - } - - return padding + trimmed -} - -function alignCenter (str, width) { - var trimmed = str.trim() - if (trimmed.length === 0 && str.length >= width) return str - var padLeft = '' - var padRight = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - var padLeftBy = parseInt((width - strWidth) / 2, 10) - padLeft = createPadding(padLeftBy) - padRight = createPadding(width - (strWidth + padLeftBy)) - } - - return padLeft + trimmed + padRight -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json deleted file mode 100644 index bdc7bfa6a4b..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "wide-align@^1.1.0", - "scope": null, - "escapedName": "wide-align", - "name": "wide-align", - "rawSpec": "^1.1.0", - "spec": ">=1.1.0 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/gauge" - ], - [ - { - "raw": "wide-align@^1.1.0", - "scope": null, - "escapedName": "wide-align", - "name": "wide-align", - "rawSpec": "^1.1.0", - "spec": ">=1.1.0 <2.0.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge" - ] - ], - "_from": "wide-align@^1.1.0", - "_id": "wide-align@1.1.0", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge/wide-align", - "_nodeVersion": "4.2.2", - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "_npmVersion": "3.5.3", - "_phantomChildren": {}, - "_requested": { - "raw": "wide-align@^1.1.0", - "scope": null, - "escapedName": "wide-align", - "name": "wide-align", - "rawSpec": "^1.1.0", - "spec": ">=1.1.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog/gauge" - ], - "_resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", - "_shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", - "_shrinkwrap": null, - "_spec": "wide-align@^1.1.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/iarna/wide-align/issues" - }, - "dependencies": { - "string-width": "^1.0.1" - }, - "description": "A wide-character aware text alignment function for use on the console or with fixed width fonts.", - "devDependencies": { - "tap": "^2.3.2" - }, - "directories": {}, - "dist": { - "shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", - "tarball": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz" - }, - "gitHead": "fe3f7f210650913d5bee702d7e19938f6977bc8a", - "homepage": "https://github.com/iarna/wide-align#readme", - "keywords": [ - "wide", - "double", - "unicode", - "cjkv", - "pad", - "align" - ], - "license": "ISC", - "main": "align.js", - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "name": "wide-align", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/wide-align.git" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "version": "1.1.0" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js deleted file mode 100644 index 64e9f9dbda4..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' -var test = require('tap').test -var align = require('..') - -test('align', function (t) { - t.is(align.center('abc', 10), ' abc ', 'center narrow') - t.is(align.center('古古古', 10), ' 古古古 ', 'center wide') - t.is(align.left('abc', 10), 'abc ', 'left narrow') - t.is(align.left('古古古', 10), '古古古 ', 'left wide') - t.is(align.right('abc', 10), ' abc', 'right narrow') - t.is(align.right('古古古', 10), ' 古古古', 'right wide') - - t.is(align.center('abc', 2), 'abc', 'center narrow overflow') - t.is(align.center('古古古', 4), '古古古', 'center wide overflow') - t.is(align.left('abc', 2), 'abc', 'left narrow overflow') - t.is(align.left('古古古', 4), '古古古', 'left wide overflow') - t.is(align.right('abc', 2), 'abc', 'right narrow overflow') - t.is(align.right('古古古', 4), '古古古', 'right wide overflow') - - t.is(align.left('', 5), ' ', 'left align nothing') - t.is(align.center('', 5), ' ', 'center align nothing') - t.is(align.right('', 5), ' ', 'right align nothing') - - t.is(align.left(' ', 5), ' ', 'left align whitespace') - t.is(align.center(' ', 5), ' ', 'center align whitespace') - t.is(align.right(' ', 5), ' ', 'right align whitespace') - - t.is(align.left(' ', 2), ' ', 'left align whitespace overflow') - t.is(align.center(' ', 2), ' ', 'center align whitespace overflow') - t.is(align.right(' ', 2), ' ', 'right align whitespace overflow') - - t.is(align.left('x ', 10), 'x ', 'left align whitespace mix') - t.is(align.center('x ', 10), ' x ', 'center align whitespace mix') - t.is(align.right('x ', 10), ' x', 'right align whitespace mix') - - t.end() -}) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/package.json deleted file mode 100644 index 209c6b4125f..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/package.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "gauge@~2.6.0", - "scope": null, - "escapedName": "gauge", - "name": "gauge", - "rawSpec": "~2.6.0", - "spec": ">=2.6.0 <2.7.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog" - ], - [ - { - "raw": "gauge@~2.6.0", - "scope": null, - "escapedName": "gauge", - "name": "gauge", - "rawSpec": "~2.6.0", - "spec": ">=2.6.0 <2.7.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog" - ] - ], - "_from": "gauge@~2.6.0", - "_id": "gauge@2.6.0", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/gauge", - "_nodeVersion": "4.4.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/gauge-2.6.0.tgz_1466067371972_0.20705468393862247" - }, - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "_npmVersion": "3.9.2", - "_phantomChildren": { - "strip-ansi": "3.0.1" - }, - "_requested": { - "raw": "gauge@~2.6.0", - "scope": null, - "escapedName": "gauge", - "name": "gauge", - "rawSpec": "~2.6.0", - "spec": ">=2.6.0 <2.7.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog" - ], - "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz", - "_shasum": "d35301ad18e96902b4751dcbbe40f4218b942a46", - "_shrinkwrap": null, - "_spec": "gauge@~2.6.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/gauge/issues" - }, - "dependencies": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-color": "^0.1.7", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "description": "A terminal based horizontal guage", - "devDependencies": { - "readable-stream": "^2.0.6", - "require-inject": "^1.4.0", - "standard": "^7.1.2", - "tap": "^5.7.2", - "through2": "^2.0.0" - }, - "directories": {}, - "dist": { - "shasum": "d35301ad18e96902b4751dcbbe40f4218b942a46", - "tarball": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz" - }, - "files": [ - "base-theme.js", - "CHANGELOG.md", - "error.js", - "has-color.js", - "index.js", - "LICENSE", - "package.json", - "plumbing.js", - "process.js", - "progress-bar.js", - "README.md", - "render-template.js", - "set-immediate.js", - "set-interval.js", - "spin.js", - "template-item.js", - "theme-set.js", - "themes.js", - "wide-truncate.js" - ], - "gitHead": "d51040a71c269432c16cc542143f403a831630e6", - "homepage": "https://github.com/iarna/gauge", - "keywords": [ - "progressbar", - "progress", - "gauge" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "name": "gauge", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/gauge.git" - }, - "scripts": { - "test": "standard && tap test/*.js --coverage" - }, - "version": "2.6.0" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/plumbing.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/plumbing.js deleted file mode 100644 index 589a9c92878..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/plumbing.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict' -var consoleControl = require('console-control-strings') -var renderTemplate = require('./render-template.js') -var validate = require('aproba') - -var Plumbing = module.exports = function (theme, template, width) { - if (!width) width = 80 - validate('OAN', [theme, template, width]) - this.showing = false - this.theme = theme - this.width = width - this.template = template -} -Plumbing.prototype = {} - -Plumbing.prototype.setTheme = function (theme) { - validate('O', [theme]) - this.theme = theme -} - -Plumbing.prototype.setTemplate = function (template) { - validate('A', [template]) - this.template = template -} - -Plumbing.prototype.setWidth = function (width) { - validate('N', [width]) - this.width = width -} - -Plumbing.prototype.hide = function () { - return consoleControl.gotoSOL() + consoleControl.eraseLine() -} - -Plumbing.prototype.hideCursor = consoleControl.hideCursor - -Plumbing.prototype.showCursor = consoleControl.showCursor - -Plumbing.prototype.show = function (status) { - var values = Object.create(this.theme) - for (var key in status) { - values[key] = status[key] - } - - return renderTemplate(this.width, this.template, values).trim() + - consoleControl.eraseLine() + consoleControl.gotoSOL() -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/process.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/process.js deleted file mode 100644 index 05e85694d75..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/process.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' -// this exists so we can replace it during testing -module.exports = process diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/progress-bar.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/progress-bar.js deleted file mode 100644 index 7f8dd68be24..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/progress-bar.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict' -var validate = require('aproba') -var renderTemplate = require('./render-template.js') -var wideTruncate = require('./wide-truncate') -var stringWidth = require('string-width') - -module.exports = function (theme, width, completed) { - validate('ONN', [theme, width, completed]) - if (completed < 0) completed = 0 - if (completed > 1) completed = 1 - if (width <= 0) return '' - var sofar = Math.round(width * completed) - var rest = width - sofar - var template = [ - {type: 'complete', value: repeat(theme.complete, sofar), length: sofar}, - {type: 'remaining', value: repeat(theme.remaining, rest), length: rest} - ] - return renderTemplate(width, template, theme) -} - -// lodash's way of repeating -function repeat (string, width) { - var result = '' - var n = width - do { - if (n % 2) { - result += string - } - n = Math.floor(n / 2) - /*eslint no-self-assign: 0*/ - string += string - } while (n && stringWidth(result) < width) - - return wideTruncate(result, width) -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/render-template.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/render-template.js deleted file mode 100644 index 3261bfbe6f4..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/render-template.js +++ /dev/null @@ -1,181 +0,0 @@ -'use strict' -var align = require('wide-align') -var validate = require('aproba') -var objectAssign = require('object-assign') -var wideTruncate = require('./wide-truncate') -var error = require('./error') -var TemplateItem = require('./template-item') - -function renderValueWithValues (values) { - return function (item) { - return renderValue(item, values) - } -} - -var renderTemplate = module.exports = function (width, template, values) { - var items = prepareItems(width, template, values) - var rendered = items.map(renderValueWithValues(values)).join('') - return align.left(wideTruncate(rendered, width), width) -} - -function preType (item) { - var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) - return 'pre' + cappedTypeName -} - -function postType (item) { - var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) - return 'post' + cappedTypeName -} - -function hasPreOrPost (item, values) { - if (!item.type) return - return values[preType(item)] || values[postType(item)] -} - -function generatePreAndPost (baseItem, parentValues) { - var item = objectAssign({}, baseItem) - var values = Object.create(parentValues) - var template = [] - var pre = preType(item) - var post = postType(item) - if (values[pre]) { - template.push({value: values[pre]}) - values[pre] = null - } - item.minLength = null - item.length = null - item.maxLength = null - template.push(item) - values[item.type] = values[item.type] - if (values[post]) { - template.push({value: values[post]}) - values[post] = null - } - return function ($1, $2, length) { - return renderTemplate(length, template, values) - } -} - -function prepareItems (width, template, values) { - function cloneAndObjectify (item, index, arr) { - var cloned = new TemplateItem(item, width) - var type = cloned.type - if (cloned.value == null) { - if (!(type in values)) { - if (cloned.default == null) { - throw new error.MissingTemplateValue(cloned, values) - } else { - cloned.value = cloned.default - } - } else { - cloned.value = values[type] - } - } - if (cloned.value == null || cloned.value === '') return null - cloned.index = index - cloned.first = index === 0 - cloned.last = index === arr.length - 1 - if (hasPreOrPost(cloned, values)) cloned.value = generatePreAndPost(cloned, values) - return cloned - } - - var output = template.map(cloneAndObjectify).filter(function (item) { return item != null }) - - var outputLength = 0 - var remainingSpace = width - var variableCount = output.length - - function consumeSpace (length) { - if (length > remainingSpace) length = remainingSpace - outputLength += length - remainingSpace -= length - } - - function finishSizing (item, length) { - if (item.finished) throw new error.Internal('Tried to finish template item that was already finished') - if (length === Infinity) throw new error.Internal('Length of template item cannot be infinity') - if (length != null) item.length = length - item.minLength = null - item.maxLength = null - --variableCount - item.finished = true - if (item.length == null) item.length = item.getBaseLength() - if (item.length == null) throw new error.Internal('Finished template items must have a length') - consumeSpace(item.getLength()) - } - - output.forEach(function (item) { - if (!item.kerning) return - var prevPadRight = item.first ? 0 : output[item.index - 1].padRight - if (!item.first && prevPadRight < item.kerning) item.padLeft = item.kerning - prevPadRight - if (!item.last) item.padRight = item.kerning - }) - - // Finish any that have a fixed (literal or intuited) length - output.forEach(function (item) { - if (item.getBaseLength() == null) return - finishSizing(item) - }) - - var resized = 0 - var resizing - var hunkSize - do { - resizing = false - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) return - if (!item.maxLength) return - if (item.getMaxLength() < hunkSize) { - finishSizing(item, item.maxLength) - resizing = true - } - }) - } while (resizing && resized++ < output.length) - if (resizing) throw new error.Internal('Resize loop iterated too many times while determining maxLength') - - resized = 0 - do { - resizing = false - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) return - if (!item.minLength) return - if (item.getMinLength() >= hunkSize) { - finishSizing(item, item.minLength) - resizing = true - } - }) - } while (resizing && resized++ < output.length) - if (resizing) throw new error.Internal('Resize loop iterated too many times while determining minLength') - - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) return - finishSizing(item, hunkSize) - }) - - return output -} - -function renderFunction (item, values, length) { - validate('OON', arguments) - if (item.type) { - return item.value(values, values[item.type + 'Theme'] || {}, length) - } else { - return item.value(values, {}, length) - } -} - -function renderValue (item, values) { - var length = item.getBaseLength() - var value = typeof item.value === 'function' ? renderFunction(item, values, length) : item.value - if (value == null || value === '') return '' - var alignWith = align[item.align] || align.left - var leftPadding = item.padLeft ? align.left('', item.padLeft) : '' - var rightPadding = item.padRight ? align.right('', item.padRight) : '' - var truncated = wideTruncate(String(value), length) - var aligned = alignWith(truncated, length) - return leftPadding + aligned + rightPadding -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/set-immediate.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/set-immediate.js deleted file mode 100644 index 6650a485c49..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/set-immediate.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' -var process = require('./process') -try { - module.exports = setImmediate -} catch (ex) { - module.exports = process.nextTick -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/set-interval.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/set-interval.js deleted file mode 100644 index 576198793c5..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/set-interval.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' -// this exists so we can replace it during testing -module.exports = setInterval diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/spin.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/spin.js deleted file mode 100644 index 34142ee31ac..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/spin.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -module.exports = function spin (spinstr, spun) { - return spinstr[spun % spinstr.length] -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/template-item.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/template-item.js deleted file mode 100644 index e46f447c941..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/template-item.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict' -var stringWidth = require('string-width') - -module.exports = TemplateItem - -function isPercent (num) { - if (typeof num !== 'string') return false - return num.slice(-1) === '%' -} - -function percent (num) { - return Number(num.slice(0, -1)) / 100 -} - -function TemplateItem (values, outputLength) { - this.overallOutputLength = outputLength - this.finished = false - this.type = null - this.value = null - this.length = null - this.maxLength = null - this.minLength = null - this.kerning = null - this.align = 'left' - this.padLeft = 0 - this.padRight = 0 - this.index = null - this.first = null - this.last = null - if (typeof values === 'string') { - this.value = values - } else { - for (var prop in values) this[prop] = values[prop] - } - // Realize percents - if (isPercent(this.length)) { - this.length = Math.round(this.overallOutputLength * percent(this.length)) - } - if (isPercent(this.minLength)) { - this.minLength = Math.round(this.overallOutputLength * percent(this.minLength)) - } - if (isPercent(this.maxLength)) { - this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength)) - } - return this -} - -TemplateItem.prototype = {} - -TemplateItem.prototype.getBaseLength = function () { - var length = this.length - if (length == null && typeof this.value === 'string' && this.maxLength == null && this.minLength == null) { - length = stringWidth(this.value) - } - return length -} - -TemplateItem.prototype.getLength = function () { - var length = this.getBaseLength() - if (length == null) return null - return length + this.padLeft + this.padRight -} - -TemplateItem.prototype.getMaxLength = function () { - if (this.maxLength == null) return null - return this.maxLength + this.padLeft + this.padRight -} - -TemplateItem.prototype.getMinLength = function () { - if (this.minLength == null) return null - return this.minLength + this.padLeft + this.padRight -} - diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/theme-set.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/theme-set.js deleted file mode 100644 index 68971d5d231..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/theme-set.js +++ /dev/null @@ -1,115 +0,0 @@ -'use strict' -var objectAssign = require('object-assign') - -module.exports = function () { - return ThemeSetProto.newThemeSet() -} - -var ThemeSetProto = {} - -ThemeSetProto.baseTheme = require('./base-theme.js') - -ThemeSetProto.newTheme = function (parent, theme) { - if (!theme) { - theme = parent - parent = this.baseTheme - } - return objectAssign({}, parent, theme) -} - -ThemeSetProto.getThemeNames = function () { - return Object.keys(this.themes) -} - -ThemeSetProto.addTheme = function (name, parent, theme) { - this.themes[name] = this.newTheme(parent, theme) -} - -ThemeSetProto.addToAllThemes = function (theme) { - var themes = this.themes - Object.keys(themes).forEach(function (name) { - objectAssign(themes[name], theme) - }) - objectAssign(this.baseTheme, theme) -} - -ThemeSetProto.getTheme = function (name) { - if (!this.themes[name]) throw this.newMissingThemeError(name) - return this.themes[name] -} - -ThemeSetProto.setDefault = function (opts, name) { - if (name == null) { - name = opts - opts = {} - } - var platform = opts.platform == null ? 'fallback' : opts.platform - var hasUnicode = !!opts.hasUnicode - var hasColor = !!opts.hasColor - if (!this.defaults[platform]) this.defaults[platform] = {true: {}, false: {}} - this.defaults[platform][hasUnicode][hasColor] = name -} - -ThemeSetProto.getDefault = function (opts) { - if (!opts) opts = {} - var platformName = opts.platform || process.platform - var platform = this.defaults[platformName] || this.defaults.fallback - var hasUnicode = !!opts.hasUnicode - var hasColor = !!opts.hasColor - if (!platform) throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) - if (!platform[hasUnicode][hasColor]) { - if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) { - hasUnicode = false - } else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { - hasColor = false - } else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) { - hasUnicode = false - hasColor = false - } else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) { - hasUnicode = false - } else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { - hasColor = false - } else if (platform === this.defaults.fallback) { - throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) - } - } - if (platform[hasUnicode][hasColor]) { - return this.getTheme(platform[hasUnicode][hasColor]) - } else { - return this.getDefault(objectAssign({}, opts, {platform: 'fallback'})) - } -} - -ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) { - var err = new Error('Could not find a gauge theme named "' + name + '"') - Error.captureStackTrace.call(err, newMissingThemeError) - err.theme = name - err.code = 'EMISSINGTHEME' - return err -} - -ThemeSetProto.newMissingDefaultThemeError = function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) { - var err = new Error( - 'Could not find a gauge theme for your platform/unicode/color use combo:\n' + - ' platform = ' + platformName + '\n' + - ' hasUnicode = ' + hasUnicode + '\n' + - ' hasColor = ' + hasColor) - Error.captureStackTrace.call(err, newMissingDefaultThemeError) - err.platform = platformName - err.hasUnicode = hasUnicode - err.hasColor = hasColor - err.code = 'EMISSINGTHEME' - return err -} - -ThemeSetProto.newThemeSet = function () { - var themeset = function (opts) { - return themeset.getDefault(opts) - } - return objectAssign(themeset, ThemeSetProto, { - themes: objectAssign({}, this.themes), - baseTheme: objectAssign({}, this.baseTheme), - defaults: JSON.parse(JSON.stringify(this.defaults || {})) - }) -} - diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/themes.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/themes.js deleted file mode 100644 index eb5a4f5b5e1..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/themes.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' -var consoleControl = require('console-control-strings') -var ThemeSet = require('./theme-set.js') - -var themes = module.exports = new ThemeSet() - -themes.addTheme('ASCII', { - preProgressbar: '[', - postProgressbar: ']', - progressbarTheme: { - complete: '#', - remaining: '.' - }, - activityIndicatorTheme: '-\\|/', - preSubsection: '>' -}) - -themes.addTheme('colorASCII', themes.getTheme('ASCII'), { - progressbarTheme: { - preComplete: consoleControl.color('inverse'), - complete: ' ', - postComplete: consoleControl.color('stopInverse'), - preRemaining: consoleControl.color('brightBlack'), - remaining: '.', - postRemaining: consoleControl.color('reset') - } -}) - -themes.addTheme('brailleSpinner', { - preProgressbar: '⸨', - postProgressbar: '⸩', - progressbarTheme: { - complete: '░', - remaining: '⠂' - }, - activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏', - preSubsection: '>' -}) - -themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), { - progressbarTheme: { - preComplete: consoleControl.color('inverse'), - complete: ' ', - postComplete: consoleControl.color('stopInverse'), - preRemaining: consoleControl.color('brightBlack'), - remaining: '░', - postRemaining: consoleControl.color('reset') - } -}) - -themes.setDefault({}, 'ASCII') -themes.setDefault({hasColor: true}, 'colorASCII') -themes.setDefault({platform: 'darwin', hasUnicode: true}, 'brailleSpinner') -themes.setDefault({platform: 'darwin', hasUnicode: true, hasColor: true}, 'colorBrailleSpinner') diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/wide-truncate.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/wide-truncate.js deleted file mode 100644 index c531bc491fb..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/wide-truncate.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' -var stringWidth = require('string-width') -var stripAnsi = require('strip-ansi') - -module.exports = wideTruncate - -function wideTruncate (str, target) { - if (stringWidth(str) === 0) return str - if (target <= 0) return '' - if (stringWidth(str) <= target) return str - - // We compute the number of bytes of ansi sequences here and add - // that to our initial truncation to ensure that we don't slice one - // that we want to keep in half. - var noAnsi = stripAnsi(str) - var ansiSize = str.length + noAnsi.length - var truncated = str.slice(0, target + ansiSize) - - // we have to shrink the result to account for our ansi sequence buffer - // (if an ansi sequence was truncated) and double width characters. - while (stringWidth(truncated) > target) { - truncated = truncated.slice(0, -1) - } - return truncated -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md deleted file mode 100644 index 03bf591923d..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -<a name="2.0.0"></a> -# [2.0.0](https://github.com/yargs/set-blocking/compare/v1.0.0...v2.0.0) (2016-05-17) - - -### Features - -* add an isTTY check ([#3](https://github.com/yargs/set-blocking/issues/3)) ([66ce277](https://github.com/yargs/set-blocking/commit/66ce277)) - - -### BREAKING CHANGES - -* stdio/stderr will not be set to blocking if isTTY === false - - - -<a name="1.0.0"></a> -# 1.0.0 (2016-05-14) - - -### Features - -* implemented shim for stream._handle.setBlocking ([6bde0c0](https://github.com/yargs/set-blocking/commit/6bde0c0)) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt deleted file mode 100644 index 836440bef7c..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/README.md deleted file mode 100644 index e93b4202b59..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# set-blocking - -[![Build Status](https://travis-ci.org/yargs/set-blocking.svg)](https://travis-ci.org/yargs/set-blocking) -[![NPM version](https://img.shields.io/npm/v/set-blocking.svg)](https://www.npmjs.com/package/set-blocking) -[![Coverage Status](https://coveralls.io/repos/yargs/set-blocking/badge.svg?branch=)](https://coveralls.io/r/yargs/set-blocking?branch=master) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - -set blocking `stdio` and `stderr` ensuring that terminal output does not truncate. - -```js -const setBlocking = require('set-blocking') -setBlocking(true) -console.log(someLargeStringToOutput) -``` - -## Historical Context/Word of Warning - -This was created as a shim to address the bug discussed in [node #6456](https://github.com/nodejs/node/issues/6456). This bug crops up on -newer versions of Node.js (`0.12+`), truncating terminal output. - -You should be mindful of the side-effects caused by using `set-blocking`: - -* if your module sets blocking to `true`, it will effect other modules - consuming your library. In [yargs](https://github.com/yargs/yargs/blob/master/yargs.js#L653) we only call - `setBlocking(true)` once we already know we are about to call `process.exit(code)`. -* this patch will not apply to subprocesses spawned with `isTTY = true`, this is - the [default `spawn()` behavior](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). - -## License - -ISC diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/index.js deleted file mode 100644 index 6f78774bb63..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function (blocking) { - [process.stdout, process.stderr].forEach(function (stream) { - if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { - stream._handle.setBlocking(blocking) - } - }) -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/package.json deleted file mode 100644 index bbfac3e6ca4..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/set-blocking/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "set-blocking@~2.0.0", - "scope": null, - "escapedName": "set-blocking", - "name": "set-blocking", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npmlog" - ], - [ - { - "raw": "set-blocking@~2.0.0", - "scope": null, - "escapedName": "set-blocking", - "name": "set-blocking", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog" - ] - ], - "_from": "set-blocking@~2.0.0", - "_id": "set-blocking@2.0.0", - "_inCache": true, - "_location": "/npm-registry-client/npmlog/set-blocking", - "_nodeVersion": "0.12.7", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/set-blocking-2.0.0.tgz_1463525966987_0.5456729622092098" - }, - "_npmUser": { - "name": "bcoe", - "email": "ben@npmjs.com" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "raw": "set-blocking@~2.0.0", - "scope": null, - "escapedName": "set-blocking", - "name": "set-blocking", - "rawSpec": "~2.0.0", - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client/npmlog" - ], - "_resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "_shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", - "_shrinkwrap": null, - "_spec": "set-blocking@~2.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client/node_modules/npmlog", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/yargs/set-blocking/issues" - }, - "dependencies": {}, - "description": "set blocking stdio and stderr ensuring that terminal output does not truncate", - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.9", - "mocha": "^2.4.5", - "nyc": "^6.4.4", - "standard": "^7.0.1", - "standard-version": "^2.2.1" - }, - "directories": {}, - "dist": { - "shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", - "tarball": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - }, - "files": [ - "index.js", - "LICENSE.txt" - ], - "gitHead": "7eec10577b5fff264de477ba3b9d07f404946eff", - "homepage": "https://github.com/yargs/set-blocking#readme", - "keywords": [ - "flush", - "terminal", - "blocking", - "shim", - "stdio", - "stderr" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "name": "bcoe", - "email": "ben@npmjs.com" - } - ], - "name": "set-blocking", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/yargs/set-blocking.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "test": "nyc mocha ./test/*.js", - "version": "standard-version" - }, - "version": "2.0.0" -} diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/package.json deleted file mode 100644 index a66e8ce1c46..00000000000 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "raw": "npmlog@~2.0.0 || ~3.1.0", - "scope": null, - "escapedName": "npmlog", - "name": "npmlog", - "rawSpec": "~2.0.0 || ~3.1.0", - "spec": ">=2.0.0 <2.1.0||>=3.1.0 <3.2.0", - "type": "range" - }, - "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client" - ] - ], - "_from": "npmlog@>=2.0.0 <2.1.0||>=3.1.0 <3.2.0", - "_id": "npmlog@3.1.2", - "_inCache": true, - "_location": "/npm-registry-client/npmlog", - "_nodeVersion": "4.4.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/npmlog-3.1.2.tgz_1466073052641_0.36111341998912394" - }, - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "_npmVersion": "3.9.6", - "_phantomChildren": { - "aproba": "1.0.4", - "has-unicode": "2.0.1", - "readable-stream": "2.1.4", - "strip-ansi": "3.0.1" - }, - "_requested": { - "raw": "npmlog@~2.0.0 || ~3.1.0", - "scope": null, - "escapedName": "npmlog", - "name": "npmlog", - "rawSpec": "~2.0.0 || ~3.1.0", - "spec": ">=2.0.0 <2.1.0||>=3.1.0 <3.2.0", - "type": "range" - }, - "_requiredBy": [ - "/npm-registry-client" - ], - "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz", - "_shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", - "_shrinkwrap": null, - "_spec": "npmlog@~2.0.0 || ~3.1.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/npmlog/issues" - }, - "dependencies": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.6.0", - "set-blocking": "~2.0.0" - }, - "description": "logger for npm", - "devDependencies": { - "standard": "~7.1.2", - "tap": "~5.7.0" - }, - "directories": {}, - "dist": { - "shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", - "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz" - }, - "files": [ - "log.js" - ], - "gitHead": "444e237743fa1339cb91bea2d3f16f710be56984", - "homepage": "https://github.com/npm/npmlog#readme", - "license": "ISC", - "main": "log.js", - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - }, - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - }, - { - "name": "zkat", - "email": "kat@sykosomatic.org" - } - ], - "name": "npmlog", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npmlog.git" - }, - "scripts": { - "test": "standard && tap test/*.js" - }, - "version": "3.1.2" -} diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index f463851a897..e3e6fdd841f 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -2,55 +2,51 @@ "_args": [ [ { - "raw": "npm-registry-client@7.3.0", + "raw": "npm-registry-client@~7.4.5", "scope": null, "escapedName": "npm-registry-client", "name": "npm-registry-client", - "rawSpec": "7.3.0", - "spec": "7.3.0", - "type": "version" + "rawSpec": "~7.4.5", + "spec": ">=7.4.5 <7.5.0", + "type": "range" }, "/Users/rebecca/code/npm" ] ], - "_from": "npm-registry-client@7.3.0", - "_id": "npm-registry-client@7.3.0", + "_from": "npm-registry-client@>=7.4.5 <7.5.0", + "_id": "npm-registry-client@7.4.5", "_inCache": true, "_location": "/npm-registry-client", - "_nodeVersion": "6.7.0", + "_nodeVersion": "6.9.1", "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/npm-registry-client-7.3.0.tgz_1476956977374_0.8605887587182224" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/npm-registry-client-7.4.5.tgz_1481241713365_0.3974522119387984" }, "_npmUser": { "name": "iarna", "email": "me@re-becca.org" }, - "_npmVersion": "3.10.9", + "_npmVersion": "4.0.5", "_phantomChildren": { - "aproba": "1.0.4", - "has-unicode": "2.0.1", - "inherits": "2.0.3", - "readable-stream": "2.1.5", - "strip-ansi": "3.0.1" + "inherits": "2.0.3" }, "_requested": { - "raw": "npm-registry-client@7.3.0", + "raw": "npm-registry-client@~7.4.5", "scope": null, "escapedName": "npm-registry-client", "name": "npm-registry-client", - "rawSpec": "7.3.0", - "spec": "7.3.0", - "type": "version" + "rawSpec": "~7.4.5", + "spec": ">=7.4.5 <7.5.0", + "type": "range" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.3.0.tgz", - "_shasum": "f2a390e8b13b78fafe26e9fa9d8bc74e17bcaa50", + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.4.5.tgz", + "_shasum": "1ef61851bb7231db53e397aaf76ddf1cb645c3df", "_shrinkwrap": null, - "_spec": "npm-registry-client@7.3.0", + "_spec": "npm-registry-client@~7.4.5", "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", @@ -65,7 +61,7 @@ "graceful-fs": "^4.1.6", "normalize-package-data": "~1.0.1 || ^2.0.0", "npm-package-arg": "^3.0.0 || ^4.0.0", - "npmlog": "~2.0.0 || ~3.1.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", "once": "^1.3.3", "request": "^2.74.0", "retry": "^0.10.0", @@ -77,16 +73,17 @@ "negotiator": "^0.6.1", "nock": "^8.0.0", "readable-stream": "^2.1.5", + "require-inject": "^1.4.0", "rimraf": "^2.5.4", - "standard": "^8.0.0", + "standard": "~8.5.0", "tap": "^7.0.0" }, "directories": {}, "dist": { - "shasum": "f2a390e8b13b78fafe26e9fa9d8bc74e17bcaa50", - "tarball": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.3.0.tgz" + "shasum": "1ef61851bb7231db53e397aaf76ddf1cb645c3df", + "tarball": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.4.5.tgz" }, - "gitHead": "0e0a707dcf62e9705ef17b7d471d3657c33e79e6", + "gitHead": "317216fab0684ea642b46890be234ad3e8665ac1", "homepage": "https://github.com/npm/npm-registry-client#readme", "license": "ISC", "main": "index.js", @@ -110,7 +107,7 @@ ], "name": "npm-registry-client", "optionalDependencies": { - "npmlog": "~2.0.0 || ~3.1.0" + "npmlog": "2 || ^3.1.0 || ^4.0.0" }, "readme": "ERROR: No README data found!", "repository": { @@ -119,5 +116,5 @@ "scripts": { "test": "standard && tap test/*.js" }, - "version": "7.3.0" + "version": "7.4.5" } diff --git a/deps/npm/node_modules/npm-registry-client/test/econnreset.js b/deps/npm/node_modules/npm-registry-client/test/econnreset.js new file mode 100644 index 00000000000..ee0657112bc --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/test/econnreset.js @@ -0,0 +1,95 @@ +'use strict' +var requireInject = require('require-inject') +var test = require('tap').test +var EventEmitter = require('events').EventEmitter +var PassThrough = require('readable-stream').PassThrough + +var content = [ + 'first chunk', + 'second chunk' +] +var requests = 0 +var fetch = requireInject('../lib/fetch.js', { + request: function (opts) { + var req = new EventEmitter() + ++requests + setTimeout(function () { + var res = new PassThrough() + res.statusCode = 200 + + setTimeout(function () { + res.write(content[0]) + }, 50) + + if (requests === 1) { + setTimeout(function () { + var err = new Error('read ECONNRESET') + err.code = 'ECONNRESET' + req.emit('error', err) + }, 100) + } else { + // we allow success on retries, though in practice we won't be + // retrying. + setTimeout(function () { + res.end(content[1]) + }, 100) + } + req.emit('response', res) + }, 50) + return req + } +}) + +function clientMock (t) { + return { + log: { + info: function (section, message) { + t.comment('[info] ' + section + ': ' + [].slice.call(arguments, 1).join(' ')) + }, + http: function (section, message) { + t.comment('[http] ' + section + ': ' + [].slice.call(arguments, 1).join(' ')) + } + }, + authify: function (alwaysAuth, parsed, headers, auth) { + return + }, + initialize: function (parsed, method, accept, headers) { + return {} + }, + attempt: require('../lib/attempt.js'), + config: { + retry: { + retries: 2, + factor: 10, + minTimeout: 10000, + maxTimeout: 60000 + } + } + } +} + +/* +This tests that errors that occur in the REQUEST object AFTER a `response` +event has been emitted will be passed through to the `response` stream. +This means that we won't try to retry these sorts of errors ourselves. +*/ + +test('econnreset', function (t) { + var client = clientMock(t) + fetch.call(client, 'http://example.com/', {}, function (err, res) { + t.ifError(err, 'initial fetch ok') + var data = '' + res.on('data', function (chunk) { + data += chunk + }) + res.on('error', function (err) { + t.comment('ERROR:', err.stack) + t.pass("errored and that's ok") + t.done() + }) + res.on('end', function () { + t.is(data, content.join(''), 'succeeded and got the right data') + t.done() + }) + }) +}) diff --git a/deps/npm/node_modules/npm-registry-client/test/lib/server.js b/deps/npm/node_modules/npm-registry-client/test/lib/server.js index 06bebdc1393..3a702e67965 100644 --- a/deps/npm/node_modules/npm-registry-client/test/lib/server.js +++ b/deps/npm/node_modules/npm-registry-client/test/lib/server.js @@ -12,7 +12,6 @@ server._expect = {} function handler (req, res) { req.connection.setTimeout(1000) - // If we got authorization, make sure it's the right password. if (req.headers.authorization && req.headers.authorization.match(/^Basic/)) { var auth = req.headers.authorization.replace(/^Basic /, '') diff --git a/deps/npm/node_modules/npm-registry-client/test/send-anon-metrics.js b/deps/npm/node_modules/npm-registry-client/test/send-anon-metrics.js new file mode 100644 index 00000000000..7afa0542c43 --- /dev/null +++ b/deps/npm/node_modules/npm-registry-client/test/send-anon-metrics.js @@ -0,0 +1,78 @@ +var test = require('tap').test + +var common = require('./lib/common.js') +var client = common.freshClient() +var server = require('./lib/server.js') + +function nop () {} + +var metricId = 'this-is-a-uuid' +var from = new Date() +var to = new Date() +var metricInfo = { + metricId: metricId, + metrics: [{ + from: from.toISOString(), + to: to.toISOString(), + successfulInstalls: 0, + failedInstalls: 1 + }] +} + +test('sendAnonymousCLIMetrics call contract', function (t) { + t.throws(function () { + client.sendAnonymousCLIMetrics(undefined, metricInfo, nop) + }, 'requires a URI') + + t.throws(function () { + client.sendAnonymousCLIMetrics([], metricInfo, nop) + }, 'requires URI to be a string') + + t.throws(function () { + client.sendAnonymousCLIMetrics(common.registry, undefined, nop) + }, 'requires params object') + + t.throws(function () { + client.sendAnonymousCLIMetrics(common.registry, '', nop) + }, 'params must be object') + + t.throws(function () { + client.sendAnonymousCLIMetrics(common.registry, metricInfo, undefined) + }, 'requires callback') + + t.throws(function () { + client.sendAnonymousCLIMetrics(common.registry, metricInfo, 'callback') + }, 'callback must be function') + + t.end() +}) + +test('sendAnonymousCLIMetrics', function (t) { + server.expect('PUT', '/-/npm/anon-metrics/v1/' + metricId, function (req, res) { + t.is(req.method, 'PUT') + var b = '' + req.setEncoding('utf8') + req.on('data', function (d) { + b += d + }) + + req.on('end', function () { + var d = JSON.parse(b) + t.isDeeply(d, metricInfo.metrics, 'PUT received metrics') + + res.statusCode = 200 + res.json({}) + }) + }) + + client.sendAnonymousCLIMetrics(common.registry, metricInfo, function (err, res) { + t.ifError(err, 'no errors') + t.isDeeply(res, {}, 'result ok') + t.end() + }) +}) + +test('cleanup', function (t) { + server.close() + t.end() +}) diff --git a/deps/npm/node_modules/npmlog/README.md b/deps/npm/node_modules/npmlog/README.md index dba35501614..268a4af41d6 100644 --- a/deps/npm/node_modules/npmlog/README.md +++ b/deps/npm/node_modules/npmlog/README.md @@ -10,9 +10,15 @@ to outputs other than streams, then you can change the `log.stream` member, or you can just listen to the events that it emits, and do whatever you want with them. -# Basic Usage +# Installation +```console +npm install npmlog --save ``` + +# Basic Usage + +```javascript var log = require('npmlog') // additional stuff ---------------------------+ diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md b/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md index e64d969fed2..dcd9fe01771 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md @@ -1,3 +1,7 @@ +### v2.7.2 + +* Use supports-color instead of has-color (as the module has been renamed) + ### v2.7.1 * Bug fix: Calls to show/pulse while the progress bar is disabled should still diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js deleted file mode 100644 index 092d0baef66..00000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json deleted file mode 100644 index 2e469520b42..00000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "has-color@^0.1.7", - "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge" - ] - ], - "_from": "has-color@>=0.1.7 <0.2.0", - "_id": "has-color@0.1.7", - "_inCache": true, - "_installable": true, - "_location": "/npmlog/gauge/has-color", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.6", - "_phantomChildren": {}, - "_requested": { - "name": "has-color", - "raw": "has-color@^0.1.7", - "rawSpec": "^0.1.7", - "scope": null, - "spec": ">=0.1.7 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/npmlog/gauge" - ], - "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", - "_shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", - "_shrinkwrap": null, - "_spec": "has-color@^0.1.7", - "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "http://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "dependencies": {}, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", - "tarball": "http://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "has-color", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.1.7" -} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md deleted file mode 100644 index 37bbd8991a6..00000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -```bash -$ npm install --save has-color -``` - - -## Usage - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - - -## License - -[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js index 7dd8d917dc5..337f691ed23 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js @@ -19,6 +19,15 @@ if (process.__signal_exit_emitter__) { emitter.emitted = {} } +// Because this emitter is a global, we have to check to see if a +// previous version of this library failed to enable infinite listeners. +// I know what you're about to say. But literally everything about +// signal-exit is a compromise with evil. Get used to it. +if (!emitter.infinite) { + emitter.setMaxListeners(Infinity) + emitter.infinite = true +} + module.exports = function (cb, opts) { assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json index 84b00e1d116..e3792dd72e0 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json @@ -10,35 +10,23 @@ "spec": ">=3.0.0 <4.0.0", "type": "range" }, - "/Users/rebecca/code/npm2/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" - ], - [ - { - "raw": "signal-exit@^3.0.0", - "scope": null, - "escapedName": "signal-exit", - "name": "signal-exit", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "/Users/rebecca/code/npm2/node_modules/npmlog/node_modules/gauge" + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" ] ], - "_from": "signal-exit@^3.0.0", - "_id": "signal-exit@3.0.1", + "_from": "signal-exit@>=3.0.0 <4.0.0", + "_id": "signal-exit@3.0.2", "_inCache": true, "_location": "/npmlog/gauge/signal-exit", "_nodeVersion": "6.5.0", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/signal-exit-3.0.1.tgz_1473354783379_0.4592130535747856" + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/signal-exit-3.0.2.tgz_1480821660838_0.6809983775019646" }, "_npmUser": { - "name": "bcoe", - "email": "ben@npmjs.com" + "name": "isaacs", + "email": "i@izs.me" }, - "_npmVersion": "3.10.3", + "_npmVersion": "3.10.9", "_phantomChildren": {}, "_requested": { "raw": "signal-exit@^3.0.0", @@ -52,11 +40,11 @@ "_requiredBy": [ "/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.1.tgz", - "_shasum": "5a4c884992b63a7acd9badb7894c3ee9cfccad81", + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "_shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d", "_shrinkwrap": null, "_spec": "signal-exit@^3.0.0", - "_where": "/Users/rebecca/code/npm2/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", "author": { "name": "Ben Coe", "email": "ben@npmjs.com" @@ -72,18 +60,18 @@ "nyc": "^8.1.0", "standard": "^7.1.2", "standard-version": "^2.3.0", - "tap": "^7.1.0" + "tap": "^8.0.1" }, "directories": {}, "dist": { - "shasum": "5a4c884992b63a7acd9badb7894c3ee9cfccad81", - "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.1.tgz" + "shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d", + "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" }, "files": [ "index.js", "signals.js" ], - "gitHead": "6859aff54f5198c63fff91baef279b86026bde69", + "gitHead": "9c5ad9809fe6135ef22e2623989deaffe2a4fa8a", "homepage": "https://github.com/tapjs/signal-exit", "keywords": [ "signal", @@ -114,5 +102,5 @@ "release": "standard-version", "test": "tap --timeout=240 ./test/*.js --cov" }, - "version": "3.0.1" + "version": "3.0.2" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/cli.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/cli.js new file mode 100755 index 00000000000..0617971e6fd --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/cli.js @@ -0,0 +1,28 @@ +#!/usr/bin/env node +'use strict'; +var pkg = require('./package.json'); +var supportsColor = require('./'); +var input = process.argv[2]; + +function help() { + console.log([ + pkg.description, + '', + 'Usage', + ' $ supports-color', + '', + 'Exits with code 0 if color is supported and 1 if not' + ].join('\n')); +} + +if (!input || process.argv.indexOf('--help') !== -1) { + help(); + return; +} + +if (process.argv.indexOf('--version') !== -1) { + console.log(pkg.version); + return; +} + +process.exit(supportsColor ? 0 : 1); diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/index.js index 092d0baef66..092d0baef66 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/package.json new file mode 100644 index 00000000000..4a834e57864 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "supports-color@^0.2.0", + "scope": null, + "escapedName": "supports-color", + "name": "supports-color", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "supports-color@>=0.2.0 <0.3.0", + "_id": "supports-color@0.2.0", + "_inCache": true, + "_location": "/npmlog/gauge/supports-color", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "supports-color@^0.2.0", + "scope": null, + "escapedName": "supports-color", + "name": "supports-color", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "_shasum": "d92de2694eb3f67323973d7ae3d8b55b4c22190a", + "_shrinkwrap": null, + "_spec": "supports-color@^0.2.0", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bin": { + "supports-color": "cli.js" + }, + "bugs": { + "url": "https://github.com/sindresorhus/supports-color/issues" + }, + "dependencies": {}, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "d92de2694eb3f67323973d7ae3d8b55b4c22190a", + "tarball": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "cli.js" + ], + "homepage": "https://github.com/sindresorhus/supports-color", + "keywords": [ + "cli", + "bin", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "supports-color", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/supports-color.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.2.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/readme.md new file mode 100644 index 00000000000..7f07e5fb0f5 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/readme.md @@ -0,0 +1,44 @@ +# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color) + +> Detect whether a terminal supports color + + +## Install + +```sh +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + + +## CLI + +```sh +$ npm install --global supports-color +``` + +```sh +$ supports-color --help + +Usage + $ supports-color + +# Exits with code 0 if color is supported and 1 if not +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json index 9ab6582b507..ed2eb61e985 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json @@ -10,23 +10,23 @@ "spec": ">=2.7.1 <2.8.0", "type": "range" }, - "/Users/rebecca/code/npm-latest/node_modules/npmlog" + "/Users/rebecca/code/npm/node_modules/npmlog" ] ], "_from": "gauge@>=2.7.1 <2.8.0", - "_id": "gauge@2.7.1", + "_id": "gauge@2.7.2", "_inCache": true, "_location": "/npmlog/gauge", "_nodeVersion": "6.9.1", "_npmOperationalInternal": { - "host": "packages-18-east.internal.npmjs.com", - "tmp": "tmp/gauge-2.7.1.tgz_1478210591065_0.5937802786938846" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/gauge-2.7.2.tgz_1480851024801_0.17901206784881651" }, "_npmUser": { "name": "iarna", "email": "me@re-becca.org" }, - "_npmVersion": "4.0.0", + "_npmVersion": "4.0.5", "_phantomChildren": { "strip-ansi": "3.0.1" }, @@ -42,11 +42,11 @@ "_requiredBy": [ "/npmlog" ], - "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.1.tgz", - "_shasum": "388473894fe8be5e13ffcdb8b93e4ed0616428c7", + "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.2.tgz", + "_shasum": "15cecc31b02d05345a5d6b0e171cdb3ad2307774", "_shrinkwrap": null, "_spec": "gauge@~2.7.1", - "_where": "/Users/rebecca/code/npm-latest/node_modules/npmlog", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org" @@ -57,12 +57,12 @@ "dependencies": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", - "has-color": "^0.1.7", "has-unicode": "^2.0.0", "object-assign": "^4.1.0", "signal-exit": "^3.0.0", "string-width": "^1.0.1", "strip-ansi": "^3.0.1", + "supports-color": "^0.2.0", "wide-align": "^1.1.0" }, "description": "A terminal based horizontal guage", @@ -75,8 +75,8 @@ }, "directories": {}, "dist": { - "shasum": "388473894fe8be5e13ffcdb8b93e4ed0616428c7", - "tarball": "https://registry.npmjs.org/gauge/-/gauge-2.7.1.tgz" + "shasum": "15cecc31b02d05345a5d6b0e171cdb3ad2307774", + "tarball": "https://registry.npmjs.org/gauge/-/gauge-2.7.2.tgz" }, "files": [ "base-theme.js", @@ -99,7 +99,7 @@ "themes.js", "wide-truncate.js" ], - "gitHead": "d7ac37af0a44af2315656fb73f76f6bca03d084e", + "gitHead": "6971e27a577d165cde360ebed86a59dfc18ac55b", "homepage": "https://github.com/iarna/gauge", "keywords": [ "progressbar", @@ -125,5 +125,5 @@ "prepublish": "rm -f *~", "test": "standard && tap test/*.js --coverage" }, - "version": "2.7.1" + "version": "2.7.2" } diff --git a/deps/npm/node_modules/npmlog/package.json b/deps/npm/node_modules/npmlog/package.json index 1a2fd8b0243..bab110a08ee 100644 --- a/deps/npm/node_modules/npmlog/package.json +++ b/deps/npm/node_modules/npmlog/package.json @@ -2,31 +2,31 @@ "_args": [ [ { - "raw": "npmlog@4.0.1", + "raw": "npmlog@4.0.2", "scope": null, "escapedName": "npmlog", "name": "npmlog", - "rawSpec": "4.0.1", - "spec": "4.0.1", + "rawSpec": "4.0.2", + "spec": "4.0.2", "type": "version" }, - "/Users/rebecca/code/npm-latest" + "/Users/rebecca/code/npm" ] ], - "_from": "npmlog@4.0.1", - "_id": "npmlog@4.0.1", + "_from": "npmlog@4.0.2", + "_id": "npmlog@4.0.2", "_inCache": true, "_location": "/npmlog", - "_nodeVersion": "7.1.0", + "_nodeVersion": "7.2.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/npmlog-4.0.1.tgz_1479345245313_0.32757814647629857" + "tmp": "tmp/npmlog-4.0.2.tgz_1481572338217_0.2948465726803988" }, "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, - "_npmVersion": "3.10.10", + "_npmVersion": "4.0.5", "_phantomChildren": { "aproba": "1.0.4", "has-unicode": "2.0.1", @@ -34,23 +34,24 @@ "strip-ansi": "3.0.1" }, "_requested": { - "raw": "npmlog@4.0.1", + "raw": "npmlog@4.0.2", "scope": null, "escapedName": "npmlog", "name": "npmlog", - "rawSpec": "4.0.1", - "spec": "4.0.1", + "rawSpec": "4.0.2", + "spec": "4.0.2", "type": "version" }, "_requiredBy": [ "#USER", - "/" + "/", + "/npm-registry-client" ], - "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.1.tgz", - "_shasum": "d14f503b4cd79710375553004ba96e6662fbc0b8", + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz", + "_shasum": "d03950e0e78ce1527ba26d2a7592e9348ac3e75f", "_shrinkwrap": null, - "_spec": "npmlog@4.0.1", - "_where": "/Users/rebecca/code/npm-latest", + "_spec": "npmlog@4.0.2", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -72,13 +73,13 @@ }, "directories": {}, "dist": { - "shasum": "d14f503b4cd79710375553004ba96e6662fbc0b8", - "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.1.tgz" + "shasum": "d03950e0e78ce1527ba26d2a7592e9348ac3e75f", + "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz" }, "files": [ "log.js" ], - "gitHead": "c027c276f6f7e6c8d808767b0d611555e3ef5f61", + "gitHead": "a3b7aed07790b674aa1fecfc81a61481abeaf882", "homepage": "https://github.com/npm/npmlog#readme", "license": "ISC", "main": "log.js", @@ -110,5 +111,5 @@ "scripts": { "test": "standard && tap test/*.js" }, - "version": "4.0.1" + "version": "4.0.2" } diff --git a/deps/npm/node_modules/osenv/node_modules/os-homedir/package.json b/deps/npm/node_modules/osenv/node_modules/os-homedir/package.json index 53c8c6e5e62..c2765cdae36 100644 --- a/deps/npm/node_modules/osenv/node_modules/os-homedir/package.json +++ b/deps/npm/node_modules/osenv/node_modules/os-homedir/package.json @@ -1,28 +1,80 @@ { - "name": "os-homedir", - "version": "1.0.1", - "description": "io.js 2.3.0 os.homedir() ponyfill", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/os-homedir.git" + "_args": [ + [ + { + "raw": "os-homedir@^1.0.0", + "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/osenv" + ] + ], + "_from": "os-homedir@>=1.0.0 <2.0.0", + "_id": "os-homedir@1.0.2", + "_inCache": true, + "_location": "/osenv/os-homedir", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/os-homedir-1.0.2.tgz_1475211519628_0.7873868853785098" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "os-homedir@^1.0.0", + "scope": null, + "escapedName": "os-homedir", + "name": "os-homedir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" }, + "_requiredBy": [ + "/osenv" + ], + "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", + "_shrinkwrap": null, + "_spec": "os-homedir@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/osenv", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/os-homedir/issues" + }, + "dependencies": {}, + "description": "Node.js 4 `os.homedir()` ponyfill", + "devDependencies": { + "ava": "*", + "path-exists": "^2.0.0", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", + "tarball": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "node test.js" - }, "files": [ "index.js" ], + "gitHead": "b1b0ae70a5965fef7005ff6509a5dd1a78c95e36", + "homepage": "https://github.com/sindresorhus/os-homedir#readme", "keywords": [ - "built-in", + "builtin", "core", "ponyfill", "polyfill", @@ -36,18 +88,22 @@ "user", "path" ], - "devDependencies": { - "ava": "0.0.4", - "path-exists": "^1.0.0" + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-homedir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-homedir.git" }, - "readme": "# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir)\n\n> io.js 2.3.0 [`os.homedir()`](https://iojs.org/api/os.html#os_os_homedir) ponyfill\n\n> Ponyfill: A polyfill that doesn't overwrite the native method\n\n\n## Install\n\n```\n$ npm install --save os-homedir\n```\n\n\n## Usage\n\n```js\nvar osHomedir = require('os-homedir');\n\nconsole.log(osHomedir());\n//=> /Users/sindresorhus\n```\n\n\n## Related\n\n- [user-home](https://github.com/sindresorhus/user-home) - Same as this module but caches the result\n- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/os-homedir/issues" + "scripts": { + "test": "xo && ava" }, - "homepage": "https://github.com/sindresorhus/os-homedir#readme", - "_id": "os-homedir@1.0.1", - "_shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007", - "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz", - "_from": "os-homedir@>=1.0.0 <2.0.0" + "version": "1.0.2" } diff --git a/deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md b/deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md index 4851f104ea7..856ae615b0c 100644 --- a/deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md +++ b/deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md @@ -1,8 +1,6 @@ # os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir) -> io.js 2.3.0 [`os.homedir()`](https://iojs.org/api/os.html#os_os_homedir) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method +> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com) ## Install @@ -15,10 +13,10 @@ $ npm install --save os-homedir ## Usage ```js -var osHomedir = require('os-homedir'); +const osHomedir = require('os-homedir'); console.log(osHomedir()); -//=> /Users/sindresorhus +//=> '/Users/sindresorhus' ``` @@ -30,4 +28,4 @@ console.log(osHomedir()); ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/index.js b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/index.js index 52d90bf2698..2077b1ce747 100644 --- a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/index.js +++ b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/index.js @@ -2,7 +2,7 @@ var isWindows = process.platform === 'win32'; var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; -// https://github.com/nodejs/io.js/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 +// https://github.com/nodejs/node/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 module.exports = function () { var path; diff --git a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json index 071ea5ec83f..272d9e55329 100644 --- a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json +++ b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json @@ -1,26 +1,77 @@ { - "name": "os-tmpdir", - "version": "1.0.1", - "description": "Node.js os.tmpdir() ponyfill", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/os-tmpdir.git" + "_args": [ + [ + { + "raw": "os-tmpdir@^1.0.0", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/osenv" + ] + ], + "_from": "os-tmpdir@>=1.0.0 <2.0.0", + "_id": "os-tmpdir@1.0.2", + "_inCache": true, + "_location": "/osenv/os-tmpdir", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/os-tmpdir-1.0.2.tgz_1475211274587_0.14931037812493742" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "os-tmpdir@^1.0.0", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/osenv" + ], + "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "_shrinkwrap": null, + "_spec": "os-tmpdir@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/osenv", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "bugs": { + "url": "https://github.com/sindresorhus/os-tmpdir/issues" + }, + "dependencies": {}, + "description": "Node.js os.tmpdir() ponyfill", + "devDependencies": { + "ava": "*", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "tarball": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, "engines": { "node": ">=0.10.0" }, - "scripts": { - "test": "node test.js" - }, "files": [ "index.js" ], + "gitHead": "1abf9cf5611b4be7377060ea67054b45cbf6813c", + "homepage": "https://github.com/sindresorhus/os-tmpdir#readme", "keywords": [ "built-in", "core", @@ -37,17 +88,22 @@ "env", "environment" ], - "devDependencies": { - "ava": "0.0.4" + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-tmpdir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-tmpdir.git" }, - "readme": "# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir)\n\n> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) ponyfill\n\n> Ponyfill: A polyfill that doesn't overwrite the native method\n\nUse this instead of `require('os').tmpdir()` to get a consistent behaviour on different Node.js versions (even 0.8).\n\n*This is actually taken from io.js 2.0.2 as it contains some fixes that haven't bubbled up to Node.js yet.*\n\n\n## Install\n\n```\n$ npm install --save os-tmpdir\n```\n\n\n## Usage\n\n```js\nvar osTmpdir = require('os-tmpdir');\n\nosTmpdir();\n//=> /var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T\n```\n\n\n## API\n\nSee the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir).\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/os-tmpdir/issues" + "scripts": { + "test": "xo && ava" }, - "homepage": "https://github.com/sindresorhus/os-tmpdir#readme", - "_id": "os-tmpdir@1.0.1", - "_shasum": "e9b423a1edaf479882562e92ed71d7743a071b6e", - "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz", - "_from": "os-tmpdir@>=1.0.0 <2.0.0" + "version": "1.0.2" } diff --git a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/readme.md b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/readme.md index 54d4c6ec8e5..c09f7ed8d5f 100644 --- a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/readme.md +++ b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/readme.md @@ -1,12 +1,8 @@ # os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir) -> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) ponyfill +> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) [ponyfill](https://ponyfill.com) -> Ponyfill: A polyfill that doesn't overwrite the native method - -Use this instead of `require('os').tmpdir()` to get a consistent behaviour on different Node.js versions (even 0.8). - -*This is actually taken from io.js 2.0.2 as it contains some fixes that haven't bubbled up to Node.js yet.* +Use this instead of `require('os').tmpdir()` to get a consistent behavior on different Node.js versions (even 0.8). ## Install @@ -19,10 +15,10 @@ $ npm install --save os-tmpdir ## Usage ```js -var osTmpdir = require('os-tmpdir'); +const osTmpdir = require('os-tmpdir'); osTmpdir(); -//=> /var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T +//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T' ``` @@ -33,4 +29,4 @@ See the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir). ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/osenv/package.json b/deps/npm/node_modules/osenv/package.json index ac0c03cda62..fa2454cc35d 100644 --- a/deps/npm/node_modules/osenv/package.json +++ b/deps/npm/node_modules/osenv/package.json @@ -1,24 +1,77 @@ { - "name": "osenv", - "version": "0.1.3", - "main": "osenv.js", - "directories": { - "test": "test" + "_args": [ + [ + { + "raw": "osenv@0.1.4", + "scope": null, + "escapedName": "osenv", + "name": "osenv", + "rawSpec": "0.1.4", + "spec": "0.1.4", + "type": "version" + }, + "/Users/rebecca/code/npm" + ] + ], + "_from": "osenv@0.1.4", + "_id": "osenv@0.1.4", + "_inCache": true, + "_location": "/osenv", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/osenv-0.1.4.tgz_1481655889868_0.3980878754518926" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "osenv@0.1.4", + "scope": null, + "escapedName": "osenv", + "name": "osenv", + "rawSpec": "0.1.4", + "spec": "0.1.4", + "type": "version" + }, + "_requiredBy": [ + "#USER", + "/", + "/node-gyp" + ], + "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "_shasum": "42fe6d5953df06c8064be6f176c3d05aaaa34644", + "_shrinkwrap": null, + "_spec": "osenv@0.1.4", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/osenv/issues" }, "dependencies": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" }, + "description": "Look up environment settings specific to different operating systems", "devDependencies": { - "tap": "^1.2.0" + "tap": "^8.0.1" }, - "scripts": { - "test": "tap test/*.js" + "directories": { + "test": "test" }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/osenv.git" + "dist": { + "shasum": "42fe6d5953df06c8064be6f176c3d05aaaa34644", + "tarball": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz" }, + "gitHead": "ef718f0d20e38d45ec452b7faeefc692d3cd1062", + "homepage": "https://github.com/npm/osenv#readme", "keywords": [ "environment", "variable", @@ -28,21 +81,35 @@ "prompt", "ps1" ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, "license": "ISC", - "description": "Look up environment settings specific to different operating systems", - "readme": "# osenv\n\nLook up environment settings specific to different operating systems.\n\n## Usage\n\n```javascript\nvar osenv = require('osenv')\nvar path = osenv.path()\nvar user = osenv.user()\n// etc.\n\n// Some things are not reliably in the env, and have a fallback command:\nvar h = osenv.hostname(function (er, hostname) {\n h = hostname\n})\n// This will still cause it to be memoized, so calling osenv.hostname()\n// is now an immediate operation.\n\n// You can always send a cb, which will get called in the nextTick\n// if it's been memoized, or wait for the fallback data if it wasn't\n// found in the environment.\nosenv.hostname(function (er, hostname) {\n if (er) console.error('error looking up hostname')\n else console.log('this machine calls itself %s', hostname)\n})\n```\n\n## osenv.hostname()\n\nThe machine name. Calls `hostname` if not found.\n\n## osenv.user()\n\nThe currently logged-in user. Calls `whoami` if not found.\n\n## osenv.prompt()\n\nEither PS1 on unix, or PROMPT on Windows.\n\n## osenv.tmpdir()\n\nThe place where temporary files should be created.\n\n## osenv.home()\n\nNo place like it.\n\n## osenv.path()\n\nAn array of the places that the operating system will search for\nexecutables.\n\n## osenv.editor() \n\nReturn the executable name of the editor program. This uses the EDITOR\nand VISUAL environment variables, and falls back to `vi` on Unix, or\n`notepad.exe` on Windows.\n\n## osenv.shell()\n\nThe SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash'\nor 'cmd'.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/npm/osenv/issues" + "main": "osenv.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "name": "osenv", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/osenv.git" }, - "homepage": "https://github.com/npm/osenv#readme", - "_id": "osenv@0.1.3", - "_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", - "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz", - "_from": "osenv@>=0.1.3 <0.2.0" + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.4" } diff --git a/deps/npm/node_modules/osenv/test/unix.js b/deps/npm/node_modules/osenv/test/unix.js index f87cbfb3295..94d4aaafb4f 100644 --- a/deps/npm/node_modules/osenv/test/unix.js +++ b/deps/npm/node_modules/osenv/test/unix.js @@ -2,13 +2,13 @@ // pretending to be another platform is too hacky, since it breaks // how the underlying system looks up module paths and runs // child processes, and all that stuff is cached. +var tap = require('tap') + + if (process.platform === 'win32') { - console.log('TAP Version 13\n' + - '1..0\n' + - '# Skip unix tests, this is not unix\n') - return + tap.plan(0, 'Skip unix tests, this is not unix') + process.exit(0) } -var tap = require('tap') // like unix, but funny process.env.USER = 'sirUser' diff --git a/deps/npm/node_modules/retry/package.json b/deps/npm/node_modules/retry/package.json index 73a2819edee..adc1b9e1ef0 100644 --- a/deps/npm/node_modules/retry/package.json +++ b/deps/npm/node_modules/retry/package.json @@ -2,50 +2,51 @@ "_args": [ [ { - "raw": "retry@0.10.0", + "raw": "retry@0.10.1", "scope": null, "escapedName": "retry", "name": "retry", - "rawSpec": "0.10.0", - "spec": "0.10.0", + "rawSpec": "0.10.1", + "spec": "0.10.1", "type": "version" }, - "/Users/zkat/Documents/code/npm" + "/Users/rebecca/code/npm" ] ], - "_from": "retry@0.10.0", - "_id": "retry@0.10.0", + "_from": "retry@0.10.1", + "_id": "retry@0.10.1", "_inCache": true, "_location": "/retry", - "_nodeVersion": "4.2.1", + "_nodeVersion": "4.6.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/retry-0.10.0.tgz_1471682099847_0.5031970851123333" + "tmp": "tmp/retry-0.10.1.tgz_1481556523726_0.45345148630440235" }, "_npmUser": { "name": "tim-kos", "email": "tim@debuggable.com" }, - "_npmVersion": "2.1.7", + "_npmVersion": "2.15.9", "_phantomChildren": {}, "_requested": { - "raw": "retry@0.10.0", + "raw": "retry@0.10.1", "scope": null, "escapedName": "retry", "name": "retry", - "rawSpec": "0.10.0", - "spec": "0.10.0", + "rawSpec": "0.10.1", + "spec": "0.10.1", "type": "version" }, "_requiredBy": [ "#USER", - "/" + "/", + "/npm-registry-client" ], - "_resolved": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz", - "_shasum": "649e15ca408422d98318161935e7f7d652d435dd", + "_resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "_shasum": "e76388d217992c252750241d3d3956fed98d8ff4", "_shrinkwrap": null, - "_spec": "retry@0.10.0", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "retry@0.10.1", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Tim Koschützki", "email": "tim@debuggable.com", @@ -64,13 +65,13 @@ "lib": "./lib" }, "dist": { - "shasum": "649e15ca408422d98318161935e7f7d652d435dd", - "tarball": "https://registry.npmjs.org/retry/-/retry-0.10.0.tgz" + "shasum": "e76388d217992c252750241d3d3956fed98d8ff4", + "tarball": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz" }, "engines": { "node": "*" }, - "gitHead": "0616e6a6ebc49b5a36b619c8f7c414ced8c3813b", + "gitHead": "3dbe5189b48786e56d1d1807731adfc53a70eeae", "homepage": "https://github.com/tim-kos/node-retry", "license": "MIT", "main": "index", @@ -88,5 +89,5 @@ "url": "git://github.com/tim-kos/node-retry.git" }, "scripts": {}, - "version": "0.10.0" + "version": "0.10.1" } diff --git a/deps/npm/node_modules/request/node_modules/uuid/.npmignore b/deps/npm/node_modules/uuid/.npmignore index 67b88724dbf..67b88724dbf 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/.npmignore +++ b/deps/npm/node_modules/uuid/.npmignore diff --git a/deps/npm/node_modules/request/node_modules/uuid/.travis.yml b/deps/npm/node_modules/uuid/.travis.yml index 8a2c585ee99..8a2c585ee99 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/.travis.yml +++ b/deps/npm/node_modules/uuid/.travis.yml diff --git a/deps/npm/node_modules/request/node_modules/uuid/AUTHORS b/deps/npm/node_modules/uuid/AUTHORS index 5a10523062f..5a10523062f 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/AUTHORS +++ b/deps/npm/node_modules/uuid/AUTHORS diff --git a/deps/npm/node_modules/request/node_modules/uuid/HISTORY.md b/deps/npm/node_modules/uuid/HISTORY.md index 02daad3f613..02daad3f613 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/HISTORY.md +++ b/deps/npm/node_modules/uuid/HISTORY.md diff --git a/deps/npm/node_modules/request/node_modules/uuid/LICENSE.md b/deps/npm/node_modules/uuid/LICENSE.md index 8c84e398668..8c84e398668 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/LICENSE.md +++ b/deps/npm/node_modules/uuid/LICENSE.md diff --git a/deps/npm/node_modules/request/node_modules/uuid/README.md b/deps/npm/node_modules/uuid/README.md index 82a79eb33a9..82a79eb33a9 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/README.md +++ b/deps/npm/node_modules/uuid/README.md diff --git a/deps/npm/node_modules/request/node_modules/uuid/bin/uuid b/deps/npm/node_modules/uuid/bin/uuid index f732e9918e0..f732e9918e0 100755 --- a/deps/npm/node_modules/request/node_modules/uuid/bin/uuid +++ b/deps/npm/node_modules/uuid/bin/uuid diff --git a/deps/npm/node_modules/request/node_modules/uuid/index.js b/deps/npm/node_modules/uuid/index.js index e96791ab4ba..e96791ab4ba 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/index.js +++ b/deps/npm/node_modules/uuid/index.js diff --git a/deps/npm/node_modules/request/node_modules/uuid/lib/bytesToUuid.js b/deps/npm/node_modules/uuid/lib/bytesToUuid.js index 9ee989cb9bb..9ee989cb9bb 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/lib/bytesToUuid.js +++ b/deps/npm/node_modules/uuid/lib/bytesToUuid.js diff --git a/deps/npm/node_modules/request/node_modules/uuid/lib/rng-browser.js b/deps/npm/node_modules/uuid/lib/rng-browser.js index 88b7dfb68af..88b7dfb68af 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/lib/rng-browser.js +++ b/deps/npm/node_modules/uuid/lib/rng-browser.js diff --git a/deps/npm/node_modules/request/node_modules/uuid/lib/rng.js b/deps/npm/node_modules/uuid/lib/rng.js index 5624d9123b4..5624d9123b4 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/lib/rng.js +++ b/deps/npm/node_modules/uuid/lib/rng.js diff --git a/deps/npm/node_modules/request/node_modules/uuid/package.json b/deps/npm/node_modules/uuid/package.json index 57626b794d5..b2caa580cc0 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/package.json +++ b/deps/npm/node_modules/uuid/package.json @@ -2,21 +2,21 @@ "_args": [ [ { - "raw": "uuid@^3.0.0", + "raw": "uuid", "scope": null, "escapedName": "uuid", "name": "uuid", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" + "rawSpec": "", + "spec": "latest", + "type": "tag" }, - "/Users/zkat/Documents/code/npm/node_modules/request" + "/Users/rebecca/code/npm" ] ], - "_from": "uuid@>=3.0.0 <4.0.0", + "_from": "uuid@latest", "_id": "uuid@3.0.1", "_inCache": true, - "_location": "/request/uuid", + "_location": "/uuid", "_nodeVersion": "6.7.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", @@ -29,22 +29,24 @@ "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { - "raw": "uuid@^3.0.0", + "raw": "uuid", "scope": null, "escapedName": "uuid", "name": "uuid", - "rawSpec": "^3.0.0", - "spec": ">=3.0.0 <4.0.0", - "type": "range" + "rawSpec": "", + "spec": "latest", + "type": "tag" }, "_requiredBy": [ + "#USER", + "/", "/request" ], "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", "_shasum": "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1", "_shrinkwrap": null, - "_spec": "uuid@^3.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/request", + "_spec": "uuid", + "_where": "/Users/rebecca/code/npm", "bin": { "uuid": "./bin/uuid" }, diff --git a/deps/npm/node_modules/request/node_modules/uuid/test/mocha.opts b/deps/npm/node_modules/uuid/test/mocha.opts index 5d6a3113b16..5d6a3113b16 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/test/mocha.opts +++ b/deps/npm/node_modules/uuid/test/mocha.opts diff --git a/deps/npm/node_modules/request/node_modules/uuid/test/test.js b/deps/npm/node_modules/uuid/test/test.js index ec33bec0137..ec33bec0137 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/test/test.js +++ b/deps/npm/node_modules/uuid/test/test.js diff --git a/deps/npm/node_modules/request/node_modules/uuid/v1.js b/deps/npm/node_modules/uuid/v1.js index 315bd4cd652..315bd4cd652 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/v1.js +++ b/deps/npm/node_modules/uuid/v1.js diff --git a/deps/npm/node_modules/request/node_modules/uuid/v4.js b/deps/npm/node_modules/uuid/v4.js index 38b6f76a985..38b6f76a985 100644 --- a/deps/npm/node_modules/request/node_modules/uuid/v4.js +++ b/deps/npm/node_modules/uuid/v4.js diff --git a/deps/npm/package.json b/deps/npm/package.json index bc799f360a8..24f75d36ccf 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.5", + "version": "4.1.1", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -56,7 +56,7 @@ "inherits": "~2.0.3", "ini": "~1.3.4", "init-package-json": "~1.9.4", - "lockfile": "~1.0.2", + "lockfile": "~1.0.3", "lodash._baseuniq": "~4.6.0", "lodash.clonedeep": "~4.5.0", "lodash.union": "~4.6.0", @@ -65,18 +65,18 @@ "mississippi": "~1.2.0", "mkdirp": "~0.5.1", "node-gyp": "~3.4.0", - "nopt": "~3.0.6", + "nopt": "~4.0.1", "normalize-git-url": "~3.0.2", "normalize-package-data": "~2.3.5", "npm-cache-filename": "~1.0.2", "npm-install-checks": "~3.0.0", "npm-package-arg": "~4.2.0", - "npm-registry-client": "~7.3.0", + "npm-registry-client": "~7.4.5", "npm-user-validate": "~0.1.5", - "npmlog": "~4.0.1", + "npmlog": "~4.0.2", "once": "~1.4.0", "opener": "~1.4.2", - "osenv": "~0.1.3", + "osenv": "~0.1.4", "path-is-inside": "~1.0.2", "read": "~1.0.7", "read-cmd-shim": "~1.0.1", @@ -86,7 +86,7 @@ "readable-stream": "~2.2.2", "realize-package-specifier": "~3.0.3", "request": "~2.79.0", - "retry": "~0.10.0", + "retry": "~0.10.1", "rimraf": "~2.5.4", "semver": "~5.3.0", "sha": "~2.0.1", @@ -100,6 +100,7 @@ "umask": "~1.1.0", "unique-filename": "~1.1.0", "unpipe": "~1.0.0", + "uuid": "~3.0.1", "validate-npm-package-name": "~2.2.2", "which": "~1.2.12", "wrappy": "~1.0.2", @@ -190,12 +191,13 @@ "which", "wrappy", "write-file-atomic", - "mississippi" + "mississippi", + "uuid" ], "devDependencies": { "deep-equal": "~1.0.1", "marked": "~0.3.6", - "marked-man": "~0.1.6", + "marked-man": "~0.2.0", "npm-registry-couchapp": "~2.6.12", "npm-registry-mock": "~1.0.1", "require-inject": "~1.4.0", diff --git a/deps/npm/test/tap/anon-cli-metrics.js b/deps/npm/test/tap/anon-cli-metrics.js new file mode 100644 index 00000000000..deb61846827 --- /dev/null +++ b/deps/npm/test/tap/anon-cli-metrics.js @@ -0,0 +1,147 @@ +'use strict' +var path = require('path') +var fs = require('graceful-fs') +var test = require('tap').test +var mr = require('npm-registry-mock') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir +var extend = Object.assign || require('util')._extend +var common = require('../common-tap.js') + +var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = path.join(basedir, 'testdir') +var cachedir = path.join(basedir, 'cache') +var globaldir = path.join(basedir, 'global') +var tmpdir = path.join(basedir, 'tmp') +var metricsFile = path.join(cachedir, 'anonymous-cli-metrics.json') + +var conf = { + cwd: testdir, + env: extend(extend({}, process.env), { + npm_config_cache: cachedir, + npm_config_tmp: tmpdir, + npm_config_prefix: globaldir, + npm_config_registry: common.registry, + npm_config_metrics_registry: common.registry, + npm_config_loglevel: 'warn' + }) +} + +var server +var fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + failure: Dir({ + 'package.json': File({ + name: 'failure', + version: '1.0.0', + scripts: { + preinstall: 'false' + } + }) + }), + success: Dir({ + 'package.json': File({ + name: 'success', + version: '1.0.0' + }) + }), + slow: Dir({ + 'package.json': File({ + name: 'slow', + version: '1.0.0', + scripts: { + preinstall: "node -e 'setTimeout(function(){}, 500)'" + } + }) + }), + 'package.json': File({ + name: 'anon-cli-metrics-test', + version: '1.0.0' + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', function (t) { + setup() + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + if (err) throw err + server = s + server.filteringPathRegEx(/([/]-[/]npm[/]anon-metrics[/]v1[/]).*/, '$1:id') + server.filteringRequestBody(function (body) { + var metrics = typeof body === 'string' ? JSON.parse(body) : body + delete metrics.from + delete metrics.to + return JSON.stringify(metrics) + }) + t.done() + }) +}) + +test('record success', function (t) { + common.npm(['install', '--no-send-metrics', 'success'], conf, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'always succeeding install succeeded') + t.comment(stdout.trim()) + t.comment(stderr.trim()) + var data = JSON.parse(fs.readFileSync(metricsFile)) + t.is(data.metrics.successfulInstalls, 1) + t.is(data.metrics.failedInstalls, 0) + t.done() + }) +}) + +test('record failure', function (t) { + server.put('/-/npm/anon-metrics/v1/:id', { + successfulInstalls: 1, + failedInstalls: 0 + }).reply(500, {ok: false}) + common.npm(['install', '--send-metrics', 'failure'], conf, function (err, code, stdout, stderr) { + if (err) throw err + t.notEqual(code, 0, 'always failing install fails') + t.comment(stdout.trim()) + t.comment(stderr.trim()) + var data = JSON.parse(fs.readFileSync(metricsFile)) + t.is(data.metrics.successfulInstalls, 1) + t.is(data.metrics.failedInstalls, 1) + t.done() + }) +}) + +test('report', function (t) { + console.log('setup') + + server.put('/-/npm/anon-metrics/v1/:id', { + successfulInstalls: 1, + failedInstalls: 1 + }).reply(200, {ok: true}) + common.npm(['install', '--send-metrics', 'slow'], conf, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'command ran ok') + t.comment(stdout.trim()) + t.comment(stderr.trim()) + // todo check mock registry for post + var data = JSON.parse(fs.readFileSync(metricsFile)) + t.is(data.metrics.successfulInstalls, 1) + t.is(data.metrics.failedInstalls, 0) + t.done() + }) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/doctor.js b/deps/npm/test/tap/doctor.js new file mode 100644 index 00000000000..5cdffb2bd84 --- /dev/null +++ b/deps/npm/test/tap/doctor.js @@ -0,0 +1,69 @@ +'use strict' +var http = require('http') +var which = require('which') +var mr = require('npm-registry-mock') +var test = require('tap').test +var common = require('../common-tap.js') +var npm = require('../../lib/npm.js') +var server +var node_url +var pingResponse = { + host: 'registry.npmjs.org', + ok: true, + username: null, + peer: 'example.com' +} +var npmResponse = { + 'dist-tags': {latest: '0.0.0'}, + 'versions': { + '0.0.0': { + version: '0.0.0', + dist: { + shasum: '', + tarball: '' + } + } + } +} + +test('setup', function (t) { + var port = common.port + 1 + http.createServer(function (q, s) { + s.end(JSON.stringify([{lts: true, version: '0.0.0'}])) + this.close() + }).listen(port, function () { + node_url = 'http://localhost:' + port + mr({port: common.port}, function (e, s) { + t.ifError(e, 'registry mocked successfully') + server = s + server.get('/-/ping?write=true').reply(200, JSON.stringify(pingResponse)) + server.get('/npm').reply(200, JSON.stringify(npmResponse)) + npm.load({registry: common.registry, loglevel: 'silent'}, function (e) { + t.ifError(e, 'npm loaded successfully') + t.pass('all set up') + t.done() + }) + }) + }) +}) + +test('npm doctor', function (t) { + npm.commands.doctor({'node-url': node_url}, true, function (e, list) { + t.ifError(e, 'npm loaded successfully') + t.same(list.length, 9, 'list should have 9 prop') + t.same(list[0][1], 'ok', 'npm ping') + t.same(list[1][1], 'v' + npm.version, 'npm -v') + t.same(list[2][1], process.version, 'node -v') + t.same(list[3][1], common.registry + '/', 'npm config get registry') + t.same(list[5][1], 'ok', 'Perms check on cached files') + t.same(list[6][1], 'ok', 'Perms check on global node_modules') + t.same(list[7][1], 'ok', 'Perms check on local node_modules') + t.same(list[8][1], 'ok', 'Checksum cached files') + which('git', function (e, resolvedPath) { + t.ifError(e, 'git command is installed') + t.same(list[4][1], resolvedPath, 'which git') + server.close() + t.done() + }) + }) +}) diff --git a/deps/npm/test/tap/install-save-local.js b/deps/npm/test/tap/install-save-local.js index 1bc739cb898..640ebfef500 100644 --- a/deps/npm/test/tap/install-save-local.js +++ b/deps/npm/test/tap/install-save-local.js @@ -61,6 +61,35 @@ test('\'npm install --save ../local/path\' should save to package.json', functio ) }) +test('\'npm install --save local/path\' should save to package.json', function (t) { + setup() + common.npm( + [ + '--loglevel', 'silent', + '--save', + 'install', 'package-local-dependency' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var dependencyPackageJson = path.join( + pkg, 'node_modules', 'package-local-dependency', 'package.json' + ) + t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8'))) + + var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8')) + t.is(Object.keys(pkgJson.dependencies).length, 1, 'only one dep') + t.ok( + /file:package-local-dependency$/.test(pkgJson.dependencies['package-local-dependency']), + 'local package saved correctly' + ) + t.end() + } + ) +}) + test('\'npm install --save-dev ../local/path\' should save to package.json', function (t) { setup() common.npm( @@ -90,6 +119,35 @@ test('\'npm install --save-dev ../local/path\' should save to package.json', fun } ) }) +test('\'npm install --save-dev local/path\' should save to package.json', function (t) { + setup() + common.npm( + [ + '--loglevel', 'silent', + '--save-dev', + 'install', 'package-local-dev-dependency' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var dependencyPackageJson = path.resolve( + pkg, 'node_modules', 'package-local-dev-dependency', 'package.json' + ) + t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8'))) + + var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8')) + t.is(Object.keys(pkgJson.devDependencies).length, 1, 'only one dep') + t.ok( + /file:package-local-dev-dependency$/.test(pkgJson.devDependencies['package-local-dev-dependency']), + 'local package saved correctly' + ) + + t.end() + } + ) +}) test('cleanup', function (t) { cleanup() @@ -122,5 +180,16 @@ function setup () { JSON.stringify(localDevDependency, null, 2) ) + mkdirp.sync(path.join(pkg, 'package-local-dependency')) + fs.writeFileSync( + path.join(pkg, 'package-local-dependency', 'package.json'), + JSON.stringify(localDependency, null, 2) + ) + + mkdirp.sync(path.join(pkg, 'package-local-dev-dependency')) + fs.writeFileSync( + path.join(pkg, 'package-local-dev-dependency', 'package.json'), + JSON.stringify(localDevDependency, null, 2) + ) process.chdir(pkg) } diff --git a/deps/npm/test/tap/pick-manifest-from-registry-metadata.js b/deps/npm/test/tap/pick-manifest-from-registry-metadata.js new file mode 100644 index 00000000000..3af354aed38 --- /dev/null +++ b/deps/npm/test/tap/pick-manifest-from-registry-metadata.js @@ -0,0 +1,145 @@ +'use strict' +var test = require('tap').test + +var pickManifest = require('../../lib/utils/pick-manifest-from-registry-metadata.js') + +test('basic carat range selection', function (t) { + var metadata = { + 'dist-tags': { + 'example': '1.1.0' + }, + versions: { + '1.0.0': { version: '1.0.0' }, + '1.0.1': { version: '1.0.1' }, + '1.0.2': { version: '1.0.2' }, + '1.1.0': { version: '1.1.0' }, + '2.0.0': { version: '2.0.0' } + } + } + var versions = Object.keys(metadata.versions) + var selected = pickManifest('^1.0.0', 'latest', versions, metadata) + t.equal(selected.manifest.version, '1.1.0', 'picked the right manifest using ^') + t.equal(selected.resolvedTo, '1.1.0', 'resolved using version match') + selected = pickManifest('^1.0.0', 'example', versions, metadata) + t.equal(selected.manifest.version, '1.1.0', 'picked the right manifest using ^') + t.equal(selected.resolvedTo, 'example', 'resolved using tag') + t.end() +}) + +test('basic tilde range selection', function (t) { + var metadata = { + 'dist-tags': { + 'example': '1.1.0' + }, + versions: { + '1.0.0': { version: '1.0.0' }, + '1.0.1': { version: '1.0.1' }, + '1.0.2': { version: '1.0.2' }, + '1.1.0': { version: '1.1.0' }, + '2.0.0': { version: '2.0.0' } + } + } + var versions = Object.keys(metadata.versions) + var selected = pickManifest('~1.0.0', 'latest', versions, metadata) + t.equal(selected.manifest.version, '1.0.2', 'picked the right manifest using ~') + t.equal(selected.resolvedTo, '1.0.2', 'resolved using version match') + t.end() +}) + +test('basic mathematical range selection', function (t) { + var metadata = { + 'dist-tags': {}, + versions: { + '1.0.0': { version: '1.0.0' }, + '1.0.1': { version: '1.0.1' }, + '1.0.2': { version: '1.0.2' }, + '2.0.0': { version: '2.0.0' } + } + } + var versions = Object.keys(metadata.versions) + var selected = pickManifest('>=1.0.0 <2', 'example', versions, metadata) + t.equal(selected.manifest.version, '1.0.2', 'picked the right manifest using mathematical range') + t.equal(selected.resolvedTo, '1.0.2', 'resolved using version match') + t.end() +}) + +test('basic version selection', function (t) { + var metadata = { + 'dist-tags': {}, + versions: { + '1.0.0': { version: '1.0.0' }, + '1.0.1': { version: '1.0.1' }, + '1.0.2': { version: '1.0.2' }, + '2.0.0': { version: '2.0.0' } + } + } + var versions = Object.keys(metadata.versions) + var selected = pickManifest('1.0.0', 'latest', versions, metadata) + t.equal(selected.manifest.version, '1.0.0', 'picked the right manifest using specific version') + t.equal(selected.resolvedTo, '1.0.0', 'resolved using version match') + t.end() +}) + +test('nothing if range does not match anything', function (t) { + var metadata = { + 'dist-tags': {}, + versions: { + '1.0.0': { version: '1.0.0' }, + '2.0.0': { version: '2.0.0' }, + '2.0.5': { version: '2.0.5' } + } + } + var versions = Object.keys(metadata.versions) + var selected = pickManifest('^2.1.0', 'latest', versions, metadata) + t.equal(selected, undefined, 'no manifest matched') + t.end() +}) + +test('if `defaultTag` matches a given range, use it', function (t) { + var metadata = { + 'dist-tags': { + foo: '1.0.1' + }, + versions: { + '1.0.0': { version: '1.0.0' }, + '1.0.1': { version: '1.0.1' }, + '1.0.2': { version: '1.0.2' }, + '2.0.0': { version: '2.0.0' } + } + } + var versions = Object.keys(metadata.versions) + var selected = pickManifest('^1.0.0', 'foo', versions, metadata) + t.equal(selected.manifest.version, '1.0.1', 'picked the version for foo') + t.equal(selected.resolvedTo, 'foo', 'resolved using tag') + + selected = pickManifest('^2.0.0', 'foo', versions, metadata) + t.equal(selected.manifest.version, '2.0.0', 'no match, no foo') + t.equal(selected.resolvedTo, '2.0.0', 'resolved using version match') + + t.end() +}) + +test('* ranges use `defaultTag` if no versions match', function (t) { + var metadata = { + 'dist-tags': { + beta: '2.0.0-beta.0' + }, + versions: { + '1.0.0-pre.0': { version: '1.0.0-pre.0' }, + '1.0.0-pre.1': { version: '1.0.0-pre.1' }, + '2.0.0-beta.0': { version: '2.0.0-beta.0' }, + '2.0.0-beta.1': { version: '2.0.0-beta.1' } + } + } + var versions = Object.keys(metadata.versions) + var selected = pickManifest('*', 'beta', versions, metadata) + t.equal(selected.manifest.version, '2.0.0-beta.0', 'used defaultTag for all-prerelease splat.') + t.equal(selected.resolvedTo, 'beta', 'resolved using tag') + t.end() +}) + +test('no result if metadata has no versions', function (t) { + var selected = pickManifest('^1.0.0', 'latest', [], {'dist-tags': {}, versions: {}}) + t.equal(selected, undefined, 'no versions, no result') + t.end() +}) diff --git a/deps/npm/test/tap/prune.js b/deps/npm/test/tap/prune.js index 23c8548df53..ef69dc88b91 100644 --- a/deps/npm/test/tap/prune.js +++ b/deps/npm/test/tap/prune.js @@ -107,7 +107,7 @@ test('npm prune', function (t) { ], EXEC_OPTS, function (err, code, stderr) { t.ifErr(err, 'prune finished successfully') t.notOk(code, 'exit ok') - t.equal(stderr, 'unbuild mkdirp@0.3.5\n') + t.equal(stderr, '- mkdirp@0.3.5 node_modules/mkdirp\n') t.end() }) }) diff --git a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js index 2598d557862..73eeee81a66 100644 --- a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js +++ b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js @@ -7,7 +7,8 @@ var moduleName = 'xyzzy-wibble' var testModule = { name: moduleName, 'dist-tags': { - latest: '1.3.0-a' + latest: '1.3.0-a', + other: '1.2.0-a' }, versions: { '1.0.0-a': { @@ -69,12 +70,19 @@ test('setup', function (t) { }) test('splat', function (t) { - t.plan(4) + t.plan(8) var addNamed = require('../../lib/cache/add-named.js') addNamed('xyzzy-wibble', '*', testModule, function (err, pkg) { t.error(err, 'Succesfully resolved a splat package') t.is(pkg.name, moduleName) t.is(pkg.version, testModule['dist-tags'].latest) t.is(lastFetched, 'https://registry.npmjs.org/aproba/-/xyzzy-wibble-1.3.0-a.tgz') + npm.config.set('tag', 'other') + addNamed('xyzzy-wibble', '*', testModule, function (err, pkg) { + t.error(err, 'Succesfully resolved a splat package') + t.is(pkg.name, moduleName) + t.is(pkg.version, testModule['dist-tags'].other) + t.is(lastFetched, 'https://registry.npmjs.org/aproba/-/xyzzy-wibble-1.2.0-a.tgz') + }) }) }) |