diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 69cb956a99b3ab..d4cef3e3d15175 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -1,11 +1,16 @@ language: node_js node_js: - - "6" + # LTS is our most important target - "4" + # next LTS and master is next most important + - "6" + # still in LTS maintenance until fall 2016 + # (also still in wide use) + - "0.10" + # will be unsupported as soon as 6 becomes LTS and 7 released - "5" + # technically in LTS / distros, unbeloved - "0.12" - - "0.10" - - "0.8" env: - DEPLOY_VERSION=testing before_install: diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 6eb95dbebdc431..d9db91520b3824 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -402,3 +402,7 @@ Gianluca Casati André Herculano Wyatt Preul Myles Borins +Elliot Lee +Dmitry Kirilyuk +Aaron Tribou +Tapani Moilanen diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 9b5a0323d0c812..acd37a76470e26 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,438 @@ +### v3.10.2 (2016-06-17): + +This is a quick hotfix release with two small bug fixes. First, there was +an issue where the new progress bar would overwrite interactive prompts, +that is, those found in `npm login` and `npm init`. Second, if the +directory you were running `npm outdated` on was a bad link or otherwise had +unrecoverable errors then npm would crash instead of printing the error. + +* [`fbefb86`](https://github.com/npm/npm/commit/fbefb8675b26320b295f481b4872ce99f0180807) + [`7779e9f`](https://github.com/npm/npm/commit/7779e9fb9430f6547532c67f2471864d62bbd5bc) + [#13105](https://github.com/npm/npm/issues/13105) + Disable progress bar in `adduser` and `init`. +* [`6a33b2c`](https://github.com/npm/npm/commit/6a33b2c13f637a41e25cd0339925bc430b50358a) + [#13115](https://github.com/npm/npm/issues/13115) + Ensure that errors reading the package tree for `outdated` does not result + in crashs. + ([@iarna](https://github.com/iarna)) + +### v3.10.1 (2016-06-17): + +There are two very important bug fixes and one long-awaited (and signifcant!) +deprecation in this hotfix release. [Hold on.](http://butt.holdings/) + +#### *WHOA* + +When Node.js 6.0.0 was released, the CLI team noticed an alarming upsurge in +bugs related to important files (like `README.md`) not being included in +published packages. The new bugs looked much like +[#5082](https://github.com/npm/npm/issues/5082), which had been around in one +form or another since April, 2014. #5082 used to be a very rare (and obnoxious) +bug that the CLI team hadn't had much luck reproducing, and we'd basically +marked it down as a race condition that arose on machines using slow and / or +rotating-media-based hard drives. + +Under 6.0.0, the behavior was reliable enough to be nearly deterministic, and +made it very difficult for publishers using `.npmignore` files in combination +with `"files"` stanzas in `package.json` to get their packages onto the +registry without one or more files missing from the packed tarball. The entire +saga is contained within [the issue](https://github.com/npm/npm/issues/5082), +but the summary is that an improvement to the performance of +[`fs.realpath()`](https://nodejs.org/api/fs.html#fs_fs_realpath_path_options_callback) +made it much more likely that the packing code would lose the race. + +Fixing this has proven to be very difficult, in part because the code used by +npm to produce package tarballs is more complicated than, strictly speaking, it +needs to be. [**@evanlucas**](https://github.com/evanlucas) contributed [a +patch](https://github.com/npm/fstream/pull/50) that passed the tests in a +[special test suite](https://github.com/othiym23/eliminate-5082) that I +([**@othiym23**](https://github.com/othiym23)) created (with help from +[**@addaleax**](https://github.com/addaleax)), but only _after_ we'd released +the fixed version of that package did we learn that it actually made the +problem _worse_ in other situations in npm proper. Eventually, +[**@rvagg**](https://github.com/rvagg) put together a more durable fix that +appears to completely address the errant behavior under Node.js 6.0.0. That's +the patch included in this release. Everybody should chip in for redback +insurance for Rod and his family; he's done the community a huge favor. + +Does this mean the long (2+ year) saga of #5082 is now over? At this point, I'm +going to quote from my latest summary on the issue: + +> The CLI team (mostly me, with input from the rest of the team) has decided that +> the overall complexity of the interaction between `fstream`, `fstream-ignore`, +> `fstream-npm`, and `node-tar` has grown more convoluted than the team is +> comfortable (maybe even capable of) supporting. +> +> - While I believe that @rvagg's (very targeted) fix addresses _this_ issue, I +> would be shocked if there aren't other race conditions in npm's packing +> logic. I've already identified a couple other places in the code that are +> most likely race conditions, even if they're harder to trigger than the +> current one. +> - The way that dependency bundling is integrated leads to a situation in +> which a bunch of logic is duplicated between `fstream-npm` and +> `lib/utils/tar.js` in npm itself, and the way `fstream`'s extension +> mechanism works makes this difficult to clean up. This caused a nasty +> regression ([#13088](https://github.com/npm/fstream/pull/50), see below) as +> of ~`npm@3.8.7` where the dependencies of `bundledDependencies` were no +> longer being included in the built package tarballs. +> - The interaction between `.npmignore`, `.gitignore`, and `files` is hopelessly +> complicated, scattered in many places throughout the code. We've been +> discussing [making the ignores and includes logic clearer and more +> predictable](https://github.com/npm/npm/wiki/Files-and-Ignores), and the +> current code fights our efforts to clean that up. +> +> So, our intention is still to replace `fstream`, `fstream-ignore`, and +> `fstream-npm` with something much simpler and purpose-built. There's no real +> reason to have a stream abstraction here when a simple recursive-descent +> filesystem visitor and a synchronous function that can answer whether a given +> path should be included in the packed tarball would do the job adequately. +> +> What's not yet clear is whether we'll need to replace `node-tar` in the +> process. `node-tar` is a very robust implementation of tar (it handles, like, +> everything), and it also includes some very important tweaks to prevent several +> classes of security exploits involving maliciously crafted packages. However, +> its packing API involves passing in an `fstream` instance, so we'd either need +> to produce something that follows enough of `fstream`'s contract for `node-tar` +> to keep working, or swap `node-tar` out for something like `tar-stream` (and +> then ensuring that our use of `tar-stream` is secure, which could involve +> security patches for either npm or `tar-stream`). + +The testing and review of `fstream@1.0.10` that the team has done leads us to +believe that this bug is fixed, but I'm feeling more than a little paranoid +about fstream now, so it's important that people keep a close eye on their +publishes for a while and let us know immediately if they notice any +irregularities. + +* [`8802f6c`](https://github.com/npm/npm/commit/8802f6c152ea35cb9e5269c077c3a2f9df411afc) + [#5082](https://github.com/npm/npm/issues/5082) `fstream@1.0.10`: Ensure that + entries are collected after a paused stream resumes. + ([@rvagg](https://github.com/rvagg)) +* [`c189723`](https://github.com/npm/npm/commit/c189723110497a17dac3b0596f2916deeed93ee7) + [#5082](https://github.com/npm/npm/issues/5082) Remove the warning introduced + in `npm@3.10.0`, because it should no longer be necessary. + ([@othiym23](https://github.com/othiym23)) + +#### *ERK* + +Because the interaction between `fstream`, `fstream-ignore`, `fsream-npm`, and +`node-tar` is so complex, it's proven difficult to add support for npm features +like `bundledDependencies` without duplicating some logic within npm's code +base. While [fixing a completely unrelated +bug](https://github.com/npm/npm/issues/9642), we "cleaned up" some of this +seemingly duplicated code, and in the process removed the code that ensured +that the dependencies of `bundledDependencies` are themselves bundled. We've +brought that code back into the code base (without reopening #9642), and added +a test to ensure that this regression can't recur. + +* [`1b6ceca`](https://github.com/npm/npm/commit/1b6ceca32fc81ca7cc7ac2eb7d11f687e6f87f26) + [#13088](https://github.com/npm/npm/issues/13088) Partially restore npm's own + version of the `fstream-npm` function `applyIgnores` to ensure that the + dependencies of `bundledDependencies` are included in published packages. + ([@iarna](https://github.com/iarna)) + +#### GOODBYE, FAITHFUL FRIEND + +At NodeConf Adventure 2016 (RIP in peace, Mikeal Rogers's NodeConf!), the CLI +team had an opportunity to talk to representatives from some of the larger +companies that we knew were still using Node.js 0.8 in production. After asking +them whether they were still using 0.8, we got back blank stares and questions +like, "0.8? You mean, from four years ago?" After establishing that being able +to run npm in their legacy environments was no longer necessary, the CLI team +made the decision to drop support for 0.8. (Faithful observers of our [team +meetings](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+npm+cli+team+meeting+) +will have known this was the plan for NodeConf since the beginning of 2016.) + +In practice, this means only what's in the commit below: we've removed 0.8 from +our continuous integration test matrix below, and will no longer be habitually +testing changes under Node 0.8. We may also give ourselves permission to use +`setImmediate()` in test code. However, since the project still supports +Node.js 0.10 and 0.12, it's unlikely that patches that rely on ES 2015 +functionality will land anytime soon. + +Looking forward, the team's current plan is to drop support for Node.js 0.10 +when its LTS maintenace window expires in October, 2016, and 0.12 when its +maintenance / LTS window ends at the end of 2016. We will also drop support for +Node.js 5.x when Node.js 6 becomes LTS and Node.js 7 is released, also in the +October-December 2016 timeframe. + +(Confused about Node.js's LTS policy? [Don't +be!](https://github.com/nodejs/LTS) If you look at [this +diagram](https://github.com/nodejs/LTS/blob/ce364a94b0e0619eba570cd57be396573e1ef889/schedule.png), +it should make all of the preceding clear.) + +If, in practice, this doesn't work with distribution packagers or other +community stakeholders responsible for packaging and distributing Node.js and +npm, please reach out to us. Aligning the npm CLI's LTS policy with Node's +helps everybody minimize the amount of work they need to do, and since all of +our teams are small and very busy, this is somewhere between a necessity and +non-negotiable. + +* [`d6afd5f`](https://github.com/npm/npm/commit/d6afd5ffb1b19e5d94aeee666afcb8adaced58db) + Remove 0.8 from the Node.js testing matrix, and reorder to match real-world + priority, with comments. ([@othiym23](https://github.com/othiym23)) + +### v3.10.0 (2016-06-16): + +Do we have a release for you! We have our first new lifecycle since +`version`, a new progress bar and a bunch of bug fixes. +[I'm](https://github.com/iarna) really excited about this release, let me +tell you!! + +#### DANGER: PUBLISHING ON NODE 6.0.0 + +Publishing and packing are buggy under Node versions greater than 6.0.0. +Please use Node.js LTS (4.4.x) to publish packages. See +[#5082](https://github.com/npm/npm/issues/5082) for details and current +status. + +* [`4e52cef`](https://github.com/npm/npm/commit/4e52cef3d4170c8abab98149666ec599f8363233) + [#13077](https://github.com/npm/npm/pull/13077) + Warn when using Node 6+. + ([@othiym23](https://github.com/othiym23)) + +#### NEW LIFECYCLE SCRIPT: `shrinkwrap` + +* [`e8c80f2`](https://github.com/npm/npm/commit/e8c80f20bfd5d1618e85dbab41660d6f3e5ce405) + [#10744](https://github.com/npm/npm/issues/10744) + You can now add `preshrinkwrap`, `shrinkwrap` and `postshrinkwrap` to your `package.json` + scripts section. They are run when you run `npm shrinkwrap` or `npm install --save` with + an `npm-shrinkwrap.json` present in your module directory. + + `preshrinkwrap` is run prior to generating the new `npm-shrinkwrap.json` and the other two + are run after. + ([@SimenB](https://github.com/SimenB)) + +#### NEW PROGRESS BAR + +![Install with new progress bar](http://shared.by.re-becca.org/misc-images/new-gauge-color.gif) + +We have a new progress bar and a bunch of related improvements! + +##### BLOCKING BLOCKING + +**!!WARNING!!** As a part of this change we now explicitly set +`process.stdout` and `process.stderr` to be _blocking_ if they are ttys, +using [set-blocking](https://www.npmjs.com/package/set-blocking). This is +necessary to ensure that we can fully erase the progress bar before we start +writing other things out to the console. + +Prior to Node.js 6.0.0, they were already blocking on Windows, and MacOS. +Meanwhile, on Linux they were always non-blocking but had large (64kb) +buffers, which largely made this a non-issue there. Starting with Node.js +6.0.0 they became non-blocking on MacOS and that caused some unexpected +issues (see [nodejs/node#6456](https://github.com/nodejs/node/issues/6456)). + +If you are a Linux user, it's plausible that this might have a performance +impact if your terminal can't keep up with output rate. If you experience +this, we want to know! Please [file an +issue](https://github.com/npm/npm/issues/new) at our issue tracker. + +##### BETTER LAYOUT + +Let's start by talking about what goes into the new progress bar: + +``` +⸨░░░░░░░░░░⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠹ loadExtraneous: verb afterAdd /Users/rebecca/.npm/null/0.0.0/package/package.json written + ↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ ↑ ‾‾‾‾‾‾‾‾‾↑‾‾‾‾ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + percent complete spinner current thing we're doing most recent log line +``` + +The _spinner_ is intended as an activity indicator–it moves whenever +npm sends something to its logs. It also spins at a constant speed while +waiting on the network. + +The _current thing we're doing_ relates to how we track how much work has +been done. It's the name of the unit of work we most recently started or +completed some of. Sometimes these names are more obvious than others and +that's something we'll look at improving over time. + +And finally, the _most recent log line_ is exactly that, it's the most +recent line that you would have seen if you were running with +`--loglevel=silly` or were watching the `npm-debug.log`. These are written +to be useful to the npm developers above all else, so they may sometimes be +a little cryptic. + +* [`6789978`](https://github.com/npm/npm/commit/6789978ab0713f67928177a9109fed43953ccbda) + [#13075](https://github.com/npm/npm/pull/13075) + `npmlog@3.1.2`: Update to the latest npmlog, which includes the new and + improved progress bar layout. + ([@iarna](https://github.com/iarna)) + +##### MORE PERFORMANT + +The underlying code for the progress bar was rewritten, in part with +performance in mind. Previously whenever you updated the progress bar it +would check an internal variable for how long it had been since the last +update and if it had been long enough, it would print out what you gave it. +With the new progress bar we do updates at a fixed interval (with +`setInterval`) and "updating" the progress bar just updates some variables +that will be used when the next tick of the progress bar happens. Currently +progress bar updates happen every 50ms, although that's open to tuning. + +##### WIDE(R) COMPATIBILITY + +I spent a lot of time working our Unicode support. There were a few issues +that plagued us: + +Previously one of the characters we used was _ambiguous width_ which means +that it was possible to configure your terminal to display it as _full +width_. If you did this, the output would be broken because we assumed it +was a _half width_ character. We no longer use any of these characters. + +Previously, we defaulted to using Unicode on Windows. This isn't a safe +assumption, however, as folks in non-US locales often use other code pages +for their terminals. Windows doesn't provide* any facility available to +Node.js for determining the current code page, so we no longer try to use +Unicode on Windows. + +_\* The facilities it does provide are a command line tool and a windows +system call. The former isn't satisfactory for speed reasons and the latter +can't be accessed from a JS-only Node.js program._ + +##### FOR THE FUTURE: THEMES + +The new version of the progress bar library supports plugable themes. Adding +support to npm shouldn't be too difficult. The built in themes are: + +* `ASCII` – The fallback theme which is always available. +* `colorASCII` – Inverts the color of the completed portion of the progress + bar. The default on Windows and usually on Linux. (Color support is + determined by looking at the `TERM` environment variable.) +* `brailleSpinner` – A braille based spinner and other unicode enhancements. MacOS only. +* `colorBrailleSpinner` – The default on MacOS, a combination of the above two. + +##### LESS GARBLED OUTPUT + +As a part of landing this I've also taken the opportunity to more +systematically disable the progress bar prior to printing to `stdout` or +running external commands (in particular: git). This should ensure that the +progress bar doesn't get left on screen after something else prints +something. We also are now much more zealous about erasing the progress bar +on exit, so if you `Ctrl-C` out of an install we'll still cleanup the +progress bar. + +* [`63f153c`](https://github.com/npm/npm/commit/63f153c743f9354376bfb9dad42bd028a320fd1f) + [#13075](https://github.com/npm/npm/pull/13075) + Consistently make sure that the progress bar is hidden before we try to + write to stdout. + ([@iarna](https://github.com/iarna)) +* [`8da79fa`](https://github.com/npm/npm/commit/8da79fa60de4972dca406887623d4e430d1609a1) + [#13075](https://github.com/npm/npm/pull/13075) + Be more methodical about disabling progress bars before running external + commands. + ([@iarna](https://github.com/iarna)) + +#### REPLACE `process.nextTick` WITH `asap` ASAP + +* [`5873b56`](https://github.com/npm/npm/commit/5873b56cb315437dfe97e747811c0b9c297bfd38) + [`254ad7e`](https://github.com/npm/npm/commit/254ad7e38f978b81046d242297fe8b122bfb5852) + [#12754](https://github.com/npm/npm/issues/12754) + Use `asap` in preference over `process.nextTick` to avoid recursion warnings. + Under the hood `asap` uses `setImmediate` when available and falls back to + `process.nextTick` when it's not. Versions of node that don't support + `setImmediate` have a version of `process.nextTick` that actually behaves + like the current `setImmediate`. + ([@lxe](https://github.com/lxe)) + +#### FIXES AND REFACTORING + +Sometimes the installer would get it into its head that it could move or +remove things that it really shouldn't have. While the reproducers for this were +often a bit complicated (the core reproducer involved five symlinks(!)), it turns +out this is an easy scenario to end up in if your project has a bunch of small +modules and you're linking them while developing them. + +Fixing this ended up involving doing an important and overdue rewrite of how +the installer keeps track of (and interrogates) the relationships between +modules. This likely fixes other related bugs, and in the coming weeks +we'll verify and close them as we find them. There are a whole slew of +commits related to this rewrite, and if you'd like to learn more check +out the PR where I describe what I did in detail: [#12775](https://github.com/npm/npm/pull/12775) + +* [`8f3e111`](https://github.com/npm/npm/commit/8f3e111fdd2ce7824864f77b04e5206bdaf961a1) + [`c0b0ed1`](https://github.com/npm/npm/commit/c0b0ed1e9945c01b2e68bf22af3fe4005aa4bcd4) + [#10800](https://github.com/npm/npm/issues/10800) + Remove install pruning stage–this was obsoleted by making the installer keep + itself up to date as it goes along. This is NOT related to `npm prune`. + ([@iarna](https://github.com/iarna)) + +#### MAKE OUTDATED MORE WIDELY LEGIBLE + +* [`21c60e9`](https://github.com/npm/npm/commit/21c60e9bb56d47da17b79681f2142b3dcf4c804b) + [#12843](https://github.com/npm/npm/pull/12843) + In `npm outdated, stop coloring the _Location_ and _Package Type_ columns. + Previously they were colored dark gray, which was hard to read for some + users. + ([@tribou](https://github.com/tribou)) + +#### DOCUMENTATION UPDATE + +* [`eb0a72e`](https://github.com/npm/npm/commit/eb0a72eb95862c1d0d41a259d138ab601d538793) + [#12983](https://github.com/npm/npm/pull/12983) + Describe how to run the lifecycle scripts of dependencies. How you do + this changed with `npm` v2. + ([@Tapppi](https://github.com/Tapppi)) + +### DEPENDENCY UPDATES + +* [`da743dc`](https://github.com/npm/npm/commit/da743dc2153fed8baca3dada611b188f53ab5931) + `which@1.2.10`: + Fix bug where unnecessary special case path handling for Windows could + produce unexpected results on Unix systems. + ([@isaacs](https://github.com/isaacs)) +* [`4533bd5`](https://github.com/npm/npm/commit/4533bd501d54aeedfec3884f4fd54e8c2edd6020) + `npm-user-validate@0.1.4`: + Validate the length of usernames. + ([@aredridel](https://github.com/aredridel)) +* [`4a18922`](https://github.com/npm/npm/commit/4a18922e56f9dc902fbb4daa8f5fafa4a1b89376) + `glob@7.0.4`: + Fixes issues with Node 6 and "long or excessively symlink-looping paths". + ([@isaacs](https://github.com/isaacs)) +* [`257fe11`](https://github.com/npm/npm/commit/257fe11052987e5cfec2abdf52392dd95a6c6ef3) + `npm-package-arg@4.2.0`: + Add `escapedName` to the result. It is suitable for passing through to a + registry without further processing. + ([@nexdrew](https://github.com/nexdrew)) +* [`dda3ca7`](https://github.com/npm/npm/commit/dda3ca70f74879106589ef29e167c8b91ef5aa4c) + `wrappy@1.0.2` + ([@zkat](https://github.com/zkat)) +* [`25f1db5`](https://github.com/npm/npm/commit/25f1db504d0fd8c97211835f0027027fe95e0ef3) + `readable-stream@2.1.4` + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`9d64fe6`](https://github.com/npm/npm/commit/9d64fe676ebc6949c687ffb85bd93eca3137fc0d) + `abbrev@1.0.9` + ([@isaacs](https://github.com/isaacs)) + +### v3.9.6 (2016-06-02): + +#### SMALL OUTPUT TWEAK + +* [`0bdc9d1`](https://github.com/npm/npm/commit/0bdc9d13b73df07e63a58470ea001fda490e5869) + [#12879](https://github.com/npm/npm/pull/12879) + The usage output for npm commands was somehow under the impression that + the singular form of `aliases` is `aliase`. This has been corrected to show + `alias` instead. + ([@intelliot](https://github.com/intelliot)) + +#### DOC UPDATES + +* [`f771b49`](https://github.com/npm/npm/commit/f771b49f5d65bbef540c231fbfcca71cacdce4db) + [#12933](https://github.com/npm/npm/pull/12933) + Add `config.gypi` to list of files that are always ignored in the + `package.json` manpage. + ([@Jokero](https://github.com/Jokero)) + +#### DEPENDENCY UPDATES + +* [`61c1d9c`](https://github.com/npm/npm/commit/61c1d9cd4b2296bd41d55a5c58e35ca5f028b9bc) + [#12926](https://github.com/npm/npm/pull/12926) + Removed unused dependency `lodash.isarray`. + ([@mmalecki](https://github.com/mmalecki)) +* [`168ed28`](https://github.com/npm/npm/commit/168ed2834b2c6db8bb39f81baadc0bf275807328) + [#12926](https://github.com/npm/npm/pull/12926) + Removed unused dependency `lodash.keys`. + ([@mmalecki](https://github.com/mmalecki)) + ### v3.9.5 (2016-05-27): Just a quick point release. We had an issue where I (Kat) included the diff --git a/deps/npm/appveyor.yml b/deps/npm/appveyor.yml index 47d806df34c041..6bec7c49389b91 100644 --- a/deps/npm/appveyor.yml +++ b/deps/npm/appveyor.yml @@ -2,13 +2,15 @@ environment: matrix: # LTS is our most important target - nodejs_version: "4" - # latest - - nodejs_version: "5" - # I like 0.10 better than 0.12 + # next LTS and master is next most important + - nodejs_version: "6" + # still in LTS maintenance until fall 2016 + # (also still in wide use) - nodejs_version: "0.10" + # will be unsupported as soon as 6 becomes LTS and 7 released + - nodejs_version: "5" + # technically in LTS / distros, unbeloved - nodejs_version: "0.12" - # EOL summer 2016, most likely - - nodejs_version: "0.8" COVERALLS_REPO_TOKEN: secure: XdC0aySefK0HLh1GNk6aKrzZPbCfPQLyA4mYtFGEp4DrTuZA/iuCUS0LDqFYO8JQ platform: diff --git a/deps/npm/doc/cli/npm-shrinkwrap.md b/deps/npm/doc/cli/npm-shrinkwrap.md index c79418a2484b0a..6fc7d96f7c2253 100644 --- a/deps/npm/doc/cli/npm-shrinkwrap.md +++ b/deps/npm/doc/cli/npm-shrinkwrap.md @@ -109,6 +109,14 @@ resolution using "version" if one isn't. 2. The tree is walked and any missing dependencies are installed in the usual fashion. +If `preshrinkwrap`, `shrinkwrap` or `postshrinkwrap` are in the `scripts` property of the +`package.json`, they will be executed by running `npm shrinkwrap`. +`preshrinkwrap` and `shrinkwrap` are executed before the shrinkwrap, `postshrinkwrap` is +executed afterwards. For example to run some postprocessing on the generated file: + + "scripts": { "postshrinkwrap": "node fix-shrinkwrap.js" } + + ### Using shrinkwrapped packages Using a shrinkwrapped package is no different than using any other @@ -174,5 +182,7 @@ contents rather than versions. ## SEE ALSO * npm-install(1) +* npm-run-script(1) +* npm-scripts(7) * package.json(5) * npm-ls(1) diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index a52f9f011d27b4..98b77af3e534d4 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -202,6 +202,7 @@ Conversely, some files are always ignored: * `npm-debug.log` * `.npmrc` * `node_modules` +* `config.gypi` ## main diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index ac372bd7a19b13..764555ea4a060a 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -676,7 +676,7 @@ Set to true to run in "production" mode. ### progress -* Default: true +* Default: true, unless TRAVIS or CI env vars set. * Type: Boolean When set to `true`, npm will display a progress bar during time intensive diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md index 972ba90bc5934b..9ec75cc5ddf3dd 100644 --- a/deps/npm/doc/misc/npm-scripts.md +++ b/deps/npm/doc/misc/npm-scripts.md @@ -32,11 +32,14 @@ following scripts: * prerestart, restart, postrestart: Run by the `npm restart` command. Note: `npm restart` will run the stop and start scripts if no `restart` script is provided. +* preshrinkwrap, shrinkwrap, postshrinkwrap: + Run by the `npm shrinkwrap` command. Additionally, arbitrary scripts can be executed by running `npm run-script `. *Pre* and *post* commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, -`postmyscript`). +`postmyscript`). Scripts from dependencies can be run with `npm explore + -- npm run `. ## COMMON USES diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index cb2ac114941266..0f16fab2af37a1 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -126,5 +126,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index b6c21bf5d6e532..0debf3b9928d23 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -84,5 +84,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 2ccc693d0fdc01..c41524b364388b 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -72,5 +72,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 7d68f93fb4b91d..f801ad7387346f 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 19df5f7696d9bd..e3dc1563e2af6e 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -55,5 +55,5 @@

SEE ALSO

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

DESCRIPTION

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index c1c4f21cfaad1b..0e042db0787071 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index c6113347df0833..1d3569b74643a8 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index e24db0e6223e5c..0cc281c8812456 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -43,5 +43,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 17dfb2b07d67cc..e22c2a9444a142 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -67,5 +67,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index e138ec02e86f68..926e1d4e7b2e16 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -61,5 +61,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 56fbb309b849df..889790d6bac8e0 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 5d6420a4b9cb8a..8e03eb8703cf37 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -87,5 +87,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 12827e099d5af1..0767917e340ab5 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index e5dd49714112a2..68cd7980f45aaf 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index e1dc8657aabbcf..0a6d369dc03896 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 50be2a7fbc8c15..d9164af34e5872 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 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 230dd39a81d5f8..cee5f8ee34fb2b 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -50,5 +50,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 9f0299102e4bdb..9c6c6badf5fc3d 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index 9dfe6e6258d940..a6b121c34a9bf8 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -42,4 +42,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 57215505751fd9..fbe8122a95ffba 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -312,5 +312,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 77796a29a86749..3cc4e35cdc99eb 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -73,5 +73,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 1c9b74872b6985..5ed95cb60f1677 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -51,5 +51,5 @@

scope

       - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 5f17c5a7f6da2b..10c44695a02a3d 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@

SYNOPSIS

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

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

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

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 43339f7f868bd5..e4a81dd81bd9f0 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -116,5 +116,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 34ec3a1cb86137..e7c04621736fa9 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -51,5 +51,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index dd4a09d0411d43..7a93a8283aafa3 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 404a83c6a3b40f..b468d3619e0c7b 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 243562b5bbc4c1..544b44d6f771e8 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 3c97535fd99f23..c281a805abe597 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 018380e14a1471..007dfa4698d92a 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -72,5 +72,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index c5bcdab1e463a3..3241ca34fe1207 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@

SEE ALSO

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index ab3a817e834fe1..9e17915eda67c2 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index ab40e4b34447e7..013cec17ce358f 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 1b9c103991ce5d..ecbb3040678c63 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -63,5 +63,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 2c300fe206e6fd..d84a0ff431c6f4 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -57,5 +57,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index eb1b1f276b1e42..d4391cd15c1b5c 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -99,7 +99,12 @@

SYNOPSIS

  • The tree is walked and any missing dependencies are installed in the usual fashion.

  • -

    Using shrinkwrapped packages

    +

    If preshrinkwrap, shrinkwrap or postshrinkwrap are in the scripts property of the +package.json, they will be executed by running npm shrinkwrap. +preshrinkwrap and shrinkwrap are executed before the shrinkwrap, postshrinkwrap is +executed afterwards. For example to run some postprocessing on the generated file:

    +
    "scripts": { "postshrinkwrap": "node fix-shrinkwrap.js" }
    +

    Using shrinkwrapped packages

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

    @@ -154,6 +159,8 @@

    Caveats

    SEE ALSO

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index f4cde5652a53d9..74c2e882054d9c 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 9d79cb387d5995..7121bad5119a82 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 1d8291d76450cf..46de6575e6b3e2 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 8792d034aec471..e14304a22374f2 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 5a7281f9968076..9a5772a2dc1f4e 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -63,5 +63,5 @@

    SEE ALSO

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 4398089f5029ad..b8d2beae435009 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 7dca76e4a9e440..2713376a391060 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -60,5 +60,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 4b7dfaf77f1e6b..8620d764a8d663 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 22aba1cc031415..f05a80ea689e97 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -118,5 +118,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 7c991ff32838d0..5f19fc6cc1676d 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -100,5 +100,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 06e3712262e9a3..e38a5a035a4e3f 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -86,5 +86,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 0ed957e1c48401..f43e02b73a816c 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index e02ea4494f8498..6d1c03ade0032a 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    3.9.5

    +

    3.10.2

    DESCRIPTION

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

    AUTHOR

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

    +i@izs.me

    SEE ALSO

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

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index a01276b2b5837e..bc32dd83b9cd53 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -182,5 +182,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index a01276b2b5837e..bc32dd83b9cd53 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -182,5 +182,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index b656d2874766cb..0887aac37b2e48 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -160,6 +160,7 @@

      files

    • npm-debug.log
    • .npmrc
    • node_modules
    • +
    • config.gypi

    main

    The main field is a module ID that is the primary entry point to your program. @@ -580,5 +581,5 @@

    SEE ALSO

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index b656d2874766cb..0887aac37b2e48 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -160,6 +160,7 @@

    files

  • npm-debug.log
  • .npmrc
  • node_modules
  • +
  • config.gypi
  • main

    The main field is a module ID that is the primary entry point to your program. @@ -580,5 +581,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 5cfb9fae3e3d5e..b5198f391216b1 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -162,5 +162,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index e1a5ec57ba4b22..b52a3baa131a19 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 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 0dce28b7165d19..a5467c6da18cee 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -582,7 +582,7 @@

    production

    progress

      -
    • Default: true
    • +
    • Default: true, unless TRAVIS or CI env vars set.
    • Type: Boolean

    When set to true, npm will display a progress bar during time intensive @@ -862,5 +862,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 72fa5d16effcb2..d8cabdd0f83055 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -194,5 +194,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index fcb0b42b6a398a..31d5135f743a48 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

    npm-disputes

    Handling Module

    SYNOPSIS

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

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

    @@ -51,12 +51,12 @@

    DESCRIPTION

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 80873484ec924e..8d68c0d87d438b 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -162,4 +162,4 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index 7dd6a9f50e1fe0..bb62910254b563 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@

    Team Admins create teams

           - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index b29efa7b9eec1c..aee0046daf4d07 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index bfe08b7b371ee1..1c5a9704d6527f 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 55381c51998c60..2e570341bfc719 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -40,11 +40,14 @@

    DESCRIPTION

  • prerestart, restart, postrestart: Run by the npm restart command. Note: npm restart will run the stop and start scripts if no restart script is provided.
  • +
  • preshrinkwrap, shrinkwrap, postshrinkwrap: +Run by the npm shrinkwrap command.
  • Additionally, arbitrary scripts can be executed by running npm run-script <stage>. Pre and post commands with matching names will be run for those as well (e.g. premyscript, myscript, -postmyscript).

    +postmyscript). Scripts from dependencies can be run with `npm explore

    +

    -- npm run `.

    COMMON USES

    If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the @@ -208,5 +211,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 939c95aca44340..0368e2feb8386e 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 0f7dc970e9f92d..5bace16da93d62 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -302,5 +302,5 @@

    Ranges

           - + diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js index 69527c2aa4b347..ad7a1f54bd34a1 100644 --- a/deps/npm/lib/access.js +++ b/deps/npm/lib/access.js @@ -5,6 +5,7 @@ var resolve = require('path').resolve var readPackageJson = require('read-package-json') var mapToRegistry = require('./utils/map-to-registry.js') var npm = require('./npm.js') +var output = require('./utils/output.js') var whoami = require('./whoami') @@ -62,7 +63,9 @@ function access (args, cb) { params.auth = auth try { return npm.registry.access(cmd, uri, params, function (err, data) { - !err && data && console.log(JSON.stringify(data, undefined, 2)) + if (!err && data) { + output(JSON.stringify(data, undefined, 2)) + } cb(err, data) }) } catch (e) { diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index 3a7425d471b2be..e04af0556b8ce9 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -4,7 +4,9 @@ var log = require('npmlog') var npm = require('./npm.js') var read = require('read') var userValidate = require('npm-user-validate') +var output = require('./utils/output') var usage = require('./utils/usage') +var chain = require('slide').chain var crypto try { @@ -30,15 +32,14 @@ function adduser (args, cb) { e: creds.email || '' } var u = {} - var fns = [readUsername, readPassword, readEmail, save] - loop() - function loop (er) { - if (er) return cb(er) - var fn = fns.shift() - if (fn) return fn(c, u, loop) - cb() - } + log.disableProgress() + chain([ + [readUsername, c, u], + [readPassword, c, u], + [readEmail, c, u], + [save, c, u] + ], cb) } function readUsername (c, u, cb) { @@ -173,7 +174,7 @@ function save (c, u, cb) { log.info('adduser', 'Authorized user %s', u.u) var scopeMessage = scope ? ' to scope ' + scope : '' - console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + output('Logged in as %s%s on %s.', u.u, scopeMessage, uri) npm.config.save('user', cb) }) } diff --git a/deps/npm/lib/bin.js b/deps/npm/lib/bin.js index 2e02617d35a790..7258893b9c3918 100644 --- a/deps/npm/lib/bin.js +++ b/deps/npm/lib/bin.js @@ -2,6 +2,7 @@ module.exports = bin var npm = require('./npm.js') var osenv = require('osenv') +var output = require('./utils/output.js') bin.usage = 'npm bin [--global]' @@ -13,7 +14,7 @@ function bin (args, silent, cb) { var b = npm.bin var PATH = osenv.path() - if (!silent) console.log(b) + if (!silent) output(b) process.nextTick(cb.bind(this, null, b)) if (npm.config.get('global') && PATH.indexOf(b) === -1) { diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js index e9da59a23dc5a3..fbe78c746d0978 100644 --- a/deps/npm/lib/build.js +++ b/deps/npm/lib/build.js @@ -22,6 +22,7 @@ var asyncMap = require('slide').asyncMap var ini = require('ini') var writeFile = require('write-file-atomic') var packageId = require('./utils/package-id.js') +var output = require('./utils/output.js') module.exports = build build.usage = 'npm build []' @@ -211,9 +212,7 @@ function linkBins (pkg, folder, parent, gtop, cb) { var out = npm.config.get('parseable') ? dest + '::' + src + ':BINFILE' : dest + ' -> ' + src - log.clearProgress() - console.log(out) - log.showProgress() + output(out) cb() }) } diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 757ba6e79df709..5ad07dfdcdbebe 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -82,6 +82,7 @@ var npa = require('npm-package-arg') var getStat = require('./cache/get-stat.js') var cachedPackageRoot = require('./cache/cached-package-root.js') var mapToRegistry = require('./utils/map-to-registry.js') +var output = require('./utils/output.js') cache.usage = 'npm cache add ' + '\nnpm cache add ' + @@ -182,7 +183,7 @@ function ls (args, cb) { prefix = '~' + prefix.substr(process.env.HOME.length) } ls_(normalize(args), npm.config.get('depth'), function (er, files) { - console.log(files.map(function (f) { + output(files.map(function (f) { return path.join(prefix, f) }).join('\n').trim()) cb(er, files) diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js index 6f6cfd810b246c..3157255bfb625b 100644 --- a/deps/npm/lib/completion.js +++ b/deps/npm/lib/completion.js @@ -14,6 +14,7 @@ var shorthandNames = Object.keys(shorthands) var allConfs = configNames.concat(shorthandNames) var once = require('once') var isWindowsShell = require('./utils/is-windows-shell.js') +var output = require('./utils/output.js') completion.completion = function (opts, cb) { if (opts.w > 3) return cb() @@ -203,7 +204,7 @@ function wrapCb (cb, opts) { console.error([er && er.stack, compls, opts.partialWord]) if (er || compls.length === 0) return cb(er) - console.log(compls.join('\n')) + output(compls.join('\n')) cb() } } diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index 80958ec5fc2799..7112e88c5f7d6e 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -11,6 +11,7 @@ var editor = require('editor') var os = require('os') var umask = require('./utils/umask') var usage = require('./utils/usage') +var output = require('./utils/output') config.usage = usage( 'config', @@ -148,7 +149,7 @@ function get (key, cb) { } var val = npm.config.get(key) if (key.match(/umask/)) val = umask.toString(val) - console.log(val) + output(val) cb() } @@ -278,7 +279,7 @@ function list (cb) { '; HOME = ' + process.env.HOME + '\n' + '; "npm config ls -l" to show all defaults.\n' - console.log(msg) + output(msg) return cb() } @@ -294,7 +295,7 @@ function list (cb) { }) msg += '\n' - console.log(msg) + output(msg) return cb() } diff --git a/deps/npm/lib/dist-tag.js b/deps/npm/lib/dist-tag.js index 0e9d914d398823..7c20ea99015304 100644 --- a/deps/npm/lib/dist-tag.js +++ b/deps/npm/lib/dist-tag.js @@ -8,6 +8,7 @@ var npm = require('./npm.js') var mapToRegistry = require('./utils/map-to-registry.js') var readLocalPkg = require('./utils/read-local-package.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') distTag.usage = usage( 'dist-tag', @@ -77,7 +78,7 @@ function add (spec, tag, cb) { npm.registry.distTags.add(base, params, function (er) { if (er) return cb(er) - console.log('+' + t + ': ' + pkg + '@' + version) + output('+' + t + ': ' + pkg + '@' + version) cb() }) }) @@ -108,7 +109,7 @@ function remove (tag, pkg, cb) { npm.registry.distTags.rm(base, params, function (er) { if (er) return cb(er) - console.log('-' + tag + ': ' + pkg + '@' + version) + output('-' + tag + ': ' + pkg + '@' + version) cb() }) }) @@ -132,7 +133,7 @@ function list (pkg, cb) { var msg = Object.keys(tags).map(function (k) { return k + ': ' + tags[k] }).sort().join('\n') - console.log(msg) + output(msg) cb(er, tags) }) } diff --git a/deps/npm/lib/explore.js b/deps/npm/lib/explore.js index 05b5220d5f14eb..5640d5f1577612 100644 --- a/deps/npm/lib/explore.js +++ b/deps/npm/lib/explore.js @@ -12,6 +12,7 @@ var fs = require('graceful-fs') var isWindowsShell = require('./utils/is-windows-shell.js') var escapeExecPath = require('./utils/escape-exec-path.js') var escapeArg = require('./utils/escape-arg.js') +var output = require('./utils/output.js') function explore (args, cb) { if (args.length < 1 || !args[0]) return cb(explore.usage) @@ -42,7 +43,7 @@ function explore (args, cb) { } if (!shellArgs.length) { - console.log( + output( '\nExploring ' + cwd + '\n' + "Type 'exit' or ^D when finished\n" ) diff --git a/deps/npm/lib/help-search.js b/deps/npm/lib/help-search.js index 8a138feebed420..ffbe554b7bc064 100644 --- a/deps/npm/lib/help-search.js +++ b/deps/npm/lib/help-search.js @@ -7,6 +7,7 @@ var asyncMap = require('slide').asyncMap var npm = require('./npm.js') var glob = require('glob') var color = require('ansicolors') +var output = require('./utils/output.js') helpSearch.usage = 'npm help-search ' @@ -135,7 +136,7 @@ function searchFiles (args, files, cb) { } if (results.length === 0) { - console.log('No results for ' + args.map(JSON.stringify).join(' ')) + output('No results for ' + args.map(JSON.stringify).join(' ')) return cb() } @@ -206,6 +207,6 @@ function formatResults (args, results, cb) { '(run with -l or --long to see more context)' } - console.log(out.trim()) + output(out.trim()) cb(null, results) } diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js index cecc6e02b086ea..cfac917999ece8 100644 --- a/deps/npm/lib/help.js +++ b/deps/npm/lib/help.js @@ -15,6 +15,7 @@ var glob = require('glob') var cmdList = require('./config/cmd-list').cmdList var shorthands = require('./config/cmd-list').shorthands var commands = cmdList.concat(Object.keys(shorthands)) +var output = require('./utils/output.js') function help (args, cb) { var argv = npm.config.get('argv').cooked @@ -43,7 +44,7 @@ function help (args, cb) { npm.commands[section].usage) { npm.config.set('loglevel', 'silent') log.level = 'silent' - console.log(npm.commands[section].usage) + output(npm.commands[section].usage) return cb() } @@ -161,7 +162,7 @@ function htmlMan (man) { function npmUsage (valid, cb) { npm.config.set('loglevel', 'silent') log.level = 'silent' - console.log([ + output([ '\nUsage: npm ', '', 'where is one of:', diff --git a/deps/npm/lib/init.js b/deps/npm/lib/init.js index e3eb3d40dd5618..a5d102c1f314f7 100644 --- a/deps/npm/lib/init.js +++ b/deps/npm/lib/init.js @@ -5,15 +5,17 @@ module.exports = init var log = require('npmlog') var npm = require('./npm.js') var initJson = require('init-package-json') +var output = require('./utils/output.js') init.usage = 'npm init [--force|-f|--yes|-y]' function init (args, cb) { var dir = process.cwd() log.pause() + log.disableProgress() var initFile = npm.config.get('init-module') if (!initJson.yes(npm.config)) { - console.log([ + output([ 'This utility will walk you through creating a package.json file.', 'It only covers the most common items, and tries to guess sensible defaults.', '', diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 53153e14634e98..1fb5a4f4e6d0ab 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -113,6 +113,7 @@ var lock = locker.lock var unlock = locker.unlock var ls = require('./ls.js') var parseJSON = require('./utils/parse-json.js') +var output = require('./utils/output.js') // install specific libraries var copyTree = require('./install/copy-tree.js') @@ -123,7 +124,6 @@ var loadDevDeps = require('./install/deps.js').loadDevDeps var getAllMetadata = require('./install/deps.js').getAllMetadata var loadRequestedDeps = require('./install/deps.js').loadRequestedDeps var loadExtraneous = require('./install/deps.js').loadExtraneous -var pruneTree = require('./install/prune-tree.js') var diffTrees = require('./install/diff-trees.js') var checkPermissions = require('./install/check-permissions.js') var decomposeActions = require('./install/decompose-actions.js') @@ -136,9 +136,11 @@ var doSerialActions = require('./install/actions.js').doSerial var doReverseSerialActions = require('./install/actions.js').doReverseSerial var doParallelActions = require('./install/actions.js').doParallel var doOneAction = require('./install/actions.js').doOne +var removeObsoleteDep = require('./install/deps.js').removeObsoleteDep var packageId = require('./utils/package-id.js') var moduleName = require('./utils/module-name.js') var errorMessage = require('./utils/error-message.js') +var andIgnoreErrors = require('./install/and-ignore-errors.js') function unlockCB (lockPath, name, cb) { validate('SSF', arguments) @@ -363,9 +365,8 @@ Installer.prototype.loadIdealTree = function (cb) { [this, this.loadAllDepsIntoIdealTree], [this, this.finishTracker, 'loadAllDepsIntoIdealTree'], - [this, function (next) { recalculateMetadata(this.idealTree, log, next) }], - [this, this.debugTree, 'idealTree:prePrune', 'idealTree'], - [this, function (next) { next(pruneTree(this.idealTree)) }] + // TODO: Remove this (should no longer be necessary, instead counter productive) + [this, function (next) { recalculateMetadata(this.idealTree, log, next) }] ], cb) } @@ -419,21 +420,18 @@ Installer.prototype.computeLinked = function (cb) { var cmd = action[0] var pkg = action[1] if (cmd !== 'add' && cmd !== 'update') return next() - var isReqByTop = pkg.package._requiredBy.filter(function (name) { return name === '/' }).length - var isReqByUser = pkg.package._requiredBy.filter(function (name) { return name === '#USER' }).length - var isExtraneous = pkg.package._requiredBy.length === 0 + var isReqByTop = pkg.requiredBy.filter(function (mod) { return mod.isTop }).length + var isReqByUser = pkg.userRequired + var isExtraneous = pkg.requiredBy.length === 0 if (!isReqByTop && !isReqByUser && !isExtraneous) return next() isLinkable(pkg, function (install, link) { if (install) linkTodoList.push(['global-install', pkg]) if (link) linkTodoList.push(['global-link', pkg]) - if (install || link) { - pkg.parent.children = pkg.parent.children.filter(function (child) { return child !== pkg }) - } + if (install || link) removeObsoleteDep(pkg) next() }) }, function () { if (linkTodoList.length === 0) return cb() - pruneTree(self.idealTree) self.differences.length = 0 Array.prototype.push.apply(self.differences, linkTodoList) diffTrees(self.currentTree, self.idealTree, self.differences, log.newGroup('d2'), cb) @@ -633,8 +631,8 @@ Installer.prototype.normalizeTree = function (log, cb) { log.silly('install', 'normalizeTree') recalculateMetadata(this.currentTree, log, iferr(cb, function (tree) { tree.children.forEach(function (child) { - if (child.package._requiredBy.length === 0) { - child.package._requiredBy.push('#EXISTING') + if (child.requiredBy.length === 0) { + child.existing = true } }) cb(null, tree) @@ -655,17 +653,16 @@ Installer.prototype.printInstalled = function (cb) { validate('F', arguments) log.silly('install', 'printInstalled') var self = this - log.clearProgress() this.differences.forEach(function (action) { var mutation = action[0] var child = action[1] var name = packageId(child) var where = path.relative(self.where, child.path) if (mutation === 'remove') { - console.log('- ' + name + ' ' + where) + output('- ' + name + ' ' + where) } else if (mutation === 'move') { var oldWhere = path.relative(self.where, child.fromPath) - console.log(name + ' ' + oldWhere + ' -> ' + where) + output(name + ' ' + oldWhere + ' -> ' + where) } }) var addedOrMoved = this.differences.filter(function (action) { @@ -676,10 +673,9 @@ Installer.prototype.printInstalled = function (cb) { var child = action[1] return child.path }) - log.showProgress() if (!addedOrMoved.length) return cb() + // TODO: remove the recalculateMetadata, should not be needed recalculateMetadata(this.idealTree, log, iferr(cb, function (tree) { - log.clearProgress() // These options control both how installs happen AND how `ls` shows output. // Something like `npm install --production` only installs production deps. // By contrast `npm install --production foo` installs `foo` and the @@ -691,10 +687,7 @@ Installer.prototype.printInstalled = function (cb) { npm.config.set('dev', false) npm.config.set('only', '') npm.config.set('also', '') - ls.fromTree(self.where, tree, addedOrMoved, false, function () { - log.showProgress() - cb() - }) + ls.fromTree(self.where, tree, addedOrMoved, false, andIgnoreErrors(cb)) })) } diff --git a/deps/npm/lib/install/actions.js b/deps/npm/lib/install/actions.js index 5d162f86d0a511..1c7462030c2a5a 100644 --- a/deps/npm/lib/install/actions.js +++ b/deps/npm/lib/install/actions.js @@ -63,7 +63,7 @@ function andHandleOptionalDepErrors (pkg, next) { return function (er) { if (!er) return next.apply(null, arguments) markAsFailed(pkg) - var anyFatal = pkg.userRequired || !pkg.parent + var anyFatal = pkg.userRequired || pkg.isTop for (var ii = 0; ii < pkg.requiredBy.length; ++ii) { var parent = pkg.requiredBy[ii] var isFatal = failedDependency(parent, pkg) diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js index edc317f846de87..886e8419135767 100644 --- a/deps/npm/lib/install/deps.js +++ b/deps/npm/lib/install/deps.js @@ -10,6 +10,7 @@ var iferr = require('iferr') var npa = require('npm-package-arg') var validate = require('aproba') var realizePackageSpecifier = require('realize-package-specifier') +var asap = require('asap') var dezalgo = require('dezalgo') var fetchPackageMetadata = require('../fetch-package-metadata.js') var andAddParentToErrors = require('./and-add-parent-to-errors.js') @@ -78,15 +79,17 @@ function doesChildVersionMatch (child, requested, requestor) { return semver.satisfies(child.package.version, requested.spec) } +// TODO: Rename to maybe computeMetadata or computeRelationships exports.recalculateMetadata = function (tree, log, next) { recalculateMetadata(tree, log, {}, next) } +exports._childDependencySpecifier = childDependencySpecifier function childDependencySpecifier (tree, name, spec, cb) { if (!tree.resolved) tree.resolved = {} if (!tree.resolved[name]) tree.resolved[name] = {} if (tree.resolved[name][spec]) { - return process.nextTick(function () { + return asap(function () { cb(null, tree.resolved[name][spec]) }) } @@ -101,19 +104,24 @@ function recalculateMetadata (tree, log, seen, next) { validate('OOOF', arguments) if (seen[tree.path]) return next() seen[tree.path] = true - if (tree.parent == null) resetMetadata(tree) - function markDeps (spec, done) { - validate('SF', arguments) - var matched = spec.match(/^(@?[^@]+)@(.*)$/) - childDependencySpecifier(tree, matched[1], matched[2], function (er, req) { + if (tree.parent == null) { + resetMetadata(tree) + tree.isTop = true + } + + function markDeps (toMark, done) { + var name = toMark.name + var spec = toMark.spec + var kind = toMark.kind + childDependencySpecifier(tree, name, spec, function (er, req) { if (er || !req.name) return done() var child = findRequirement(tree, req.name, req) if (child) { resolveWithExistingModule(child, tree, log, andIgnoreErrors(done)) - } else if (tree.package.dependencies[req.name] != null) { + } else if (kind === 'dep') { tree.missingDeps[req.name] = req.rawSpec done() - } else if (tree.package.devDependencies[req.name] != null) { + } else if (kind === 'dev') { tree.missingDevDeps[req.name] = req.rawSpec done() } else { @@ -121,15 +129,16 @@ function recalculateMetadata (tree, log, seen, next) { } }) } - function specs (deps) { - return Object.keys(deps).map(function (depname) { return depname + '@' + deps[depname] }) + + function makeMarkable (deps, kind) { + if (!deps) return [] + return Object.keys(deps).map(function (depname) { return { name: depname, spec: deps[depname], kind: kind } }) } // Ensure dependencies and dev dependencies are marked as required - var tomark = specs(tree.package.dependencies) - if (!tree.parent && (npm.config.get('dev') || !npm.config.get('production'))) { - tomark = union(tomark, specs(tree.package.devDependencies)) - } + var tomark = makeMarkable(tree.package.dependencies, 'dep') + if (tree.isTop) tomark = union(tomark, makeMarkable(tree.package.devDependencies, 'dev')) + // Ensure any children ONLY from a shrinkwrap are also included var childrenOnlyInShrinkwrap = tree.children.filter(function (child) { return child.fromShrinkwrap && @@ -137,7 +146,13 @@ function recalculateMetadata (tree, log, seen, next) { !tree.package.devDependencies[child.package.name] }) var tomarkOnlyInShrinkwrap = childrenOnlyInShrinkwrap.map(function (child) { - return child.package._spec + var name = child.package.name + var matched = child.package._spec.match(/^@?[^@]+@(.*)$/) + var spec = matched ? matched[1] : child.package._spec + var kind = tree.package.dependencies[name] ? 'dep' + : tree.package.devDependencies[name] ? 'dev' + : 'dep' + return { name: name, spec: spec, kind: kind } }) tomark = union(tomark, tomarkOnlyInShrinkwrap) @@ -148,9 +163,7 @@ function recalculateMetadata (tree, log, seen, next) { [asyncMap, tomark, markDeps], [asyncMap, tree.children, function (child, done) { recalculateMetadata(child, log, seen, done) }] ], function () { - tree.userRequired = tree.package._requiredBy.some(function (req) { return req === '#USER' }) - tree.existing = tree.package._requiredBy.some(function (req) { return req === '#EXISTING' }) - tree.package._location = flatNameFromTree(tree) + tree.location = flatNameFromTree(tree) next(null, tree) }) } @@ -158,18 +171,23 @@ function recalculateMetadata (tree, log, seen, next) { function addRequiredDep (tree, child, cb) { isDep(tree, child, function (childIsDep, childIsProdDep, childIsDevDep) { if (!childIsDep) return cb(false) - var name = childIsProdDep ? flatNameFromTree(tree) : '#DEV:' + flatNameFromTree(tree) - replaceModuleName(child.package, '_requiredBy', name) - replaceModule(child, 'requiredBy', tree) - replaceModule(tree, 'requires', child) + replaceModuleByPath(child, 'requiredBy', tree) + replaceModuleByName(tree, 'requires', child) + if (childIsProdDep && tree.missingDeps) delete tree.missingDeps[moduleName(child)] + if (childIsDevDep && tree.missingDevDeps) delete tree.missingDevDeps[moduleName(child)] cb(true) }) } -exports._removeObsoleteDep = removeObsoleteDep +exports.removeObsoleteDep = removeObsoleteDep function removeObsoleteDep (child) { if (child.removed) return child.removed = true + // remove from physical tree + if (child.parent) { + child.parent.children = child.parent.children.filter(function (pchild) { return pchild !== child }) + } + // remove from logical tree var requires = child.requires || [] requires.forEach(function (requirement) { requirement.requiredBy = requirement.requiredBy.filter(function (reqBy) { return reqBy !== child }) @@ -243,9 +261,7 @@ exports.loadRequestedDeps = function (args, tree, saveToDependencies, log, next) // won't be when we're done), flag it as "depending" on the user // themselves, so we don't remove it as a dep that no longer exists addRequiredDep(tree, child, function (childIsDep) { - if (!childIsDep) { - replaceModuleName(child.package, '_requiredBy', '#USER') - } + if (!childIsDep) child.userRequired = true depLoaded(null, child, tracker) }) })) @@ -266,13 +282,13 @@ exports.removeDeps = function (args, tree, saveToDependencies, log, next) { validate('AOOF', [args, tree, log, next]) args.forEach(function (pkg) { var pkgName = moduleName(pkg) + var toRemove = tree.children.filter(moduleNameMatches(pkgName)) + var pkgToRemove = toRemove[0] || createChild({package: {name: pkgName}}) if (saveToDependencies) { - var toRemove = tree.children.filter(moduleNameMatches(pkgName)) - var pkgToRemove = toRemove[0] || createChild({package: {name: pkgName}}) - replaceModule(tree, 'removed', pkgToRemove) + replaceModuleByPath(tree, 'removed', pkgToRemove) pkgToRemove.save = saveToDependencies } - tree.children = tree.children.filter(noModuleNameMatches(pkgName)) + removeObsoleteDep(pkgToRemove) }) log.finish() next() @@ -313,7 +329,6 @@ var failedDependency = exports.failedDependency = function (tree, name_pkg) { pkg = name_pkg name = moduleName(pkg) } - tree.children = tree.children.filter(noModuleNameMatches(name)) if (isDepOptional(tree, name)) { @@ -322,10 +337,14 @@ var failedDependency = exports.failedDependency = function (tree, name_pkg) { tree.failed = true - if (!tree.parent) return true + if (tree.isTop) return true if (tree.userRequired) return true + removeObsoleteDep(tree) + + if (!tree.requiredBy) return false + for (var ii = 0; ii < tree.requiredBy.length; ++ii) { var requireParent = tree.requiredBy[ii] if (failedDependency(requireParent, tree.package)) { @@ -367,7 +386,7 @@ function andHandleOptionalErrors (log, tree, name, done) { exports.loadDeps = loadDeps function loadDeps (tree, log, next) { validate('OOF', arguments) - if (tree.loaded || (tree.parent && tree.parent.failed)) return andFinishTracker.now(log, next) + if (tree.loaded || (tree.parent && tree.parent.failed) || tree.removed) return andFinishTracker.now(log, next) if (tree.parent) tree.loaded = true if (!tree.package.dependencies) tree.package.dependencies = {} asyncMap(Object.keys(tree.package.dependencies), function (dep, done) { @@ -446,38 +465,44 @@ function resolveWithExistingModule (child, tree, log, next) { var updatePhantomChildren = exports.updatePhantomChildren = function (current, child) { validate('OO', arguments) while (current && current !== child.parent) { - // FIXME: phantomChildren doesn't actually belong in the package.json - if (!current.package._phantomChildren) current.package._phantomChildren = {} - current.package._phantomChildren[moduleName(child)] = child.package.version + if (!current.phantomChildren) current.phantomChildren = {} + current.phantomChildren[moduleName(child)] = child current = current.parent } } function flatNameFromTree (tree) { validate('O', arguments) - if (!tree.parent) return '/' + if (tree.isTop) return '/' var path = flatNameFromTree(tree.parent) if (path !== '/') path += '/' return flatName(path, tree) } -exports._replaceModuleName = replaceModuleName -function replaceModuleName (obj, key, name) { - validate('OSS', arguments) - obj[key] = union(obj[key] || [], [name]) +exports._replaceModuleByPath = replaceModuleByPath +function replaceModuleByPath (obj, key, child) { + return replaceModule(obj, key, child, function (replacing, child) { + return replacing.path === child.path + }) +} + +exports._replaceModuleByName = replaceModuleByName +function replaceModuleByName (obj, key, child) { + var childName = moduleName(child) + return replaceModule(obj, key, child, function (replacing, child) { + return moduleName(replacing) === childName + }) } -exports._replaceModule = replaceModule -function replaceModule (obj, key, child) { - validate('OSO', arguments) +function replaceModule (obj, key, child, matchBy) { + validate('OSOF', arguments) if (!obj[key]) obj[key] = [] // we replace children with a new array object instead of mutating it // because mutating it results in weird failure states. // I would very much like to know _why_ this is. =/ var children = [].concat(obj[key]) - var childName = moduleName(child) for (var replaceAt = 0; replaceAt < children.length; ++replaceAt) { - if (moduleName(children[replaceAt]) === childName) break + if (matchBy(children[replaceAt], child)) break } var replacing = children.splice(replaceAt, 1, child) obj[key] = children @@ -514,15 +539,17 @@ function resolveWithNewModule (pkg, tree, log, next) { children: pkg._bundled || [], isLink: tree.isLink }) + delete pkg._bundled + var hasBundled = child.children.length - var replaced = replaceModule(parent, 'children', child) + var replaced = replaceModuleByName(parent, 'children', child) if (replaced) removeObsoleteDep(replaced) addRequiredDep(tree, child, function () { - pkg._location = flatNameFromTree(child) + child.location = flatNameFromTree(child) if (tree.parent && parent !== tree) updatePhantomChildren(tree.parent, child) - if (pkg._bundled) { + if (hasBundled) { inflateBundled(child, child.children) } @@ -584,7 +611,7 @@ var findRequirement = exports.findRequirement = function (tree, name, requested, if (matches.length) return matches[0] return null } - if (!tree.parent) return null + if (tree.isTop) return null return findRequirement(tree.parent, name, requested, requestor) } @@ -618,13 +645,12 @@ var earliestInstallable = exports.earliestInstallable = function (requiredBy, tr return null } - // FIXME: phantomChildren doesn't actually belong in the package.json - if (tree.package._phantomChildren && tree.package._phantomChildren[pkg.name]) return null + if (tree.phantomChildren && tree.phantomChildren[pkg.name]) return null - if (!tree.parent) return tree + if (tree.isTop) return tree if (tree.isGlobal) return tree - if (npm.config.get('global-style') && !tree.parent.parent) return tree + if (npm.config.get('global-style') && tree.parent.isTop) return tree if (npm.config.get('legacy-bundling')) return tree return (earliestInstallable(requiredBy, tree.parent, pkg) || tree) diff --git a/deps/npm/lib/install/diff-trees.js b/deps/npm/lib/install/diff-trees.js index 8000124604e272..578cda90cec885 100644 --- a/deps/npm/lib/install/diff-trees.js +++ b/deps/npm/lib/install/diff-trees.js @@ -59,17 +59,15 @@ function requiredByAllLinked (node) { return node.requiredBy.filter(isLink).length === node.requiredBy.length } -function isNotReqByTop (req) { - return req !== '/' && // '/' is the top level itself - req !== '#USER' && // #USER - req !== '#EXTRANEOUS' +function isNotTopOrExtraneous (node) { + return !node.isTop && !node.userRequired && !node.existing } var sortActions = module.exports.sortActions = function (differences) { var actions = {} differences.forEach(function (action) { var child = action[1] - actions[child.package._location] = action + actions[child.location] = action }) var sorted = [] @@ -77,14 +75,18 @@ var sortActions = module.exports.sortActions = function (differences) { var sortedlocs = Object.keys(actions).sort(sortByLocation) - // Do top level deps first, this stops the sorting by required order from - // unsorting these deps. + // We're going to sort the actions taken on top level dependencies first, before + // considering the order of transitive deps. Because we're building our list + // from the bottom up, this means we will return a list with top level deps LAST. + // This is important in terms of keeping installations as consistent as possible + // as folks add new dependencies. var toplocs = sortedlocs.filter(function (location) { var mod = actions[location][1] - if (!mod.package._requiredBy) return true - // If the module is required by ANY non-top level package - // then we don't want to include this. - return !mod.package._requiredBy.some(isNotReqByTop) + if (!mod.requiredBy) return true + // If this module is required by any non-top level module + // or by any extraneous module, eg user requested or existing + // then we don't want to give this priority sorting. + return !mod.requiredBy.some(isNotTopOrExtraneous) }) toplocs.concat(sortedlocs).forEach(function (location) { @@ -94,12 +96,16 @@ var sortActions = module.exports.sortActions = function (differences) { function sortByLocation (aa, bb) { return bb.localeCompare(aa) } + function sortModuleByLocation (aa, bb) { + return sortByLocation(aa && aa.location, bb && bb.location) + } function sortByDeps (action) { var mod = action[1] - if (added[mod.package._location]) return - added[mod.package._location] = action - mod.package._requiredBy.sort().forEach(function (location) { - if (actions[location]) sortByDeps(actions[location]) + if (added[mod.location]) return + added[mod.location] = action + if (!mod.requiredBy) mod.requiredBy = [] + mod.requiredBy.sort(sortModuleByLocation).forEach(function (mod) { + if (actions[mod.location]) sortByDeps(actions[mod.location]) }) sorted.unshift(action) } diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js index b38181b9f19e83..1853f2c068cb93 100644 --- a/deps/npm/lib/install/inflate-shrinkwrap.js +++ b/deps/npm/lib/install/inflate-shrinkwrap.js @@ -55,6 +55,7 @@ var inflateShrinkwrap = module.exports = function (tree, swdeps, finishInflating }) tree.children.push(child) if (pkg._bundled) { + delete pkg._bundled inflateBundled(child, child.children) } inflateShrinkwrap(child, sw.dependencies || {}, next) diff --git a/deps/npm/lib/install/is-dev.js b/deps/npm/lib/install/is-dev.js index b1f2c4b6614975..e0fae4eb82dc41 100644 --- a/deps/npm/lib/install/is-dev.js +++ b/deps/npm/lib/install/is-dev.js @@ -1,7 +1,26 @@ 'use strict' -var isDev = exports.isDev = function (node) { - return node.package._requiredBy.some(function (req) { return req === '#DEV:/' }) +var moduleName = require('../utils/module-name.js') + +function andIsDev (name) { + return function (req) { + return req.package && + req.package.devDependencies && + req.package.devDependencies[name] + } } + +exports.isDev = function (node) { + return node.requiredBy.some(andIsDev(moduleName(node))) +} + +function andIsOnlyDev (name) { + var isThisDev = andIsDev(name) + return function (req) { + return isThisDev(req) && + (!req.package.dependencies || !req.package.dependencies[name]) + } +} + exports.isOnlyDev = function (node) { - return node.package._requiredBy.length === 1 && isDev(node) + return node.requiredBy.every(andIsOnlyDev(moduleName(node))) } diff --git a/deps/npm/lib/install/is-extraneous.js b/deps/npm/lib/install/is-extraneous.js index cd4d954668426a..f0d599965fe598 100644 --- a/deps/npm/lib/install/is-extraneous.js +++ b/deps/npm/lib/install/is-extraneous.js @@ -1,14 +1,37 @@ 'use strict' -var path = require('path') -var isDev = require('./is-dev.js').isDev -var npm = require('../npm.js') - -module.exports = function (tree) { - var pkg = tree.package - var requiredBy = pkg._requiredBy.filter(function (req) { return req[0] !== '#' }) - var isTopLevel = tree.parent == null - var isChildOfTop = !isTopLevel && tree.parent.parent == null - var isTopGlobal = isChildOfTop && tree.parent.path === path.resolve(npm.globalDir, '..') - var topHasNoPackageJson = isChildOfTop && tree.parent.error - return !isTopLevel && (!isChildOfTop || !topHasNoPackageJson) && !isTopGlobal && requiredBy.length === 0 && !isDev(tree) +module.exports = isExtraneous + +function isExtraneous (tree) { + var result = !isNotExtraneous(tree) + return result +} + +function isNotRequired (tree) { + return tree.requiredBy && tree.requiredBy.length === 0 +} + +function parentHasNoPjson (tree) { + return tree.parent && tree.parent.isTop && tree.parent.error +} + +function topHasNoPjson (tree) { + var top = tree + while (!top.isTop) top = top.parent + return top.error +} + +function isNotExtraneous (tree, isCycle) { + if (!isCycle) isCycle = {} + if (tree.isTop || tree.userRequired) { + return true + } else if (isNotRequired(tree) && parentHasNoPjson(tree)) { + return true + } else if (isCycle[tree.path]) { + return topHasNoPjson(tree) + } else { + isCycle[tree.path] = true + return tree.requiredBy && tree.requiredBy.some(function (node) { + return isNotExtraneous(node, Object.create(isCycle)) + }) + } } diff --git a/deps/npm/lib/install/mutate-into-logical-tree.js b/deps/npm/lib/install/mutate-into-logical-tree.js index 833aa94c9400cc..b2059da906079c 100644 --- a/deps/npm/lib/install/mutate-into-logical-tree.js +++ b/deps/npm/lib/install/mutate-into-logical-tree.js @@ -8,6 +8,24 @@ var validateAllPeerDeps = require('./deps.js').validateAllPeerDeps var packageId = require('../utils/package-id.js') var moduleName = require('../utils/module-name.js') +// Return true if tree is a part of a cycle that: +// A) Never connects to the top of the tree +// B) Has not not had a point in the cycle arbitraryly declared its top +// yet. +function isDisconnectedCycle (tree, seen) { + if (!seen) seen = {} + if (tree.isTop || tree.cycleTop || tree.requiredBy.length === 0) { + return false + } else if (seen[tree.path]) { + return true + } else { + seen[tree.path] = true + return tree.requiredBy.every(function (node) { + return isDisconnectedCycle(node, Object.create(seen)) + }) + } +} + var mutateIntoLogicalTree = module.exports = function (tree) { validate('O', arguments) @@ -18,35 +36,29 @@ var mutateIntoLogicalTree = module.exports = function (tree) { var flat = flattenTree(tree) - function getNode (flatname) { - return flatname.substr(0, 5) === '#DEV:' - ? flat[flatname.substr(5)] - : flat[flatname] - } - Object.keys(flat).sort().forEach(function (flatname) { var node = flat[flatname] - var requiredBy = node.package._requiredBy || [] - var requiredByNames = requiredBy.filter(function (parentFlatname) { - var parentNode = getNode(parentFlatname) - if (!parentNode) return false - return parentNode.package.dependencies[moduleName(node)] || - (parentNode.package.devDependencies && parentNode.package.devDependencies[moduleName(node)]) - }) - requiredBy = requiredByNames.map(getNode) - - node.requiredBy = requiredBy - - if (!requiredBy.length) return + if (!node.requiredBy.length) return - if (node.parent) node.parent.children = without(node.parent.children, node) + if (node.parent) { + // If a node is a cycle that never reaches the root of the logical + // tree then we'll leave it attached to the root, or else it + // would go missing. Further we'll note that this is the node in the + // cycle that we picked arbitrarily to be the one attached to the root. + // others will fall + if (isDisconnectedCycle(node)) { + node.cycleTop = true + // Nor do we want to disconnect non-cyclical extraneous modules from the tree. + } else if (node.requiredBy.length) { + // regular deps though, we do, as we're moving them into the capable + // hands of the modules that require them. + node.parent.children = without(node.parent.children, node) + } + } - requiredBy.forEach(function (parentNode) { + node.requiredBy.forEach(function (parentNode) { parentNode.children = union(parentNode.children, [node]) }) - if (node.package._requiredBy.some(function (nodename) { return nodename[0] === '#' })) { - tree.children = union(tree.children, [node]) - } }) return tree } @@ -70,18 +82,27 @@ function translateTree_ (tree, seen) { tree.children.forEach(function (child) { pkg.dependencies[moduleName(child)] = translateTree_(child, seen) }) - Object.keys(tree.missingDeps).forEach(function (name) { + + function markMissing (name, requiredBy) { if (pkg.dependencies[name]) { + if (pkg.dependencies[name].missing) return pkg.dependencies[name].invalid = true pkg.dependencies[name].realName = name pkg.dependencies[name].extraneous = false } else { pkg.dependencies[name] = { - requiredBy: tree.missingDeps[name], + requiredBy: requiredBy, missing: true, optional: !!pkg.optionalDependencies[name] } } + } + + Object.keys(tree.missingDeps).forEach(function (name) { + markMissing(name, tree.missingDeps[name]) + }) + Object.keys(tree.missingDevDeps).forEach(function (name) { + markMissing(name, tree.missingDevDeps[name]) }) var checkForMissingPeers = (tree.parent ? [] : [tree]).concat(tree.children) checkForMissingPeers.filter(function (child) { diff --git a/deps/npm/lib/install/node.js b/deps/npm/lib/install/node.js index c76dc765ba493c..a5b766b0549946 100644 --- a/deps/npm/lib/install/node.js +++ b/deps/npm/lib/install/node.js @@ -2,11 +2,10 @@ var defaultTemplate = { package: { + version: '', dependencies: {}, devDependencies: {}, - optionalDependencies: {}, - _requiredBy: [], - _phantomChildren: {} + optionalDependencies: {} }, loaded: false, children: [], @@ -14,10 +13,13 @@ var defaultTemplate = { requires: [], missingDeps: {}, missingDevDeps: {}, + phantomChildren: {}, path: null, realpath: null, + location: null, userRequired: false, - existing: false + existing: false, + isTop: false } function isLink (node) { @@ -34,7 +36,7 @@ var create = exports.create = function (node, template) { if (node[key] != null) return node[key] = template[key] }) - if (isLink(node) || isLink(node.parent)) { + if (isLink(node.parent)) { node.isLink = true } return node @@ -48,14 +50,17 @@ function reset (node, seen) { if (seen[node.path]) return seen[node.path] = true var child = create(node) - child.package._requiredBy = child.package._requiredBy.filter(function (req) { - return req[0] === '#' - }) - child.requiredBy = [] - child.package._phantomChildren = {} + // FIXME: cleaning up after read-package-json's mess =( if (child.package._id === '@') delete child.package._id + + child.isTop = false + child.requiredBy = [] + child.requires = [] child.missingDeps = {} + child.missingDevDeps = {} + child.phantomChildren = {} + child.location = null + child.children.forEach(function (child) { reset(child, seen) }) - if (!child.package.version) child.package.version = '' } diff --git a/deps/npm/lib/install/prune-tree.js b/deps/npm/lib/install/prune-tree.js deleted file mode 100644 index eb3edf4f75bafc..00000000000000 --- a/deps/npm/lib/install/prune-tree.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' -var validate = require('aproba') -var flattenTree = require('./flatten-tree.js') - -function isNotPackage (mod) { - return function (parentMod) { return mod !== parentMod } -} - -module.exports = function pruneTree (tree) { - validate('O', arguments) - var flat = flattenTree(tree) - // we just do this repeatedly until there are no more orphaned packages - // which isn't as effecient as it could be on a REALLY big tree - // but we'll face that if it proves to be an issue - var removedPackage - do { - removedPackage = false - Object.keys(flat).forEach(function (flatname) { - var child = flat[flatname] - if (!child.parent) return - child.package._requiredBy = (child.package._requiredBy || []).filter(function (req) { - var isDev = req.substr(0, 4) === '#DEV' - if (req[0] === '#' && !isDev) return true - if (flat[req]) return true - if (!isDev) return false - var reqChildAsDevDep = flat[req.substr(5)] - return reqChildAsDevDep && !reqChildAsDevDep.parent - }) - if (!child.package._requiredBy.length) { - removedPackage = true - delete flat[flatname] - child.parent.children = child.parent.children.filter(isNotPackage(child)) - } - }) - } while (removedPackage) -} diff --git a/deps/npm/lib/install/save.js b/deps/npm/lib/install/save.js index acbe8c5bb3579f..708da61c8a9488 100644 --- a/deps/npm/lib/install/save.js +++ b/deps/npm/lib/install/save.js @@ -12,6 +12,7 @@ var npm = require('../npm.js') var deepSortObject = require('../utils/deep-sort-object.js') var parseJSON = require('../utils/parse-json.js') var moduleName = require('../utils/module-name.js') +var isOnlyDev = require('./is-dev.js').isOnlyDev // if the -S|--save option is specified, then write installed packages // as dependencies to a package.json file. @@ -49,8 +50,7 @@ function saveShrinkwrap (tree, next) { var shrinkwrap = tree.package._shrinkwrap || {dependencies: {}} var hasDevOnlyDeps = tree.requires.filter(function (dep) { - var devReqs = dep.package._requiredBy.filter(function (name) { return name.substr(0, 4) === '#DEV' }) - return devReqs.length === dep.package._requiredBy.length + return isOnlyDev(dep) }).some(function (dep) { return shrinkwrap.dependencies[dep.package.name] != null }) diff --git a/deps/npm/lib/install/update-package-json.js b/deps/npm/lib/install/update-package-json.js index 97b2f05bb0fa97..eee530c3cd803d 100644 --- a/deps/npm/lib/install/update-package-json.js +++ b/deps/npm/lib/install/update-package-json.js @@ -1,18 +1,46 @@ 'use strict' var path = require('path') var writeFileAtomic = require('write-file-atomic') +var moduleName = require('../utils/module-name.js') var deepSortObject = require('../utils/deep-sort-object.js') +var sortedObject = require('sorted-object') + +var sortKeys = [ + 'dependencies', 'devDependencies', 'bundleDependencies', + 'optionalDependencies', 'keywords', 'engines', 'scripts', + 'files' +] + +module.exports = function (mod, buildpath, next) { + var pkg = sortedObject(mod.package) + var name = moduleName(mod) + // Add our diagnostic keys to the package.json. + // Note that there are folks relying on these, for ex, the Visual Studio + // Node.js addon. + pkg._requiredBy = + mod.requiredBy + .map(function (req) { + if (req.package.devDependencies[name] && !req.package.dependencies[name]) { + return '#DEV:' + req.location + } else { + return req.location + } + }) + .concat(mod.userRequired ? ['#USER'] : []) + .concat(mod.existing ? ['#EXISTING'] : []) + .sort() + pkg._location = mod.location + pkg._phantomChildren = {} + Object.keys(mod.phantomChildren).sort().forEach(function (name) { + pkg._phantomChildren[name] = mod.phantomChildren[name].package.version + }) + + // sort keys that are known safe to sort to produce more consistent output + sortKeys.forEach(function (key) { + if (pkg[key] != null) pkg[key] = deepSortObject(pkg[key]) + }) + + var data = JSON.stringify(sortedObject(pkg), null, 2) + '\n' -module.exports = function (pkg, buildpath, next) { - // FIXME: This bundled dance is because we're sticking a big tree of bundled - // deps into the parsed package.json– it probably doesn't belong there =/ - // But the real reason we don't just dump it out is that it's the result - // of npm-read-tree, which produces circular data structures, due to the - // parent and children keys. - var bundled = pkg.package._bundled - delete pkg.package._bundled // FIXME - var packagejson = deepSortObject(pkg.package) - var data = JSON.stringify(packagejson, null, 2) + '\n' - pkg.package._bundled = bundled writeFileAtomic(path.resolve(buildpath, 'package.json'), data, next) } diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js index 3624a16c98e6c7..54b8dcac7a428e 100644 --- a/deps/npm/lib/link.js +++ b/deps/npm/lib/link.js @@ -11,6 +11,7 @@ var path = require('path') var build = require('./build.js') var npa = require('npm-package-arg') var usage = require('./utils/usage') +var output = require('./utils/output.js') module.exports = link @@ -179,9 +180,7 @@ function resultPrinter (pkg, src, dest, rp, cb) { return parseableOutput(dest, rp || src, cb) } if (rp === src) rp = null - log.clearProgress() - console.log(where + ' -> ' + src + (rp ? ' -> ' + rp : '')) - log.showProgress() + output(where + ' -> ' + src + (rp ? ' -> ' + rp : '')) cb() } @@ -193,8 +192,6 @@ function parseableOutput (dest, rp, cb) { // *just* print the target folder. // However, we don't actually ever read the version number, so // the second field is always blank. - log.clearProgress() - console.log(dest + '::' + rp) - log.showProgress() + output(dest + '::' + rp) cb() } diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index d2fe14fb2f8702..ba5ab16e51ec7b 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -20,6 +20,7 @@ var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') var recalculateMetadata = require('./install/deps.js').recalculateMetadata var packageId = require('./utils/package-id.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') ls.usage = usage( 'ls', @@ -99,7 +100,7 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) { } else if (data) { out = makeArchy(bfs, long, dir) } - console.log(out) + output(out) if (args.length && !data._found) process.exitCode = 1 diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 9d6cda386a7d4d..4f810152513ee0 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -22,6 +22,7 @@ var npmconf = require('./config/core.js') var log = require('npmlog') + var tty = require('tty') var path = require('path') var abbrev = require('abbrev') var which = require('which') @@ -30,6 +31,7 @@ var aliases = require('./config/cmd-list').aliases var cmdList = require('./config/cmd-list').cmdList var plumbing = require('./config/cmd-list').plumbing + var output = require('./utils/output.js') npm.config = { loaded: false, @@ -140,7 +142,7 @@ function defaultCb (er, data) { log.disableProgress() if (er) console.error(er.stack || er.message) - else console.log(data) + else output(data) } npm.deref = function (c) { @@ -261,7 +263,6 @@ npm.color = false break default: - var tty = require('tty') if (process.stdout.isTTY) npm.color = true else if (!tty.isatty) npm.color = true else if (tty.isatty(1)) npm.color = true @@ -269,19 +270,19 @@ break } - log.resume() + if (config.get('unicode')) { + log.enableUnicode() + } else { + log.disableUnicode() + } - if (config.get('progress')) { + if (config.get('progress') && (process.stderr.isTTY || (tty.isatty && tty.isatty(2)))) { log.enableProgress() } else { log.disableProgress() } - if (config.get('unicode')) { - log.enableUnicode() - } else { - log.disableUnicode() - } + log.resume() // at this point the configs are all set. // go ahead and spin up the registry client. diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index 50bdb363d1cdaf..dd597983650cfd 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -40,6 +40,7 @@ var mapToRegistry = require('./utils/map-to-registry.js') 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') function uniqName (item) { return item[0].path + '|' + item[1] + '|' + item[7] @@ -75,6 +76,7 @@ function outdated (args, silent, cb) { if (npm.config.get('depth') === Infinity) npm.config.set('depth', 0) readPackageTree(dir, andRecalculateMetadata(function (er, tree) { + if (!tree) return cb(er) mutateIntoLogicalTree(tree) outdated_(args, '', tree, {}, 0, function (er, list) { list = uniq(list || []).sort(function (aa, bb) { @@ -82,11 +84,10 @@ function outdated (args, silent, cb) { aa[1].localeCompare(bb[1]) }) if (er || silent || list.length === 0) return cb(er, list) - log.disableProgress() if (npm.config.get('json')) { - console.log(makeJSON(list)) + output(makeJSON(list)) } else if (npm.config.get('parseable')) { - console.log(makeParseable(list)) + output(makeParseable(list)) } else { var outList = list.map(makePretty) var outHead = [ 'Package', @@ -108,7 +109,7 @@ function outdated (args, silent, cb) { align: ['l', 'r', 'r', 'r', 'l'], stringLength: function (s) { return ansiTrim(s).length } } - console.log(table(outTable, tableOpts)) + output(table(outTable, tableOpts)) } cb(null, list.map(function (item) { return [item[0].parent.path].concat(item.slice(1, 7)) })) }) @@ -142,8 +143,6 @@ function makePretty (p) { columns[0] = color[has === want || want === 'linked' ? 'yellow' : 'red'](columns[0]) // dep columns[2] = color.green(columns[2]) // want columns[3] = color.magenta(columns[3]) // latest - columns[4] = color.brightBlack(columns[4]) // dir - if (long) columns[5] = color.brightBlack(columns[5]) // type } return columns @@ -333,7 +332,7 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) { if (args.length && args.indexOf(dep) === -1) return skip() var parsed = npa(dep + '@' + req) - if (tree.isLink && (tree.parent !== null && tree.parent.parent === null)) { + if (tree.isLink && tree.parent && tree.parent.isTop) { return doIt('linked', 'linked') } if (parsed.type === 'git' || parsed.type === 'hosted') { diff --git a/deps/npm/lib/owner.js b/deps/npm/lib/owner.js index 2cc3eef3b9175a..64d086af78f9b1 100644 --- a/deps/npm/lib/owner.js +++ b/deps/npm/lib/owner.js @@ -5,6 +5,7 @@ var log = require('npmlog') var mapToRegistry = require('./utils/map-to-registry.js') var readLocalPkg = require('./utils/read-local-package.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') owner.usage = usage( 'owner', @@ -127,7 +128,7 @@ function ls (pkg, cb) { return o.name + ' <' + o.email + '>' }).join('\n') } - console.log(msg) + output(msg) cb(er, owners) }) }) @@ -258,9 +259,9 @@ function mutate (pkg, user, mutation, cb) { if (er) { log.error('owner mutate', 'Failed to update package metadata') } else if (m.length > beforeMutation) { - console.log('+ %s (%s)', user, pkg) + output('+ %s (%s)', user, pkg) } else if (m.length < beforeMutation) { - console.log('- %s (%s)', user, pkg) + output('- %s (%s)', user, pkg) } cb(er, data) diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js index c98f5f202016b8..ede59dd12c207e 100644 --- a/deps/npm/lib/pack.js +++ b/deps/npm/lib/pack.js @@ -12,6 +12,7 @@ var path = require('path') var cwd = process.cwd() var writeStreamAtomic = require('fs-write-stream-atomic') var cachedPackageRoot = require('./cache/cached-package-root.js') +var output = require('./utils/output.js') pack.usage = 'npm pack [[<@scope>/]...]' @@ -39,7 +40,7 @@ function printFiles (files, cb) { files = files.map(function (file) { return path.relative(cwd, file) }) - console.log(files.join('\n')) + output(files.join('\n')) cb() } diff --git a/deps/npm/lib/ping.js b/deps/npm/lib/ping.js index 23b18bfba079a5..a86150508d2678 100644 --- a/deps/npm/lib/ping.js +++ b/deps/npm/lib/ping.js @@ -1,4 +1,5 @@ var npm = require('./npm.js') +var output = require('./utils/output.js') module.exports = ping @@ -14,7 +15,7 @@ function ping (args, silent, cb) { var auth = npm.config.getCredentialsByURI(registry) npm.registry.ping(registry, {auth: auth}, function (er, pong) { - if (!silent) console.log(JSON.stringify(pong)) + if (!silent) output(JSON.stringify(pong)) cb(er, er ? null : pong) }) } diff --git a/deps/npm/lib/prefix.js b/deps/npm/lib/prefix.js index 42f61103f64a2e..fb20389c457b2e 100644 --- a/deps/npm/lib/prefix.js +++ b/deps/npm/lib/prefix.js @@ -1,6 +1,7 @@ module.exports = prefix var npm = require('./npm.js') +var output = require('./utils/output.js') prefix.usage = 'npm prefix [-g]' @@ -9,6 +10,6 @@ function prefix (args, silent, cb) { cb = silent silent = false } - if (!silent) console.log(npm.prefix) + if (!silent) output(npm.prefix) process.nextTick(cb.bind(this, null, npm.prefix)) } diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index 45de4f24b40ef9..e1826df9d47966 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -13,6 +13,7 @@ var createReadStream = require('graceful-fs').createReadStream var npa = require('npm-package-arg') var semver = require('semver') var getPublishConfig = require('./utils/get-publish-config.js') +var output = require('./utils/output.js') publish.usage = 'npm publish [|] [--tag ] [--access ]' + "\n\nPublishes '.' if no argument supplied" + @@ -147,8 +148,7 @@ function publish_ (arg, data, isRetry, cachedir, cb) { // report the unpublish error if this was a retry and unpublish failed if (er && isRetry && isRetry !== true) return cb(isRetry) if (er) return cb(er) - log.clearProgress() - console.log('+ ' + data._id) + output('+ ' + data._id) cb() }) }) diff --git a/deps/npm/lib/rebuild.js b/deps/npm/lib/rebuild.js index 29492c27f22783..2673b1cfea66a3 100644 --- a/deps/npm/lib/rebuild.js +++ b/deps/npm/lib/rebuild.js @@ -7,6 +7,7 @@ var log = require('npmlog') var npm = require('./npm.js') var npa = require('npm-package-arg') var usage = require('./utils/usage') +var output = require('./utils/output.js') rebuild.usage = usage( 'rebuild', @@ -33,11 +34,9 @@ function rebuild (args, cb) { function cleanBuild (folders, set, cb) { npm.commands.build(folders, function (er) { if (er) return cb(er) - log.clearProgress() - console.log(folders.map(function (f) { + output(folders.map(function (f) { return set[f] + ' ' + f }).join('\n')) - log.showProgress() cb() }) } diff --git a/deps/npm/lib/root.js b/deps/npm/lib/root.js index 958361d351a4b0..82a804aff5391b 100644 --- a/deps/npm/lib/root.js +++ b/deps/npm/lib/root.js @@ -1,6 +1,7 @@ module.exports = root var npm = require('./npm.js') +var output = require('./utils/output.js') root.usage = 'npm root [-g]' @@ -9,6 +10,6 @@ function root (args, silent, cb) { cb = silent silent = false } - if (!silent) console.log(npm.dir) + if (!silent) output(npm.dir) process.nextTick(cb.bind(this, null, npm.dir)) } diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index f9c6872aa96a8e..05bc1fe98b7763 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -7,6 +7,7 @@ var readJson = require('read-package-json') var log = require('npmlog') var chain = require('slide').chain var usage = require('./utils/usage') +var output = require('./utils/output.js') runScript.usage = usage( 'run-script', @@ -91,13 +92,13 @@ function list (cb) { } if (npm.config.get('json')) { - console.log(JSON.stringify(d.scripts || {}, null, 2)) + output(JSON.stringify(d.scripts || {}, null, 2)) return cb(null, allScripts) } if (npm.config.get('parseable')) { allScripts.forEach(function (script) { - console.log(script + ':' + d.scripts[script]) + output(script + ':' + d.scripts[script]) }) return cb(null, allScripts) } @@ -105,18 +106,18 @@ function list (cb) { var s = '\n ' var prefix = ' ' if (scripts.length) { - console.log('Lifecycle scripts included in %s:', d.name) + output('Lifecycle scripts included in %s:', d.name) } scripts.forEach(function (script) { - console.log(prefix + script + s + d.scripts[script]) + output(prefix + script + s + d.scripts[script]) }) if (!scripts.length && runScripts.length) { - console.log('Scripts available in %s via `npm run-script`:', d.name) + output('Scripts available in %s via `npm run-script`:', d.name) } else if (runScripts.length) { - console.log('\navailable via `npm run-script`:') + output('\navailable via `npm run-script`:') } runScripts.forEach(function (script) { - console.log(prefix + script + s + d.scripts[script]) + output(prefix + script + s + d.scripts[script]) }) return cb(null, allScripts) }) diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js index d71102ac3ed68c..cd6d5ed8ea54db 100644 --- a/deps/npm/lib/search.js +++ b/deps/npm/lib/search.js @@ -5,6 +5,7 @@ var npm = require('./npm.js') var columnify = require('columnify') var updateIndex = require('./cache/update-index.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') search.usage = usage( 'search', @@ -70,7 +71,7 @@ function search (args, silent, staleness, cb) { // prettify and print it, and then provide the raw // data to the cb. if (er || silent) return cb(er, data) - console.log(prettify(data, args)) + output(prettify(data, args)) cb(null, data) }) } diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js index 9a6d8e76bd549e..c6a41842fcc4b2 100644 --- a/deps/npm/lib/shrinkwrap.js +++ b/deps/npm/lib/shrinkwrap.js @@ -7,8 +7,10 @@ var path = require('path') var log = require('npmlog') var writeFileAtomic = require('write-file-atomic') var iferr = require('iferr') +var readPackageJson = require('read-package-json') var readPackageTree = require('read-package-tree') var validate = require('aproba') +var chain = require('slide').chain var npm = require('./npm.js') var recalculateMetadata = require('./install/deps.js').recalculateMetadata var validatePeerDeps = require('./install/deps.js').validatePeerDeps @@ -16,6 +18,8 @@ var isExtraneous = require('./install/is-extraneous.js') var isOnlyDev = require('./install/is-dev.js').isOnlyDev var packageId = require('./utils/package-id.js') var moduleName = require('./utils/module-name.js') +var output = require('./utils/output.js') +var lifecycle = require('./utils/lifecycle.js') shrinkwrap.usage = 'npm shrinkwrap' @@ -30,11 +34,24 @@ function shrinkwrap (args, silent, cb) { } var dir = path.resolve(npm.dir, '..') + var packagePath = path.join(npm.localPrefix, 'package.json') npm.config.set('production', true) - readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (tree) { - var pkginfo = treeToShrinkwrap(tree, !!npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also'))) - shrinkwrap_(pkginfo, silent, cb) - }))) + + readPackageJson(packagePath, iferr(cb, function (data) { + lifecycle(data, 'preshrinkwrap', function () { + readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (tree) { + var pkginfo = treeToShrinkwrap(tree, !!npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also'))) + + chain([ + [lifecycle, tree.package, 'shrinkwrap'], + [shrinkwrap_, pkginfo, silent], + [lifecycle, tree.package, 'postshrinkwrap'] + ], iferr(cb, function (data) { + cb(null, data[0]) + })) + }))) + }) + })) } function andRecalculateMetadata (next) { @@ -122,9 +139,7 @@ function save (pkginfo, silent, cb) { writeFileAtomic(file, swdata, function (er) { if (er) return cb(er) if (silent) return cb(null, pkginfo) - log.clearProgress() - console.log('wrote npm-shrinkwrap.json') - log.showProgress() + output('wrote npm-shrinkwrap.json') cb(null, pkginfo) }) } diff --git a/deps/npm/lib/star.js b/deps/npm/lib/star.js index ce141688b9339f..f19cb4b07bebb9 100644 --- a/deps/npm/lib/star.js +++ b/deps/npm/lib/star.js @@ -5,6 +5,7 @@ var log = require('npmlog') var asyncMap = require('slide').asyncMap var mapToRegistry = require('./utils/map-to-registry.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') star.usage = usage( 'star', @@ -34,7 +35,7 @@ function star (args, cb) { } npm.registry.star(uri, params, function (er, data, raw, req) { if (!er) { - console.log(s + ' ' + pkg) + output(s + ' ' + pkg) log.verbose('star', data) } cb(er, data, raw, req) diff --git a/deps/npm/lib/stars.js b/deps/npm/lib/stars.js index 4ad8f02e59dca9..4771079356a174 100644 --- a/deps/npm/lib/stars.js +++ b/deps/npm/lib/stars.js @@ -5,6 +5,7 @@ stars.usage = 'npm stars []' var npm = require('./npm.js') var log = require('npmlog') var mapToRegistry = require('./utils/map-to-registry.js') +var output = require('./utils/output.js') function stars (args, cb) { npm.commands.whoami([], true, function (er, username) { @@ -38,7 +39,7 @@ function stars (args, cb) { log.warn('stars', 'user has not starred any packages.') } else { data.rows.forEach(function (a) { - console.log(a.value) + output(a.value) }) } cb() diff --git a/deps/npm/lib/substack.js b/deps/npm/lib/substack.js index c39a5dcc482a8d..428e0a5898b6ee 100644 --- a/deps/npm/lib/substack.js +++ b/deps/npm/lib/substack.js @@ -1,5 +1,6 @@ module.exports = substack var npm = require('./npm.js') +var output = require('./utils/output.js') var isms = [ '\u001b[32mbeep \u001b[35mboop\u001b[m', @@ -14,7 +15,7 @@ var isms = [ function substack (args, cb) { var i = Math.floor(Math.random() * isms.length) - console.log(isms[i]) + output(isms[i]) var c = args.shift() if (c) npm.commands[c](args, cb) else cb() diff --git a/deps/npm/lib/team.js b/deps/npm/lib/team.js index 324d8df5e22848..f99063b2787148 100644 --- a/deps/npm/lib/team.js +++ b/deps/npm/lib/team.js @@ -1,5 +1,6 @@ var mapToRegistry = require('./utils/map-to-registry.js') var npm = require('./npm') +var output = require('./utils/output.js') module.exports = team @@ -44,7 +45,7 @@ function team (args, cb) { team: entity[1], user: args.shift() }, function (err, data) { - !err && data && console.log(JSON.stringify(data, undefined, 2)) + !err && data && output(JSON.stringify(data, undefined, 2)) cb(err, data) }) } catch (e) { diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js index f5efb1ee6d2ca8..9ba5972d8a3666 100644 --- a/deps/npm/lib/unbuild.js +++ b/deps/npm/lib/unbuild.js @@ -12,6 +12,7 @@ var asyncMap = require('slide').asyncMap var chain = require('slide').chain var log = require('npmlog') var build = require('./build.js') +var output = require('./utils/output.js') // args is a list of folders. // remove any bins/etc, and then delete the folder. @@ -40,9 +41,7 @@ function unbuild_ (silent) { [lifecycle, pkg, 'preuninstall', folder, false, true], [lifecycle, pkg, 'uninstall', folder, false, true], !silent && function (cb) { - log.clearProgress() - console.log('unbuild ' + pkg._id) - log.showProgress() + output('unbuild ' + pkg._id) cb() }, [rmStuff, pkg, folder], diff --git a/deps/npm/lib/unpublish.js b/deps/npm/lib/unpublish.js index 63f87b8207d246..ee050c2846206a 100644 --- a/deps/npm/lib/unpublish.js +++ b/deps/npm/lib/unpublish.js @@ -8,6 +8,7 @@ var path = require('path') var mapToRegistry = require('./utils/map-to-registry.js') var npa = require('npm-package-arg') var getPublishConfig = require('./utils/get-publish-config.js') +var output = require('./utils/output.js') unpublish.usage = 'npm unpublish [<@scope>/][@]' @@ -89,7 +90,7 @@ function gotProject (project, version, publishConfig, cb_) { function cb (er) { if (er) return cb_(er) - console.log('- ' + project + (version ? '@' + version : '')) + output('- ' + project + (version ? '@' + version : '')) cb_() } diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js index dc021300ea0d7d..4d05c75b867e37 100644 --- a/deps/npm/lib/utils/git.js +++ b/deps/npm/lib/utils/git.js @@ -11,6 +11,7 @@ var which = require('which') var git = npm.config.get('git') var assert = require('assert') var log = require('npmlog') +var noProgressTillDone = require('./no-progress-while-running.js').tillDone function prefixGitArgs () { return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : [] @@ -19,7 +20,7 @@ function prefixGitArgs () { function execGit (args, options, cb) { log.info('git', args) var fullArgs = prefixGitArgs().concat(args || []) - return exec(git, fullArgs, options, cb) + return exec(git, fullArgs, options, noProgressTillDone(cb)) } function spawnGit (args, options) { diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index fd1a59b74c75bc..6a862366f28374 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -14,6 +14,7 @@ var PATH = 'PATH' var uidNumber = require('uid-number') var umask = require('./umask') var usage = require('./usage') +var output = require('./output.js') // windows calls it's path 'Path' usually, but this is not guaranteed. if (process.platform === 'win32') { @@ -182,9 +183,7 @@ function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) { var group = unsafe ? null : npm.config.get('group') if (log.level !== 'silent') { - log.clearProgress() - console.log(note) - log.showProgress() + output(note) } log.verbose('lifecycle', logid(pkg, stage), 'unsafe-perm in lifecycle', unsafe) @@ -232,8 +231,6 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { log.verbose('lifecycle', logid(pkg, stage), 'CWD:', wd) log.silly('lifecycle', logid(pkg, stage), 'Args:', [shFlag, cmd]) - var progressEnabled = log.progressEnabled - if (progressEnabled) log.disableProgress() var proc = spawn(sh, [shFlag, cmd], conf) proc.on('error', procError) @@ -249,7 +246,6 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { process.once('SIGTERM', procKill) function procError (er) { - if (progressEnabled) log.enableProgress() if (er) { log.info('lifecycle', logid(pkg, stage), 'Failed to exec ' + stage + ' script') er.message = pkg._id + ' ' + stage + ': `' + cmd + '`\n' + diff --git a/deps/npm/lib/utils/no-progress-while-running.js b/deps/npm/lib/utils/no-progress-while-running.js new file mode 100644 index 00000000000000..961fa8b5556bbc --- /dev/null +++ b/deps/npm/lib/utils/no-progress-while-running.js @@ -0,0 +1,23 @@ +'use strict' +var log = require('npmlog') +var progressEnabled +var running = 0 + +var startRunning = exports.startRunning = function () { + if (progressEnabled == null) progressEnabled = log.progressEnabled + if (progressEnabled) log.disableProgress() + ++running +} + +var stopRunning = exports.stopRunning = function () { + --running + if (progressEnabled && running === 0) log.enableProgress() +} + +exports.tillDone = function noProgressTillDone (cb) { + startRunning() + return function () { + stopRunning() + cb.apply(this, arguments) + } +} diff --git a/deps/npm/lib/utils/output.js b/deps/npm/lib/utils/output.js new file mode 100644 index 00000000000000..3dd66cbdd2ab8d --- /dev/null +++ b/deps/npm/lib/utils/output.js @@ -0,0 +1,8 @@ +'use strict' +var log = require('npmlog') +// output to stdout in a progress bar compatible way +module.exports = function () { + log.clearProgress() + console.log.apply(console, arguments) + log.showProgress() +} diff --git a/deps/npm/lib/utils/pulse-till-done.js b/deps/npm/lib/utils/pulse-till-done.js index fc6450e0030015..26692413068a53 100644 --- a/deps/npm/lib/utils/pulse-till-done.js +++ b/deps/npm/lib/utils/pulse-till-done.js @@ -7,9 +7,10 @@ var pulse module.exports = function (prefix, cb) { validate('SF', [prefix, cb]) + if (!prefix) prefix = 'network' if (!pulsers++) { pulse = setInterval(function () { - log.gauge.pulse('network') + log.gauge.pulse(prefix) }, 250) } return function () { diff --git a/deps/npm/lib/utils/spawn.js b/deps/npm/lib/utils/spawn.js index e389d83e02c64d..b164a6acba0f30 100644 --- a/deps/npm/lib/utils/spawn.js +++ b/deps/npm/lib/utils/spawn.js @@ -2,15 +2,31 @@ module.exports = spawn var _spawn = require('child_process').spawn var EventEmitter = require('events').EventEmitter +var npwr = require('./no-progress-while-running.js') + +function willCmdOutput (stdio) { + if (stdio === 'inherit') return true + if (!Array.isArray(stdio)) return false + for (var fh = 1; fh <= 2; ++fh) { + if (stdio[fh] === 'inherit') return true + if (stdio[fh] === 1 || stdio[fh] === 2) return true + } + return false +} function spawn (cmd, args, options) { + var cmdWillOutput = willCmdOutput(options && options.stdio) + + if (cmdWillOutput) npwr.startRunning() var raw = _spawn(cmd, args, options) var cooked = new EventEmitter() raw.on('error', function (er) { + if (cmdWillOutput) npwr.stopRunning() er.file = cmd cooked.emit('error', er) }).on('close', function (code, signal) { + if (cmdWillOutput) npwr.stopRunning() // Create ENOENT error because Node.js v0.8 will not emit // an `error` event if the command could not be found. if (code === 127) { diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js index 98f6e4ff64e33f..1e00040dbb12e2 100644 --- a/deps/npm/lib/utils/tar.js +++ b/deps/npm/lib/utils/tar.js @@ -20,9 +20,9 @@ var myUid = process.getuid && process.getuid() var myGid = process.getgid && process.getgid() var readPackageTree = require('read-package-tree') var union = require('lodash.union') -var flattenTree = require('../install/flatten-tree.js') var moduleName = require('./module-name.js') var packageId = require('./package-id.js') +var pulseTillDone = require('../utils/pulse-till-done.js') if (process.env.SUDO_UID && myUid === 0) { if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID @@ -40,18 +40,20 @@ function pack (tarball, folder, pkg, cb) { readJson(path.join(folder, 'package.json'), function (er, pkg) { if (er || !pkg.bundleDependencies) { - pack_(tarball, folder, null, null, pkg, cb) + pack_(tarball, folder, null, pkg, cb) } else { // we require this at runtime due to load-order issues, because recursive // requires fail if you replace the exports object, and we do, not in deps, but // in a dep of it. var recalculateMetadata = require('../install/deps.js').recalculateMetadata - readPackageTree(folder, iferr(cb, function (tree) { - recalculateMetadata(tree, log.newGroup('pack:' + packageId(pkg)), iferr(cb, function () { - pack_(tarball, folder, tree, flattenTree(tree), pkg, cb) + readPackageTree(folder, pulseTillDone('pack:readTree:' + packageId(pkg), iferr(cb, function (tree) { + var recalcGroup = log.newGroup('pack:recalc:' + packageId(pkg)) + recalculateMetadata(tree, recalcGroup, iferr(cb, function () { + recalcGroup.finish() + pack_(tarball, folder, tree, pkg, pulseTillDone('pack:' + packageId(pkg), cb)) })) - })) + }))) } }) } @@ -61,9 +63,96 @@ function BundledPacker (props) { } inherits(BundledPacker, Packer) +BundledPacker.prototype.applyIgnores = function (entry, partial, entryObj) { + if (!entryObj || entryObj.type !== 'Directory') { + // package.json files can never be ignored. + if (entry === 'package.json') return true + + // readme files should never be ignored. + if (entry.match(/^readme(\.[^\.]*)$/i)) return true + + // license files should never be ignored. + if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true + + // copyright notice files should never be ignored. + if (entry.match(/^(notice)(\.[^\.]*)?$/i)) return true + + // changelogs should never be ignored. + if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true + } + + // special rules. see below. + if (entry === 'node_modules' && this.packageRoot) return true + + // package.json main file should never be ignored. + var mainFile = this.package && this.package.main + if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true + + // some files are *never* allowed under any circumstances + // (VCS folders, native build cruft, npm cruft, regular cruft) + if (entry === '.git' || + entry === 'CVS' || + entry === '.svn' || + entry === '.hg' || + entry === '.lock-wscript' || + entry.match(/^\.wafpickle-[0-9]+$/) || + (this.parent && this.parent.packageRoot && this.basename === 'build' && + entry === 'config.gypi') || + entry === 'npm-debug.log' || + entry === '.npmrc' || + entry.match(/^\..*\.swp$/) || + entry === '.DS_Store' || + entry.match(/^\._/) + ) { + return false + } + + // in a node_modules folder, we only include bundled dependencies + // also, prevent packages in node_modules from being affected + // by rules set in the containing package, so that + // bundles don't get busted. + // Also, once in a bundle, everything is installed as-is + // To prevent infinite cycles in the case of cyclic deps that are + // linked with npm link, even in a bundle, deps are only bundled + // if they're not already present at a higher level. + if (this.bundleMagic) { + // bubbling up. stop here and allow anything the bundled pkg allows + if (entry.indexOf('/') !== -1) return true + + // never include the .bin. It's typically full of platform-specific + // stuff like symlinks and .cmd files anyway. + if (entry === '.bin') return false + + // the package root. + var p = this.parent + // the package before this one. + var pp = p && p.parent + + // if this entry has already been bundled, and is a symlink, + // and it is the *same* symlink as this one, then exclude it. + if (pp && pp.bundleLinks && this.bundleLinks && + pp.bundleLinks[entry] && + pp.bundleLinks[entry] === this.bundleLinks[entry]) { + return false + } + + // since it's *not* a symbolic link, if we're *already* in a bundle, + // then we should include everything. + if (pp && pp.package && pp.basename === 'node_modules') { + return true + } + + // only include it at this point if it's a bundleDependency + return this.isBundled(entry) + } + // if (this.bundled) return true + + return Packer.prototype.applyIgnores.call(this, entry, partial, entryObj) +} + function nameMatch (name) { return function (other) { return name === moduleName(other) } } -function pack_ (tarball, folder, tree, flatTree, pkg, cb) { +function pack_ (tarball, folder, tree, pkg, cb) { function InstancePacker (props) { BundledPacker.call(this, props) } @@ -81,18 +170,17 @@ function pack_ (tarball, folder, tree, flatTree, pkg, cb) { if (bd.indexOf(name) !== -1) return true var pkg = tree.children.filter(nameMatch(name))[0] if (!pkg) return false - var requiredBy = union([], pkg.package._requiredBy) + var requiredBy = [].concat(pkg.requiredBy) var seen = {} while (requiredBy.length) { - var req = requiredBy.shift() - if (seen[req]) continue - seen[req] = true - var reqPkg = flatTree[req] + var reqPkg = requiredBy.shift() + if (seen[reqPkg.path]) continue + seen[reqPkg.path] = true if (!reqPkg) continue if (reqPkg.parent === tree && bd.indexOf(moduleName(reqPkg)) !== -1) { return true } - requiredBy = union(requiredBy, reqPkg.package._requiredBy) + requiredBy = union(requiredBy, reqPkg.requiredBy) } return false } diff --git a/deps/npm/lib/utils/usage.js b/deps/npm/lib/utils/usage.js index 261d84ee8e06d5..ba069e645e156b 100644 --- a/deps/npm/lib/utils/usage.js +++ b/deps/npm/lib/utils/usage.js @@ -11,7 +11,7 @@ module.exports = function usage (cmd, txt, opt) { if (opt || post.length > 0) txt += '\n\n' if (post.length === 1) { - txt += 'aliase: ' + txt += 'alias: ' txt += post.join(', ') } else if (post.length > 1) { txt += 'aliases: ' diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index 448c7713cedbca..e69560fa9a8590 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -13,6 +13,7 @@ var git = require('./utils/git.js') var assert = require('assert') var lifecycle = require('./utils/lifecycle.js') var parseJSON = require('./utils/parse-json.js') +var output = require('./utils/output.js') version.usage = 'npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]' + '\n(run in package dir)\n' + @@ -121,7 +122,7 @@ function readPackage (cb) { function updatePackage (newVersion, silent, cb_) { function cb (er) { - if (!er && !silent) console.log('v' + newVersion) + if (!er && !silent) output('v' + newVersion) cb_(er) } @@ -174,7 +175,7 @@ function dump (data, cb) { if (npm.config.get('json')) v = JSON.stringify(v, null, 2) - console.log(v) + output(v) cb() } diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index 79c440426b9fbc..5bf1cbf248a771 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -288,6 +288,10 @@ function printData (data, name, cb) { // there's one at the beginning if (/^\s*\n/.test(msg)) msg += '\n' + // disable the progress bar entirely, as we can't meaningfully update it if + // we may have partial lines printed. + log.disableProgress() + // print directly to stdout to not unnecessarily add blank lines process.stdout.write(msg) diff --git a/deps/npm/lib/visnup.js b/deps/npm/lib/visnup.js index b0352fd6d049f2..a61bacb73bf952 100644 --- a/deps/npm/lib/visnup.js +++ b/deps/npm/lib/visnup.js @@ -1,5 +1,6 @@ module.exports = visnup var npm = require('./npm.js') +var output = require('./utils/output.js') var handsomeFace = [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, 236, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], @@ -31,7 +32,7 @@ var handsomeFace = [ function visnup (args, cb) { handsomeFace.forEach(function (line) { - console.log(line.map(function (ch) { + output(line.map(function (ch) { return '\u001b[' + (ch ? '48;5;' + ch : ch) + 'm' }).join(' ')) }) diff --git a/deps/npm/lib/whoami.js b/deps/npm/lib/whoami.js index feb6fab95ae89c..e8af6595d15cc1 100644 --- a/deps/npm/lib/whoami.js +++ b/deps/npm/lib/whoami.js @@ -1,4 +1,5 @@ var npm = require('./npm.js') +var output = require('./utils/output.js') module.exports = whoami @@ -17,7 +18,7 @@ function whoami (args, silent, cb) { var auth = npm.config.getCredentialsByURI(registry) if (auth) { if (auth.username) { - if (!silent) console.log(auth.username) + if (!silent) output(auth.username) return process.nextTick(cb.bind(this, null, auth.username)) } else if (auth.token) { return npm.registry.whoami(registry, { auth: auth }, function (er, username) { @@ -30,7 +31,7 @@ function whoami (args, silent, cb) { return cb(needNewSession) } - if (!silent) console.log(username) + if (!silent) output(username) cb(null, username) }) } diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 8dc00cbee997c8..d62b1be2553a4e 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@3.9.5 /path/to/npm +npm@3.10.2 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index f00ca28e82f9ba..fbb2c67da757e8 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -141,6 +141,17 @@ resolution using "version" if one isn't\. .IP 2. 3 The tree is walked and any missing dependencies are installed in the usual fashion\. +.RE +.P +If \fBpreshrinkwrap\fP, \fBshrinkwrap\fP or \fBpostshrinkwrap\fP are in the \fBscripts\fP property of the +\fBpackage\.json\fP, they will be executed by running \fBnpm shrinkwrap\fP\|\. +\fBpreshrinkwrap\fP and \fBshrinkwrap\fP are executed before the shrinkwrap, \fBpostshrinkwrap\fP is +executed afterwards\. For example to run some postprocessing on the generated file: +.P +.RS 2 +.nf +"scripts": { "postshrinkwrap": "node fix\-shrinkwrap\.js" } +.fi .RE .SS Using shrinkwrapped packages .P @@ -216,6 +227,10 @@ contents rather than versions\. .IP \(bu 2 npm help install .IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 npm help 5 package\.json .IP \(bu 2 npm help ls diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index cc2a401e45083d..4d3bd5f58b8607 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -3.9.5 +3.10.2 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 9afbea0c3d78aa..1576cc83641060 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -261,6 +261,8 @@ Conversely, some files are always ignored: \fB\|\.npmrc\fP .IP \(bu 2 \fBnode_modules\fP +.IP \(bu 2 +\fBconfig\.gypi\fP .RE .SH main diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 9afbea0c3d78aa..1576cc83641060 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -261,6 +261,8 @@ Conversely, some files are always ignored: \fB\|\.npmrc\fP .IP \(bu 2 \fBnode_modules\fP +.IP \(bu 2 +\fBconfig\.gypi\fP .RE .SH main diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 6153cd4e168442..4309b189bba0c8 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -936,7 +936,7 @@ Set the NODE_ENV="production" for lifecycle scripts\. .SS progress .RS 0 .IP \(bu 2 -Default: true +Default: true, unless TRAVIS or CI env vars set\. .IP \(bu 2 Type: Boolean diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index 4e382cd98b53a1..0b5dcb7f81e00a 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -44,13 +44,18 @@ Run by the \fBnpm start\fP command\. prerestart, restart, postrestart: Run by the \fBnpm restart\fP command\. Note: \fBnpm restart\fP will run the stop and start scripts if no \fBrestart\fP script is provided\. +.IP \(bu 2 +preshrinkwrap, shrinkwrap, postshrinkwrap: +Run by the \fBnpm shrinkwrap\fP command\. .RE .P Additionally, arbitrary scripts can be executed by running \fBnpm run\-script \fP\|\. \fIPre\fR and \fIpost\fR commands with matching names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, -\fBpostmyscript\fP)\. +\fBpostmyscript\fP)\. Scripts from dependencies can be run with `npm explore +.P + \-\- npm run `\. .SH COMMON USES .P If you need to perform operations on your package before it is used, in a way diff --git a/deps/npm/node_modules/abbrev/.travis.yml b/deps/npm/node_modules/abbrev/.travis.yml deleted file mode 100644 index 991d04b6e2272b..00000000000000 --- a/deps/npm/node_modules/abbrev/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - '0.10' - - '0.12' - - 'iojs' diff --git a/deps/npm/node_modules/abbrev/CONTRIBUTING.md b/deps/npm/node_modules/abbrev/CONTRIBUTING.md deleted file mode 100644 index 2f302612f81630..00000000000000 --- a/deps/npm/node_modules/abbrev/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ - To get started, sign the - Contributor License Agreement. diff --git a/deps/npm/node_modules/abbrev/package.json b/deps/npm/node_modules/abbrev/package.json index d3e3a661edcd3c..17ac1cad3239fb 100644 --- a/deps/npm/node_modules/abbrev/package.json +++ b/deps/npm/node_modules/abbrev/package.json @@ -1,31 +1,91 @@ { - "name": "abbrev", - "version": "1.0.7", - "description": "Like ruby's abbrev module, but in js", + "_args": [ + [ + { + "raw": "abbrev@1.0.9", + "scope": null, + "name": "abbrev", + "rawSpec": "1.0.9", + "spec": "1.0.9", + "type": "version" + }, + "/Users/rebecca/code/npm" + ] + ], + "_from": "abbrev@1.0.9", + "_id": "abbrev@1.0.9", + "_inCache": true, + "_installable": true, + "_location": "/abbrev", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/abbrev-1.0.9.tgz_1466016055839_0.7825860097073019" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "abbrev@1.0.9", + "scope": null, + "name": "abbrev", + "rawSpec": "1.0.9", + "spec": "1.0.9", + "type": "version" + }, + "_requiredBy": [ + "#USER", + "/", + "/nopt", + "/tap/nyc/istanbul" + ], + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "_shasum": "91b4792588a7738c25f35dd6f63752a2f8776135", + "_shrinkwrap": null, + "_spec": "abbrev@1.0.9", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" }, - "main": "abbrev.js", - "scripts": { - "test": "tap test.js --cov" + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "dependencies": {}, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^5.7.2" }, + "directories": {}, + "dist": { + "shasum": "91b4792588a7738c25f35dd6f63752a2f8776135", + "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz" + }, + "files": [ + "abbrev.js" + ], + "gitHead": "c386cd9dbb1d8d7581718c54d4ba944cc9298d6f", + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "abbrev", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" }, - "license": "ISC", - "devDependencies": { - "tap": "^1.2.0" - }, - "readme": "# abbrev-js\n\nJust like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).\n\nUsage:\n\n var abbrev = require(\"abbrev\");\n abbrev(\"foo\", \"fool\", \"folding\", \"flop\");\n \n // returns:\n { fl: 'flop'\n , flo: 'flop'\n , flop: 'flop'\n , fol: 'folding'\n , fold: 'folding'\n , foldi: 'folding'\n , foldin: 'folding'\n , folding: 'folding'\n , foo: 'foo'\n , fool: 'fool'\n }\n\nThis is handy for command-line scripts, or other cases where you want to be able to accept shorthands.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/abbrev-js/issues" + "scripts": { + "test": "tap test.js --cov" }, - "homepage": "https://github.com/isaacs/abbrev-js#readme", - "_id": "abbrev@1.0.7", - "_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", - "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz", - "_from": "abbrev@>=1.0.7 <1.1.0" + "version": "1.0.9" } diff --git a/deps/npm/node_modules/abbrev/test.js b/deps/npm/node_modules/abbrev/test.js deleted file mode 100644 index eb30e421cb9836..00000000000000 --- a/deps/npm/node_modules/abbrev/test.js +++ /dev/null @@ -1,47 +0,0 @@ -var abbrev = require('./abbrev.js') -var assert = require("assert") -var util = require("util") - -console.log("TAP version 13") -var count = 0 - -function test (list, expect) { - count++ - var actual = abbrev(list) - assert.deepEqual(actual, expect, - "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) - actual = abbrev.apply(exports, list) - assert.deepEqual(abbrev.apply(exports, list), expect, - "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) - console.log('ok - ' + list.join(' ')) -} - -test([ "ruby", "ruby", "rules", "rules", "rules" ], -{ rub: 'ruby' -, ruby: 'ruby' -, rul: 'rules' -, rule: 'rules' -, rules: 'rules' -}) -test(["fool", "foom", "pool", "pope"], -{ fool: 'fool' -, foom: 'foom' -, poo: 'pool' -, pool: 'pool' -, pop: 'pope' -, pope: 'pope' -}) -test(["a", "ab", "abc", "abcd", "abcde", "acde"], -{ a: 'a' -, ab: 'ab' -, abc: 'abc' -, abcd: 'abcd' -, abcde: 'abcde' -, ac: 'acde' -, acd: 'acde' -, acde: 'acde' -}) - -console.log("1..%d", count) diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/CHANGES.md b/deps/npm/node_modules/asap/CHANGES.md similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/CHANGES.md rename to deps/npm/node_modules/asap/CHANGES.md diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/LICENSE.md b/deps/npm/node_modules/asap/LICENSE.md similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/LICENSE.md rename to deps/npm/node_modules/asap/LICENSE.md diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/README.md b/deps/npm/node_modules/asap/README.md similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/README.md rename to deps/npm/node_modules/asap/README.md diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/asap.js b/deps/npm/node_modules/asap/asap.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/asap.js rename to deps/npm/node_modules/asap/asap.js diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/browser-asap.js b/deps/npm/node_modules/asap/browser-asap.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/browser-asap.js rename to deps/npm/node_modules/asap/browser-asap.js diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/browser-raw.js b/deps/npm/node_modules/asap/browser-raw.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/browser-raw.js rename to deps/npm/node_modules/asap/browser-raw.js diff --git a/deps/npm/node_modules/asap/package.json b/deps/npm/node_modules/asap/package.json new file mode 100644 index 00000000000000..9e796295d75c99 --- /dev/null +++ b/deps/npm/node_modules/asap/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "name": "asap", + "raw": "asap", + "rawSpec": "", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "/Users/aleksey/npm" + ] + ], + "_from": "asap@latest", + "_id": "asap@2.0.4", + "_inCache": true, + "_installable": true, + "_location": "/asap", + "_nodeVersion": "0.10.32", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/asap-2.0.4.tgz_1463764720924_0.3805790115147829" + }, + "_npmUser": { + "email": "kris.kowal@cixar.com", + "name": "kriskowal" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "asap", + "raw": "asap", + "rawSpec": "", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://unpm.uberinternal.com/asap/-/asap-2.0.4.tgz", + "_shasum": "b391bf7f6bfbc65706022fec8f49c4b07fecf589", + "_shrinkwrap": null, + "_spec": "asap", + "_where": "/Users/aleksey/npm", + "browser": { + "./asap": "./browser-asap.js", + "./asap.js": "./browser-asap.js", + "./raw": "./browser-raw.js", + "./raw.js": "./browser-raw.js", + "./test/domain.js": "./test/browser-domain.js" + }, + "bugs": { + "url": "https://github.com/kriskowal/asap/issues" + }, + "dependencies": {}, + "description": "High-priority task queue for Node.js and browsers", + "devDependencies": { + "benchmark": "^1.0.0", + "events": "^1.0.1", + "jshint": "^2.5.1", + "knox": "^0.8.10", + "mr": "^2.0.5", + "opener": "^1.3.0", + "q": "^2.0.3", + "q-io": "^2.0.3", + "saucelabs": "^0.1.1", + "wd": "^0.2.21", + "weak-map": "^1.0.5" + }, + "directories": {}, + "dist": { + "shasum": "b391bf7f6bfbc65706022fec8f49c4b07fecf589", + "tarball": "https://unpm.uberinternal.com/asap/-/asap-2.0.4.tgz" + }, + "files": [ + "raw.js", + "asap.js", + "browser-raw.js", + "browser-asap.js" + ], + "gitHead": "26e815dafed7bc112924bf7a6be0d997abf1b407", + "homepage": "https://github.com/kriskowal/asap#readme", + "keywords": [ + "event", + "task", + "queue" + ], + "license": "MIT", + "main": "./asap.js", + "maintainers": [ + { + "email": "kris.kowal@cixar.com", + "name": "kriskowal" + }, + { + "email": "forbes@lindesay.co.uk", + "name": "forbeslindesay" + } + ], + "name": "asap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/kriskowal/asap.git" + }, + "scripts": { + "benchmarks": "node benchmarks", + "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)", + "test": "npm run lint && npm run test-node", + "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", + "test-node": "node test/asap-test.js", + "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", + "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", + "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", + "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", + "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", + "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker" + }, + "version": "2.0.4" +} diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/raw.js b/deps/npm/node_modules/asap/raw.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/raw.js rename to deps/npm/node_modules/asap/raw.js diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/package.json b/deps/npm/node_modules/dezalgo/node_modules/asap/package.json deleted file mode 100644 index ba54d711f849cd..00000000000000 --- a/deps/npm/node_modules/dezalgo/node_modules/asap/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "asap", - "version": "2.0.3", - "description": "High-priority task queue for Node.js and browsers", - "keywords": [ - "event", - "task", - "queue" - ], - "license": { - "type": "MIT", - "url": "https://github.com/kriskowal/asap/raw/master/LICENSE.md" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/kriskowal/asap.git" - }, - "main": "./asap.js", - "browser": { - "./asap.js": "./browser-asap.js", - "./raw.js": "./browser-raw.js", - "./test/domain.js": "./test/browser-domain.js" - }, - "files": [ - "raw.js", - "asap.js", - "browser-raw.js", - "browser-asap.js" - ], - "scripts": { - "test": "npm run lint && npm run test-node", - "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker", - "test-node": "node test/asap-test.js", - "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", - "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", - "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", - "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", - "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", - "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", - "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)" - }, - "devDependencies": { - "events": "^1.0.1", - "jshint": "^2.5.1", - "knox": "^0.8.10", - "mr": "^2.0.5", - "opener": "^1.3.0", - "q": "^2.0.3", - "q-io": "^2.0.3", - "saucelabs": "^0.1.1", - "wd": "^0.2.21", - "weak-map": "^1.0.5" - }, - "readme": "# ASAP\n\n[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap)\n\nPromise and asynchronous observer libraries, as well as hand-rolled callback\nprograms and libraries, often need a mechanism to postpone the execution of a\ncallback until the next available event.\n(See [Designing API’s for Asynchrony][Zalgo].)\nThe `asap` function executes a task **as soon as possible** but not before it\nreturns, waiting only for the completion of the current event and previously\nscheduled tasks.\n\n```javascript\nasap(function () {\n // ...\n});\n```\n\n[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony\n\nThis CommonJS package provides an `asap` module that exports a function that\nexecutes a task function *as soon as possible*.\n\nASAP strives to schedule events to occur before yielding for IO, reflow,\nor redrawing.\nEach event receives an independent stack, with only platform code in parent\nframes and the events run in the order they are scheduled.\n\nASAP provides a fast event queue that will execute tasks until it is\nempty before yielding to the JavaScript engine's underlying event-loop.\nWhen a task gets added to a previously empty event queue, ASAP schedules a flush\nevent, preferring for that event to occur before the JavaScript engine has an\nopportunity to perform IO tasks or rendering, thus making the first task and\nsubsequent tasks semantically indistinguishable.\nASAP uses a variety of techniques to preserve this invariant on different\nversions of browsers and Node.js.\n\nBy design, ASAP prevents input events from being handled until the task\nqueue is empty.\nIf the process is busy enough, this may cause incoming connection requests to be\ndropped, and may cause existing connections to inform the sender to reduce the\ntransmission rate or stall.\nASAP allows this on the theory that, if there is enough work to do, there is no\nsense in looking for trouble.\nAs a consequence, ASAP can interfere with smooth animation.\nIf your task should be tied to the rendering loop, consider using\n`requestAnimationFrame` instead.\nA long sequence of tasks can also effect the long running script dialog.\nIf this is a problem, you may be able to use ASAP’s cousin `setImmediate` to\nbreak long processes into shorter intervals and periodically allow the browser\nto breathe.\n`setImmediate` will yield for IO, reflow, and repaint events.\nIt also returns a handler and can be canceled.\nFor a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].\n\n[setImmediate]: https://github.com/YuzuJS/setImmediate\n\nTake care.\nASAP can sustain infinite recursive calls without warning.\nIt will not halt from a stack overflow, and it will not consume unbounded\nmemory.\nThis is behaviorally equivalent to an infinite loop.\nJust as with infinite loops, you can monitor a Node.js process for this behavior\nwith a heart-beat signal.\nAs with infinite loops, a very small amount of caution goes a long way to\navoiding problems.\n\n```javascript\nfunction loop() {\n asap(loop);\n}\nloop();\n```\n\nIn browsers, if a task throws an exception, it will not interrupt the flushing\nof high-priority tasks.\nThe exception will be postponed to a later, low-priority event to avoid\nslow-downs.\nIn Node.js, if a task throws an exception, ASAP will resume flushing only if—and\nonly after—the error is handled by `domain.on(\"error\")` or\n`process.on(\"uncaughtException\")`.\n\n## Raw ASAP\n\nChecking for exceptions comes at a cost.\nThe package also provides an `asap/raw` module that exports the underlying\nimplementation which is faster but stalls if a task throws an exception.\nThis internal version of the ASAP function does not check for errors.\nIf a task does throw an error, it will stall the event queue unless you manually\ncall `rawAsap.requestFlush()` before throwing the error, or any time after.\n\nIn Node.js, `asap/raw` also runs all tasks outside any domain.\nIf you need a task to be bound to your domain, you will have to do it manually.\n\n```js\nif (process.domain) {\n task = process.domain.bind(task);\n}\nrawAsap(task);\n```\n\n## Tasks\n\nA task may be any object that implements `call()`.\nA function will suffice, but closures tend not to be reusable and can cause\ngarbage collector churn.\nBoth `asap` and `rawAsap` accept task objects to give you the option of\nrecycling task objects or using higher callable object abstractions.\nSee the `asap` source for an illustration.\n\n\n## Compatibility\n\nASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.\nThe following charts capture the browser test results for the most recent\nrelease.\nThe first chart shows test results for ASAP running in the main window context.\nThe second chart shows test results for ASAP running in a web worker context.\nTest results are inconclusive (grey) on browsers that do not support web\nworkers.\nThese data are captured automatically by [Continuous\nIntegration][].\n\n[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md\n\n![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)\n\n![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)\n\n## Caveats\n\nWhen a task is added to an empty event queue, it is not always possible to\nguarantee that the task queue will begin flushing immediately after the current\nevent.\nHowever, once the task queue begins flushing, it will not yield until the queue\nis empty, even if the queue grows while executing tasks.\n\nThe following browsers allow the use of [DOM mutation observers][] to access\nthe HTML [microtask queue][], and thus begin flushing ASAP's task queue\nimmediately at the end of the current event loop turn, before any rendering or\nIO:\n\n[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue\n[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers\n\n- Android 4–4.3\n- Chrome 26–34\n- Firefox 14–29\n- Internet Explorer 11\n- iPad Safari 6–7.1\n- iPhone Safari 7–7.1\n- Safari 6–7\n\nIn the absense of mutation observers, there are a few browsers, and situations\nlike web workers in some of the above browsers, where [message channels][]\nwould be a useful way to avoid falling back to timers.\nMessage channels give direct access to the HTML [task queue][], so the ASAP\ntask queue would flush after any already queued rendering and IO tasks, but\nwithout having the minimum delay imposed by timers.\nHowever, among these browsers, Internet Explorer 10 and Safari do not reliably\ndispatch messages, so they are not worth the trouble to implement.\n\n[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels\n[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task\n\n- Internet Explorer 10\n- Safair 5.0-1\n- Opera 11-12\n\nIn the absense of mutation observers, these browsers and the following browsers\nall fall back to using `setTimeout` and `setInterval` to ensure that a `flush`\noccurs.\nThe implementation uses both and cancels whatever handler loses the race, since\n`setTimeout` tends to occasionally skip tasks in unisolated circumstances.\nTimers generally delay the flushing of ASAP's task queue for four milliseconds.\n\n- Firefox 3–13\n- Internet Explorer 6–10\n- iPad Safari 4.3\n- Lynx 2.8.7\n\n\n## Heritage\n\nASAP has been factored out of the [Q][] asynchronous promise library.\nIt originally had a naïve implementation in terms of `setTimeout`, but\n[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be\nuseful for creating a high-priority, no-delay event dispatch hack.\nSince then, Internet Explorer proposed and implemented `setImmediate`.\nRobert Katić began contributing to Q by measuring the performance of\nthe internal implementation of `asap`, paying particular attention to\nerror recovery.\nDomenic, Robert, and Kris Kowal collectively settled on the current strategy of\nunrolling the high-priority event queue internally regardless of what strategy\nwe used to dispatch the potentially lower-priority flush event.\nDomenic went on to make ASAP cooperate with Node.js domains.\n\n[Q]: https://github.com/kriskowal/q\n[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html\n\nFor further reading, Nicholas Zakas provided a thorough article on [The\nCase for setImmediate][NCZ].\n\n[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/\n\nEmber’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but\nfurther developed the implentation.\nParticularly, The `MessagePort` implementation was abandoned due to interaction\n[problems with Mobile Internet Explorer][IE Problems] in favor of an\nimplementation backed on the newer and more reliable DOM `MutationObserver`\ninterface.\nThese changes were back-ported into this library.\n\n[IE Problems]: https://github.com/cujojs/when/issues/197\n[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\nIn addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained\nexception-safe, but `asap/raw` provided a tight kernel that could be used for\ntasks that guaranteed that they would not throw exceptions.\nThis core is useful for promise implementations that capture thrown errors in\nrejected promises and do not need a second safety net.\nAt the same time, the exception handling in `asap` was factored into separate\nimplementations for Node.js and browsers, using the the [Browserify][Browser\nConfig] `browser` property in `package.json` to instruct browser module loaders\nand bundlers, including [Browserify][], [Mr][], and [Mop][], to use the\nbrowser-only implementation.\n\n[Browser Config]: https://gist.github.com/defunctzombie/4339901\n[Browserify]: https://github.com/substack/node-browserify\n[Mr]: https://github.com/montagejs/mr\n[Mop]: https://github.com/montagejs/mop\n\n## License\n\nCopyright 2009-2014 by Contributors\nMIT License (enclosed)\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/kriskowal/asap/issues" - }, - "homepage": "https://github.com/kriskowal/asap#readme", - "_id": "asap@2.0.3", - "_shasum": "1fc1d1564ee11620dfca6d67029850913f9f4679", - "_resolved": "https://registry.npmjs.org/asap/-/asap-2.0.3.tgz", - "_from": "asap@>=2.0.0 <3.0.0" -} diff --git a/deps/npm/node_modules/fstream/.travis.yml b/deps/npm/node_modules/fstream/.travis.yml index a092c82b26fc41..9f5972ab5aa1cd 100644 --- a/deps/npm/node_modules/fstream/.travis.yml +++ b/deps/npm/node_modules/fstream/.travis.yml @@ -1,9 +1,9 @@ language: node_js node_js: - - iojs - - 0.12 - - 0.10 - - 0.8 + - "6" + - "4" + - "0.10" + - "0.12" before_install: - "npm config set spin false" - "npm install -g npm/npm" diff --git a/deps/npm/node_modules/fstream/lib/collect.js b/deps/npm/node_modules/fstream/lib/collect.js index 6245e6ce492d20..e5d4f35833476e 100644 --- a/deps/npm/node_modules/fstream/lib/collect.js +++ b/deps/npm/node_modules/fstream/lib/collect.js @@ -3,6 +3,8 @@ module.exports = collect function collect (stream) { if (stream._collected) return + if (stream._paused) return stream.on('resume', collect.bind(null, stream)) + stream._collected = true stream.pause() diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json index dd1f45fc99faf6..cb1ad42e11db23 100644 --- a/deps/npm/node_modules/fstream/package.json +++ b/deps/npm/node_modules/fstream/package.json @@ -1,19 +1,62 @@ { + "_args": [ + [ + { + "raw": "fstream@~1.0.10", + "scope": null, + "escapedName": "fstream", + "name": "fstream", + "rawSpec": "~1.0.10", + "spec": ">=1.0.10 <1.1.0", + "type": "range" + }, + "/Users/ogd/Documents/projects/npm/npm" + ] + ], + "_from": "fstream@>=1.0.10 <1.1.0", + "_id": "fstream@1.0.10", + "_inCache": true, + "_installable": true, + "_location": "/fstream", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/fstream-1.0.10.tgz_1466189553883_0.3062701092567295" + }, + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "_npmVersion": "3.10.0", + "_phantomChildren": {}, + "_requested": { + "raw": "fstream@~1.0.10", + "scope": null, + "escapedName": "fstream", + "name": "fstream", + "rawSpec": "~1.0.10", + "spec": ">=1.0.10 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "#USER", + "/", + "/fstream-npm/fstream-ignore", + "/node-gyp", + "/tar" + ], + "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz", + "_shasum": "604e8a92fe26ffd9f6fae30399d4984e1ab22822", + "_shrinkwrap": null, + "_spec": "fstream@~1.0.10", + "_where": "/Users/ogd/Documents/projects/npm/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "name": "fstream", - "description": "Advanced file system stream things", - "version": "1.0.8", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/fstream.git" - }, - "main": "fstream.js", - "engines": { - "node": ">=0.6" + "bugs": { + "url": "https://github.com/npm/fstream/issues" }, "dependencies": { "graceful-fs": "^4.1.2", @@ -21,32 +64,23 @@ "mkdirp": ">=0.5 0", "rimraf": "2" }, + "description": "Advanced file system stream things", "devDependencies": { "standard": "^4.0.0", "tap": "^1.2.0" }, - "scripts": { - "test": "standard && tap examples/*.js" - }, - "license": "ISC", - "gitHead": "d9f81146c50e687f1df04c1a0e7e4c173eb3dae2", - "bugs": { - "url": "https://github.com/isaacs/fstream/issues" - }, - "homepage": "https://github.com/isaacs/fstream#readme", - "_id": "fstream@1.0.8", - "_shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038", - "_from": "fstream@>=1.0.8 <1.1.0", - "_npmVersion": "2.14.3", - "_nodeVersion": "2.2.2", - "_npmUser": { - "name": "zkat", - "email": "kat@sykosomatic.org" - }, + "directories": {}, "dist": { - "shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038", - "tarball": "http://registry.npmjs.org/fstream/-/fstream-1.0.8.tgz" + "shasum": "604e8a92fe26ffd9f6fae30399d4984e1ab22822", + "tarball": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz" }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "24fabdec32e334dd3b130d77b38c010e3119b102", + "homepage": "https://github.com/npm/fstream#readme", + "license": "ISC", + "main": "fstream.js", "maintainers": [ { "name": "iarna", @@ -65,7 +99,15 @@ "email": "kat@sykosomatic.org" } ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.8.tgz", - "readme": "ERROR: No README data found!" + "name": "fstream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fstream.git" + }, + "scripts": { + "test": "standard && tap examples/*.js" + }, + "version": "1.0.10" } diff --git a/deps/npm/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md deleted file mode 100644 index 9dd9384fa143c3..00000000000000 --- a/deps/npm/node_modules/glob/README.md +++ /dev/null @@ -1,365 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](oh-my-glob.gif) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js index 4dba04adec43c4..02d15b755dd84e 100644 --- a/deps/npm/node_modules/glob/glob.js +++ b/deps/npm/node_modules/glob/glob.js @@ -41,6 +41,7 @@ module.exports = glob var fs = require('fs') +var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch var inherits = require('inherits') @@ -232,7 +233,7 @@ Glob.prototype._realpathSet = function (index, cb) { // one or more of the links in the realpath couldn't be // resolved. just return the abs value in that case. p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { + rp.realpath(p, self.realpathCache, function (er, real) { if (!er) set[real] = true else if (er.syscall === 'stat') diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE b/deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE new file mode 100644 index 00000000000000..5bd884c252ac49 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE @@ -0,0 +1,43 @@ +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 +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. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + 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/glob/node_modules/fs.realpath/README.md b/deps/npm/node_modules/glob/node_modules/fs.realpath/README.md new file mode 100644 index 00000000000000..a42ceac62663ac --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/README.md @@ -0,0 +1,33 @@ +# fs.realpath + +A backwards-compatible fs.realpath for Node v6 and above + +In Node v6, the JavaScript implementation of fs.realpath was replaced +with a faster (but less resilient) native implementation. That raises +new and platform-specific errors and cannot handle long or excessively +symlink-looping paths. + +This module handles those cases by detecting the new errors and +falling back to the JavaScript implementation. On versions of Node +prior to v6, it has no effect. + +## USAGE + +```js +var rp = require('fs.realpath') + +// async version +rp.realpath(someLongAndLoopingPath, function (er, real) { + // the ELOOP was handled, but it was a bit slower +}) + +// sync version +var real = rp.realpathSync(someLongAndLoopingPath) + +// monkeypatch at your own risk! +// This replaces the fs.realpath/fs.realpathSync builtins +rp.monkeypatch() + +// un-do the monkeypatching +rp.unmonkeypatch() +``` diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/index.js b/deps/npm/node_modules/glob/node_modules/fs.realpath/index.js new file mode 100644 index 00000000000000..b09c7c7e6364da --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/index.js @@ -0,0 +1,66 @@ +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = require('fs') +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = require('./old.js') + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/old.js b/deps/npm/node_modules/glob/node_modules/fs.realpath/old.js new file mode 100644 index 00000000000000..b40305e73fd583 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/old.js @@ -0,0 +1,303 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var pathModule = require('path'); +var isWindows = process.platform === 'win32'; +var fs = require('fs'); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json b/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json new file mode 100644 index 00000000000000..b235390a5d43b1 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + { + "raw": "fs.realpath@^1.0.0", + "scope": null, + "name": "fs.realpath", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/glob" + ] + ], + "_from": "fs.realpath@>=1.0.0 <2.0.0", + "_id": "fs.realpath@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/glob/fs.realpath", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/fs.realpath-1.0.0.tgz_1466015941059_0.3332864767871797" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "fs.realpath@^1.0.0", + "scope": null, + "name": "fs.realpath", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", + "_shrinkwrap": null, + "_spec": "fs.realpath@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/glob", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/fs.realpath/issues" + }, + "dependencies": {}, + "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", + "tarball": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "files": [ + "old.js", + "index.js" + ], + "gitHead": "03e7c884431fe185dfebbc9b771aeca339c1807a", + "homepage": "https://github.com/isaacs/fs.realpath#readme", + "keywords": [ + "realpath", + "fs", + "polyfill" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "fs.realpath", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/fs.realpath.git" + }, + "scripts": { + "test": "tap test/*.js --cov" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore deleted file mode 100644 index 353546af2368e1..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -test -.gitignore -.travis.yml diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js deleted file mode 100644 index 36cde4de5c114b..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +++ /dev/null @@ -1,7 +0,0 @@ -var expand = require('./'); - -console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); -console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); -console.log(expand('http://www.letters.com/file{a..z..2}.txt')); -console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); -console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore index fd4f2b066b339e..ae5d8c36ac6522 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore @@ -1,2 +1,5 @@ -node_modules -.DS_Store +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml deleted file mode 100644 index 6e5919de39a312..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile deleted file mode 100644 index dd2730cfde0cab..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @node_modules/.bin/tape test/*.js - -.PHONY: test diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md index 421f3aa5f951a2..d6880b2f36e72b 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -1,6 +1,6 @@ # balanced-match -Match balanced string pairs, like `{` and `}` or `` and ``. +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! [![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) [![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) @@ -16,6 +16,7 @@ var balanced = require('balanced-match'); console.log(balanced('{', '}', 'pre{in{nested}}post')); console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); ``` The matches are: @@ -28,6 +29,7 @@ $ node example.js pre: 'pre', body: 'first', post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } ``` ## API diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js deleted file mode 100644 index 9ce76f480a4321..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +++ /dev/null @@ -1,4 +0,0 @@ -var balanced = require('./'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js index 75f3d71cba90bc..4670f7f79f4d2a 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -1,5 +1,8 @@ module.exports = balanced; function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r = range(a, b, str); return r && { @@ -11,6 +14,11 @@ function balanced(a, b, str) { }; } +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index 5de119ba5b5760..208e61972bfc94 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -1,41 +1,52 @@ { "_args": [ [ - "balanced-match@^0.3.0", + { + "raw": "balanced-match@^0.4.1", + "scope": null, + "name": "balanced-match", + "rawSpec": "^0.4.1", + "spec": ">=0.4.1 <0.5.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion" ] ], - "_from": "balanced-match@>=0.3.0 <0.4.0", - "_id": "balanced-match@0.3.0", + "_from": "balanced-match@>=0.4.1 <0.5.0", + "_id": "balanced-match@0.4.1", "_inCache": true, "_installable": true, "_location": "/glob/minimatch/brace-expansion/balanced-match", - "_nodeVersion": "4.2.1", + "_nodeVersion": "6.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144" + }, "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, - "_npmVersion": "2.14.7", + "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "name": "balanced-match", - "raw": "balanced-match@^0.3.0", - "rawSpec": "^0.3.0", + "raw": "balanced-match@^0.4.1", "scope": null, - "spec": ">=0.3.0 <0.4.0", + "name": "balanced-match", + "rawSpec": "^0.4.1", + "spec": ">=0.4.1 <0.5.0", "type": "range" }, "_requiredBy": [ "/glob/minimatch/brace-expansion" ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz", - "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz", + "_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335", "_shrinkwrap": null, - "_spec": "balanced-match@^0.3.0", + "_spec": "balanced-match@^0.4.1", "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion", "author": { - "email": "mail@juliangruber.com", "name": "Julian Gruber", + "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "bugs": { @@ -44,21 +55,21 @@ "dependencies": {}, "description": "Match balanced character pairs, like \"{\" and \"}\"", "devDependencies": { - "tape": "~4.2.2" + "tape": "~4.5.0" }, "directories": {}, "dist": { - "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", - "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" + "shasum": "19053e2e0748eadb379da6c09d455cf5e1039335", + "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz" }, - "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5", + "gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863", "homepage": "https://github.com/juliangruber/balanced-match", "keywords": [ - "balanced", "match", - "parse", "regexp", - "test" + "test", + "balanced", + "parse" ], "license": "MIT", "main": "index.js", @@ -79,20 +90,20 @@ "test": "make test" }, "testling": { + "files": "test/*.js", "browsers": [ - "android-browser/4.2..latest", - "chrome/25..latest", - "chrome/canary", + "ie/8..latest", "firefox/20..latest", "firefox/nightly", - "ie/8..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", + "chrome/25..latest", + "chrome/canary", "opera/12..latest", "opera/next", - "safari/5.1..latest" - ], - "files": "test/*.js" + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] }, - "version": "0.3.0" + "version": "0.4.1" } diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js deleted file mode 100644 index f5e98e3f2a3240..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +++ /dev/null @@ -1,84 +0,0 @@ -var test = require('tape'); -var balanced = require('..'); - -test('balanced', function(t) { - t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), { - start: 3, - end: 12, - pre: 'pre', - body: 'in{nest}', - post: 'post' - }); - t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), { - start: 8, - end: 11, - pre: '{{{{{{{{', - body: 'in', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre{body{in}post'), { - start: 8, - end: 11, - pre: 'pre{body', - body: 'in', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), { - start: 4, - end: 13, - pre: 'pre}', - body: 'in{nest}', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), { - start: 3, - end: 8, - pre: 'pre', - body: 'body', - post: 'between{body2}post' - }); - t.notOk(balanced('{', '}', 'nope'), 'should be notOk'); - t.deepEqual(balanced('', '', 'preinnestpost'), { - start: 3, - end: 19, - pre: 'pre', - body: 'innest', - post: 'post' - }); - t.deepEqual(balanced('', '', 'preinnestpost'), { - start: 7, - end: 23, - pre: 'pre', - body: 'innest', - post: 'post' - }); - t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), { - start: 3, - end: 9, - pre: 'pre', - body: '{in}', - post: 'post' - }); - t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), { - start: 3, - end: 8, - pre: 'pre', - body: 'in', - post: '}post' - }); - t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), { - start: 4, - end: 10, - pre: 'pre{', - body: 'first', - post: 'in{second}post' - }); - t.deepEqual(balanced('', 'prepost'), { - start: 3, - end: 4, - pre: 'pre', - body: '', - post: 'post' - }); - t.end(); -}); diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json index 2917f0eac0e7bf..3ffc8da5c03baa 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -1,76 +1,83 @@ { "_args": [ [ - "brace-expansion@^1.0.0", + { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch" ] ], "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_id": "brace-expansion@1.1.3", + "_id": "brace-expansion@1.1.5", "_inCache": true, "_installable": true, "_location": "/glob/minimatch/brace-expansion", - "_nodeVersion": "5.5.0", + "_nodeVersion": "4.4.5", "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/brace-expansion-1.1.3.tgz_1455216688668_0.948847763473168" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/brace-expansion-1.1.5.tgz_1465989660138_0.34528115345165133" }, "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, - "_npmVersion": "3.3.12", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "brace-expansion", "raw": "brace-expansion@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "name": "brace-expansion", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/glob/minimatch" ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz", - "_shasum": "46bff50115d47fc9ab89854abb87d98078a10991", + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz", + "_shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526", "_shrinkwrap": null, "_spec": "brace-expansion@^1.0.0", "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch", "author": { - "email": "mail@juliangruber.com", "name": "Julian Gruber", + "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, "dependencies": { - "balanced-match": "^0.3.0", + "balanced-match": "^0.4.1", "concat-map": "0.0.1" }, "description": "Brace expansion as known from sh/bash", "devDependencies": { - "tape": "4.4.0" + "tape": "4.5.1" }, "directories": {}, "dist": { - "shasum": "46bff50115d47fc9ab89854abb87d98078a10991", - "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz" + "shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz" }, - "gitHead": "f0da1bb668e655f67b6b2d660c6e1c19e2a6f231", + "gitHead": "ff31acab078f1bb696ac4c55ca56ea24e6495fb6", "homepage": "https://github.com/juliangruber/brace-expansion", "keywords": [], "license": "MIT", "main": "index.js", "maintainers": [ { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, { - "email": "isaacs@npmjs.com", - "name": "isaacs" + "name": "isaacs", + "email": "isaacs@npmjs.com" } ], "name": "brace-expansion", @@ -85,6 +92,7 @@ "test": "tape test/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/20..latest", @@ -97,8 +105,7 @@ "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" - ], - "files": "test/*.js" + ] }, - "version": "1.1.3" + "version": "1.1.5" } diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index cf191d217966b1..253686f9b4b37c 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -1,53 +1,62 @@ { "_args": [ [ - "glob@7.0.3", + { + "raw": "glob@~7.0.3", + "scope": null, + "name": "glob", + "rawSpec": "~7.0.3", + "spec": ">=7.0.3 <7.1.0", + "type": "range" + }, "/Users/rebecca/code/npm" ] ], - "_from": "glob@7.0.3", - "_id": "glob@7.0.3", + "_from": "glob@>=7.0.3 <7.1.0", + "_id": "glob@7.0.4", "_inCache": true, "_installable": true, "_location": "/glob", - "_nodeVersion": "5.6.0", + "_nodeVersion": "6.2.1", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/glob-7.0.3.tgz_1457166529288_0.7840580905321985" + "tmp": "tmp/glob-7.0.4.tgz_1466098181857_0.6043217403348535" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, - "_npmVersion": "3.7.3", + "_npmVersion": "3.9.3", "_phantomChildren": {}, "_requested": { - "name": "glob", - "raw": "glob@7.0.3", - "rawSpec": "7.0.3", + "raw": "glob@~7.0.3", "scope": null, - "spec": "7.0.3", - "type": "version" + "name": "glob", + "rawSpec": "~7.0.3", + "spec": ">=7.0.3 <7.1.0", + "type": "range" }, "_requiredBy": [ + "#USER", "/", "/rimraf", "/tap" ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz", - "_shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.4.tgz", + "_shasum": "3b44afa0943bdc31b2037b934791e2e084bcb7f6", "_shrinkwrap": null, - "_spec": "glob@7.0.3", + "_spec": "glob@~7.0.3", "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "dependencies": { + "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "2 || 3", @@ -63,8 +72,8 @@ }, "directories": {}, "dist": { - "shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", - "tarball": "http://registry.npmjs.org/glob/-/glob-7.0.3.tgz" + "shasum": "3b44afa0943bdc31b2037b934791e2e084bcb7f6", + "tarball": "https://registry.npmjs.org/glob/-/glob-7.0.4.tgz" }, "engines": { "node": "*" @@ -74,14 +83,14 @@ "sync.js", "common.js" ], - "gitHead": "2fc2278ab857c7df117213a2fb431de090be6353", + "gitHead": "3f883c43fec4f8046cbea9497add3b8ba4ef0a37", "homepage": "https://github.com/isaacs/node-glob#readme", "license": "ISC", "main": "glob.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "glob", @@ -100,5 +109,5 @@ "test": "tap test/*.js --cov", "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" }, - "version": "7.0.3" + "version": "7.0.4" } diff --git a/deps/npm/node_modules/glob/sync.js b/deps/npm/node_modules/glob/sync.js index 301577ab5f228f..bba2dc6a0c14e1 100644 --- a/deps/npm/node_modules/glob/sync.js +++ b/deps/npm/node_modules/glob/sync.js @@ -2,6 +2,7 @@ module.exports = globSync globSync.GlobSync = GlobSync var fs = require('fs') +var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch var Glob = require('./glob.js').Glob @@ -57,7 +58,7 @@ GlobSync.prototype._finish = function () { for (var p in matchset) { try { p = self._makeAbs(p) - var real = fs.realpathSync(p, self.realpathCache) + var real = rp.realpathSync(p, self.realpathCache) set[real] = true } catch (er) { if (er.syscall === 'stat') diff --git a/deps/npm/node_modules/lodash.isarray/README.md b/deps/npm/node_modules/lodash.isarray/README.md deleted file mode 100644 index da1580fabe9919..00000000000000 --- a/deps/npm/node_modules/lodash.isarray/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isarray v4.0.0 - -The [lodash](https://lodash.com/) method `_.isArray` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isarray -``` - -In Node.js: -```js -var isArray = require('lodash.isarray'); -``` - -See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.isarray) for more details. diff --git a/deps/npm/node_modules/lodash.isarray/index.js b/deps/npm/node_modules/lodash.isarray/index.js deleted file mode 100644 index 105fd4249e782f..00000000000000 --- a/deps/npm/node_modules/lodash.isarray/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; diff --git a/deps/npm/node_modules/lodash.isarray/package.json b/deps/npm/node_modules/lodash.isarray/package.json deleted file mode 100644 index 606f67a82fcd5a..00000000000000 --- a/deps/npm/node_modules/lodash.isarray/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - "lodash.isarray@latest", - "/Users/rebecca/code/npm" - ] - ], - "_from": "lodash.isarray@latest", - "_id": "lodash.isarray@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/lodash.isarray", - "_nodeVersion": "5.4.0", - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.15", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.isarray", - "raw": "lodash.isarray@latest", - "rawSpec": "latest", - "scope": null, - "spec": "latest", - "type": "tag" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-4.0.0.tgz", - "_shasum": "2aca496b28c4ca6d726715313590c02e6ea34403", - "_shrinkwrap": null, - "_spec": "lodash.isarray@latest", - "_where": "/Users/rebecca/code/npm", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.isArray` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "2aca496b28c4ca6d726715313590c02e6ea34403", - "tarball": "http://registry.npmjs.org/lodash.isarray/-/lodash.isarray-4.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "isarray", - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.0" -} diff --git a/deps/npm/node_modules/lodash.keys/README.md b/deps/npm/node_modules/lodash.keys/README.md deleted file mode 100644 index 5c9c49c6271996..00000000000000 --- a/deps/npm/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.keys v4.0.7 - -The [lodash](https://lodash.com/) method `_.keys` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.keys -``` - -In Node.js: -```js -var keys = require('lodash.keys'); -``` - -See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/4.0.7-npm-packages/lodash.keys) for more details. diff --git a/deps/npm/node_modules/lodash.keys/index.js b/deps/npm/node_modules/lodash.keys/index.js deleted file mode 100644 index 39530dfc6f7ab9..00000000000000 --- a/deps/npm/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,468 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - stringTag = '[object String]'; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetPrototype = Object.getPrototypeOf, - nativeKeys = Object.keys; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); -} - -/** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - return nativeKeys(Object(object)); -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Gets the `[[Prototype]]` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. - */ -function getPrototype(value) { - return nativeGetPrototype(Object(value)); -} - -/** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. - * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. - */ -function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @type {Function} - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; -} - -module.exports = keys; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/LICENSE @@ -0,0 +1,15 @@ +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 +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/node-gyp/node_modules/npmlog/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/README.md new file mode 100644 index 00000000000000..a57cf429d4a6fa --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/README.md @@ -0,0 +1,195 @@ +# 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) + +Overrides the default gauge template. + +## 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.` Emitted for all messages with the `` level. +* `` 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()` diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/log.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/log.js new file mode 100644 index 00000000000000..8d781f17319084 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/log.js @@ -0,0 +1,251 @@ +'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 ansi = require('ansi') +log.cursor = ansi(process.stderr) +log.stream = process.stderr + +// by default, let ansi decide based on tty-ness. +var colorEnabled = undefined +log.enableColor = function () { + colorEnabled = true + this.cursor.enabled = true +} +log.disableColor = function () { + colorEnabled = false + this.cursor.enabled = false +} + +// default level +log.level = 'info' + +log.gauge = new Gauge(log.cursor) +log.tracker = new Progress.TrackerGroup() + +// no progress bars unless asked +log.progressEnabled = false + +var gaugeTheme = undefined + +log.enableUnicode = function () { + gaugeTheme = Gauge.unicode + log.gauge.setTheme(gaugeTheme) +} + +log.disableUnicode = function () { + gaugeTheme = Gauge.ascii + log.gauge.setTheme(gaugeTheme) +} + +var gaugeTemplate = undefined +log.setGaugeTemplate = function (template) { + gaugeTemplate = template + log.gauge.setTemplate(gaugeTemplate) +} + +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 () { + if (!this.progressEnabled) return + this.gauge.hide() +} + +log.showProgress = function (name, completed) { + if (!this.progressEnabled) return + if (completed == null) completed = this.tracker.completed() + this.gauge.show(name, completed) +}.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 style = log.style[m.level] + 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.write = function (msg, style) { + if (!this.cursor) return + if (this.stream !== this.cursor.stream) { + this.cursor = ansi(this.stream, { enabled: colorEnabled }) + var options = {} + if (gaugeTheme != null) options.theme = gaugeTheme + if (gaugeTemplate != null) options.template = gaugeTemplate + this.gauge = new Gauge(options, this.cursor) + } + + style = style || {} + if (style.fg) this.cursor.fg[style.fg]() + if (style.bg) this.cursor.bg[style.bg]() + if (style.bold) this.cursor.bold() + if (style.underline) this.cursor.underline() + if (style.inverse) this.cursor.inverse() + if (style.beep) this.cursor.beep() + this.cursor.write(msg).reset() +} + +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/npmlog/node_modules/ansi/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/.npmignore similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/.npmignore rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/.npmignore diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/History.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/History.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/History.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/History.md diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/LICENSE similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/LICENSE diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/README.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/README.md diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/beep/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/beep/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/beep/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/beep/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/clear/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/clear/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/progress/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/progress/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/progress/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/progress/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/lib/ansi.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/ansi.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/lib/ansi.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/ansi.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/lib/newlines.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/newlines.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/lib/newlines.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/newlines.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/package.json similarity index 60% rename from deps/npm/node_modules/npmlog/node_modules/ansi/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/package.json index f02794d71e2188..ce2366e31e1044 100644 --- a/deps/npm/node_modules/npmlog/node_modules/ansi/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/package.json @@ -1,15 +1,33 @@ { "_args": [ [ - "ansi@~0.3.0", + { + "name": "ansi", + "raw": "ansi@~0.3.1", + "rawSpec": "~0.3.1", + "scope": null, + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/npmlog" + ], + [ + { + "name": "ansi", + "raw": "ansi@~0.3.1", + "rawSpec": "~0.3.1", + "scope": null, + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog" ] ], - "_from": "ansi@>=0.3.0 <0.4.0", + "_from": "ansi@~0.3.1", "_id": "ansi@0.3.1", "_inCache": true, "_installable": true, - "_location": "/npmlog/ansi", + "_location": "/node-gyp/npmlog/ansi", "_nodeVersion": "5.3.0", "_npmUser": { "email": "nathan@tootallnate.net", @@ -19,21 +37,21 @@ "_phantomChildren": {}, "_requested": { "name": "ansi", - "raw": "ansi@~0.3.0", - "rawSpec": "~0.3.0", + "raw": "ansi@~0.3.1", + "rawSpec": "~0.3.1", "scope": null, - "spec": ">=0.3.0 <0.4.0", + "spec": ">=0.3.1 <0.4.0", "type": "range" }, "_requiredBy": [ - "/npmlog", - "/npmlog/gauge" + "/node-gyp/npmlog", + "/node-gyp/npmlog/gauge" ], "_resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", "_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", "_shrinkwrap": null, - "_spec": "ansi@~0.3.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog", + "_spec": "ansi@~0.3.1", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog", "author": { "email": "nathan@tootallnate.net", "name": "Nathan Rajlich", @@ -48,30 +66,30 @@ "directories": {}, "dist": { "shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", - "tarball": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" + "tarball": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" }, "gitHead": "4d0d4af94e0bdaa648bd7262acd3bde4b98d5246", "homepage": "https://github.com/TooTallNate/ansi.js#readme", "keywords": [ - "256", "ansi", - "color", - "cursor", "formatting", + "cursor", + "color", + "terminal", "rgb", - "stream", - "terminal" + "256", + "stream" ], "license": "MIT", "main": "./lib/ansi.js", "maintainers": [ { - "name": "TooTallNate", - "email": "nathan@tootallnate.net" + "email": "nathan@tootallnate.net", + "name": "TooTallNate" }, { - "name": "tootallnate", - "email": "nathan@tootallnate.net" + "email": "nathan@tootallnate.net", + "name": "tootallnate" } ], "name": "ansi", diff --git a/deps/npm/node_modules/abbrev/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore similarity index 75% rename from deps/npm/node_modules/abbrev/.npmignore rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore index 9d6cd2f025d4a6..bc818974f8633f 100644 --- a/deps/npm/node_modules/abbrev/.npmignore +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore @@ -1,4 +1,5 @@ -.nyc_output -nyc_output +*~ +.#* node_modules coverage +.nyc_output diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md new file mode 100644 index 00000000000000..e990b86ddfb416 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md @@ -0,0 +1,19 @@ +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE new file mode 100644 index 00000000000000..af4588069db82d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE @@ -0,0 +1,5 @@ +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md new file mode 100644 index 00000000000000..f8789800aa784c --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md @@ -0,0 +1,194 @@ +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js new file mode 100644 index 00000000000000..57d8743fdad177 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js @@ -0,0 +1,4 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore new file mode 100644 index 00000000000000..c2658d7d1b3184 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md new file mode 100644 index 00000000000000..25959eab67b840 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md @@ -0,0 +1,22 @@ + +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License new file mode 100644 index 00000000000000..60de60addbe7e9 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License @@ -0,0 +1,20 @@ +Copyright (c) 2015 TJ Holowaychuk + +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile new file mode 100644 index 00000000000000..a9dcfd50dbdb22 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile @@ -0,0 +1,8 @@ + +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md new file mode 100644 index 00000000000000..ab8cf4ace15939 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md @@ -0,0 +1,94 @@ + +# 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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js new file mode 100644 index 00000000000000..17c222d52935c6 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js @@ -0,0 +1,121 @@ + +/** + * 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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json new file mode 100644 index 00000000000000..502a040eda0f2e --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + { + "name": "delegates", + "raw": "delegates@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet" + ], + [ + { + "name": "delegates", + "raw": "delegates@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet" + ] + ], + "_from": "delegates@^1.0.0", + "_id": "delegates@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/are-we-there-yet/delegates", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "delegates", + "raw": "delegates@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/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/rebecca/code/npm/node_modules/node-gyp/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": [ + { + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" + }, + { + "email": "dominic@dbarnes.info", + "name": "dominicbarnes" + } + ], + "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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js new file mode 100644 index 00000000000000..7b6e3d4df19d90 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js @@ -0,0 +1,94 @@ + +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json new file mode 100644 index 00000000000000..bab98d6812a80a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "name": "are-we-there-yet", + "raw": "are-we-there-yet@~1.1.2", + "rawSpec": "~1.1.2", + "scope": null, + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog" + ], + [ + { + "name": "are-we-there-yet", + "raw": "are-we-there-yet@~1.1.2", + "rawSpec": "~1.1.2", + "scope": null, + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog" + ] + ], + "_from": "are-we-there-yet@~1.1.2", + "_id": "are-we-there-yet@1.1.2", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/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": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.8.1", + "_phantomChildren": {}, + "_requested": { + "name": "are-we-there-yet", + "raw": "are-we-there-yet@~1.1.2", + "rawSpec": "~1.1.2", + "scope": null, + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/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/rebecca/code/npm/node_modules/node-gyp/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": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js new file mode 100644 index 00000000000000..2aa7c05c5864fa --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js @@ -0,0 +1,29 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js new file mode 100644 index 00000000000000..374c7739d0c011 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js @@ -0,0 +1,57 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js new file mode 100644 index 00000000000000..799a7670b65934 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js @@ -0,0 +1,96 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js new file mode 100644 index 00000000000000..65f04b03769190 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js @@ -0,0 +1,51 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js new file mode 100644 index 00000000000000..6f436875578a7a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js @@ -0,0 +1,11 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js new file mode 100644 index 00000000000000..9759e1226db046 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js @@ -0,0 +1,107 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js new file mode 100644 index 00000000000000..fb9598ed4e9c31 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js @@ -0,0 +1,35 @@ +'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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js new file mode 100644 index 00000000000000..68c2339b45409a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js @@ -0,0 +1,30 @@ +'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/npmlog/node_modules/gauge/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/.npmignore similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/.npmignore rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/.npmignore diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/LICENSE new file mode 100644 index 00000000000000..e756052969b780 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014, 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/node-gyp/node_modules/npmlog/node_modules/gauge/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/README.md new file mode 100644 index 00000000000000..337dc9d8d45e14 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/README.md @@ -0,0 +1,166 @@ +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() +``` + +![](example.png) + + +### `var gauge = new Gauge([options], [ansiStream])` + +* **options** – *(optional)* An option object. (See [below] for details.) +* **ansiStream** – *(optional)* A stream that's been blessed by the [ansi] + module to include various commands for controlling the cursor in a terminal. + +[ansi]: https://www.npmjs.com/package/ansi +[below]: #theme-objects + +Constructs a new gauge. Gauges are drawn on a single line, and are not drawn +if the current terminal isn't a tty. + +If you resize your terminal in a way that can be detected then the gauge +will be drawn at the new size. As a general rule, growing your terminal will +be clean, but shrinking your terminal will result in cruft as we don't have +enough information to know where what we wrote previously is now located. + +The **options** object can have the following properties, all of which are +optional: + +* maxUpdateFrequency: defaults to 50 msec, the gauge will not be drawn more + than once in this period of time. This applies to `show` and `pulse` + calls, but if you `hide` and then `show` the gauge it will draw it + regardless of time since last draw. +* theme: defaults to Gauge.unicode` if the terminal supports + unicode according to [has-unicode], otherwise it defaults to `Gauge.ascii`. + Details on the [theme object](#theme-objects) are documented elsewhere. +* template: see [documentation elsewhere](#template-objects) for + defaults and details. + +[has-unicode]: https://www.npmjs.com/package/has-unicode + +If **ansiStream** isn't passed in, then one will be constructed from stderr +with `ansi(process.stderr)`. + +### `gauge.show([name, [completed]])` + +* **name** – *(optional)* The name of the current thing contributing to progress. Defaults to the last value used, or "". +* **completed** – *(optional)* The portion completed as a value between 0 and 1. Defaults to the last value used, or 0. + +If `process.stdout.isTTY` is false then this does nothing. If completed is 0 +and `gauge.pulse` has never been called, then similarly nothing will be printed. + +If `maxUpdateFrequency` msec haven't passed since the last call to `show` or +`pulse` then similarly, nothing will be printed. (Actually, the update is +deferred until `maxUpdateFrequency` msec have passed and if nothing else has +happened, the gauge update will happen.) + +### `gauge.hide()` + +Removes the gauge from the terminal. + +### `gauge.pulse([name])` + +* **name** – *(optional)* The specific thing that triggered this pulse + +Spins the spinner in the gauge to show output. If **name** is included then +it will be combined with the last name passed to `gauge.show` using the +subsection property of the theme (typically a right facing arrow). + +### `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.setTheme(theme)` + +Change the active theme, will be displayed with the next show or pulse + +### `gauge.setTemplate(template)` + +Change the active template, will be displayed with the next show or pulse + +### Theme Objects + +There are two theme objects available as a part of the module, `Gauge.unicode` and `Gauge.ascii`. +Theme objects have the follow properties: + +| Property | Unicode | ASCII | +| ---------- | ------- | ----- | +| startgroup | ╢ | \| | +| endgroup | ╟ | \| | +| complete | █ | # | +| incomplete | ░ | - | +| spinner | ▀▐▄▌ | -\\\|/ | +| subsection | → | -> | + +*startgroup*, *endgroup* and *subsection* can be as many characters as you want. + +*complete* and *incomplete* should be a single character width each. + +*spinner* is a list of characters to use in turn when displaying an activity +spinner. The Gauge will spin as many characters as you give here. + +### Template Objects + +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: "name", separated: true, maxLength: 25, minLength: 25, align: "left"}, + {type: "spinner", separated: true}, + {type: "startgroup"}, + {type: "completionbar"}, + {type: "endgroup"} +] +``` + +The various template elements can either be **plain strings**, in which case they will +be be included verbatum in the output. + +If the template element is an object, it can have the following keys: + +* *type* can be: + * `name` – The most recent name passed to `show`; if this is in response to a + `pulse` then the name passed to `pulse` will be appended along with the + subsection property from the theme. + * `spinner` – If you've ever called `pulse` this will be one of the characters + from the spinner property of the theme. + * `startgroup` – The `startgroup` property from the theme. + * `completionbar` – This progress bar itself + * `endgroup` – The `endgroup` property from the theme. +* *separated* – If true, the element will be separated with spaces from things on + either side (and margins count as space, so it won't be indented), but only + if its included. +* *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. + +### 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 diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/example.png b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/example.png similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/example.png rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/example.png diff --git a/deps/npm/node_modules/lodash.keys/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE similarity index 100% rename from deps/npm/node_modules/lodash.keys/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md index f43453bf2e04eb..57fb585913f433 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md @@ -1,4 +1,4 @@ -# lodash.pad v4.1.0 +# lodash.pad v4.4.0 The [lodash](https://lodash.com/) method `_.pad` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var pad = require('lodash.pad'); ``` -See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.pad) for more details. +See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.pad) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js similarity index 57% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js index 6220e0f831a714..876fbb967490ae 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js @@ -1,22 +1,25 @@ /** - * lodash 4.1.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var repeat = require('lodash.repeat'), +var baseSlice = require('lodash._baseslice'), + baseToString = require('lodash._basetostring'), toString = require('lodash.tostring'); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** `Object#toString` result references. */ var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -95,7 +98,8 @@ function stringToArray(string) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -104,30 +108,69 @@ var objectToString = objectProto.toString; var nativeCeil = Math.ceil, nativeFloor = Math.floor; +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. + * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ -function createPadding(string, length, chars) { - length = toInteger(length); +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); - var strLength = stringSize(string); - if (!length || strLength >= length) { - return ''; + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; } - var padLength = length - strLength; - chars = chars === undefined ? ' ' : (chars + ''); - - var result = repeat(chars, nativeCeil(padLength / stringSize(chars))); + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return reHasComplexSymbol.test(chars) - ? stringToArray(result).slice(0, padLength).join('') - : result.slice(0, padLength); + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** @@ -135,9 +178,11 @@ function createPadding(string, length, chars) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -148,18 +193,20 @@ function createPadding(string, length, chars) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. @@ -183,30 +230,80 @@ function isObject(value) { } /** - * Converts `value` to an integer. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 * @category Lang * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @returns {number} Returns the converted number. * @example * - * _.toInteger(3); - * // => 3 + * _.toFinite(3.2); + * // => 3.2 * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toInteger(Infinity); + * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); - * // => 3 + * _.toFinite('3.2'); + * // => 3.2 */ -function toInteger(value) { +function toFinite(value) { if (!value) { return value === 0 ? value : 0; } @@ -215,8 +312,40 @@ function toInteger(value) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + return value === value ? value : 0; +} + +/** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -224,13 +353,14 @@ function toInteger(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -238,10 +368,16 @@ function toInteger(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } if (isObject(value)) { var other = isFunction(value.valueOf) ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; @@ -262,6 +398,7 @@ function toNumber(value) { * * @static * @memberOf _ + * @since 3.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. @@ -282,15 +419,16 @@ function pad(string, length, chars) { string = toString(string); length = toInteger(length); - var strLength = stringSize(string); + var strLength = length ? stringSize(string) : 0; if (!length || strLength >= length) { return string; } - var mid = (length - strLength) / 2, - leftLength = nativeFloor(mid), - rightLength = nativeCeil(mid); - - return createPadding('', leftLength, chars) + string + createPadding('', rightLength, chars); + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); } module.exports = pad; diff --git a/deps/npm/node_modules/lodash.isarray/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/LICENSE similarity index 100% rename from deps/npm/node_modules/lodash.isarray/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/LICENSE diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md new file mode 100644 index 00000000000000..8cd4181ccdc00d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md @@ -0,0 +1,18 @@ +# lodash._baseslice v4.0.0 + +The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseslice +``` + +In Node.js: +```js +var baseSlice = require('lodash._baseslice'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js new file mode 100644 index 00000000000000..59293c3d0037a8 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js @@ -0,0 +1,40 @@ +/** + * lodash 4.0.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json similarity index 55% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json index b9946dcdbf7951..3be3e7b990dce3 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json @@ -1,42 +1,45 @@ { "_args": [ [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ] ], - "_from": "lodash.repeat@>=4.0.0 <5.0.0", - "_id": "lodash.repeat@4.0.0", + "_from": "lodash._baseslice@>=4.0.0 <4.1.0", + "_id": "lodash._baseslice@4.0.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.pad/lodash.repeat", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.repeat-4.0.0.tgz_1455602646227_0.7481637196615338" - }, + "_location": "/node-gyp/npmlog/gauge/lodash.pad/lodash._baseslice", + "_nodeVersion": "5.4.0", "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.14.15", "_phantomChildren": {}, "_requested": { - "name": "lodash.repeat", - "raw": "lodash.repeat@^4.0.0", - "rawSpec": "^4.0.0", + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", "scope": null, - "spec": ">=4.0.0 <5.0.0", + "spec": ">=4.0.0 <4.1.0", "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.pad" + "/node-gyp/npmlog/gauge/lodash.pad" ], - "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz", - "_shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", + "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", + "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704", "_shrinkwrap": null, - "_spec": "lodash.repeat@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", + "_spec": "lodash._baseslice@~4.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -62,22 +65,16 @@ "url": "https://mathiasbynens.be/" } ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.repeat` exported as a module.", + "dependencies": {}, + "description": "The internal lodash function `baseSlice` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz" + "shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "repeat" - ], "license": "MIT", "maintainers": [ { @@ -93,7 +90,7 @@ "name": "phated" } ], - "name": "lodash.repeat", + "name": "lodash._baseslice", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..ba060c94dadea0 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md @@ -0,0 +1,18 @@ +# lodash._basetostring v4.12.0 + +The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js: +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..d5848107499c34 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js @@ -0,0 +1,153 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/lodash.keys/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json similarity index 55% rename from deps/npm/node_modules/lodash.keys/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json index 0308e51443fbac..afe25bfc79986b 100644 --- a/deps/npm/node_modules/lodash.keys/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json @@ -1,19 +1,26 @@ { "_args": [ [ - "lodash.keys@latest", - "/Users/rebecca/code/npm" + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ] ], - "_from": "lodash.keys@latest", - "_id": "lodash.keys@4.0.7", + "_from": "lodash._basetostring@>=4.12.0 <4.13.0", + "_id": "lodash._basetostring@4.12.0", "_inCache": true, "_installable": true, - "_location": "/lodash.keys", + "_location": "/node-gyp/npmlog/gauge/lodash.pad/lodash._basetostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash.keys-4.0.7.tgz_1463062346790_0.19413627637550235" + "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261" }, "_npmUser": { "email": "john.david.dalton@gmail.com", @@ -22,21 +29,21 @@ "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "lodash.keys", - "raw": "lodash.keys@latest", - "rawSpec": "latest", + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", "scope": null, - "spec": "latest", - "type": "tag" + "spec": ">=4.12.0 <4.13.0", + "type": "range" }, "_requiredBy": [ - "/" + "/node-gyp/npmlog/gauge/lodash.pad" ], - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz", - "_shasum": "30e1b3bd98e54d6a0611991812685b6bc47cb63b", + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", "_shrinkwrap": null, - "_spec": "lodash.keys@latest", - "_where": "/Users/rebecca/code/npm", + "_spec": "lodash._basetostring@~4.12.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -63,19 +70,15 @@ } ], "dependencies": {}, - "description": "The lodash method `_.keys` exported as a module.", + "description": "The internal lodash function `baseToString` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "30e1b3bd98e54d6a0611991812685b6bc47cb63b", - "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz" + "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "keys" - ], "license": "MIT", "maintainers": [ { @@ -91,7 +94,7 @@ "name": "phated" } ], - "name": "lodash.keys", + "name": "lodash._basetostring", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { @@ -101,5 +104,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.0.7" + "version": "4.12.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md index b3858fd68e7866..75aa6b0699b4df 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md @@ -1,4 +1,4 @@ -# lodash.tostring v4.1.2 +# lodash.tostring v4.1.3 The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toString = require('lodash.tostring'); ``` -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. +See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js similarity index 81% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js index 5c0e3e2b987eb6..8a2cde39290e82 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ @@ -66,7 +66,8 @@ function checkGlobal(value) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -78,12 +79,33 @@ var Symbol = root.Symbol; var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -110,9 +132,11 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -127,11 +151,12 @@ function isSymbol(value) { } /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. @@ -147,18 +172,7 @@ function isSymbol(value) { * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json similarity index 68% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json index 8ee1a50433d1f6..9b829d126b64f8 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ] ], "_from": "lodash.tostring@>=4.0.0 <5.0.0", - "_id": "lodash.tostring@4.1.2", + "_id": "lodash.tostring@4.1.3", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.pad/lodash.tostring", + "_location": "/node-gyp/npmlog/gauge/lodash.pad/lodash.tostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/lodash.tostring-4.1.2.tgz_1456896853027_0.8195764778647572" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.17", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.tostring", @@ -30,14 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.pad", - "/npmlog/gauge/lodash.pad/lodash.repeat" + "/node-gyp/npmlog/gauge/lodash.pad" ], - "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz", - "_shasum": "7d326a5cf64da4298f2fd35b688d848267535288", + "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz", + "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", "_shrinkwrap": null, "_spec": "lodash.tostring@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -68,8 +74,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "tarball": "http://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz" + "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", + "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -102,5 +108,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.2" + "version": "4.1.3" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json similarity index 67% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json index 2b83241d5057e0..077525ba2a9737 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.pad@^4.1.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + { + "name": "lodash.pad", + "raw": "lodash.pad@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" ] ], "_from": "lodash.pad@>=4.1.0 <5.0.0", - "_id": "lodash.pad@4.1.0", + "_id": "lodash.pad@4.4.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.pad", + "_location": "/node-gyp/npmlog/gauge/lodash.pad", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.pad-4.1.0.tgz_1455615516420_0.3130727862007916" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.pad-4.4.0.tgz_1463062450475_0.3613762252498418" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.pad", @@ -30,13 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge" + "/node-gyp/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.1.0.tgz", - "_shasum": "dbbe3a9681fccb69970473a2263f50c196ac3aa9", + "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.4.0.tgz", + "_shasum": "faa38df26c0a69ec5086a82246c958e150dcb1ab", "_shrinkwrap": null, "_spec": "lodash.pad@^4.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -52,7 +59,7 @@ "url": "http://allyoucanleet.com/" }, { - "email": "blaine@iceddev.com", + "email": "blaine.bublitz@gmail.com", "name": "Blaine Bublitz", "url": "https://github.com/phated" }, @@ -63,15 +70,16 @@ } ], "dependencies": { - "lodash.repeat": "^4.0.0", + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", "lodash.tostring": "^4.0.0" }, "description": "The lodash method `_.pad` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "dbbe3a9681fccb69970473a2263f50c196ac3aa9", - "tarball": "http://registry.npmjs.org/lodash.pad/-/lodash.pad-4.1.0.tgz" + "shasum": "faa38df26c0a69ec5086a82246c958e150dcb1ab", + "tarball": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.4.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +112,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.0" + "version": "4.4.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md index ac84987849bf1a..909eef8f2215ef 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md @@ -1,4 +1,4 @@ -# lodash.padend v4.2.0 +# lodash.padend v4.5.0 The [lodash](https://lodash.com/) method `_.padEnd` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var padEnd = require('lodash.padend'); ``` -See the [documentation](https://lodash.com/docs#padEnd) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.padend) for more details. +See the [documentation](https://lodash.com/docs#padEnd) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.padend) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js similarity index 56% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js index d7c813a1dbd015..5af50372e338dd 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js @@ -1,22 +1,25 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var repeat = require('lodash.repeat'), +var baseSlice = require('lodash._baseslice'), + baseToString = require('lodash._basetostring'), toString = require('lodash.tostring'); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** `Object#toString` result references. */ var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -95,38 +98,79 @@ function stringToArray(string) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; +var nativeCeil = Math.ceil, + nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. + * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ -function createPadding(string, length, chars) { - length = toInteger(length); +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); - var strLength = stringSize(string); - if (!length || strLength >= length) { - return ''; + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; } - var padLength = length - strLength; - chars = chars === undefined ? ' ' : (chars + ''); - - var result = repeat(chars, nativeCeil(padLength / stringSize(chars))); + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return reHasComplexSymbol.test(chars) - ? stringToArray(result).slice(0, padLength).join('') - : result.slice(0, padLength); + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** @@ -134,9 +178,11 @@ function createPadding(string, length, chars) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -147,18 +193,20 @@ function createPadding(string, length, chars) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. @@ -182,30 +230,80 @@ function isObject(value) { } /** - * Converts `value` to an integer. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 * @category Lang * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @returns {number} Returns the converted number. * @example * - * _.toInteger(3); - * // => 3 + * _.toFinite(3.2); + * // => 3.2 * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toInteger(Infinity); + * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); - * // => 3 + * _.toFinite('3.2'); + * // => 3.2 */ -function toInteger(value) { +function toFinite(value) { if (!value) { return value === 0 ? value : 0; } @@ -214,8 +312,40 @@ function toInteger(value) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + return value === value ? value : 0; +} + +/** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -223,13 +353,14 @@ function toInteger(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -237,10 +368,16 @@ function toInteger(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } if (isObject(value)) { var other = isFunction(value.valueOf) ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; @@ -261,6 +398,7 @@ function toNumber(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. @@ -279,7 +417,12 @@ function toNumber(value) { */ function padEnd(string, length, chars) { string = toString(string); - return string + createPadding(string, length, chars); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; } module.exports = padEnd; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE new file mode 100644 index 00000000000000..b054ca5a3ac7d6 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md new file mode 100644 index 00000000000000..8cd4181ccdc00d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md @@ -0,0 +1,18 @@ +# lodash._baseslice v4.0.0 + +The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseslice +``` + +In Node.js: +```js +var baseSlice = require('lodash._baseslice'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js new file mode 100644 index 00000000000000..59293c3d0037a8 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js @@ -0,0 +1,40 @@ +/** + * lodash 4.0.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json similarity index 50% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json index 8bb2966c4a3149..69dbad217da375 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json @@ -1,44 +1,56 @@ { "_args": [ [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ], [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" ] ], - "_from": "lodash.repeat@>=4.0.0 <5.0.0", - "_id": "lodash.repeat@4.0.0", + "_from": "lodash._baseslice@~4.0.0", + "_id": "lodash._baseslice@4.0.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padstart/lodash.repeat", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.repeat-4.0.0.tgz_1455602646227_0.7481637196615338" - }, + "_location": "/node-gyp/npmlog/gauge/lodash.padend/lodash._baseslice", + "_nodeVersion": "5.4.0", "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.14.15", "_phantomChildren": {}, "_requested": { - "name": "lodash.repeat", - "raw": "lodash.repeat@^4.0.0", - "rawSpec": "^4.0.0", + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", "scope": null, - "spec": ">=4.0.0 <5.0.0", + "spec": ">=4.0.0 <4.1.0", "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.padstart" + "/node-gyp/npmlog/gauge/lodash.padend" ], + "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", + "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704", "_shrinkwrap": null, - "_spec": "lodash.repeat@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", + "_spec": "lodash._baseslice@~4.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -64,22 +76,16 @@ "url": "https://mathiasbynens.be/" } ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.repeat` exported as a module.", + "dependencies": {}, + "description": "The internal lodash function `baseSlice` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz" + "shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "repeat" - ], "license": "MIT", "maintainers": [ { @@ -95,7 +101,7 @@ "name": "phated" } ], - "name": "lodash.repeat", + "name": "lodash._baseslice", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..ba060c94dadea0 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md @@ -0,0 +1,18 @@ +# lodash._basetostring v4.12.0 + +The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js: +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..d5848107499c34 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js @@ -0,0 +1,153 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json new file mode 100644 index 00000000000000..11810e229268cb --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + ], + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" + ] + ], + "_from": "lodash._basetostring@~4.12.0", + "_id": "lodash._basetostring@4.12.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge/lodash.padend/lodash._basetostring", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261" + }, + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog/gauge/lodash.padend" + ], + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "_shrinkwrap": null, + "_spec": "lodash._basetostring@~4.12.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + { + "email": "blaine.bublitz@gmail.com", + "name": "Blaine Bublitz", + "url": "https://github.com/phated" + }, + { + "email": "mathias@qiwi.be", + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The internal lodash function `baseToString` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + { + "email": "mathias@qiwi.be", + "name": "mathias" + }, + { + "email": "blaine@iceddev.com", + "name": "phated" + } + ], + "name": "lodash._basetostring", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.12.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md index b3858fd68e7866..75aa6b0699b4df 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md @@ -1,4 +1,4 @@ -# lodash.tostring v4.1.2 +# lodash.tostring v4.1.3 The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toString = require('lodash.tostring'); ``` -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. +See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js similarity index 81% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js index 5c0e3e2b987eb6..8a2cde39290e82 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ @@ -66,7 +66,8 @@ function checkGlobal(value) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -78,12 +79,33 @@ var Symbol = root.Symbol; var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -110,9 +132,11 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -127,11 +151,12 @@ function isSymbol(value) { } /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. @@ -147,18 +172,7 @@ function isSymbol(value) { * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json similarity index 58% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json index 61501df10307e9..176ced6107ecca 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json @@ -1,29 +1,43 @@ { "_args": [ [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ], [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" ] ], - "_from": "lodash.tostring@>=4.0.0 <5.0.0", - "_id": "lodash.tostring@4.1.2", + "_from": "lodash.tostring@^4.0.0", + "_id": "lodash.tostring@4.1.3", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padend/lodash.tostring", + "_location": "/node-gyp/npmlog/gauge/lodash.padend/lodash.tostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/lodash.tostring-4.1.2.tgz_1456896853027_0.8195764778647572" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.17", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.tostring", @@ -34,12 +48,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.padend", - "/npmlog/gauge/lodash.padend/lodash.repeat" + "/node-gyp/npmlog/gauge/lodash.padend" ], + "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz", + "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", "_shrinkwrap": null, "_spec": "lodash.tostring@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -70,8 +85,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "tarball": "http://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz" + "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", + "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +119,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.2" + "version": "4.1.3" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json similarity index 67% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json index fa826877c5a5e4..e00e08add68262 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.padend@^4.1.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + { + "name": "lodash.padend", + "raw": "lodash.padend@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" ] ], "_from": "lodash.padend@>=4.1.0 <5.0.0", - "_id": "lodash.padend@4.2.0", + "_id": "lodash.padend@4.5.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padend", + "_location": "/node-gyp/npmlog/gauge/lodash.padend", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/lodash.padend-4.2.0.tgz_1455615519416_0.9670630963519216" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.padend-4.5.0.tgz_1463062451966_0.5034168094862252" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.padend", @@ -30,13 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge" + "/node-gyp/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.2.0.tgz", - "_shasum": "b84e8c3401d4538055c6e321a51e3aee19881a18", + "_resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.5.0.tgz", + "_shasum": "a289e9377ee2e6de8ba7f11f3a8eb326070b7619", "_shrinkwrap": null, "_spec": "lodash.padend@^4.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -52,7 +59,7 @@ "url": "http://allyoucanleet.com/" }, { - "email": "blaine@iceddev.com", + "email": "blaine.bublitz@gmail.com", "name": "Blaine Bublitz", "url": "https://github.com/phated" }, @@ -63,15 +70,16 @@ } ], "dependencies": { - "lodash.repeat": "^4.0.0", + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", "lodash.tostring": "^4.0.0" }, "description": "The lodash method `_.padEnd` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "b84e8c3401d4538055c6e321a51e3aee19881a18", - "tarball": "http://registry.npmjs.org/lodash.padend/-/lodash.padend-4.2.0.tgz" + "shasum": "a289e9377ee2e6de8ba7f11f3a8eb326070b7619", + "tarball": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.5.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +112,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.2.0" + "version": "4.5.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md index d3176b0012afb9..bcc1c5aa6710e0 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md @@ -1,4 +1,4 @@ -# lodash.padstart v4.2.0 +# lodash.padstart v4.5.0 The [lodash](https://lodash.com/) method `_.padStart` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var padStart = require('lodash.padstart'); ``` -See the [documentation](https://lodash.com/docs#padStart) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.padstart) for more details. +See the [documentation](https://lodash.com/docs#padStart) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.padstart) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js similarity index 56% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js index 9f403a1f857fae..456889536633cb 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js @@ -1,22 +1,25 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var repeat = require('lodash.repeat'), +var baseSlice = require('lodash._baseslice'), + baseToString = require('lodash._basetostring'), toString = require('lodash.tostring'); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** `Object#toString` result references. */ var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -95,38 +98,79 @@ function stringToArray(string) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; +var nativeCeil = Math.ceil, + nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. + * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ -function createPadding(string, length, chars) { - length = toInteger(length); +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); - var strLength = stringSize(string); - if (!length || strLength >= length) { - return ''; + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; } - var padLength = length - strLength; - chars = chars === undefined ? ' ' : (chars + ''); - - var result = repeat(chars, nativeCeil(padLength / stringSize(chars))); + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return reHasComplexSymbol.test(chars) - ? stringToArray(result).slice(0, padLength).join('') - : result.slice(0, padLength); + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** @@ -134,9 +178,11 @@ function createPadding(string, length, chars) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -147,18 +193,20 @@ function createPadding(string, length, chars) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. @@ -182,30 +230,80 @@ function isObject(value) { } /** - * Converts `value` to an integer. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 * @category Lang * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @returns {number} Returns the converted number. * @example * - * _.toInteger(3); - * // => 3 + * _.toFinite(3.2); + * // => 3.2 * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toInteger(Infinity); + * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); - * // => 3 + * _.toFinite('3.2'); + * // => 3.2 */ -function toInteger(value) { +function toFinite(value) { if (!value) { return value === 0 ? value : 0; } @@ -214,8 +312,40 @@ function toInteger(value) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + return value === value ? value : 0; +} + +/** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -223,13 +353,14 @@ function toInteger(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -237,10 +368,16 @@ function toInteger(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } if (isObject(value)) { var other = isFunction(value.valueOf) ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; @@ -261,6 +398,7 @@ function toNumber(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. @@ -279,7 +417,12 @@ function toNumber(value) { */ function padStart(string, length, chars) { string = toString(string); - return createPadding(string, length, chars) + string; + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; } module.exports = padStart; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE new file mode 100644 index 00000000000000..b054ca5a3ac7d6 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +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/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md new file mode 100644 index 00000000000000..8cd4181ccdc00d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md @@ -0,0 +1,18 @@ +# lodash._baseslice v4.0.0 + +The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseslice +``` + +In Node.js: +```js +var baseSlice = require('lodash._baseslice'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js new file mode 100644 index 00000000000000..59293c3d0037a8 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js @@ -0,0 +1,40 @@ +/** + * lodash 4.0.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json new file mode 100644 index 00000000000000..bf0bf651135204 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + ], + [ + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" + ] + ], + "_from": "lodash._baseslice@~4.0.0", + "_id": "lodash._baseslice@4.0.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge/lodash.padstart/lodash._baseslice", + "_nodeVersion": "5.4.0", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.14.15", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog/gauge/lodash.padstart" + ], + "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", + "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "_shrinkwrap": null, + "_spec": "lodash._baseslice@~4.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + { + "email": "blaine@iceddev.com", + "name": "Blaine Bublitz", + "url": "https://github.com/phated" + }, + { + "email": "mathias@qiwi.be", + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The internal lodash function `baseSlice` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + { + "email": "mathias@qiwi.be", + "name": "mathias" + }, + { + "email": "blaine@iceddev.com", + "name": "phated" + } + ], + "name": "lodash._baseslice", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.0.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..ba060c94dadea0 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md @@ -0,0 +1,18 @@ +# lodash._basetostring v4.12.0 + +The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js: +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..d5848107499c34 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js @@ -0,0 +1,153 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json new file mode 100644 index 00000000000000..1c42ea67ec4288 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + ], + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" + ] + ], + "_from": "lodash._basetostring@~4.12.0", + "_id": "lodash._basetostring@4.12.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge/lodash.padstart/lodash._basetostring", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261" + }, + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog/gauge/lodash.padstart" + ], + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "_shrinkwrap": null, + "_spec": "lodash._basetostring@~4.12.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + { + "email": "blaine.bublitz@gmail.com", + "name": "Blaine Bublitz", + "url": "https://github.com/phated" + }, + { + "email": "mathias@qiwi.be", + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The internal lodash function `baseToString` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + { + "email": "mathias@qiwi.be", + "name": "mathias" + }, + { + "email": "blaine@iceddev.com", + "name": "phated" + } + ], + "name": "lodash._basetostring", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.12.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md index b3858fd68e7866..75aa6b0699b4df 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md @@ -1,4 +1,4 @@ -# lodash.tostring v4.1.2 +# lodash.tostring v4.1.3 The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toString = require('lodash.tostring'); ``` -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. +See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js similarity index 81% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js index 5c0e3e2b987eb6..8a2cde39290e82 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ @@ -66,7 +66,8 @@ function checkGlobal(value) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -78,12 +79,33 @@ var Symbol = root.Symbol; var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -110,9 +132,11 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -127,11 +151,12 @@ function isSymbol(value) { } /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. @@ -147,18 +172,7 @@ function isSymbol(value) { * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json similarity index 58% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json index a50df30e2cbe25..32c5752c9d3706 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json @@ -1,29 +1,43 @@ { "_args": [ [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ], [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" ] ], - "_from": "lodash.tostring@>=4.0.0 <5.0.0", - "_id": "lodash.tostring@4.1.2", + "_from": "lodash.tostring@^4.0.0", + "_id": "lodash.tostring@4.1.3", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padstart/lodash.tostring", + "_location": "/node-gyp/npmlog/gauge/lodash.padstart/lodash.tostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/lodash.tostring-4.1.2.tgz_1456896853027_0.8195764778647572" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.17", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.tostring", @@ -34,12 +48,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.padstart", - "/npmlog/gauge/lodash.padstart/lodash.repeat" + "/node-gyp/npmlog/gauge/lodash.padstart" ], + "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz", + "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", "_shrinkwrap": null, "_spec": "lodash.tostring@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -70,8 +85,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "tarball": "http://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz" + "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", + "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +119,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.2" + "version": "4.1.3" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json similarity index 67% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json index 0a4deb7c03e0a6..57fc4ead9a08bf 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.padstart@^4.1.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + { + "name": "lodash.padstart", + "raw": "lodash.padstart@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" ] ], "_from": "lodash.padstart@>=4.1.0 <5.0.0", - "_id": "lodash.padstart@4.2.0", + "_id": "lodash.padstart@4.5.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padstart", + "_location": "/node-gyp/npmlog/gauge/lodash.padstart", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/lodash.padstart-4.2.0.tgz_1455615522339_0.6710881665349007" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.padstart-4.5.0.tgz_1463062453524_0.18468116875737906" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.padstart", @@ -30,13 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge" + "/node-gyp/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.2.0.tgz", - "_shasum": "e36f89fd6c3b5072219087695b765de83ec96985", + "_resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.5.0.tgz", + "_shasum": "3ea190f6734841c3364d279d11e056726b60a79a", "_shrinkwrap": null, "_spec": "lodash.padstart@^4.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -52,7 +59,7 @@ "url": "http://allyoucanleet.com/" }, { - "email": "blaine@iceddev.com", + "email": "blaine.bublitz@gmail.com", "name": "Blaine Bublitz", "url": "https://github.com/phated" }, @@ -63,15 +70,16 @@ } ], "dependencies": { - "lodash.repeat": "^4.0.0", + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", "lodash.tostring": "^4.0.0" }, "description": "The lodash method `_.padStart` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "e36f89fd6c3b5072219087695b765de83ec96985", - "tarball": "http://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.2.0.tgz" + "shasum": "3ea190f6734841c3364d279d11e056726b60a79a", + "tarball": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.5.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +112,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.2.0" + "version": "4.5.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json new file mode 100644 index 00000000000000..6d3424f0acbdbb --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "name": "gauge", + "raw": "gauge@~1.2.5", + "rawSpec": "~1.2.5", + "scope": null, + "spec": ">=1.2.5 <1.3.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog" + ] + ], + "_from": "gauge@>=1.2.5 <1.3.0", + "_id": "gauge@1.2.7", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge", + "_nodeVersion": "4.2.2", + "_npmOperationalInternal": { + "host": "packages-9-west.internal.npmjs.com", + "tmp": "tmp/gauge-1.2.7.tgz_1455835409513_0.6293477965518832" + }, + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.7.2", + "_phantomChildren": {}, + "_requested": { + "name": "gauge", + "raw": "gauge@~1.2.5", + "rawSpec": "~1.2.5", + "scope": null, + "spec": ">=1.2.5 <1.3.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog" + ], + "_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", + "_shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", + "_shrinkwrap": null, + "_spec": "gauge@~1.2.5", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog", + "author": { + "email": "me@re-becca.org", + "name": "Rebecca Turner" + }, + "bugs": { + "url": "https://github.com/iarna/gauge/issues" + }, + "dependencies": { + "ansi": "^0.3.0", + "has-unicode": "^2.0.0", + "lodash.pad": "^4.1.0", + "lodash.padend": "^4.1.0", + "lodash.padstart": "^4.1.0" + }, + "description": "A terminal based horizontal guage", + "devDependencies": { + "tap": "^5.6.0" + }, + "directories": {}, + "dist": { + "shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", + "tarball": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz" + }, + "gitHead": "75a7d0a4ed67489ac992ed3d211bed60376ca7c1", + "homepage": "https://github.com/iarna/gauge", + "keywords": [ + "progressbar", + "progress", + "gauge" + ], + "license": "ISC", + "main": "progress-bar.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "name": "gauge", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/gauge.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.2.7" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/progress-bar.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/progress-bar.js new file mode 100644 index 00000000000000..ddfc4a44be4ded --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/progress-bar.js @@ -0,0 +1,225 @@ +"use strict" +var hasUnicode = require("has-unicode") +var ansi = require("ansi") +var align = { + center: require("lodash.pad"), + left: require("lodash.padend"), + right: require("lodash.padstart") +} +var defaultStream = process.stderr +function isTTY() { + return process.stderr.isTTY +} +function getWritableTTYColumns() { + // Writing to the final column wraps the line + // We have to use stdout here, because Node's magic SIGWINCH handler only + // updates process.stdout, not process.stderr + return process.stdout.columns - 1 +} + +var ProgressBar = module.exports = function (options, cursor) { + if (! options) options = {} + if (! cursor && options.write) { + cursor = options + options = {} + } + if (! cursor) { + cursor = ansi(defaultStream) + } + this.cursor = cursor + this.showing = false + this.theme = options.theme || (hasUnicode() ? ProgressBar.unicode : ProgressBar.ascii) + this.template = options.template || [ + {type: "name", separated: true, length: 25}, + {type: "spinner", separated: true}, + {type: "startgroup"}, + {type: "completionbar"}, + {type: "endgroup"} + ] + this.updatefreq = options.maxUpdateFrequency == null ? 50 : options.maxUpdateFrequency + this.lastName = "" + this.lastCompleted = 0 + this.spun = 0 + this.last = new Date(0) + + var self = this + this._handleSizeChange = function () { + if (!self.showing) return + self.hide() + self.show() + } +} +ProgressBar.prototype = {} + +ProgressBar.unicode = { + startgroup: "╢", + endgroup: "╟", + complete: "█", + incomplete: "░", + spinner: "▀▐▄▌", + subsection: "→" +} + +ProgressBar.ascii = { + startgroup: "|", + endgroup: "|", + complete: "#", + incomplete: "-", + spinner: "-\\|/", + subsection: "->" +} + +ProgressBar.prototype.setTheme = function(theme) { + this.theme = theme +} + +ProgressBar.prototype.setTemplate = function(template) { + this.template = template +} + +ProgressBar.prototype._enableResizeEvents = function() { + process.stdout.on('resize', this._handleSizeChange) +} + +ProgressBar.prototype._disableResizeEvents = function() { + process.stdout.removeListener('resize', this._handleSizeChange) +} + +ProgressBar.prototype.disable = function() { + this.hide() + this.disabled = true +} + +ProgressBar.prototype.enable = function() { + this.disabled = false + this.show() +} + +ProgressBar.prototype.hide = function() { + if (!isTTY()) return + if (this.disabled) return + this.cursor.show() + if (this.showing) this.cursor.up(1) + this.cursor.horizontalAbsolute(0).eraseLine() + this.showing = false +} + +var repeat = function (str, count) { + var out = "" + for (var ii=0; ii=0.0.0 <1.0.0||>=1.0.0 <2.0.0||>=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp" + ] + ], + "_from": "npmlog@>=0.0.0 <1.0.0||>=1.0.0 <2.0.0||>=2.0.0 <3.0.0", + "_id": "npmlog@2.0.4", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/npmlog-2.0.4.tgz_1463616637725_0.461703865788877" + }, + "_npmUser": { + "email": "kat@sykosomatic.org", + "name": "zkat" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": { + "has-unicode": "2.0.0", + "readable-stream": "2.1.3" + }, + "_requested": { + "name": "npmlog", + "raw": "npmlog@0 || 1 || 2", + "rawSpec": "0 || 1 || 2", + "scope": null, + "spec": ">=0.0.0 <1.0.0||>=1.0.0 <2.0.0||>=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp" + ], + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", + "_shasum": "98b52530f2514ca90d09ec5b22c8846722375692", + "_shrinkwrap": null, + "_spec": "npmlog@0 || 1 || 2", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/npmlog/issues" + }, + "dependencies": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.1.2", + "gauge": "~1.2.5" + }, + "description": "logger for npm", + "devDependencies": { + "tap": "~5.7.0" + }, + "directories": {}, + "dist": { + "shasum": "98b52530f2514ca90d09ec5b22c8846722375692", + "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz" + }, + "files": [ + "log.js" + ], + "gitHead": "3732fd4ba1ca2d47c6102343e6c3fb7e66df7fe5", + "homepage": "https://github.com/npm/npmlog#readme", + "license": "ISC", + "main": "log.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + }, + { + "email": "i@izs.me", + "name": "isaacs" + }, + { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" + } + ], + "name": "npmlog", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/npmlog.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "2.0.4" +} diff --git a/deps/npm/node_modules/normalize-git-url/test/basic.js~ b/deps/npm/node_modules/normalize-git-url/test/basic.js~ new file mode 100644 index 00000000000000..00ac6d3131b445 --- /dev/null +++ b/deps/npm/node_modules/normalize-git-url/test/basic.js~ @@ -0,0 +1,56 @@ +var test = require('tap').test + +var normalize = require('../normalize-git-url.js') + +test('basic normalization tests', function (t) { + t.same( + normalize('git+ssh://user@hostname:project.git#commit-ish'), + { url: 'user@hostname:project.git', branch: 'commit-ish' } + ) + t.same( + normalize('git+http://user@hostname/project/blah.git#commit-ish'), + { url: 'http://user@hostname/project/blah.git', branch: 'commit-ish' } + ) + t.same( + normalize('git+https://user@hostname/project/blah.git#commit-ish'), + { url: 'https://user@hostname/project/blah.git', branch: 'commit-ish' } + ) + t.same( + normalize('git+ssh://git@github.com:npm/npm.git#v1.0.27'), + { url: 'git@github.com:npm/npm.git', branch: 'v1.0.27' } + ) + t.same( + normalize('git+ssh://git@github.com:org/repo#dev'), + { url: 'git@github.com:org/repo', branch: 'dev' } + ) + t.same( + normalize('git+ssh://git@github.com/org/repo#dev'), + { url: 'ssh://git@github.com/org/repo', branch: 'dev' } + ) + t.same( + normalize('git+ssh://foo:22/some/path'), + { url: 'ssh://foo:22/some/path', branch: 'master' } + ) + t.same( + normalize('git@github.com:org/repo#dev'), + { url: 'git@github.com:org/repo', branch: 'dev' } + ) + t.same( + normalize('git+https://github.com/KenanY/node-uuid'), + { url: 'https://github.com/KenanY/node-uuid', branch: 'master' } + ) + t.same( + normalize('git+https://github.com/KenanY/node-uuid#7a018f2d075b03a73409e8356f9b29c9ad4ea2c5'), + { url: 'https://github.com/KenanY/node-uuid', branch: '7a018f2d075b03a73409e8356f9b29c9ad4ea2c5' } + ) + t.same( + normalize('git+ssh://git@git.example.com:b/b.git#v1.0.0'), + { url: 'git@git.example.com:b/b.git', branch: 'v1.0.0' } + ) + t.same( + normalize('git+ssh://git@github.com:npm/npm-proto.git#othiym23/organized'), + { url: 'git@github.com:npm/npm-proto.git', branch: 'othiym23/organized' } + ) + + t.end() +}) diff --git a/deps/npm/node_modules/npm-package-arg/.npmignore b/deps/npm/node_modules/npm-package-arg/.npmignore new file mode 100644 index 00000000000000..c2658d7d1b3184 --- /dev/null +++ b/deps/npm/node_modules/npm-package-arg/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/deps/npm/node_modules/npm-package-arg/.travis.yml b/deps/npm/node_modules/npm-package-arg/.travis.yml index ab9182bf24ab56..e5a5a8b9ec5683 100644 --- a/deps/npm/node_modules/npm-package-arg/.travis.yml +++ b/deps/npm/node_modules/npm-package-arg/.travis.yml @@ -1,10 +1,9 @@ language: node_js node_js: + - "6" - "5" - "4" - - iojs - "0.12" - "0.10" - - "0.8" sudo: false script: "npm test" diff --git a/deps/npm/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/npm-package-arg/README.md index 82968a4bef8c0f..9f4aee1c056bd9 100644 --- a/deps/npm/node_modules/npm-package-arg/README.md +++ b/deps/npm/node_modules/npm-package-arg/README.md @@ -22,12 +22,13 @@ var parsed = npa("@bar/foo@1.2") // Returns an object like: { - raw: '@bar/foo@1.2', // what was passed in - name: "@bar/foo", // the name of the package - scope: "@bar", // the private scope of the package, or null - type: "range", // the type of specifier this is - spec: ">=1.2.0 <1.3.0" // the expanded specifier - rawSpec: "1.2" // the specifier as passed in + raw: '@bar/foo@1.2', // what was passed in + name: '@bar/foo', // the name of the package + escapedName: '@bar%2ffoo', // the escaped name, for making requests against a registry + scope: '@bar', // the scope of the package, or null + type: 'range', // the type of specifier this is + spec: '>=1.2.0 <1.3.0', // the expanded specifier + rawSpec: '1.2' // the specifier as passed in } // Parsing urls pointing at hosted git services produces a variation: @@ -38,6 +39,7 @@ var parsed = npa("git+https://github.com/user/foo") raw: 'git+https://github.com/user/foo', scope: null, name: null, + escapedName: null, rawSpec: 'git+https://github.com/user/foo', spec: 'user/foo', type: 'hosted', @@ -97,8 +99,11 @@ keys: * `rawSpec` - The part after the `name@...`, as it was originally provided. * `scope` - If a name is something like `@org/module` then the `scope` - field will be set to `org`. If it doesn't have a scoped name, then + field will be set to `@org`. If it doesn't have a scoped name, then scope is `null`. +* `escapedName` - A version of `name` escaped to match the npm scoped packages + specification. Mostly used when making requests against a registry. When + `name` is `null`, `escapedName` will also be `null`. If you only include a name and no specifier part, eg, `foo` or `foo@` then a default of `latest` will be used (as of 4.1.0). This is contrast with diff --git a/deps/npm/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/npm-package-arg/npa.js index 1e6deb1ec7c22d..07139696d30921 100644 --- a/deps/npm/node_modules/npm-package-arg/npa.js +++ b/deps/npm/node_modules/npm-package-arg/npa.js @@ -1,57 +1,61 @@ -var url = require("url") -var assert = require("assert") -var util = require("util") -var semver = require("semver") -var path = require("path") -var HostedGit = require("hosted-git-info") +var url = require('url') +var assert = require('assert') +var util = require('util') +var semver = require('semver') +var HostedGit = require('hosted-git-info') module.exports = npa -var isWindows = process.platform === "win32" || global.FAKE_WINDOWS +var isWindows = process.platform === 'win32' || global.FAKE_WINDOWS var slashRe = isWindows ? /\\|[/]/ : /[/]/ var parseName = /^(?:@([^/]+?)[/])?([^/]+?)$/ var nameAt = /^(@([^/]+?)[/])?([^/]+?)@/ -var debug = util.debuglog ? util.debuglog("npa") - : /\bnpa\b/i.test(process.env.NODE_DEBUG || "") - ? function () { - console.error("NPA: " + util.format.apply(util, arguments).split("\n").join("\nNPA: ")) - } : function () {} +var debug = util.debuglog + ? util.debuglog('npa') + : /\bnpa\b/i.test(process.env.NODE_DEBUG || '') + ? function () { + console.error('NPA: ' + util.format.apply(util, arguments).split('\n').join('\nNPA: ')) + } + : function () {} function validName (name) { if (!name) { - debug("not a name %j", name) + debug('not a name %j', name) return false } var n = name.trim() - if (!n || n.charAt(0) === "." - || !n.match(/^[a-zA-Z0-9]/) - || n.match(/[/()&?#|<>@:%\s\\*'"!~`]/) - || n.toLowerCase() === "node_modules" - || n !== encodeURIComponent(n) - || n.toLowerCase() === "favicon.ico") { - debug("not a valid name %j", name) + if (!n || n.charAt(0) === '.' || + !n.match(/^[a-zA-Z0-9]/) || + n.match(/[/()&?#|<>@:%\s\\*'"!~`]/) || + n.toLowerCase() === 'node_modules' || + n !== encodeURIComponent(n) || + n.toLowerCase() === 'favicon.ico') { + debug('not a valid name %j', name) return false } return n } function npa (arg) { - assert.equal(typeof arg, "string") + assert.equal(typeof arg, 'string') arg = arg.trim() - var res = new Result + var res = new Result() res.raw = arg res.scope = null + res.escapedName = null // See if it's something like foo@... var nameparse = arg.match(nameAt) - debug("nameparse", nameparse) + debug('nameparse', nameparse) if (nameparse && validName(nameparse[3]) && - (!nameparse[2] || validName(nameparse[2]))) { - res.name = (nameparse[1] || "") + nameparse[3] - if (nameparse[2]) - res.scope = "@" + nameparse[2] + (!nameparse[2] || validName(nameparse[2]))) { + res.name = (nameparse[1] || '') + nameparse[3] + res.escapedName = escapeName(res.name) + if (nameparse[2]) { + res.scope = '@' + nameparse[2] + } arg = arg.substr(nameparse[0].length) } else { res.name = null @@ -61,13 +65,13 @@ function npa (arg) { res.spec = arg var urlparse = url.parse(arg) - debug("urlparse", urlparse) + debug('urlparse', urlparse) // windows paths look like urls // don't be fooled! if (isWindows && urlparse && urlparse.protocol && - urlparse.protocol.match(/^[a-zA-Z]:$/)) { - debug("windows url-ish local path", urlparse) + urlparse.protocol.match(/^[a-zA-Z]:$/)) { + debug('windows url-ish local path', urlparse) urlparse = {} } @@ -82,32 +86,34 @@ function npa (arg) { // if it's got / chars in it, then assume that it's local. if (res.name) { - if (arg == '') arg = 'latest' + if (arg === '') arg = 'latest' var version = semver.valid(arg, true) var range = semver.validRange(arg, true) // foo@... if (version) { res.spec = version - res.type = "version" + res.type = 'version' } else if (range) { res.spec = range - res.type = "range" + res.type = 'range' } else if (slashRe.test(arg)) { parseLocal(res, arg) } else { - res.type = "tag" + res.type = 'tag' res.spec = arg } } else { var p = arg.match(parseName) if (p && validName(p[2]) && - (!p[1] || validName(p[1]))) { - res.type = "tag" - res.spec = "latest" - res.rawSpec = "" + (!p[1] || validName(p[1]))) { + res.type = 'tag' + res.spec = 'latest' + res.rawSpec = '' res.name = arg - if (p[1]) - res.scope = "@" + p[1] + res.escapedName = escapeName(res.name) + if (p[1]) { + res.scope = '@' + p[1] + } } else { parseLocal(res, arg) } @@ -116,52 +122,57 @@ function npa (arg) { return res } +function escapeName (name) { + // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar + return name && name.replace('/', '%2f') +} + function parseLocal (res, arg) { // turns out nearly every character is allowed in fs paths if (/\0/.test(arg)) { - throw new Error("Invalid Path: " + JSON.stringify(arg)) + throw new Error('Invalid Path: ' + JSON.stringify(arg)) } - res.type = "local" + res.type = 'local' res.spec = arg } function parseUrl (res, arg, urlparse) { var gitHost = HostedGit.fromUrl(arg) if (gitHost) { - res.type = "hosted" - res.spec = gitHost.toString(), + res.type = 'hosted' + res.spec = gitHost.toString() res.hosted = { - type: gitHost.type, - ssh: gitHost.ssh(), - sshUrl: gitHost.sshurl(), - httpsUrl: gitHost.https(), - gitUrl: gitHost.git(), - shortcut: gitHost.shortcut(), - directUrl: gitHost.file("package.json") + type: gitHost.type, + ssh: gitHost.ssh(), + sshUrl: gitHost.sshurl(), + httpsUrl: gitHost.https(), + gitUrl: gitHost.git(), + shortcut: gitHost.shortcut(), + directUrl: gitHost.file('package.json') } return res } // check the protocol, and then see if it's git or not switch (urlparse.protocol) { - case "git:": - case "git+http:": - case "git+https:": - case "git+rsync:": - case "git+ftp:": - case "git+ssh:": - case "git+file:": - res.type = "git" - res.spec = arg.replace(/^git[+]/, "") + case 'git:': + case 'git+http:': + case 'git+https:': + case 'git+rsync:': + case 'git+ftp:': + case 'git+ssh:': + case 'git+file:': + res.type = 'git' + res.spec = arg.replace(/^git[+]/, '') break - case "http:": - case "https:": - res.type = "remote" + case 'http:': + case 'https:': + res.type = 'remote' res.spec = arg break - case "file:": - res.type = "local" + case 'file:': + res.type = 'local' if (isWindows && arg.match(/^file:\/\/\/?[a-z]:/i)) { // Windows URIs usually parse all wrong, so we just take matters // into our own hands, in this case. @@ -172,19 +183,17 @@ function parseUrl (res, arg, urlparse) { break default: - throw new Error("Unsupported URL Type: " + arg) - break + throw new Error('Unsupported URL Type: ' + arg) } return res } - function Result () { - if (!(this instanceof Result)) return new Result + if (!(this instanceof Result)) return new Result() } -Result.prototype.name = null -Result.prototype.type = null -Result.prototype.spec = null -Result.prototype.raw = null +Result.prototype.name = null +Result.prototype.type = null +Result.prototype.spec = null +Result.prototype.raw = null Result.prototype.hosted = null diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json index 1044852bcd330f..b9f5b4d4a66dd2 100644 --- a/deps/npm/node_modules/npm-package-arg/package.json +++ b/deps/npm/node_modules/npm-package-arg/package.json @@ -1,88 +1,97 @@ { "_args": [ [ - "npm-package-arg@4.1.1", - "/Users/zkat/Documents/code/npm" + { + "raw": "npm-package-arg@4.2.0", + "scope": null, + "name": "npm-package-arg", + "rawSpec": "4.2.0", + "spec": "4.2.0", + "type": "version" + }, + "/Users/rebecca/code/npm" ] ], - "_from": "npm-package-arg@>=4.1.0 <4.2.0", - "_id": "npm-package-arg@4.1.1", + "_from": "npm-package-arg@4.2.0", + "_id": "npm-package-arg@4.2.0", "_inCache": true, "_installable": true, "_location": "/npm-package-arg", - "_nodeVersion": "5.6.0", + "_nodeVersion": "6.2.1", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/npm-package-arg-4.1.1.tgz_1461107377267_0.3723941845819354" + "tmp": "tmp/npm-package-arg-4.2.0.tgz_1465952856229_0.8071578682865947" }, "_npmUser": { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, - "_npmVersion": "3.8.7", + "_npmVersion": "3.9.6", "_phantomChildren": {}, "_requested": { - "name": "npm-package-arg", - "raw": "npm-package-arg@4.1.1", - "rawSpec": "4.1.1", + "raw": "npm-package-arg@4.2.0", "scope": null, - "spec": "4.1.1", + "name": "npm-package-arg", + "rawSpec": "4.2.0", + "spec": "4.2.0", "type": "version" }, "_requiredBy": [ + "#USER", "/", "/init-package-json", "/npm-registry-client", "/realize-package-specifier" ], - "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.1.tgz", - "_shasum": "86d9dca985b4c5e5d59772dfd5de6919998a495a", + "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.2.0.tgz", + "_shasum": "809bc61cabf54bd5ff94f6165c89ba8ee88c115c", "_shrinkwrap": null, - "_spec": "npm-package-arg@4.1.1", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "npm-package-arg@4.2.0", + "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/npm/npm-package-arg/issues" }, "dependencies": { - "hosted-git-info": "^2.1.4", - "semver": "4 || 5" + "hosted-git-info": "^2.1.5", + "semver": "^5.1.0" }, "description": "Parse the things that can be arguments to `npm install`", "devDependencies": { - "tap": "^1.2.0" + "standard": "^7.1.2", + "tap": "^5.7.2" }, "directories": { "test": "test" }, "dist": { - "shasum": "86d9dca985b4c5e5d59772dfd5de6919998a495a", - "tarball": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.1.tgz" + "shasum": "809bc61cabf54bd5ff94f6165c89ba8ee88c115c", + "tarball": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.2.0.tgz" }, - "gitHead": "b39730cf0362576be0f3d3bfbc090af512a6afd2", + "gitHead": "b54a9286ef387dd1fd109c54a42e8de45d7b07e8", "homepage": "https://github.com/npm/npm-package-arg", "license": "ISC", "main": "npa.js", "maintainers": [ { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "zkat", + "email": "kat@sykosomatic.org" } ], "name": "npm-package-arg", @@ -93,7 +102,7 @@ "url": "git+https://github.com/npm/npm-package-arg.git" }, "scripts": { - "test": "tap test/*.js" + "test": "standard && tap --coverage test/*.js" }, - "version": "4.1.1" + "version": "4.2.0" } diff --git a/deps/npm/node_modules/npm-package-arg/test/basic.js b/deps/npm/node_modules/npm-package-arg/test/basic.js index 7e4112b460e34c..95f260a3c7c784 100644 --- a/deps/npm/node_modules/npm-package-arg/test/basic.js +++ b/deps/npm/node_modules/npm-package-arg/test/basic.js @@ -1,168 +1,187 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') +var path = require('path') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "foo@1.2": { - name: "foo", - type: "range", - spec: ">=1.2.0 <1.3.0", - raw: "foo@1.2", - rawSpec: "1.2" - }, - - "@foo/bar": { - raw: "@foo/bar", - name: "@foo/bar", - scope: "@foo", - rawSpec: "", - spec: "latest", - type: "tag" - }, - - "@foo/bar@": { - raw: "@foo/bar@", - name: "@foo/bar", - scope: "@foo", - rawSpec: "", - spec: "latest", - type: "tag" - }, - - "@foo/bar@baz": { - raw: "@foo/bar@baz", - name: "@foo/bar", - scope: "@foo", - rawSpec: "baz", - spec: "baz", - type: "tag" - }, - - "@f fo o al/ a d s ;f ": { - raw: "@f fo o al/ a d s ;f", + 'foo@1.2': { + name: 'foo', + escapedName: 'foo', + type: 'range', + spec: '>=1.2.0 <1.3.0', + raw: 'foo@1.2', + rawSpec: '1.2' + }, + + '@foo/bar': { + raw: '@foo/bar', + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + rawSpec: '', + spec: 'latest', + type: 'tag' + }, + + '@foo/bar@': { + raw: '@foo/bar@', + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + rawSpec: '', + spec: 'latest', + type: 'tag' + }, + + '@foo/bar@baz': { + raw: '@foo/bar@baz', + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + rawSpec: 'baz', + spec: 'baz', + type: 'tag' + }, + + '@f fo o al/ a d s ;f ': { + raw: '@f fo o al/ a d s ;f', name: null, - rawSpec: "@f fo o al/ a d s ;f", - spec: "@f fo o al/ a d s ;f", - type: "local" + escapedName: null, + rawSpec: '@f fo o al/ a d s ;f', + spec: '@f fo o al/ a d s ;f', + type: 'local' }, - "foo@1.2.3": { - name: "foo", - type: "version", - spec: "1.2.3", - raw: "foo@1.2.3" + 'foo@1.2.3': { + name: 'foo', + escapedName: 'foo', + type: 'version', + spec: '1.2.3', + raw: 'foo@1.2.3' }, - "foo@=v1.2.3": { - name: "foo", - type: "version", - spec: "1.2.3", - raw: "foo@=v1.2.3", - rawSpec: "=v1.2.3" + 'foo@=v1.2.3': { + name: 'foo', + escapedName: 'foo', + type: 'version', + spec: '1.2.3', + raw: 'foo@=v1.2.3', + rawSpec: '=v1.2.3' }, - "git+ssh://git@notgithub.com/user/foo#1.2.3": { + 'git+ssh://git@notgithub.com/user/foo#1.2.3': { name: null, - type: "git", - spec: "ssh://git@notgithub.com/user/foo#1.2.3", - raw: "git+ssh://git@notgithub.com/user/foo#1.2.3" + escapedName: null, + type: 'git', + spec: 'ssh://git@notgithub.com/user/foo#1.2.3', + raw: 'git+ssh://git@notgithub.com/user/foo#1.2.3' }, - "git+file://path/to/repo#1.2.3": { + 'git+file://path/to/repo#1.2.3': { name: null, - type: "git", - spec: "file://path/to/repo#1.2.3", - raw: "git+file://path/to/repo#1.2.3" + escapedName: null, + type: 'git', + spec: 'file://path/to/repo#1.2.3', + raw: 'git+file://path/to/repo#1.2.3' }, - "git://notgithub.com/user/foo": { + 'git://notgithub.com/user/foo': { name: null, - type: "git", - spec: "git://notgithub.com/user/foo", - raw: "git://notgithub.com/user/foo" + escapedName: null, + type: 'git', + spec: 'git://notgithub.com/user/foo', + raw: 'git://notgithub.com/user/foo' }, - "@foo/bar@git+ssh://notgithub.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - spec: "ssh://notgithub.com/user/foo", - rawSpec: "git+ssh://notgithub.com/user/foo", - raw: "@foo/bar@git+ssh://notgithub.com/user/foo" + '@foo/bar@git+ssh://notgithub.com/user/foo': { + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + spec: 'ssh://notgithub.com/user/foo', + rawSpec: 'git+ssh://notgithub.com/user/foo', + raw: '@foo/bar@git+ssh://notgithub.com/user/foo' }, - "/path/to/foo": { + '/path/to/foo': { name: null, - type: "local", - spec: path.resolve(__dirname, "/path/to/foo"), - raw: "/path/to/foo" + escapedName: null, + type: 'local', + spec: path.resolve(__dirname, '/path/to/foo'), + raw: '/path/to/foo' }, - "file:path/to/foo": { + 'file:path/to/foo': { name: null, - type: "local", - spec: "path/to/foo", - raw: "file:path/to/foo" + escapedName: null, + type: 'local', + spec: 'path/to/foo', + raw: 'file:path/to/foo' }, - "file:~/path/to/foo": { + 'file:~/path/to/foo': { name: null, - type: "local", - spec: "~/path/to/foo", - raw: "file:~/path/to/foo" + escapedName: null, + type: 'local', + spec: '~/path/to/foo', + raw: 'file:~/path/to/foo' }, - "file:../path/to/foo": { + 'file:../path/to/foo': { name: null, - type: "local", - spec: "../path/to/foo", - raw: "file:../path/to/foo" + escapedName: null, + type: 'local', + spec: '../path/to/foo', + raw: 'file:../path/to/foo' }, - "file:///path/to/foo": { + 'file:///path/to/foo': { name: null, - type: "local", - spec: "/path/to/foo", - raw: "file:///path/to/foo" + escapedName: null, + type: 'local', + spec: '/path/to/foo', + raw: 'file:///path/to/foo' }, - "https://server.com/foo.tgz": { + 'https://server.com/foo.tgz': { name: null, - type: "remote", - spec: "https://server.com/foo.tgz", - raw: "https://server.com/foo.tgz" - }, - - "foo@latest": { - name: "foo", - type: "tag", - spec: "latest", - raw: "foo@latest" - }, - - "foo": { - name: "foo", - type: "tag", - spec: "latest", - raw: "foo" + escapedName: null, + type: 'remote', + spec: 'https://server.com/foo.tgz', + raw: 'https://server.com/foo.tgz' + }, + + 'foo@latest': { + name: 'foo', + escapedName: 'foo', + type: 'tag', + spec: 'latest', + raw: 'foo@latest' + }, + + 'foo': { + name: 'foo', + escapedName: 'foo', + type: 'tag', + spec: 'latest', + raw: 'foo' } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is result') + t.has(res, tests[arg], arg + ' matches expectations') }) // Completely unreasonable invalid garbage throws an error - t.throws(function() { - npa("this is not a \0 valid package name or url") + t.throws(function () { + npa('this is not a \0 valid package name or url') }) - t.throws(function() { - npa("gopher://yea right") - }, "Unsupported URL Type: gopher://yea right") + t.throws(function () { + npa('gopher://yea right') + }, 'Unsupported URL Type: gopher://yea right') t.end() }) diff --git a/deps/npm/node_modules/npm-package-arg/test/bitbucket.js b/deps/npm/node_modules/npm-package-arg/test/bitbucket.js index 1dff34ffa8afb9..53efd89862e49b 100644 --- a/deps/npm/node_modules/npm-package-arg/test/bitbucket.js +++ b/deps/npm/node_modules/npm-package-arg/test/bitbucket.js @@ -1,81 +1,80 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "bitbucket:user/foo-js": { + 'bitbucket:user/foo-js': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js", - raw: "bitbucket:user/foo-js" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js', + raw: 'bitbucket:user/foo-js' }, - "bitbucket:user/foo-js#bar/baz": { + 'bitbucket:user/foo-js#bar/baz': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js#bar/baz", - raw: "bitbucket:user/foo-js#bar/baz" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js#bar/baz', + raw: 'bitbucket:user/foo-js#bar/baz' }, - "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /": { + 'bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /', + raw: 'bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /' }, - "bitbucket:user/foo-js#bar/baz/bin": { + 'bitbucket:user/foo-js#bar/baz/bin': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js#bar/baz/bin", - raw: "bitbucket:user/foo-js#bar/baz/bin" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js#bar/baz/bin', + raw: 'bitbucket:user/foo-js#bar/baz/bin' }, - "foo@bitbucket:user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js", - raw: "foo@bitbucket:user/foo-js" + 'foo@bitbucket:user/foo-js': { + name: 'foo', + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js', + raw: 'foo@bitbucket:user/foo-js' }, - "git+ssh://git@bitbucket.org/user/foo#1.2.3": { + 'git+ssh://git@bitbucket.org/user/foo#1.2.3': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo.git#1.2.3", - raw: "git+ssh://git@bitbucket.org/user/foo#1.2.3" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'git+ssh://git@bitbucket.org/user/foo.git#1.2.3', + raw: 'git+ssh://git@bitbucket.org/user/foo#1.2.3' }, - "https://bitbucket.org/user/foo.git": { + 'https://bitbucket.org/user/foo.git': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+https://bitbucket.org/user/foo.git", - raw: "https://bitbucket.org/user/foo.git" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'git+https://bitbucket.org/user/foo.git', + raw: 'https://bitbucket.org/user/foo.git' }, - "@foo/bar@git+ssh://bitbucket.org/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo.git", - rawSpec: "git+ssh://bitbucket.org/user/foo", - raw: "@foo/bar@git+ssh://bitbucket.org/user/foo" + '@foo/bar@git+ssh://bitbucket.org/user/foo': { + name: '@foo/bar', + scope: '@foo', + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'git+ssh://git@bitbucket.org/user/foo.git', + rawSpec: 'git+ssh://bitbucket.org/user/foo', + raw: '@foo/bar@git+ssh://bitbucket.org/user/foo' } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is a result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is a result') + t.has(res, tests[arg], arg + ' matches expectations') }) t.end() diff --git a/deps/npm/node_modules/npm-package-arg/test/github.js b/deps/npm/node_modules/npm-package-arg/test/github.js index a2c146002b76c2..a7cc1f462fd116 100644 --- a/deps/npm/node_modules/npm-package-arg/test/github.js +++ b/deps/npm/node_modules/npm-package-arg/test/github.js @@ -1,105 +1,103 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "user/foo-js": { + 'user/foo-js': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "user/foo-js" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js', + raw: 'user/foo-js' }, - "user/foo-js#bar/baz": { + 'user/foo-js#bar/baz': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js#bar/baz", - raw: "user/foo-js#bar/baz" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js#bar/baz', + raw: 'user/foo-js#bar/baz' }, - "user..blerg--/..foo-js# . . . . . some . tags / / /": { + 'user..blerg--/..foo-js# . . . . . some . tags / / /': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "user..blerg--/..foo-js# . . . . . some . tags / / /" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user..blerg--/..foo-js# . . . . . some . tags / / /', + raw: 'user..blerg--/..foo-js# . . . . . some . tags / / /' }, - "user/foo-js#bar/baz/bin": { + 'user/foo-js#bar/baz/bin': { name: null, - type: "hosted", - hosted: { type: "github" }, - raw: "github:user/foo-js#bar/baz/bin", - raw: "user/foo-js#bar/baz/bin" + type: 'hosted', + hosted: { type: 'github' }, + raw: 'user/foo-js#bar/baz/bin' }, - "foo@user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "foo@user/foo-js" + 'foo@user/foo-js': { + name: 'foo', + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js', + raw: 'foo@user/foo-js' }, - "github:user/foo-js": { + 'github:user/foo-js': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "github:user/foo-js" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js', + raw: 'github:user/foo-js' }, - "git+ssh://git@github.com/user/foo#1.2.3": { + 'git+ssh://git@github.com/user/foo#1.2.3': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git#1.2.3", - raw: "git+ssh://git@github.com/user/foo#1.2.3" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git+ssh://git@github.com/user/foo.git#1.2.3', + raw: 'git+ssh://git@github.com/user/foo#1.2.3' }, - "git://github.com/user/foo": { + 'git://github.com/user/foo': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git://github.com/user/foo.git", - raw: "git://github.com/user/foo" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git://github.com/user/foo.git', + raw: 'git://github.com/user/foo' }, - "https://github.com/user/foo.git": { + 'https://github.com/user/foo.git': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git+https://github.com/user/foo.git", - raw: "https://github.com/user/foo.git" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git+https://github.com/user/foo.git', + raw: 'https://github.com/user/foo.git' }, - "@foo/bar@git+ssh://github.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git", - rawSpec: "git+ssh://github.com/user/foo", - raw: "@foo/bar@git+ssh://github.com/user/foo" + '@foo/bar@git+ssh://github.com/user/foo': { + name: '@foo/bar', + scope: '@foo', + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git+ssh://git@github.com/user/foo.git', + rawSpec: 'git+ssh://github.com/user/foo', + raw: '@foo/bar@git+ssh://github.com/user/foo' }, - "foo@bar/foo": { - name: "foo", - type: "hosted", - hosted: { type: "github" }, - spec: "github:bar/foo", - raw: "foo@bar/foo" - } + 'foo@bar/foo': { + name: 'foo', + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:bar/foo', + raw: 'foo@bar/foo' + } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is a result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is a result') + t.has(res, tests[arg], arg + ' matches expectations') }) t.end() diff --git a/deps/npm/node_modules/npm-package-arg/test/gitlab.js b/deps/npm/node_modules/npm-package-arg/test/gitlab.js index c9a8ef9f25b80e..b1bff98f9c1151 100644 --- a/deps/npm/node_modules/npm-package-arg/test/gitlab.js +++ b/deps/npm/node_modules/npm-package-arg/test/gitlab.js @@ -1,81 +1,78 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "gitlab:user/foo-js": { + 'gitlab:user/foo-js': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - raw: "gitlab:user/foo-js", - raw: "gitlab:user/foo-js" + type: 'hosted', + hosted: { type: 'gitlab' }, + raw: 'gitlab:user/foo-js' }, - "gitlab:user/foo-js#bar/baz": { + 'gitlab:user/foo-js#bar/baz': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - raw: "gitlab:user/foo-js#bar/baz", - raw: "gitlab:user/foo-js#bar/baz" + type: 'hosted', + hosted: { type: 'gitlab' }, + raw: 'gitlab:user/foo-js#bar/baz' }, - "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /": { + 'gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /', + raw: 'gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /' }, - "gitlab:user/foo-js#bar/baz/bin": { + 'gitlab:user/foo-js#bar/baz/bin': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js#bar/baz/bin", - raw: "gitlab:user/foo-js#bar/baz/bin" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'gitlab:user/foo-js#bar/baz/bin', + raw: 'gitlab:user/foo-js#bar/baz/bin' }, - "foo@gitlab:user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js", - raw: "foo@gitlab:user/foo-js" + 'foo@gitlab:user/foo-js': { + name: 'foo', + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'gitlab:user/foo-js', + raw: 'foo@gitlab:user/foo-js' }, - "git+ssh://git@gitlab.com/user/foo#1.2.3": { + 'git+ssh://git@gitlab.com/user/foo#1.2.3': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo.git#1.2.3", - raw: "git+ssh://git@gitlab.com/user/foo#1.2.3" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'git+ssh://git@gitlab.com/user/foo.git#1.2.3', + raw: 'git+ssh://git@gitlab.com/user/foo#1.2.3' }, - "https://gitlab.com/user/foo.git": { + 'https://gitlab.com/user/foo.git': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+https://gitlab.com/user/foo.git", - raw: "https://gitlab.com/user/foo.git" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'git+https://gitlab.com/user/foo.git', + raw: 'https://gitlab.com/user/foo.git' }, - "@foo/bar@git+ssh://gitlab.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo.git", - rawSpec: "git+ssh://gitlab.com/user/foo", - raw: "@foo/bar@git+ssh://gitlab.com/user/foo" + '@foo/bar@git+ssh://gitlab.com/user/foo': { + name: '@foo/bar', + scope: '@foo', + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'git+ssh://git@gitlab.com/user/foo.git', + rawSpec: 'git+ssh://gitlab.com/user/foo', + raw: '@foo/bar@git+ssh://gitlab.com/user/foo' } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is a result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is a result') + t.has(res, tests[arg], arg + ' matches expectations') }) t.end() diff --git a/deps/npm/node_modules/npm-package-arg/test/windows.js b/deps/npm/node_modules/npm-package-arg/test/windows.js index b91416e2f96e52..a10fa5b6861700 100644 --- a/deps/npm/node_modules/npm-package-arg/test/windows.js +++ b/deps/npm/node_modules/npm-package-arg/test/windows.js @@ -1,69 +1,75 @@ global.FAKE_WINDOWS = true -var npa = require("../npa.js") -var test = require("tap").test -var path = require("path") +var npa = require('../npa.js') +var test = require('tap').test var cases = { - "C:\\x\\y\\z": { - raw: "C:\\x\\y\\z", + 'C:\\x\\y\\z': { + raw: 'C:\\x\\y\\z', scope: null, name: null, - rawSpec: "C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@C:\\x\\y\\z": { - raw: "foo@C:\\x\\y\\z", + 'foo@C:\\x\\y\\z': { + raw: 'foo@C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@file:///C:\\x\\y\\z": { - raw: "foo@file:///C:\\x\\y\\z", + 'foo@file:///C:\\x\\y\\z': { + raw: 'foo@file:///C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "file:///C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'file:///C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@file://C:\\x\\y\\z": { - raw: "foo@file://C:\\x\\y\\z", + 'foo@file://C:\\x\\y\\z': { + raw: 'foo@file://C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "file://C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'file://C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "file:///C:\\x\\y\\z": { - raw: "file:///C:\\x\\y\\z", + 'file:///C:\\x\\y\\z': { + raw: 'file:///C:\\x\\y\\z', scope: null, name: null, - rawSpec: "file:///C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'file:///C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "file://C:\\x\\y\\z": { - raw: "file://C:\\x\\y\\z", + 'file://C:\\x\\y\\z': { + raw: 'file://C:\\x\\y\\z', scope: null, name: null, - rawSpec: "file://C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'file://C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@/foo/bar/baz": { - raw: "foo@/foo/bar/baz", + 'foo@/foo/bar/baz': { + raw: 'foo@/foo/bar/baz', scope: null, - name: "foo", - rawSpec: "/foo/bar/baz", - spec: "/foo/bar/baz", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: '/foo/bar/baz', + spec: '/foo/bar/baz', + type: 'local' } } -test("parse a windows path", function (t) { +test('parse a windows path', function (t) { Object.keys(cases).forEach(function (c) { var expect = cases[c] var actual = npa(c) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js index 571c276783c779..a4f40f845faa65 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js @@ -8,13 +8,36 @@ if (!process.version || module.exports = process.nextTick; } -function nextTick(fn) { - var args = new Array(arguments.length - 1); - var i = 0; - while (i < args.length) { - args[i++] = arguments[i]; +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); } - process.nextTick(function afterTick() { - fn.apply(null, args); - }); } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json index 3718b900c60510..f0ee8b940e9e4a 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "process-nextick-args@~1.0.6", - "/Users/rebecca/code/npm/node_modules/readable-stream" - ], - [ - "process-nextick-args@~1.0.6", + { + "name": "process-nextick-args", + "raw": "process-nextick-args@~1.0.6", + "rawSpec": "~1.0.6", + "scope": null, + "spec": ">=1.0.6 <1.1.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream" ] ], "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_id": "process-nextick-args@1.0.6", + "_id": "process-nextick-args@1.0.7", "_inCache": true, "_installable": true, "_location": "/npm-registry-client/concat-stream/readable-stream/process-nextick-args", - "_nodeVersion": "4.1.1", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" + }, "_npmUser": { "email": "calvin.metcalf@gmail.com", "name": "cwmma" }, - "_npmVersion": "2.14.4", + "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { "name": "process-nextick-args", @@ -32,6 +39,8 @@ "_requiredBy": [ "/npm-registry-client/concat-stream/readable-stream" ], + "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", "_shrinkwrap": null, "_spec": "process-nextick-args@~1.0.6", "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream", @@ -46,10 +55,10 @@ }, "directories": {}, "dist": { - "shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", - "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" + "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", + "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, - "gitHead": "e85787b05a8c3c1adb714f332d822e9162699c78", + "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", "homepage": "https://github.com/calvinmetcalf/process-nextick-args", "license": "MIT", "main": "index.js", @@ -69,5 +78,5 @@ "scripts": { "test": "node test.js" }, - "version": "1.0.6" + "version": "1.0.7" } diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index ca717a0bd3b952..20ff75226d8a8e 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -1,28 +1,34 @@ { "_args": [ [ - "npm-registry-client@latest", + { + "name": "npm-registry-client", + "raw": "npm-registry-client@latest", + "rawSpec": "latest", + "scope": null, + "spec": "latest", + "type": "tag" + }, "/Users/rebecca/code/npm" ] ], "_from": "npm-registry-client@latest", - "_id": "npm-registry-client@7.1.0", + "_id": "npm-registry-client@7.1.2", "_inCache": true, "_installable": true, "_location": "/npm-registry-client", - "_nodeVersion": "5.4.0", + "_nodeVersion": "4.4.0", "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/npm-registry-client-7.1.0.tgz_1456435497334_0.35472381697036326" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/npm-registry-client-7.1.2.tgz_1466040796551_0.645394338760525" }, "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.7.5", + "_npmVersion": "3.9.2", "_phantomChildren": { - "inherits": "2.0.1", - "readable-stream": "2.0.5" + "inherits": "2.0.1" }, "_requested": { "name": "npm-registry-client", @@ -35,7 +41,8 @@ "_requiredBy": [ "/" ], - "_shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.2.tgz", + "_shasum": "ddf243a2bd149d35172fe680aff40dfa20054bc3", "_shrinkwrap": null, "_spec": "npm-registry-client@latest", "_where": "/Users/rebecca/code/npm", @@ -54,7 +61,7 @@ "mkdirp": "^0.5.0", "normalize-package-data": "~1.0.1 || ^2.0.0", "npm-package-arg": "^3.0.0 || ^4.0.0", - "npmlog": "~2.0.0", + "npmlog": "~2.0.0 || ~3.1.0", "once": "^1.3.0", "request": "^2.47.0", "retry": "^0.8.0", @@ -72,10 +79,10 @@ }, "directories": {}, "dist": { - "shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", - "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.0.tgz" + "shasum": "ddf243a2bd149d35172fe680aff40dfa20054bc3", + "tarball": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.2.tgz" }, - "gitHead": "d077cb652152a8c265369d9d169cba8a52239fb4", + "gitHead": "0b595c4769f314a12661d537a328cf4e5658a00f", "homepage": "https://github.com/npm/npm-registry-client#readme", "license": "ISC", "main": "index.js", @@ -99,7 +106,7 @@ ], "name": "npm-registry-client", "optionalDependencies": { - "npmlog": "~2.0.0" + "npmlog": "~2.0.0 || ~3.1.0" }, "readme": "ERROR: No README data found!", "repository": { @@ -108,5 +115,5 @@ "scripts": { "test": "standard && tap test/*.js" }, - "version": "7.1.0" + "version": "7.1.2" } diff --git a/deps/npm/node_modules/npm-user-validate/.travis.yml b/deps/npm/node_modules/npm-user-validate/.travis.yml index a12e3f0fdebc13..6ff074b74880dd 100644 --- a/deps/npm/node_modules/npm-user-validate/.travis.yml +++ b/deps/npm/node_modules/npm-user-validate/.travis.yml @@ -1,4 +1,7 @@ language: node_js +before_install: +- npm install -g npm@latest +sudo: false node_js: - "0.8" - - "0.10" \ No newline at end of file + - "0.10" diff --git a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js index f18e13ccf7271f..c9da9cd1c90f0e 100644 --- a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js +++ b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js @@ -4,9 +4,10 @@ exports.username = username var requirements = exports.requirements = { username: { - lowerCase: 'Username must be lowercase', - urlSafe: 'Username may not contain non-url-safe chars', - dot: 'Username may not start with "."' + length: 'Name length must be less than or equal to 576 characters long', + lowerCase: 'Name must be lowercase', + urlSafe: 'Name may not contain non-url-safe chars', + dot: 'Name may not start with "."' }, password: {}, email: { @@ -27,6 +28,10 @@ function username (un) { return new Error(requirements.username.dot) } + if (un.length > 576) { + return new Error(requirements.username.length) + } + return null } diff --git a/deps/npm/node_modules/npm-user-validate/package.json b/deps/npm/node_modules/npm-user-validate/package.json index 2cc56691ec4fd4..84204f8a4b1dd0 100644 --- a/deps/npm/node_modules/npm-user-validate/package.json +++ b/deps/npm/node_modules/npm-user-validate/package.json @@ -1,56 +1,101 @@ { - "name": "npm-user-validate", - "version": "0.1.2", - "description": "User validations for npm", - "main": "npm-user-validate.js", - "devDependencies": { - "tap": "0.4.3" + "_args": [ + [ + { + "raw": "npm-user-validate@latest", + "scope": null, + "escapedName": "npm-user-validate", + "name": "npm-user-validate", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" + }, + "/Users/rebecca/code/npm" + ] + ], + "_from": "npm-user-validate@latest", + "_id": "npm-user-validate@0.1.4", + "_inCache": true, + "_installable": true, + "_location": "/npm-user-validate", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/npm-user-validate-0.1.4.tgz_1466105686124_0.06683815410360694" }, - "scripts": { - "test": "tap test/*.js" + "_npmUser": { + "name": "aredridel", + "email": "aria@npmjs.com" }, - "repository": { - "type": "git", - "url": "git://github.com/npm/npm-user-validate.git" + "_npmVersion": "3.9.6", + "_phantomChildren": {}, + "_requested": { + "raw": "npm-user-validate@latest", + "scope": null, + "escapedName": "npm-user-validate", + "name": "npm-user-validate", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, - "keywords": [ - "npm", - "validation", - "registry" + "_requiredBy": [ + "#USER", + "/" ], + "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz", + "_shasum": "18fcbe53cf921eb8e6339314665b187955b1a837", + "_shrinkwrap": null, + "_spec": "npm-user-validate@latest", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Robert Kowalski", "email": "rok@kowalski.gd" }, - "license": "BSD-2-Clause", - "gitHead": "e5b280babff5b73fe74b496461bcf424a51881e1", "bugs": { "url": "https://github.com/npm/npm-user-validate/issues" }, - "homepage": "https://github.com/npm/npm-user-validate#readme", - "_id": "npm-user-validate@0.1.2", - "_shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", - "_from": "npm-user-validate@>=0.1.2 <0.2.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" + "dependencies": {}, + "description": "User validations for npm", + "devDependencies": { + "tap": "^1.2.0" }, + "directories": {}, "dist": { - "shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", - "tarball": "http://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" + "shasum": "18fcbe53cf921eb8e6339314665b187955b1a837", + "tarball": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz" }, + "gitHead": "ab804940b6846f8cc63f87692cea85b1906c967a", + "homepage": "https://github.com/npm/npm-user-validate#readme", + "keywords": [ + "npm", + "validation", + "registry" + ], + "license": "BSD-2-Clause", + "main": "npm-user-validate.js", "maintainers": [ { - "name": "robertkowalski", - "email": "rok@kowalski.gd" + "name": "aredridel", + "email": "aria@npmjs.com" }, { "name": "isaacs", "email": "i@izs.me" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" } ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" + "name": "npm-user-validate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-user-validate.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.4" } diff --git a/deps/npm/node_modules/npm-user-validate/test/username.test.js b/deps/npm/node_modules/npm-user-validate/test/username.test.js index d30ec8afe71491..83528eec82a76d 100644 --- a/deps/npm/node_modules/npm-user-validate/test/username.test.js +++ b/deps/npm/node_modules/npm-user-validate/test/username.test.js @@ -2,25 +2,41 @@ var test = require('tap').test var v = require('../npm-user-validate.js').username test('username must be lowercase', function (t) { - err = v('ERRR') + var err = v('ERRR') t.type(err, 'object') + t.match(err.message, /lowercase/) t.end() }) test('username may not contain non-url-safe chars', function (t) { - err = v('f ') + var err = v('f ') t.type(err, 'object') + t.match(err.message, /url-safe/) t.end() }) test('username may not start with "."', function (t) { - err = v('.username') + var err = v('.username') t.type(err, 'object') + t.match(err.message, /start with.*\./) t.end() }) +test('username may not be longer than 576 characters', function (t) { + var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-and-a-pickle') + t.type(err, 'object') + t.match(err.message, /less than or equal to 576/) + t.end() +}); + +test('username may be as long as 576 characters', function (t) { + var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-beef') + t.type(err, 'null') + t.end() +}); + test('username is ok', function (t) { - err = v('ente') + var err = v('ente') t.type(err, 'null') t.end() }) diff --git a/deps/npm/node_modules/npmlog/.travis.yml b/deps/npm/node_modules/npmlog/.travis.yml deleted file mode 100644 index e76e1ac81ff366..00000000000000 --- a/deps/npm/node_modules/npmlog/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -sudo: false -node_js: - - "5" - - "4" - - iojs - - "0.12" - - "0.10" - - "0.8" -before_install: - - "npm install -g npm" -script: "npm test" -notifications: - slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/deps/npm/node_modules/npmlog/CHANGELOG.md b/deps/npm/node_modules/npmlog/CHANGELOG.md new file mode 100644 index 00000000000000..f549a1f3de81e3 --- /dev/null +++ b/deps/npm/node_modules/npmlog/CHANGELOG.md @@ -0,0 +1,36 @@ +### 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/npmlog/README.md b/deps/npm/node_modules/npmlog/README.md index a57cf429d4a6fa..dba35501614e91 100644 --- a/deps/npm/node_modules/npmlog/README.md +++ b/deps/npm/node_modules/npmlog/README.md @@ -98,7 +98,13 @@ Disable the use of unicode in the progress bar. ## log.setGaugeTemplate(template) -Overrides the default gauge 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() @@ -193,3 +199,12 @@ following fields: * `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/npmlog/example.js b/deps/npm/node_modules/npmlog/example.js deleted file mode 100644 index c009fb15777fbe..00000000000000 --- a/deps/npm/node_modules/npmlog/example.js +++ /dev/null @@ -1,39 +0,0 @@ -var log = require('./log.js') - -log.heading = 'npm' - -console.error('log.level=silly') -log.level = 'silly' -log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) -log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) -log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) -log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) -log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) -log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - -console.error('log.level=silent') -log.level = 'silent' -log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) -log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) -log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) -log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) -log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) -log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - -console.error('log.level=info') -log.level = 'info' -log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) -log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) -log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) -log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) -log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) -log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('404', 'This is a longer\n'+ - 'message, with some details\n'+ - 'and maybe a stack.\n'+ - new Error('a 404 error').stack) -log.addLevel('noise', 10000, {beep: true}) -log.noise(false, 'LOUD NOISES') diff --git a/deps/npm/node_modules/npmlog/log.js b/deps/npm/node_modules/npmlog/log.js index 8d781f17319084..e5b70f1f80b743 100644 --- a/deps/npm/node_modules/npmlog/log.js +++ b/deps/npm/node_modules/npmlog/log.js @@ -2,49 +2,76 @@ var Progress = require('are-we-there-yet') var Gauge = require('gauge') var EE = require('events').EventEmitter -var log = exports = module.exports = new EE +var log = exports = module.exports = new EE() var util = require('util') -var ansi = require('ansi') -log.cursor = ansi(process.stderr) -log.stream = process.stderr +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 +} -// by default, let ansi decide based on tty-ness. -var colorEnabled = undefined log.enableColor = function () { colorEnabled = true - this.cursor.enabled = true + this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) } log.disableColor = function () { colorEnabled = false - this.cursor.enabled = false + this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) } // default level log.level = 'info' -log.gauge = new Gauge(log.cursor) +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 gaugeTheme = undefined +var unicodeEnabled log.enableUnicode = function () { - gaugeTheme = Gauge.unicode - log.gauge.setTheme(gaugeTheme) + unicodeEnabled = true + this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) } log.disableUnicode = function () { - gaugeTheme = Gauge.ascii - log.gauge.setTheme(gaugeTheme) + unicodeEnabled = false + this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) +} + +log.setGaugeThemeset = function (themes) { + this.gauge.setThemeset(themes) } -var gaugeTemplate = undefined log.setGaugeTemplate = function (template) { - gaugeTemplate = template - log.gauge.setTemplate(gaugeTemplate) + this.gauge.setTemplate(template) } log.enableProgress = function () { @@ -95,15 +122,26 @@ trackerConstructors.forEach(function (C) { log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } }) -log.clearProgress = function () { - if (!this.progressEnabled) return - this.gauge.hide() +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 - if (completed == null) completed = this.tracker.completed() - this.gauge.show(name, completed) + 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 @@ -137,8 +175,8 @@ log.log = function (lvl, prefix, message) { 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] + 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 && @@ -181,7 +219,6 @@ log.emitLog = function (m) { if (l < this.levels[this.level]) return if (l > 0 && !isFinite(l)) return - var style = log.style[m.level] var disp = log.disp[m.level] || m.level this.clearProgress() m.message.split(/\r?\n/).forEach(function (line) { @@ -198,38 +235,48 @@ log.emitLog = function (m) { this.showProgress() } -log.write = function (msg, style) { - if (!this.cursor) return - if (this.stream !== this.cursor.stream) { - this.cursor = ansi(this.stream, { enabled: colorEnabled }) - var options = {} - if (gaugeTheme != null) options.theme = gaugeTheme - if (gaugeTemplate != null) options.template = gaugeTemplate - this.gauge = new Gauge(options, this.cursor) +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 +} - style = style || {} - if (style.fg) this.cursor.fg[style.fg]() - if (style.bg) this.cursor.bg[style.bg]() - if (style.bold) this.cursor.bold() - if (style.underline) this.cursor.underline() - if (style.inverse) this.cursor.inverse() - if (style.beep) this.cursor.beep() - this.cursor.write(msg).reset() +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) + 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 } @@ -248,4 +295,4 @@ log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') log.addLevel('silent', Infinity) // allow 'error' prefix -log.on('error', function(){}) +log.on('error', function () {}) diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/.jshintrc b/deps/npm/node_modules/npmlog/node_modules/ansi/.jshintrc deleted file mode 100644 index 248c5426ea63dc..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/ansi/.jshintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "laxcomma": true, - "asi": true -} diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json index a32bbf52b2bbca..068780fd557c90 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json @@ -2,7 +2,7 @@ "_args": [ [ "delegates@^1.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet" + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/are-we-there-yet" ] ], "_from": "delegates@>=1.0.0 <2.0.0", @@ -32,7 +32,7 @@ "_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", "_shrinkwrap": null, "_spec": "delegates@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/are-we-there-yet", "bugs": { "url": "https://github.com/visionmedia/node-delegates/issues" }, @@ -45,7 +45,7 @@ "directories": {}, "dist": { "shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", - "tarball": "http://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" + "tarball": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" }, "gitHead": "c4dc07ef1ed51c2b2a63f3585e5ef949ee577a49", "homepage": "https://github.com/visionmedia/node-delegates#readme", @@ -56,12 +56,12 @@ "license": "MIT", "maintainers": [ { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" }, { - "name": "dominicbarnes", - "email": "dominic@dbarnes.info" + "email": "dominic@dbarnes.info", + "name": "dominicbarnes" } ], "name": "delegates", diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json index eb2dea38b8b726..4d774accaaf7d7 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json @@ -2,7 +2,7 @@ "_args": [ [ "are-we-there-yet@~1.1.2", - "/Users/rebecca/code/npm/node_modules/npmlog" + "/Users/rebecca/code/npmlog" ] ], "_from": "are-we-there-yet@>=1.1.2 <1.2.0", @@ -32,10 +32,11 @@ "_requiredBy": [ "/npmlog" ], + "_resolved": "http://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/rebecca/code/npm/node_modules/npmlog", + "_where": "/Users/rebecca/code/npmlog", "author": { "name": "Rebecca Turner", "url": "http://re-becca.org" diff --git a/deps/npm/node_modules/npmlog/node_modules/console-control-strings/LICENSE b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/LICENSE new file mode 100644 index 00000000000000..e756052969b780 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014, 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/npmlog/node_modules/console-control-strings/README.md b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/README.md new file mode 100644 index 00000000000000..59cbd5639de446 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/README.md @@ -0,0 +1,144 @@ +# 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/npmlog/node_modules/console-control-strings/index.js b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/index.js new file mode 100644 index 00000000000000..bf890348ec6e35 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/index.js @@ -0,0 +1,125 @@ +'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/npmlog/node_modules/console-control-strings/package.json b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/package.json new file mode 100644 index 00000000000000..8f1559bf62eb32 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "name": "console-control-strings", + "raw": "console-control-strings@~1.1.0", + "rawSpec": "~1.1.0", + "scope": null, + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog" + ] + ], + "_from": "console-control-strings@>=1.1.0 <1.2.0", + "_id": "console-control-strings@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/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": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.9.2", + "_phantomChildren": {}, + "_requested": { + "name": "console-control-strings", + "raw": "console-control-strings@~1.1.0", + "rawSpec": "~1.1.0", + "scope": null, + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog", + "/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/rebecca/code/npm/node_modules/npmlog", + "author": { + "email": "me@re-becca.org", + "name": "Rebecca Turner", + "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": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "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/npmlog/node_modules/gauge/CHANGELOG.md b/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md new file mode 100644 index 00000000000000..efd08fc7c19dd7 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md @@ -0,0 +1,131 @@ +### 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/npmlog/node_modules/gauge/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md index 337dc9d8d45e14..bf87d189f1b5c1 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md @@ -15,138 +15,330 @@ gauge.pulse("this") gauge.hide() ``` -![](example.png) +![](gauge-demo.gif) -### `var gauge = new Gauge([options], [ansiStream])` +### CHANGES FROM 1.x -* **options** – *(optional)* An option object. (See [below] for details.) -* **ansiStream** – *(optional)* A stream that's been blessed by the [ansi] - module to include various commands for controlling the cursor in a terminal. +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. -[ansi]: https://www.npmjs.com/package/ansi -[below]: #theme-objects +[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 the current terminal isn't a tty. +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. -If you resize your terminal in a way that can be detected then the gauge -will be drawn at the new size. As a general rule, growing your terminal will -be clean, but shrinking your terminal will result in cruft as we don't have -enough information to know where what we wrote previously is now located. +**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: -* maxUpdateFrequency: defaults to 50 msec, the gauge will not be drawn more - than once in this period of time. This applies to `show` and `pulse` - calls, but if you `hide` and then `show` the gauge it will draw it - regardless of time since last draw. -* theme: defaults to Gauge.unicode` if the terminal supports - unicode according to [has-unicode], otherwise it defaults to `Gauge.ascii`. - Details on the [theme object](#theme-objects) are documented elsewhere. -* template: see [documentation elsewhere](#template-objects) for - defaults and details. +* **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 -If **ansiStream** isn't passed in, then one will be constructed from stderr -with `ansi(process.stderr)`. +#### `gauge.show(section | status, [completed])` -### `gauge.show([name, [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. -* **name** – *(optional)* The name of the current thing contributing to progress. Defaults to the last value used, or "". -* **completed** – *(optional)* The portion completed as a value between 0 and 1. Defaults to the last value used, or 0. +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. -If `process.stdout.isTTY` is false then this does nothing. If completed is 0 -and `gauge.pulse` has never been called, then similarly nothing will be printed. +#### `gauge.hide([cb])` -If `maxUpdateFrequency` msec haven't passed since the last call to `show` or -`pulse` then similarly, nothing will be printed. (Actually, the update is -deferred until `maxUpdateFrequency` msec have passed and if nothing else has -happened, the gauge update will happen.) +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.) -### `gauge.hide()` +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. -Removes the gauge from the terminal. +#### `gauge.pulse([subsection])` -### `gauge.pulse([name])` +* **subsection** – *(optional)* The specific thing that triggered this pulse -* **name** – *(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`. -Spins the spinner in the gauge to show output. If **name** is included then -it will be combined with the last name passed to `gauge.show` using the -subsection property of the theme (typically a right facing arrow). - -### `gauge.disable()` +#### `gauge.disable()` Hides the gauge and ignores further calls to `show` or `pulse`. -### `gauge.enable()` +#### `gauge.enable()` Shows the gauge and resumes updating when `show` or `pulse` is called. -### `gauge.setTheme(theme)` +#### `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. -Change the active theme, will be displayed with the next show or pulse +#### `gauge.setTheme(theme)` -### `gauge.setTemplate(template)` +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 -### Theme Objects +### 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() -There are two theme objects available as a part of the module, `Gauge.unicode` and `Gauge.ascii`. -Theme objects have the follow properties: +Return a list of all of the names of the themes in this themeset. Suitable +for use in `themes.getTheme(…)`. -| Property | Unicode | ASCII | -| ---------- | ------- | ----- | -| startgroup | ╢ | \| | -| endgroup | ╟ | \| | -| complete | █ | # | -| incomplete | ░ | - | -| spinner | ▀▐▄▌ | -\\\|/ | -| subsection | → | -> | +#### themes.getTheme(name) -*startgroup*, *endgroup* and *subsection* can be as many characters as you want. +Returns the theme object from this theme set named `name`. -*complete* and *incomplete* should be a single character width each. +If `name` does not exist in this themeset an error will be thrown with +a `code` of `EMISSINGTHEME`. -*spinner* is a list of characters to use in turn when displaying an activity -spinner. The Gauge will spin as many characters as you give here. +#### themes.setDefault([opts], themeName) -### Template Objects +`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: "name", separated: true, maxLength: 25, minLength: 25, align: "left"}, - {type: "spinner", separated: true}, - {type: "startgroup"}, - {type: "completionbar"}, - {type: "endgroup"} + {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. - -If the template element is an object, it can have the following keys: - -* *type* can be: - * `name` – The most recent name passed to `show`; if this is in response to a - `pulse` then the name passed to `pulse` will be appended along with the - subsection property from the theme. - * `spinner` – If you've ever called `pulse` this will be one of the characters - from the spinner property of the theme. - * `startgroup` – The `startgroup` property from the theme. - * `completionbar` – This progress bar itself - * `endgroup` – The `endgroup` property from the theme. -* *separated* – If true, the element will be separated with spaces from things on - either side (and margins count as space, so it won't be indented), but only - if its included. +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 @@ -155,12 +347,49 @@ If the template element is an object, it can have the following keys: 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. -### Tracking Completion +### PLUMBING -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. +This is the super simple, assume nothing, do no magic internals used by gauge to +implement its ordinary interface. -[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet +``` +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/npmlog/node_modules/gauge/base-theme.js b/deps/npm/node_modules/npmlog/node_modules/gauge/base-theme.js new file mode 100644 index 00000000000000..0b67638e0211d0 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/base-theme.js @@ -0,0 +1,14 @@ +'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/npmlog/node_modules/gauge/error.js b/deps/npm/node_modules/npmlog/node_modules/gauge/error.js new file mode 100644 index 00000000000000..d9914ba5335d25 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/error.js @@ -0,0 +1,24 @@ +'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/npmlog/node_modules/gauge/has-color.js b/deps/npm/node_modules/npmlog/node_modules/gauge/has-color.js new file mode 100644 index 00000000000000..e283a256f26b74 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/has-color.js @@ -0,0 +1,12 @@ +'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/npmlog/node_modules/gauge/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/index.js new file mode 100644 index 00000000000000..7eefb9507bb47e --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/index.js @@ -0,0 +1,226 @@ +'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/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 new file mode 100644 index 00000000000000..092d0baef6698e --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js @@ -0,0 +1,32 @@ +'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 new file mode 100644 index 00000000000000..2e469520b4255d --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json @@ -0,0 +1,97 @@ +{ + "_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 new file mode 100644 index 00000000000000..37bbd8991a6423 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md @@ -0,0 +1,30 @@ +# 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/lodash.pad/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md deleted file mode 100644 index 33b447cd53e779..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.repeat v4.0.0 - -The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.repeat -``` - -In Node.js: -```js -var repeat = require('lodash.repeat'); -``` - -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js deleted file mode 100644 index 7a54e85714c367..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var toString = require('lodash.tostring'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ -function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ -function toNumber(value) { - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ -function repeat(string, n) { - string = toString(string); - n = toInteger(n); - - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - string += string; - } while (n); - - return result; -} - -module.exports = repeat; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/README.md deleted file mode 100644 index 33b447cd53e779..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.repeat v4.0.0 - -The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.repeat -``` - -In Node.js: -```js -var repeat = require('lodash.repeat'); -``` - -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/index.js deleted file mode 100644 index 7a54e85714c367..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/index.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var toString = require('lodash.tostring'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ -function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ -function toNumber(value) { - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ -function repeat(string, n) { - string = toString(string); - n = toInteger(n); - - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - string += string; - } while (n); - - return result; -} - -module.exports = repeat; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/package.json deleted file mode 100644 index e98ee4125c0d0c..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" - ], - [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" - ] - ], - "_from": "lodash.repeat@>=4.0.0 <5.0.0", - "_id": "lodash.repeat@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/npmlog/gauge/lodash.padend/lodash.repeat", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.repeat-4.0.0.tgz_1455602646227_0.7481637196615338" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.18", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.repeat", - "raw": "lodash.repeat@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npmlog/gauge/lodash.padend" - ], - "_shrinkwrap": null, - "_spec": "lodash.repeat@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - { - "email": "blaine@iceddev.com", - "name": "Blaine Bublitz", - "url": "https://github.com/phated" - }, - { - "email": "mathias@qiwi.be", - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.repeat` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "repeat" - ], - "license": "MIT", - "maintainers": [ - { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - { - "email": "mathias@qiwi.be", - "name": "mathias" - }, - { - "email": "blaine@iceddev.com", - "name": "phated" - } - ], - "name": "lodash.repeat", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.0" -} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/README.md deleted file mode 100644 index 33b447cd53e779..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.repeat v4.0.0 - -The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.repeat -``` - -In Node.js: -```js -var repeat = require('lodash.repeat'); -``` - -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/index.js deleted file mode 100644 index 7a54e85714c367..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/index.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var toString = require('lodash.tostring'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ -function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ -function toNumber(value) { - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ -function repeat(string, n) { - string = toString(string); - n = toInteger(n); - - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - string += string; - } while (n); - - return result; -} - -module.exports = repeat; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -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/npmlog/node_modules/gauge/node_modules/object-assign/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js new file mode 100644 index 00000000000000..508504840dc61d --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js @@ -0,0 +1,83 @@ +'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/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +Copyright (c) Sindre Sorhus (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 @@ -11,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json new file mode 100644 index 00000000000000..f27b55175b4010 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "object-assign@^4.0.1", + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "object-assign@>=4.0.1 <5.0.0", + "_id": "object-assign@4.1.0", + "_inCache": true, + "_installable": true, + "_location": "/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": { + "email": "ben@benalpert.com", + "name": "spicyj" + }, + "_npmVersion": "2.14.19", + "_phantomChildren": {}, + "_requested": { + "name": "object-assign", + "raw": "object-assign@^4.0.1", + "rawSpec": "^4.0.1", + "scope": null, + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "_shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", + "_shrinkwrap": null, + "_spec": "object-assign@^4.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "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": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + { + "email": "ben@benalpert.com", + "name": "spicyj" + } + ], + "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/npmlog/node_modules/gauge/node_modules/object-assign/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md new file mode 100644 index 00000000000000..13c097734cfd18 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md @@ -0,0 +1,56 @@ +# 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/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md new file mode 100644 index 00000000000000..c12f8340c8d6c6 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md @@ -0,0 +1,17 @@ +# 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. + + +# [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/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt new file mode 100644 index 00000000000000..c7e27478a3eff8 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt @@ -0,0 +1,14 @@ +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/npmlog/node_modules/gauge/node_modules/signal-exit/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md new file mode 100644 index 00000000000000..8ebccabecaea4c --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md @@ -0,0 +1,40 @@ +# 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/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 new file mode 100644 index 00000000000000..7dd8d917dc507b --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js @@ -0,0 +1,148 @@ +// 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) +} + +// { : , ... } +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/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 new file mode 100644 index 00000000000000..ce0807f2de3227 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "name": "signal-exit", + "raw": "signal-exit@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "signal-exit@>=3.0.0 <4.0.0", + "_id": "signal-exit@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/signal-exit", + "_nodeVersion": "5.1.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/signal-exit-3.0.0.tgz_1465857346813_0.7961636525578797" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "signal-exit", + "raw": "signal-exit@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz", + "_shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", + "_shrinkwrap": null, + "_spec": "signal-exit@^3.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "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.2", + "nyc": "^6.4.4", + "standard": "^7.1.2", + "standard-version": "^2.3.0", + "tap": "^5.7.2" + }, + "directories": {}, + "dist": { + "shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", + "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz" + }, + "files": [ + "index.js", + "signals.js" + ], + "gitHead": "2bbec4e5d9f9cf1f7529b1c923d1b058e69ccf7f", + "homepage": "https://github.com/tapjs/signal-exit", + "keywords": [ + "signal", + "exit" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + { + "email": "isaacs@npmjs.com", + "name": "isaacs" + } + ], + "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.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js new file mode 100644 index 00000000000000..bc6f97ee606954 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js @@ -0,0 +1,52 @@ +// 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. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGBUS', + 'SIGFPE', + 'SIGHUP', + 'SIGILL', + 'SIGINT', + 'SIGSEGV', + '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/npmlog/node_modules/gauge/node_modules/string-width/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js new file mode 100644 index 00000000000000..aa2f839b6dd2ce --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js @@ -0,0 +1,32 @@ +'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); + + // surrogates + if (code >= 0x10000) { + i++; + } + + if (isFullwidthCodePoint(code)) { + width += 2; + } else { + width++; + } + } + + return width; +}; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +Copyright (c) Sindre Sorhus (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 @@ -11,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js new file mode 100644 index 00000000000000..0335117977237f --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js @@ -0,0 +1,33 @@ +'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/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +Copyright (c) Sindre Sorhus (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 @@ -11,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js new file mode 100644 index 00000000000000..79be4b9cb8c3bc --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = Number.isNaN || function (x) { + return x !== x; +}; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +Copyright (c) Sindre Sorhus (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 @@ -11,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json new file mode 100644 index 00000000000000..018bcb37151877 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "number-is-nan@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/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.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/code-point-at/number-is-nan", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "number-is-nan", + "raw": "number-is-nan@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge/string-width/code-point-at" + ], + "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", + "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "_shrinkwrap": null, + "_spec": "number-is-nan@^1.0.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/number-is-nan/issues" + }, + "dependencies": {}, + "description": "ES6 Number.isNaN() ponyfill", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "tarball": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3", + "homepage": "https://github.com/sindresorhus/number-is-nan#readme", + "keywords": [ + "es6", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "polyfill", + "shim", + "number", + "is", + "nan", + "not" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "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": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md new file mode 100644 index 00000000000000..93d851a14f1ac5 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md @@ -0,0 +1,30 @@ +# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) + +> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## 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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json new file mode 100644 index 00000000000000..4c1430d8e52ade --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "code-point-at@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/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.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/code-point-at", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "code-point-at", + "raw": "code-point-at@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge/string-width" + ], + "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz", + "_shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6", + "_shrinkwrap": null, + "_spec": "code-point-at@^1.0.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "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": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6", + "tarball": "http://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c2ffa4064718b37c84c73a633abeeed5b486a469", + "homepage": "https://github.com/sindresorhus/code-point-at", + "keywords": [ + "es2015", + "es6", + "ponyfill", + "polyfill", + "shim", + "string", + "str", + "code", + "point", + "at", + "codepoint", + "unicode" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "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": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md new file mode 100644 index 00000000000000..71e7d0931b8b0c --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md @@ -0,0 +1,34 @@ +# 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 + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## 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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 00000000000000..a7d3e3855f1c24 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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/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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js new file mode 100644 index 00000000000000..79be4b9cb8c3bc --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = Number.isNaN || function (x) { + return x !== x; +}; diff --git a/deps/npm/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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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/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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json new file mode 100644 index 00000000000000..287e697c31ad34 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "number-is-nan@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at" + ], + [ + "number-is-nan@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/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.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/is-fullwidth-code-point/number-is-nan", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "number-is-nan", + "raw": "number-is-nan@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge/string-width/is-fullwidth-code-point" + ], + "_resolved": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", + "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "_shrinkwrap": null, + "_spec": "number-is-nan@^1.0.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/number-is-nan/issues" + }, + "dependencies": {}, + "description": "ES6 Number.isNaN() ponyfill", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "tarball": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3", + "homepage": "https://github.com/sindresorhus/number-is-nan#readme", + "keywords": [ + "es6", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "polyfill", + "shim", + "number", + "is", + "nan", + "not" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "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": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md new file mode 100644 index 00000000000000..93d851a14f1ac5 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md @@ -0,0 +1,30 @@ +# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) + +> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## 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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 00000000000000..25fb5000dca8c1 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "is-fullwidth-code-point@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width" + ] + ], + "_from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", + "_id": "is-fullwidth-code-point@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/is-fullwidth-code-point", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "is-fullwidth-code-point", + "raw": "is-fullwidth-code-point@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/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/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "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": "http://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": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "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/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 00000000000000..4936464b1b4155 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# 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/npmlog/node_modules/gauge/node_modules/string-width/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json new file mode 100644 index 00000000000000..662efc0b1e6e8b --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "string-width@^1.0.1", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "string-width@>=1.0.1 <2.0.0", + "_id": "string-width@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "string-width", + "raw": "string-width@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge", + "/npmlog/gauge/wide-align" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz", + "_shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", + "_shrinkwrap": null, + "_spec": "string-width@^1.0.1", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "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": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", + "tarball": "http://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "f279cfd14835f0a3c8df69ba18e9a3960156e135", + "homepage": "https://github.com/sindresorhus/string-width", + "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": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "string-width", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md new file mode 100644 index 00000000000000..a7737a986c5736 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md @@ -0,0 +1,41 @@ +# 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. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install --save string-width +``` + + +## Usage + +```js +var 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 + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore new file mode 100644 index 00000000000000..d1a6b0054bc8f3 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore @@ -0,0 +1,5 @@ +*~ +/node_modules +.#* +/.nyc_output +/coverage diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE new file mode 100644 index 00000000000000..2a4982dc40cb69 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE @@ -0,0 +1,13 @@ +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/npmlog/node_modules/gauge/node_modules/wide-align/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md new file mode 100644 index 00000000000000..4cbb017556118d --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md @@ -0,0 +1,47 @@ +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/npmlog/node_modules/gauge/node_modules/wide-align/align.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js new file mode 100644 index 00000000000000..9e8359c6c718e3 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js @@ -0,0 +1,65 @@ +'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/npmlog/node_modules/gauge/node_modules/wide-align/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json new file mode 100644 index 00000000000000..8d3c8cf0c2ff5e --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + "wide-align@^1.1.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "wide-align@>=1.1.0 <2.0.0", + "_id": "wide-align@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/wide-align", + "_nodeVersion": "4.2.2", + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.5.3", + "_phantomChildren": {}, + "_requested": { + "name": "wide-align", + "raw": "wide-align@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/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/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "me@re-becca.org", + "name": "Rebecca Turner", + "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": "http://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": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "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/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js new file mode 100644 index 00000000000000..64e9f9dbda4697 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js @@ -0,0 +1,37 @@ +'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/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json index efbb346bb4f587..846a27e8a44d85 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json @@ -1,40 +1,50 @@ { "_args": [ [ - "gauge@~1.2.5", + { + "name": "gauge", + "raw": "gauge@~2.6.0", + "rawSpec": "~2.6.0", + "scope": null, + "spec": ">=2.6.0 <2.7.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/npmlog" ] ], - "_from": "gauge@>=1.2.5 <1.3.0", - "_id": "gauge@1.2.7", + "_from": "gauge@>=2.6.0 <2.7.0", + "_id": "gauge@2.6.0", "_inCache": true, "_installable": true, "_location": "/npmlog/gauge", - "_nodeVersion": "4.2.2", + "_nodeVersion": "4.4.0", "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/gauge-1.2.7.tgz_1455835409513_0.6293477965518832" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/gauge-2.6.0.tgz_1466067371972_0.20705468393862247" }, "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.7.2", - "_phantomChildren": {}, + "_npmVersion": "3.9.2", + "_phantomChildren": { + "strip-ansi": "3.0.1" + }, "_requested": { "name": "gauge", - "raw": "gauge@~1.2.5", - "rawSpec": "~1.2.5", + "raw": "gauge@~2.6.0", + "rawSpec": "~2.6.0", "scope": null, - "spec": ">=1.2.5 <1.3.0", + "spec": ">=2.6.0 <2.7.0", "type": "range" }, "_requiredBy": [ "/npmlog" ], - "_shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", + "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz", + "_shasum": "d35301ad18e96902b4751dcbbe40f4218b942a46", "_shrinkwrap": null, - "_spec": "gauge@~1.2.5", + "_spec": "gauge@~2.6.0", "_where": "/Users/rebecca/code/npm/node_modules/npmlog", "author": { "email": "me@re-becca.org", @@ -44,22 +54,51 @@ "url": "https://github.com/iarna/gauge/issues" }, "dependencies": { - "ansi": "^0.3.0", + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-color": "^0.1.7", "has-unicode": "^2.0.0", - "lodash.pad": "^4.1.0", - "lodash.padend": "^4.1.0", - "lodash.padstart": "^4.1.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": { - "tap": "^5.6.0" + "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": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", - "tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz" + "shasum": "d35301ad18e96902b4751dcbbe40f4218b942a46", + "tarball": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz" }, - "gitHead": "75a7d0a4ed67489ac992ed3d211bed60376ca7c1", + "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", @@ -67,7 +106,7 @@ "gauge" ], "license": "ISC", - "main": "progress-bar.js", + "main": "index.js", "maintainers": [ { "email": "me@re-becca.org", @@ -82,7 +121,7 @@ "url": "git+https://github.com/iarna/gauge.git" }, "scripts": { - "test": "tap test/*.js" + "test": "standard && tap test/*.js --coverage" }, - "version": "1.2.7" + "version": "2.6.0" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js b/deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js new file mode 100644 index 00000000000000..589a9c92878ebf --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js @@ -0,0 +1,47 @@ +'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/npmlog/node_modules/gauge/process.js b/deps/npm/node_modules/npmlog/node_modules/gauge/process.js new file mode 100644 index 00000000000000..05e85694d755b6 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/process.js @@ -0,0 +1,3 @@ +'use strict' +// this exists so we can replace it during testing +module.exports = process diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js b/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js index ddfc4a44be4ded..7f8dd68be24cf0 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js @@ -1,225 +1,35 @@ -"use strict" -var hasUnicode = require("has-unicode") -var ansi = require("ansi") -var align = { - center: require("lodash.pad"), - left: require("lodash.padend"), - right: require("lodash.padstart") -} -var defaultStream = process.stderr -function isTTY() { - return process.stderr.isTTY -} -function getWritableTTYColumns() { - // Writing to the final column wraps the line - // We have to use stdout here, because Node's magic SIGWINCH handler only - // updates process.stdout, not process.stderr - return process.stdout.columns - 1 -} - -var ProgressBar = module.exports = function (options, cursor) { - if (! options) options = {} - if (! cursor && options.write) { - cursor = options - options = {} - } - if (! cursor) { - cursor = ansi(defaultStream) - } - this.cursor = cursor - this.showing = false - this.theme = options.theme || (hasUnicode() ? ProgressBar.unicode : ProgressBar.ascii) - this.template = options.template || [ - {type: "name", separated: true, length: 25}, - {type: "spinner", separated: true}, - {type: "startgroup"}, - {type: "completionbar"}, - {type: "endgroup"} +'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} ] - this.updatefreq = options.maxUpdateFrequency == null ? 50 : options.maxUpdateFrequency - this.lastName = "" - this.lastCompleted = 0 - this.spun = 0 - this.last = new Date(0) - - var self = this - this._handleSizeChange = function () { - if (!self.showing) return - self.hide() - self.show() - } -} -ProgressBar.prototype = {} - -ProgressBar.unicode = { - startgroup: "╢", - endgroup: "╟", - complete: "█", - incomplete: "░", - spinner: "▀▐▄▌", - subsection: "→" -} - -ProgressBar.ascii = { - startgroup: "|", - endgroup: "|", - complete: "#", - incomplete: "-", - spinner: "-\\|/", - subsection: "->" -} - -ProgressBar.prototype.setTheme = function(theme) { - this.theme = theme -} - -ProgressBar.prototype.setTemplate = function(template) { - this.template = template -} - -ProgressBar.prototype._enableResizeEvents = function() { - process.stdout.on('resize', this._handleSizeChange) -} - -ProgressBar.prototype._disableResizeEvents = function() { - process.stdout.removeListener('resize', this._handleSizeChange) -} - -ProgressBar.prototype.disable = function() { - this.hide() - this.disabled = true -} - -ProgressBar.prototype.enable = function() { - this.disabled = false - this.show() -} - -ProgressBar.prototype.hide = function() { - if (!isTTY()) return - if (this.disabled) return - this.cursor.show() - if (this.showing) this.cursor.up(1) - this.cursor.horizontalAbsolute(0).eraseLine() - this.showing = false + return renderTemplate(width, template, theme) } -var repeat = function (str, count) { - var out = "" - for (var ii=0; ii 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/npmlog/node_modules/gauge/set-immediate.js b/deps/npm/node_modules/npmlog/node_modules/gauge/set-immediate.js new file mode 100644 index 00000000000000..6650a485c49933 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/set-immediate.js @@ -0,0 +1,7 @@ +'use strict' +var process = require('./process') +try { + module.exports = setImmediate +} catch (ex) { + module.exports = process.nextTick +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js b/deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js new file mode 100644 index 00000000000000..576198793c5504 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js @@ -0,0 +1,3 @@ +'use strict' +// this exists so we can replace it during testing +module.exports = setInterval diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/spin.js b/deps/npm/node_modules/npmlog/node_modules/gauge/spin.js new file mode 100644 index 00000000000000..34142ee31acc7c --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/spin.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = function spin (spinstr, spun) { + return spinstr[spun % spinstr.length] +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js b/deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js new file mode 100644 index 00000000000000..4f02fefaa23eca --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js @@ -0,0 +1,72 @@ +'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/npmlog/node_modules/gauge/theme-set.js b/deps/npm/node_modules/npmlog/node_modules/gauge/theme-set.js new file mode 100644 index 00000000000000..c022d61cf13cb0 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/theme-set.js @@ -0,0 +1,114 @@ +'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/npmlog/node_modules/gauge/themes.js b/deps/npm/node_modules/npmlog/node_modules/gauge/themes.js new file mode 100644 index 00000000000000..eb5a4f5b5e1034 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/themes.js @@ -0,0 +1,54 @@ +'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/npmlog/node_modules/gauge/wide-truncate.js b/deps/npm/node_modules/npmlog/node_modules/gauge/wide-truncate.js new file mode 100644 index 00000000000000..c531bc491fbb58 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/wide-truncate.js @@ -0,0 +1,25 @@ +'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/npmlog/node_modules/set-blocking/CHANGELOG.md b/deps/npm/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md new file mode 100644 index 00000000000000..03bf591923d782 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md @@ -0,0 +1,26 @@ +# 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. + + +# [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 + + + + +# 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/npmlog/node_modules/set-blocking/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt new file mode 100644 index 00000000000000..836440bef7cf14 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt @@ -0,0 +1,14 @@ +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/npmlog/node_modules/set-blocking/README.md b/deps/npm/node_modules/npmlog/node_modules/set-blocking/README.md new file mode 100644 index 00000000000000..e93b4202b59d65 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/README.md @@ -0,0 +1,31 @@ +# 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/npmlog/node_modules/set-blocking/index.js b/deps/npm/node_modules/npmlog/node_modules/set-blocking/index.js new file mode 100644 index 00000000000000..6f78774bb63ee6 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/index.js @@ -0,0 +1,7 @@ +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/npmlog/node_modules/set-blocking/package.json b/deps/npm/node_modules/npmlog/node_modules/set-blocking/package.json new file mode 100644 index 00000000000000..86292b90f5ef79 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "name": "set-blocking", + "raw": "set-blocking@~2.0.0", + "rawSpec": "~2.0.0", + "scope": null, + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog" + ] + ], + "_from": "set-blocking@>=2.0.0 <2.1.0", + "_id": "set-blocking@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/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": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "set-blocking", + "raw": "set-blocking@~2.0.0", + "rawSpec": "~2.0.0", + "scope": null, + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/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/rebecca/code/npm/node_modules/npmlog", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "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": [ + { + "email": "ben@npmjs.com", + "name": "bcoe" + } + ], + "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/npmlog/package.json b/deps/npm/node_modules/npmlog/package.json index 153145ab056059..85211951f6951b 100644 --- a/deps/npm/node_modules/npmlog/package.json +++ b/deps/npm/node_modules/npmlog/package.json @@ -1,45 +1,54 @@ { "_args": [ [ - "npmlog@~2.0.2", + { + "name": "npmlog", + "raw": "npmlog@latest", + "rawSpec": "latest", + "scope": null, + "spec": "latest", + "type": "tag" + }, "/Users/rebecca/code/npm" ] ], - "_from": "npmlog@>=2.0.2 <2.1.0", - "_id": "npmlog@2.0.3", + "_from": "npmlog@latest", + "_id": "npmlog@3.1.2", "_inCache": true, "_installable": true, "_location": "/npmlog", - "_nodeVersion": "4.2.2", + "_nodeVersion": "4.4.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/npmlog-2.0.3.tgz_1458089035965_0.5096880353521556" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/npmlog-3.1.2.tgz_1466073052641_0.36111341998912394" }, "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.8.1", + "_npmVersion": "3.9.6", "_phantomChildren": { + "aproba": "1.0.3", "has-unicode": "2.0.0", - "readable-stream": "2.0.6" + "readable-stream": "2.1.3", + "strip-ansi": "3.0.1" }, "_requested": { "name": "npmlog", - "raw": "npmlog@~2.0.2", - "rawSpec": "~2.0.2", + "raw": "npmlog@latest", + "rawSpec": "latest", "scope": null, - "spec": ">=2.0.2 <2.1.0", - "type": "range" + "spec": "latest", + "type": "tag" }, "_requiredBy": [ "/", - "/node-gyp", "/npm-registry-client" ], - "_shasum": "020f99351f0c02e399c674ba256e7c4d3b3dd298", + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz", + "_shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", "_shrinkwrap": null, - "_spec": "npmlog@~2.0.2", + "_spec": "npmlog@latest", "_where": "/Users/rebecca/code/npm", "author": { "email": "i@izs.me", @@ -50,20 +59,25 @@ "url": "https://github.com/npm/npmlog/issues" }, "dependencies": { - "ansi": "~0.3.1", "are-we-there-yet": "~1.1.2", - "gauge": "~1.2.5" + "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": "020f99351f0c02e399c674ba256e7c4d3b3dd298", - "tarball": "http://registry.npmjs.org/npmlog/-/npmlog-2.0.3.tgz" + "shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", + "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz" }, - "gitHead": "9dfe26296118ceb5443e76f347f256c35e7ca999", + "files": [ + "log.js" + ], + "gitHead": "444e237743fa1339cb91bea2d3f16f710be56984", "homepage": "https://github.com/npm/npmlog#readme", "license": "ISC", "main": "log.js", @@ -79,6 +93,10 @@ { "email": "ogd@aoaioxxysz.net", "name": "othiym23" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" } ], "name": "npmlog", @@ -89,7 +107,7 @@ "url": "git+https://github.com/npm/npmlog.git" }, "scripts": { - "test": "tap test/*.js" + "test": "standard && tap test/*.js" }, - "version": "2.0.3" + "version": "3.1.2" } diff --git a/deps/npm/node_modules/npmlog/test/basic.js b/deps/npm/node_modules/npmlog/test/basic.js deleted file mode 100644 index 1887d3a2a8cd4e..00000000000000 --- a/deps/npm/node_modules/npmlog/test/basic.js +++ /dev/null @@ -1,235 +0,0 @@ -var tap = require('tap') -var log = require('../') - -var result = [] -var logEvents = [] -var logInfoEvents = [] -var logPrefixEvents = [] - -var util = require('util') - -var resultExpect = -[ '\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[7msill\u001b[0m \u001b[0m\u001b[35msilly prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[34m\u001b[40mverb\u001b[0m \u001b[0m\u001b[35mverbose prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m This is a longer\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m message, with some details\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m and maybe a stack.\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m \n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u0007noise\u001b[0m\u001b[35m\u001b[0m LOUD NOISES\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u0007noise\u001b[0m \u001b[0m\u001b[35merror\u001b[0m erroring\n', - '\u001b[0m' ] - -var logPrefixEventsExpect = -[ { id: 2, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 9, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 16, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] } ] - -// should be the same. -var logInfoEventsExpect = logPrefixEventsExpect - -var logEventsExpect = -[ { id: 0, - level: 'silly', - prefix: 'silly prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 1, - level: 'verbose', - prefix: 'verbose prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 2, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 3, - level: 'http', - prefix: 'http prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 4, - level: 'warn', - prefix: 'warn prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 5, - level: 'error', - prefix: 'error prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 6, - level: 'silent', - prefix: 'silent prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 7, - level: 'silly', - prefix: 'silly prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 8, - level: 'verbose', - prefix: 'verbose prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 9, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 10, - level: 'http', - prefix: 'http prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 11, - level: 'warn', - prefix: 'warn prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 12, - level: 'error', - prefix: 'error prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 13, - level: 'silent', - prefix: 'silent prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 14, - level: 'silly', - prefix: 'silly prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 15, - level: 'verbose', - prefix: 'verbose prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 16, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 17, - level: 'http', - prefix: 'http prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 18, - level: 'warn', - prefix: 'warn prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 19, - level: 'error', - prefix: 'error prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 20, - level: 'silent', - prefix: 'silent prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 21, - level: 'error', - prefix: '404', - message: 'This is a longer\nmessage, with some details\nand maybe a stack.\n', - messageRaw: [ 'This is a longer\nmessage, with some details\nand maybe a stack.\n' ] }, - { id: 22, - level: 'noise', - prefix: false, - message: 'LOUD NOISES', - messageRaw: [ 'LOUD NOISES' ] }, - { id: 23, - level: 'noise', - prefix: 'error', - message: 'erroring', - messageRaw: [ 'erroring' ] } ] - -var Stream = require('stream').Stream -var s = new Stream() -s.write = function (m) { - result.push(m) -} - -s.writable = true -s.isTTY = true -s.end = function () {} - -log.stream = s - -log.heading = 'npm' - - -tap.test('basic', function (t) { - log.on('log', logEvents.push.bind(logEvents)) - log.on('log.info', logInfoEvents.push.bind(logInfoEvents)) - log.on('info prefix', logPrefixEvents.push.bind(logPrefixEvents)) - - console.error('log.level=silly') - log.level = 'silly' - log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) - log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) - log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) - log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) - log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) - log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - - console.error('log.level=silent') - log.level = 'silent' - log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) - log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) - log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) - log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) - log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) - log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - - console.error('log.level=info') - log.level = 'info' - log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) - log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) - log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) - log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) - log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) - log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('404', 'This is a longer\n'+ - 'message, with some details\n'+ - 'and maybe a stack.\n') - log.addLevel('noise', 10000, {beep: true}) - log.noise(false, 'LOUD NOISES') - log.noise('error', 'erroring') - - t.deepEqual(result.join('').trim(), resultExpect.join('').trim(), 'result') - t.deepEqual(log.record, logEventsExpect, 'record') - t.deepEqual(logEvents, logEventsExpect, 'logEvents') - t.deepEqual(logInfoEvents, logInfoEventsExpect, 'logInfoEvents') - t.deepEqual(logPrefixEvents, logPrefixEventsExpect, 'logPrefixEvents') - - t.end() -}) diff --git a/deps/npm/node_modules/npmlog/test/progress.js b/deps/npm/node_modules/npmlog/test/progress.js deleted file mode 100644 index 68dca2afc73575..00000000000000 --- a/deps/npm/node_modules/npmlog/test/progress.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -var test = require('tap').test -var Progress = require('are-we-there-yet') -var log = require('../log.js') - -var actions = [] -log.gauge = { - enable: function () { - actions.push(['enable']) - }, - disable: function () { - actions.push(['disable']) - }, - hide: function () { - actions.push(['hide']) - }, - show: function (name, completed) { - actions.push(['show', name, completed]) - }, - pulse: function (name) { - actions.push(['pulse', name]) - } -} - -function didActions(t, msg, output) { - var tests = [] - for (var ii = 0; ii < output.length; ++ ii) { - for (var jj = 0; jj < output[ii].length; ++ jj) { - tests.push({cmd: ii, arg: jj}) - } - } - t.is(actions.length, output.length, msg) - tests.forEach(function (test) { - t.is(actions[test.cmd] ? actions[test.cmd][test.arg] : null, - output[test.cmd][test.arg], - msg + ': ' + output[test.cmd] + (test.arg ? ' arg #'+test.arg : '')) - }) - actions = [] -} - -function resetTracker() { - log.disableProgress() - log.tracker = new Progress.TrackerGroup() - log.enableProgress() - actions = [] -} - -test('enableProgress', function (t) { - t.plan(6) - resetTracker() - log.disableProgress() - actions = [] - log.enableProgress() - didActions(t, 'enableProgress', [ [ 'enable' ], [ 'show', undefined, 0 ] ]) - log.enableProgress() - didActions(t, 'enableProgress again', []) -}) - -test('disableProgress', function (t) { - t.plan(4) - resetTracker() - log.disableProgress() - didActions(t, 'disableProgress', [ [ 'hide' ], [ 'disable' ] ]) - log.disableProgress() - didActions(t, 'disableProgress again', []) -}) - -test('showProgress', function (t) { - t.plan(5) - resetTracker() - log.disableProgress() - actions = [] - log.showProgress('foo') - didActions(t, 'showProgress disabled', []) - log.enableProgress() - actions = [] - log.showProgress('foo') - didActions(t, 'showProgress', [ [ 'show', 'foo', 0 ] ]) -}) - -test('clearProgress', function (t) { - t.plan(3) - resetTracker() - log.clearProgress() - didActions(t, 'clearProgress', [ [ 'hide' ] ]) - log.disableProgress() - actions = [] - log.clearProgress() - didActions(t, 'clearProgress disabled', [ ]) -}) - -test("newItem", function (t) { - t.plan(12) - resetTracker() - actions = [] - var a = log.newItem("test", 10) - didActions(t, "newItem", [ [ 'show', 'test', 0 ] ]) - a.completeWork(5) - didActions(t, "newItem:completeWork", [ [ 'show', 'test', 0.5 ] ]) - a.finish() - didActions(t, "newItem:finish", [ [ 'show', 'test', 1 ] ]) -}) - -// test that log objects proxy through. And test that completion status filters up -test("newGroup", function (t) { - t.plan(23) - resetTracker() - var a = log.newGroup("newGroup") - didActions(t, 'newGroup', [[ 'show', 'newGroup', 0 ]]) - a.warn("test", "this is a test") - didActions(t, "newGroup:warn", [ [ 'pulse', 'test' ], [ 'hide' ], [ 'show', undefined, 0 ] ]) - var b = a.newItem("newGroup2", 10) - didActions(t, "newGroup:newItem", [ [ 'show', 'newGroup2', 0 ] ]) - b.completeWork(5) - didActions(t, "newGroup:completeWork", [ [ 'show', 'newGroup2', 0.5] ]) - a.finish() - didActions(t, "newGroup:finish", [ [ 'show', 'newGroup', 1 ] ]) -}) - -test("newStream", function (t) { - t.plan(13) - resetTracker() - var a = log.newStream("newStream", 10) - didActions(t, "newStream", [ [ 'show', 'newStream', 0 ] ]) - a.write("abcde") - didActions(t, "newStream", [ [ 'show', 'newStream', 0.5 ] ]) - a.write("fghij") - didActions(t, "newStream", [ [ 'show', 'newStream', 1 ] ]) - t.is(log.tracker.completed(), 1, "Overall completion") -}) diff --git a/deps/npm/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/readable-stream/.npmignore index 38344f87a62766..265ff739e071cd 100644 --- a/deps/npm/node_modules/readable-stream/.npmignore +++ b/deps/npm/node_modules/readable-stream/.npmignore @@ -2,4 +2,7 @@ build/ test/ examples/ fs.js -zlib.js \ No newline at end of file +zlib.js +.zuul.yml +.nyc_output +coverage diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css b/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css deleted file mode 100644 index 417c7adc95f1da..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css +++ /dev/null @@ -1,212 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } - - -.medium .chart { border:1px solid #666; } -.medium .cover-fill { background: #666; } - -.cbranch-no { background: yellow !important; color: #111; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - -span.cline-neutral { background: #eaeaea; } -.medium { background: #eaeaea; } - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html deleted file mode 100644 index a812194c17fab3..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Code coverage report for All files - - - - - - - -
    -
    -

    - / -

    -
    -
    - 90.63% - Statements - 851/939 -
    -
    - 87.94% - Branches - 496/564 -
    -
    - 86.54% - Functions - 90/104 -
    -
    - 92.73% - Lines - 765/825 -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    lib/
    90.63%851/93987.94%496/56486.54%90/10492.73%765/825
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html deleted file mode 100644 index a3f1208b4136a5..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - Code coverage report for lib/_stream_duplex.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_duplex.js -

    -
    -
    - 69.23% - Statements - 27/39 -
    -
    - 68.18% - Branches - 15/22 -
    -
    - 40% - Functions - 2/5 -
    -
    - 75.76% - Lines - 25/33 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75  -  -  -  -  -  -  -  -  -49× -  -  -  -  -  -  -  -49× -  -  -49× -  -  -  -49× -49× -  -  -49× -49× -  -49× -  -49× -49× -392× -392× -  -  -49× -25× -  -25× -25× -  -25× -  -25× -  -25× -25× -  -25× -  -  -  -49× -  -  -18× -  -  -  -  -  -  -49× -  -  -  -49× -  -  -  - 
    // a duplex stream is just a stream that is both readable and writable.
    -// Since JS doesn't have multiple prototypal inheritance, this class
    -// prototypally inherits from Readable, and then parasitically from
    -// Writable.
    - 
    -'use strict';
    - 
    -/*<replacement>*/
    - 
    -var objectKeys = Object.keys || function (obj) {
    -  var keys = [];
    -  for (var key in obj) {
    -    keys.push(key);
    -  }return keys;
    -};
    -/*</replacement>*/
    - 
    -module.exports = Duplex;
    - 
    -/*<replacement>*/
    -var processNextTick = require('process-nextick-args');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -var Readable = require('./_stream_readable');
    -var Writable = require('./_stream_writable');
    - 
    -util.inherits(Duplex, Readable);
    - 
    -var keys = objectKeys(Writable.prototype);
    -for (var v = 0; v < keys.length; v++) {
    -  var method = keys[v];
    -  if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
    -}
    - 
    -function Duplex(options) {
    -  Iif (!(this instanceof Duplex)) return new Duplex(options);
    - 
    -  Readable.call(this, options);
    -  Writable.call(this, options);
    - 
    -  Iif (options && options.readable === false) this.readable = false;
    - 
    -  Iif (options && options.writable === false) this.writable = false;
    - 
    -  this.allowHalfOpen = true;
    -  Iif (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
    - 
    -  this.once('end', onend);
    -}
    - 
    -// the no-half-open enforcer
    -function onend() {
    -  // if we allow half-open state, or if the writable side ended,
    -  // then we're ok.
    -  Eif (this.allowHalfOpen || this._writableState.ended) return;
    - 
    -  // no more data can be written.
    -  // But allow more writes to happen in this tick.
    -  processNextTick(onEndNT, this);
    -}
    - 
    -function onEndNT(self) {
    -  self.end();
    -}
    - 
    -function forEach(xs, f) {
    -  for (var i = 0, l = xs.length; i < l; i++) {
    -    f(xs[i], i);
    -  }
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html deleted file mode 100644 index 3ca02ae767a09e..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - Code coverage report for lib/_stream_passthrough.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_passthrough.js -

    -
    -
    - 90.91% - Statements - 10/11 -
    -
    - 50% - Branches - 1/2 -
    -
    - 100% - Functions - 2/2 -
    -
    - 100% - Lines - 10/10 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26  -  -  -  -  -  -49× -  -49× -  -  -49× -49× -  -  -49× -  -49× - -  - -  -  -49× -59× - 
    // a passthrough stream.
    -// basically just the most minimal sort of Transform stream.
    -// Every written chunk gets output as-is.
    - 
    -'use strict';
    - 
    -module.exports = PassThrough;
    - 
    -var Transform = require('./_stream_transform');
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -util.inherits(PassThrough, Transform);
    - 
    -function PassThrough(options) {
    -  Iif (!(this instanceof PassThrough)) return new PassThrough(options);
    - 
    -  Transform.call(this, options);
    -}
    - 
    -PassThrough.prototype._transform = function (chunk, encoding, cb) {
    -  cb(null, chunk);
    -};
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html deleted file mode 100644 index fb9f1d0cbe6347..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html +++ /dev/null @@ -1,2741 +0,0 @@ - - - - Code coverage report for lib/_stream_readable.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_readable.js -

    -
    -
    - 89.29% - Statements - 467/523 -
    -
    - 87.22% - Branches - 307/352 -
    -
    - 86.79% - Functions - 46/53 -
    -
    - 90.73% - Lines - 411/453 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 -377 -378 -379 -380 -381 -382 -383 -384 -385 -386 -387 -388 -389 -390 -391 -392 -393 -394 -395 -396 -397 -398 -399 -400 -401 -402 -403 -404 -405 -406 -407 -408 -409 -410 -411 -412 -413 -414 -415 -416 -417 -418 -419 -420 -421 -422 -423 -424 -425 -426 -427 -428 -429 -430 -431 -432 -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444 -445 -446 -447 -448 -449 -450 -451 -452 -453 -454 -455 -456 -457 -458 -459 -460 -461 -462 -463 -464 -465 -466 -467 -468 -469 -470 -471 -472 -473 -474 -475 -476 -477 -478 -479 -480 -481 -482 -483 -484 -485 -486 -487 -488 -489 -490 -491 -492 -493 -494 -495 -496 -497 -498 -499 -500 -501 -502 -503 -504 -505 -506 -507 -508 -509 -510 -511 -512 -513 -514 -515 -516 -517 -518 -519 -520 -521 -522 -523 -524 -525 -526 -527 -528 -529 -530 -531 -532 -533 -534 -535 -536 -537 -538 -539 -540 -541 -542 -543 -544 -545 -546 -547 -548 -549 -550 -551 -552 -553 -554 -555 -556 -557 -558 -559 -560 -561 -562 -563 -564 -565 -566 -567 -568 -569 -570 -571 -572 -573 -574 -575 -576 -577 -578 -579 -580 -581 -582 -583 -584 -585 -586 -587 -588 -589 -590 -591 -592 -593 -594 -595 -596 -597 -598 -599 -600 -601 -602 -603 -604 -605 -606 -607 -608 -609 -610 -611 -612 -613 -614 -615 -616 -617 -618 -619 -620 -621 -622 -623 -624 -625 -626 -627 -628 -629 -630 -631 -632 -633 -634 -635 -636 -637 -638 -639 -640 -641 -642 -643 -644 -645 -646 -647 -648 -649 -650 -651 -652 -653 -654 -655 -656 -657 -658 -659 -660 -661 -662 -663 -664 -665 -666 -667 -668 -669 -670 -671 -672 -673 -674 -675 -676 -677 -678 -679 -680 -681 -682 -683 -684 -685 -686 -687 -688 -689 -690 -691 -692 -693 -694 -695 -696 -697 -698 -699 -700 -701 -702 -703 -704 -705 -706 -707 -708 -709 -710 -711 -712 -713 -714 -715 -716 -717 -718 -719 -720 -721 -722 -723 -724 -725 -726 -727 -728 -729 -730 -731 -732 -733 -734 -735 -736 -737 -738 -739 -740 -741 -742 -743 -744 -745 -746 -747 -748 -749 -750 -751 -752 -753 -754 -755 -756 -757 -758 -759 -760 -761 -762 -763 -764 -765 -766 -767 -768 -769 -770 -771 -772 -773 -774 -775 -776 -777 -778 -779 -780 -781 -782 -783 -784 -785 -786 -787 -788 -789 -790 -791 -792 -793 -794 -795 -796 -797 -798 -799 -800 -801 -802 -803 -804 -805 -806 -807 -808 -809 -810 -811 -812 -813 -814 -815 -816 -817 -818 -819 -820 -821 -822 -823 -824 -825 -826 -827 -828 -829 -830 -831 -832 -833 -834 -835 -836 -837 -838 -839 -840 -841 -842 -843 -844 -845 -846 -847 -848 -849 -850 -851 -852 -853 -854 -855 -856 -857 -858 -859 -860 -861 -862 -863 -864 -865 -866 -867 -868 -869 -870 -871 -872 -873 -874 -875 -876 -877 -878 -879 -880 -881 -882 -883 -884 -885 -886 -887 -888 -889 -890 -891 -892 -893  -  -49× -  -  -49× -  -  -  -49× -  -  -49× -  -  -49× -  -49× -269× -  -  -  -  -49× -49× -49× -49× -  -49× -  -  -  -  -49× -  -49× -  -  -  -49× -49× -  -  -  -49× -49× -49× -49× -  -  -  -  -  -49× -  -49× -  -49× -  -49× -38× -  -  -  -  -  -  -38× -  -  -49× -49× -82× -  -82× -  -  -  -82× -  -82× -  -  -  -82× -82× -82× -  -  -82× -  -82× -82× -82× -82× -82× -82× -82× -82× -  -  -  -  -  -82× -  -  -  -82× -82× -82× -82× -  -  -  -  -82× -  -  -  -82× -  -  -82× -  -  -82× -  -82× -82× -82× -10× -10× -10× -  -  -  -49× -49× -84× -  -84× -  -82× -  -  -82× -  -82× -  -82× -  -  -  -  -  -  -49× -276927× -  -276927× -37× -37× -10× -10× -  -  -  -276927× -  -  -  -49× -41× -41× -  -  -49× - -  -  -49× -276968× -276968× -  -276968× -67× -67× -276901× -276883× - - -276882× - - -  -276881× -276881× -23× -23× -  -  -276881× -  -  -  -276881× -  -276875× -108× -108× -  -  -276767× -276767× -  -276767× -  -  -  -276881× -  -18× - -  -  -276966× -  -  -  -  -  -  -  -  -  -49× -276966× -  -  -  -49× - - - - -  -  -  -49× -49× - -  -  -  - - - - - - - -  - -  -  -49× -554235× -  -553951× -  -553860× -  -421× -  -  -553439× -  -  -  -  -  -2087× -  -  -2087× -1711× -1697× -1697× -  -14× -  -  -  -376× -  -  -  -49× -277657× -277657× -277657× -  -277657× -  -  -  -  -277657× - - - -  -  -277651× -  -  -277651× -279× -279× -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -277372× -277372× -  -  -277372× -277365× -277365× -  -  -  -  -277372× -556× -556× -  -  -277372× -276809× -276809× -276809× -  -276809× -  -276809× -276809× -  -  -  -  -277372× -  -277372× -277372× -  -277372× -276627× -276627× -  -  -277372× -  -  -  -277372× -  -  -277372× -  -277372× -  -277372× -  -  -49× -276968× -276968× -  -  -276968× -  -  -49× -67× -59× -14× -14× - - -  -  -59× -  -  -59× -  -  -  -  -  -49× -276722× -276722× -276722× -1123× -1123× -1123× -  -  -  -49× -1123× -1123× -1123× -  -  -  -  -  -  -  -  -49× -276881× -225× -225× -  -  -  -49× -225× -225× -275597× -275597× -275597× -  -275571× -  -225× -  -  -  -  -  -  -49× -  -  -  -49× -38× -38× -  -38× -  -37× -37× -  - - -  -  -  -  -38× -38× -  -38× -  -38× -38× -  -38× -49× -25× -25× -24× -  -  -  -49× -12× -12× -  -  -  -  -  -  -38× -38× -  -38× -49× -24× -  -24× -24× -24× -24× -24× -24× -24× -24× -  -24× -  -  -  -  -  -  -24× -  -  -38× -49× -395× -395× -395× -  -  -  -  -264× -263× -263× -  -264× -  -  -  -  -  -49× - - - - -  -  -  -38× -  -  -49× -  -  -  -38× -49× - - - -  -38× -  -49× -11× -11× -  -  -  -38× -  -  -38× -12× -12× -  -  -38× -  -  -49× -38× -265× -265× -265× -265× -263× -263× -  -  -  -  -49× -27× -  -  -27× -  -  -24× -  -24× -  -24× -  -  -24× -24× -24× -24× -24× -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -49× -226× -  -  -  -226× -36× -  -  -226× -38× -38× -28× -28× -28× -28× -25× - - -  -  -  -  -226× -  -49× -  -49× -25× -25× -  -  -  -  -49× -57× -57× -56× -56× -56× -  -57× -  -  -49× -56× -42× -42× -  -  -  -49× -42× -38× -38× -  -  -42× -42× -42× -42× -  -  -49× -272× -272× -270× -270× -270× -  -272× -  -  -49× -1428× -1428× -1428× -345× -395× -  -  -  -  -  -  -  -49× - - -  - - - - -  -  -  -  - -  -  - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - -16× -  -  -  -  -  -  -  -  -  - - - -  -  -  -  - -  -  -  -  -  -  -  - -  -  -  -49× -  -  -  -49× -757× -757× -757× -757× -757× -  -  -757× -  -753× -  -280× -280× -  -  -434× -  -  -114× -114× -114× -320× -  -264× -  -  -  -56× -  -56× -56× -186× -186× -  -186× -  -186× -  -186× -  -  -  -  -753× -  -  -49× -316× -  -  -  -316× -  -316× -314× -314× -  -  -  -49× -  -314× -54× -54× -54× -  -  -  -49× - - -  -  -  -49× - - -  -  - 
    'use strict';
    - 
    -module.exports = Readable;
    - 
    -/*<replacement>*/
    -var processNextTick = require('process-nextick-args');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var isArray = require('isarray');
    -/*</replacement>*/
    - 
    -Readable.ReadableState = ReadableState;
    - 
    -/*<replacement>*/
    -var EE = require('events').EventEmitter;
    - 
    -var EElistenerCount = function (emitter, type) {
    -  return emitter.listeners(type).length;
    -};
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var Stream;
    -(function () {
    -  try {
    -    Stream = require('st' + 'ream');
    -  } catch (_) {} finally {
    -    Iif (!Stream) Stream = require('events').EventEmitter;
    -  }
    -})();
    -/*</replacement>*/
    - 
    -var Buffer = require('buffer').Buffer;
    -/*<replacement>*/
    -var bufferShim = require('buffer-shims');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var debugUtil = require('util');
    -var debug = void 0;
    -Eif (debugUtil && debugUtil.debuglog) {
    -  debug = debugUtil.debuglog('stream');
    -} else {
    -  debug = function () {};
    -}
    -/*</replacement>*/
    - 
    -var StringDecoder;
    - 
    -util.inherits(Readable, Stream);
    - 
    -var hasPrependListener = typeof EE.prototype.prependListener === 'function';
    - 
    -function prependListener(emitter, event, fn) {
    -  Iif (hasPrependListener) return emitter.prependListener(event, fn);
    - 
    -  // This is a brutally ugly hack to make sure that our error handler
    -  // is attached before any userland ones.  NEVER DO THIS. This is here
    -  // only because this code needs to continue to work with older versions
    -  // of Node.js that do not include the prependListener() method. The goal
    -  // is to eventually remove this hack.
    -  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else Iif (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
    -}
    - 
    -var Duplex;
    -function ReadableState(options, stream) {
    -  Duplex = Duplex || require('./_stream_duplex');
    - 
    -  options = options || {};
    - 
    -  // object stream flag. Used to make read(n) ignore n and to
    -  // make all the buffer merging and length checks go away
    -  this.objectMode = !!options.objectMode;
    - 
    -  if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
    - 
    -  // the point at which it stops calling _read() to fill the buffer
    -  // Note: 0 is a valid value, means "don't call _read preemptively ever"
    -  var hwm = options.highWaterMark;
    -  var defaultHwm = this.objectMode ? 16 : 16 * 1024;
    -  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
    - 
    -  // cast to ints.
    -  this.highWaterMark = ~ ~this.highWaterMark;
    - 
    -  this.buffer = [];
    -  this.length = 0;
    -  this.pipes = null;
    -  this.pipesCount = 0;
    -  this.flowing = null;
    -  this.ended = false;
    -  this.endEmitted = false;
    -  this.reading = false;
    - 
    -  // a flag to be able to tell if the onwrite cb is called immediately,
    -  // or on a later tick.  We set this to true at first, because any
    -  // actions that shouldn't happen until "later" should generally also
    -  // not happen before the first write call.
    -  this.sync = true;
    - 
    -  // whenever we return null, then we set a flag to say
    -  // that we're awaiting a 'readable' event emission.
    -  this.needReadable = false;
    -  this.emittedReadable = false;
    -  this.readableListening = false;
    -  this.resumeScheduled = false;
    - 
    -  // Crypto is kind of old and crusty.  Historically, its default string
    -  // encoding is 'binary' so we have to make this configurable.
    -  // Everything else in the universe uses 'utf8', though.
    -  this.defaultEncoding = options.defaultEncoding || 'utf8';
    - 
    -  // when piping, we only care about 'readable' events that happen
    -  // after read()ing all the bytes and not getting any pushback.
    -  this.ranOut = false;
    - 
    -  // the number of writers that are awaiting a drain event in .pipe()s
    -  this.awaitDrain = 0;
    - 
    -  // if true, a maybeReadMore has been scheduled
    -  this.readingMore = false;
    - 
    -  this.decoder = null;
    -  this.encoding = null;
    -  if (options.encoding) {
    -    if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
    -    this.decoder = new StringDecoder(options.encoding);
    -    this.encoding = options.encoding;
    -  }
    -}
    - 
    -var Duplex;
    -function Readable(options) {
    -  Duplex = Duplex || require('./_stream_duplex');
    - 
    -  if (!(this instanceof Readable)) return new Readable(options);
    - 
    -  this._readableState = new ReadableState(options, this);
    - 
    -  // legacy
    -  this.readable = true;
    - 
    -  if (options && typeof options.read === 'function') this._read = options.read;
    - 
    -  Stream.call(this);
    -}
    - 
    -// Manually shove something into the read() buffer.
    -// This returns true if the highWaterMark has not been hit yet,
    -// similar to how Writable.write() returns true if you should
    -// write() some more.
    -Readable.prototype.push = function (chunk, encoding) {
    -  var state = this._readableState;
    - 
    -  if (!state.objectMode && typeof chunk === 'string') {
    -    encoding = encoding || state.defaultEncoding;
    -    if (encoding !== state.encoding) {
    -      chunk = bufferShim.from(chunk, encoding);
    -      encoding = '';
    -    }
    -  }
    - 
    -  return readableAddChunk(this, state, chunk, encoding, false);
    -};
    - 
    -// Unshift should *always* be something directly out of read()
    -Readable.prototype.unshift = function (chunk) {
    -  var state = this._readableState;
    -  return readableAddChunk(this, state, chunk, '', true);
    -};
    - 
    -Readable.prototype.isPaused = function () {
    -  return this._readableState.flowing === false;
    -};
    - 
    -function readableAddChunk(stream, state, chunk, encoding, addToFront) {
    -  var er = chunkInvalid(state, chunk);
    -  Iif (er) {
    -    stream.emit('error', er);
    -  } else if (chunk === null) {
    -    state.reading = false;
    -    onEofChunk(stream, state);
    -  } else if (state.objectMode || chunk && chunk.length > 0) {
    -    if (state.ended && !addToFront) {
    -      var e = new Error('stream.push() after EOF');
    -      stream.emit('error', e);
    -    } else if (state.endEmitted && addToFront) {
    -      var _e = new Error('stream.unshift() after end event');
    -      stream.emit('error', _e);
    -    } else {
    -      var skipAdd;
    -      if (state.decoder && !addToFront && !encoding) {
    -        chunk = state.decoder.write(chunk);
    -        skipAdd = !state.objectMode && chunk.length === 0;
    -      }
    - 
    -      if (!addToFront) state.reading = false;
    - 
    -      // Don't add to the buffer if we've decoded to an empty string chunk and
    -      // we're not in object mode
    -      if (!skipAdd) {
    -        // if we want the data now, just emit it.
    -        if (state.flowing && state.length === 0 && !state.sync) {
    -          stream.emit('data', chunk);
    -          stream.read(0);
    -        } else {
    -          // update the buffer info.
    -          state.length += state.objectMode ? 1 : chunk.length;
    -          if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
    - 
    -          if (state.needReadable) emitReadable(stream);
    -        }
    -      }
    - 
    -      maybeReadMore(stream, state);
    -    }
    -  } else if (!addToFront) {
    -    state.reading = false;
    -  }
    - 
    -  return needMoreData(state);
    -}
    - 
    -// if it's past the high water mark, we can push in some more.
    -// Also, if we have no data yet, we can stand some
    -// more bytes.  This is to work around cases where hwm=0,
    -// such as the repl.  Also, if the push() triggered a
    -// readable event, and the user called read(largeNumber) such that
    -// needReadable was set, then we ought to push more, so that another
    -// 'readable' event will be triggered.
    -function needMoreData(state) {
    -  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
    -}
    - 
    -// backwards compatibility.
    -Readable.prototype.setEncoding = function (enc) {
    -  if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
    -  this._readableState.decoder = new StringDecoder(enc);
    -  this._readableState.encoding = enc;
    -  return this;
    -};
    - 
    -// Don't raise the hwm > 8MB
    -var MAX_HWM = 0x800000;
    -function computeNewHighWaterMark(n) {
    -  Iif (n >= MAX_HWM) {
    -    n = MAX_HWM;
    -  } else {
    -    // Get the next highest power of 2
    -    n--;
    -    n |= n >>> 1;
    -    n |= n >>> 2;
    -    n |= n >>> 4;
    -    n |= n >>> 8;
    -    n |= n >>> 16;
    -    n++;
    -  }
    -  return n;
    -}
    - 
    -function howMuchToRead(n, state) {
    -  if (state.length === 0 && state.ended) return 0;
    - 
    -  if (state.objectMode) return n === 0 ? 0 : 1;
    - 
    -  if (n === null || isNaN(n)) {
    -    // only flow one buffer at a time
    -    if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length;
    -  }
    - 
    -  if (n <= 0) return 0;
    - 
    -  // If we're asking for more than the target buffer level,
    -  // then raise the water mark.  Bump up to the next highest
    -  // power of 2, to prevent increasing it excessively in tiny
    -  // amounts.
    -  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
    - 
    -  // don't have that much.  return null, unless we've ended.
    -  if (n > state.length) {
    -    if (!state.ended) {
    -      state.needReadable = true;
    -      return 0;
    -    } else {
    -      return state.length;
    -    }
    -  }
    - 
    -  return n;
    -}
    - 
    -// you can override either this method, or the async _read(n) below.
    -Readable.prototype.read = function (n) {
    -  debug('read', n);
    -  var state = this._readableState;
    -  var nOrig = n;
    - 
    -  if (typeof n !== 'number' || n > 0) state.emittedReadable = false;
    - 
    -  // if we're doing read(0) to trigger a readable event, but we
    -  // already have a bunch of data in the buffer, then just trigger
    -  // the 'readable' event and move on.
    -  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
    -    debug('read: emitReadable', state.length, state.ended);
    -    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
    -    return null;
    -  }
    - 
    -  n = howMuchToRead(n, state);
    - 
    -  // if we've ended, and we're now clear, then finish it up.
    -  if (n === 0 && state.ended) {
    -    if (state.length === 0) endReadable(this);
    -    return null;
    -  }
    - 
    -  // All the actual chunk generation logic needs to be
    -  // *below* the call to _read.  The reason is that in certain
    -  // synthetic stream cases, such as passthrough streams, _read
    -  // may be a completely synchronous operation which may change
    -  // the state of the read buffer, providing enough data when
    -  // before there was *not* enough.
    -  //
    -  // So, the steps are:
    -  // 1. Figure out what the state of things will be after we do
    -  // a read from the buffer.
    -  //
    -  // 2. If that resulting state will trigger a _read, then call _read.
    -  // Note that this may be asynchronous, or synchronous.  Yes, it is
    -  // deeply ugly to write APIs this way, but that still doesn't mean
    -  // that the Readable class should behave improperly, as streams are
    -  // designed to be sync/async agnostic.
    -  // Take note if the _read call is sync or async (ie, if the read call
    -  // has returned yet), so that we know whether or not it's safe to emit
    -  // 'readable' etc.
    -  //
    -  // 3. Actually pull the requested chunks out of the buffer and return.
    - 
    -  // if we need a readable event, then we need to do some reading.
    -  var doRead = state.needReadable;
    -  debug('need readable', doRead);
    - 
    -  // if we currently have less than the highWaterMark, then also read some
    -  if (state.length === 0 || state.length - n < state.highWaterMark) {
    -    doRead = true;
    -    debug('length less than watermark', doRead);
    -  }
    - 
    -  // however, if we've ended, then there's no point, and if we're already
    -  // reading, then it's unnecessary.
    -  if (state.ended || state.reading) {
    -    doRead = false;
    -    debug('reading or ended', doRead);
    -  }
    - 
    -  if (doRead) {
    -    debug('do read');
    -    state.reading = true;
    -    state.sync = true;
    -    // if the length is currently zero, then we *need* a readable event.
    -    if (state.length === 0) state.needReadable = true;
    -    // call internal read method
    -    this._read(state.highWaterMark);
    -    state.sync = false;
    -  }
    - 
    -  // If _read pushed data synchronously, then `reading` will be false,
    -  // and we need to re-evaluate how much data we can return to the user.
    -  if (doRead && !state.reading) n = howMuchToRead(nOrig, state);
    - 
    -  var ret;
    -  if (n > 0) ret = fromList(n, state);else ret = null;
    - 
    -  if (ret === null) {
    -    state.needReadable = true;
    -    n = 0;
    -  }
    - 
    -  state.length -= n;
    - 
    -  // If we have nothing in the buffer, then we want to know
    -  // as soon as we *do* get something into the buffer.
    -  if (state.length === 0 && !state.ended) state.needReadable = true;
    - 
    -  // If we tried to read() past the EOF, then emit end on the next tick.
    -  if (nOrig !== n && state.ended && state.length === 0) endReadable(this);
    - 
    -  if (ret !== null) this.emit('data', ret);
    - 
    -  return ret;
    -};
    - 
    -function chunkInvalid(state, chunk) {
    -  var er = null;
    -  Iif (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
    -    er = new TypeError('Invalid non-string/buffer chunk');
    -  }
    -  return er;
    -}
    - 
    -function onEofChunk(stream, state) {
    -  if (state.ended) return;
    -  if (state.decoder) {
    -    var chunk = state.decoder.end();
    -    if (chunk && chunk.length) {
    -      state.buffer.push(chunk);
    -      state.length += state.objectMode ? 1 : chunk.length;
    -    }
    -  }
    -  state.ended = true;
    - 
    -  // emit 'readable' now to make sure it gets picked up.
    -  emitReadable(stream);
    -}
    - 
    -// Don't emit readable right away in sync mode, because this can trigger
    -// another read() call => stack overflow.  This way, it might trigger
    -// a nextTick recursion warning, but that's not so bad.
    -function emitReadable(stream) {
    -  var state = stream._readableState;
    -  state.needReadable = false;
    -  if (!state.emittedReadable) {
    -    debug('emitReadable', state.flowing);
    -    state.emittedReadable = true;
    -    if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
    -  }
    -}
    - 
    -function emitReadable_(stream) {
    -  debug('emit readable');
    -  stream.emit('readable');
    -  flow(stream);
    -}
    - 
    -// at this point, the user has presumably seen the 'readable' event,
    -// and called read() to consume some data.  that may have triggered
    -// in turn another _read(n) call, in which case reading = true if
    -// it's in progress.
    -// However, if we're not ended, or reading, and the length < hwm,
    -// then go ahead and try to read some more preemptively.
    -function maybeReadMore(stream, state) {
    -  if (!state.readingMore) {
    -    state.readingMore = true;
    -    processNextTick(maybeReadMore_, stream, state);
    -  }
    -}
    - 
    -function maybeReadMore_(stream, state) {
    -  var len = state.length;
    -  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
    -    debug('maybeReadMore read 0');
    -    stream.read(0);
    -    if (len === state.length)
    -      // didn't get any data, stop spinning.
    -      break;else len = state.length;
    -  }
    -  state.readingMore = false;
    -}
    - 
    -// abstract method.  to be overridden in specific implementation classes.
    -// call cb(er, data) where data is <= n in length.
    -// for virtual (non-string, non-buffer) streams, "length" is somewhat
    -// arbitrary, and perhaps not very meaningful.
    -Readable.prototype._read = function (n) {
    -  this.emit('error', new Error('not implemented'));
    -};
    - 
    -Readable.prototype.pipe = function (dest, pipeOpts) {
    -  var src = this;
    -  var state = this._readableState;
    - 
    -  switch (state.pipesCount) {
    -    case 0:
    -      state.pipes = dest;
    -      break;
    -    case 1:
    -      state.pipes = [state.pipes, dest];
    -      break;
    -    default:
    -      state.pipes.push(dest);
    -      break;
    -  }
    -  state.pipesCount += 1;
    -  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
    - 
    -  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
    - 
    -  var endFn = doEnd ? onend : cleanup;
    -  if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
    - 
    -  dest.on('unpipe', onunpipe);
    -  function onunpipe(readable) {
    -    debug('onunpipe');
    -    if (readable === src) {
    -      cleanup();
    -    }
    -  }
    - 
    -  function onend() {
    -    debug('onend');
    -    dest.end();
    -  }
    - 
    -  // when the dest drains, it reduces the awaitDrain counter
    -  // on the source.  This would be more elegant with a .once()
    -  // handler in flow(), but adding and removing repeatedly is
    -  // too slow.
    -  var ondrain = pipeOnDrain(src);
    -  dest.on('drain', ondrain);
    - 
    -  var cleanedUp = false;
    -  function cleanup() {
    -    debug('cleanup');
    -    // cleanup event handlers once the pipe is broken
    -    dest.removeListener('close', onclose);
    -    dest.removeListener('finish', onfinish);
    -    dest.removeListener('drain', ondrain);
    -    dest.removeListener('error', onerror);
    -    dest.removeListener('unpipe', onunpipe);
    -    src.removeListener('end', onend);
    -    src.removeListener('end', cleanup);
    -    src.removeListener('data', ondata);
    - 
    -    cleanedUp = true;
    - 
    -    // if the reader is waiting for a drain event from this
    -    // specific writer, then it would cause it to never start
    -    // flowing again.
    -    // So, if this is awaiting a drain, then we just call it now.
    -    // If we don't know, then assume that we are waiting for one.
    -    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
    -  }
    - 
    -  src.on('data', ondata);
    -  function ondata(chunk) {
    -    debug('ondata');
    -    var ret = dest.write(chunk);
    -    if (false === ret) {
    -      // If the user unpiped during `dest.write()`, it is possible
    -      // to get stuck in a permanently paused state if that write
    -      // also returned false.
    -      // => Check whether `dest` is still a piping destination.
    -      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
    -        debug('false write response, pause', src._readableState.awaitDrain);
    -        src._readableState.awaitDrain++;
    -      }
    -      src.pause();
    -    }
    -  }
    - 
    -  // if the dest has an error, then stop piping into it.
    -  // however, don't suppress the throwing behavior for this.
    -  function onerror(er) {
    -    debug('onerror', er);
    -    unpipe();
    -    dest.removeListener('error', onerror);
    -    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
    -  }
    - 
    -  // Make sure our error handler is attached before userland ones.
    -  prependListener(dest, 'error', onerror);
    - 
    -  // Both close and finish should trigger unpipe, but only once.
    -  function onclose() {
    -    dest.removeListener('finish', onfinish);
    -    unpipe();
    -  }
    -  dest.once('close', onclose);
    -  function onfinish() {
    -    debug('onfinish');
    -    dest.removeListener('close', onclose);
    -    unpipe();
    -  }
    -  dest.once('finish', onfinish);
    - 
    -  function unpipe() {
    -    debug('unpipe');
    -    src.unpipe(dest);
    -  }
    - 
    -  // tell the dest that it's being piped to
    -  dest.emit('pipe', src);
    - 
    -  // start the flow if it hasn't been started already.
    -  if (!state.flowing) {
    -    debug('pipe resume');
    -    src.resume();
    -  }
    - 
    -  return dest;
    -};
    - 
    -function pipeOnDrain(src) {
    -  return function () {
    -    var state = src._readableState;
    -    debug('pipeOnDrain', state.awaitDrain);
    -    if (state.awaitDrain) state.awaitDrain--;
    -    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
    -      state.flowing = true;
    -      flow(src);
    -    }
    -  };
    -}
    - 
    -Readable.prototype.unpipe = function (dest) {
    -  var state = this._readableState;
    - 
    -  // if we're not piping anywhere, then do nothing.
    -  if (state.pipesCount === 0) return this;
    - 
    -  // just one destination.  most common case.
    -  Eif (state.pipesCount === 1) {
    -    // passed in one, but it's not the right one.
    -    Iif (dest && dest !== state.pipes) return this;
    - 
    -    Iif (!dest) dest = state.pipes;
    - 
    -    // got a match.
    -    state.pipes = null;
    -    state.pipesCount = 0;
    -    state.flowing = false;
    -    Eif (dest) dest.emit('unpipe', this);
    -    return this;
    -  }
    - 
    -  // slow case. multiple pipe destinations.
    - 
    -  if (!dest) {
    -    // remove all.
    -    var dests = state.pipes;
    -    var len = state.pipesCount;
    -    state.pipes = null;
    -    state.pipesCount = 0;
    -    state.flowing = false;
    - 
    -    for (var _i = 0; _i < len; _i++) {
    -      dests[_i].emit('unpipe', this);
    -    }return this;
    -  }
    - 
    -  // try to find the right one.
    -  var i = indexOf(state.pipes, dest);
    -  if (i === -1) return this;
    - 
    -  state.pipes.splice(i, 1);
    -  state.pipesCount -= 1;
    -  if (state.pipesCount === 1) state.pipes = state.pipes[0];
    - 
    -  dest.emit('unpipe', this);
    - 
    -  return this;
    -};
    - 
    -// set up data events if they are asked for
    -// Ensure readable listeners eventually get something
    -Readable.prototype.on = function (ev, fn) {
    -  var res = Stream.prototype.on.call(this, ev, fn);
    - 
    -  // If listening to data, and it has not explicitly been paused,
    -  // then call resume to start the flow of data on the next tick.
    -  if (ev === 'data' && false !== this._readableState.flowing) {
    -    this.resume();
    -  }
    - 
    -  if (ev === 'readable' && !this._readableState.endEmitted) {
    -    var state = this._readableState;
    -    if (!state.readableListening) {
    -      state.readableListening = true;
    -      state.emittedReadable = false;
    -      state.needReadable = true;
    -      if (!state.reading) {
    -        processNextTick(nReadingNextTick, this);
    -      } else if (state.length) {
    -        emitReadable(this, state);
    -      }
    -    }
    -  }
    - 
    -  return res;
    -};
    -Readable.prototype.addListener = Readable.prototype.on;
    - 
    -function nReadingNextTick(self) {
    -  debug('readable nexttick read 0');
    -  self.read(0);
    -}
    - 
    -// pause() and resume() are remnants of the legacy readable stream API
    -// If the user uses them, then switch into old mode.
    -Readable.prototype.resume = function () {
    -  var state = this._readableState;
    -  if (!state.flowing) {
    -    debug('resume');
    -    state.flowing = true;
    -    resume(this, state);
    -  }
    -  return this;
    -};
    - 
    -function resume(stream, state) {
    -  if (!state.resumeScheduled) {
    -    state.resumeScheduled = true;
    -    processNextTick(resume_, stream, state);
    -  }
    -}
    - 
    -function resume_(stream, state) {
    -  if (!state.reading) {
    -    debug('resume read 0');
    -    stream.read(0);
    -  }
    - 
    -  state.resumeScheduled = false;
    -  stream.emit('resume');
    -  flow(stream);
    -  if (state.flowing && !state.reading) stream.read(0);
    -}
    - 
    -Readable.prototype.pause = function () {
    -  debug('call pause flowing=%j', this._readableState.flowing);
    -  if (false !== this._readableState.flowing) {
    -    debug('pause');
    -    this._readableState.flowing = false;
    -    this.emit('pause');
    -  }
    -  return this;
    -};
    - 
    -function flow(stream) {
    -  var state = stream._readableState;
    -  debug('flow', state.flowing);
    -  if (state.flowing) {
    -    do {
    -      var chunk = stream.read();
    -    } while (null !== chunk && state.flowing);
    -  }
    -}
    - 
    -// wrap an old-style stream as the async data source.
    -// This is *not* part of the readable stream interface.
    -// It is an ugly unfortunate mess of history.
    -Readable.prototype.wrap = function (stream) {
    -  var state = this._readableState;
    -  var paused = false;
    - 
    -  var self = this;
    -  stream.on('end', function () {
    -    debug('wrapped end');
    -    Iif (state.decoder && !state.ended) {
    -      var chunk = state.decoder.end();
    -      if (chunk && chunk.length) self.push(chunk);
    -    }
    - 
    -    self.push(null);
    -  });
    - 
    -  stream.on('data', function (chunk) {
    -    debug('wrapped data');
    -    if (state.decoder) chunk = state.decoder.write(chunk);
    - 
    -    // don't skip over falsy values in objectMode
    -    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
    - 
    -    var ret = self.push(chunk);
    -    if (!ret) {
    -      paused = true;
    -      stream.pause();
    -    }
    -  });
    - 
    -  // proxy all the other methods.
    -  // important when wrapping filters and duplexes.
    -  for (var i in stream) {
    -    Iif (this[i] === undefined && typeof stream[i] === 'function') {
    -      this[i] = function (method) {
    -        return function () {
    -          return stream[method].apply(stream, arguments);
    -        };
    -      }(i);
    -    }
    -  }
    - 
    -  // proxy certain important events.
    -  var events = ['error', 'close', 'destroy', 'pause', 'resume'];
    -  forEach(events, function (ev) {
    -    stream.on(ev, self.emit.bind(self, ev));
    -  });
    - 
    -  // when we try to consume some more bytes, simply unpause the
    -  // underlying stream.
    -  self._read = function (n) {
    -    debug('wrapped _read', n);
    -    if (paused) {
    -      paused = false;
    -      stream.resume();
    -    }
    -  };
    - 
    -  return self;
    -};
    - 
    -// exposed for testing purposes only.
    -Readable._fromList = fromList;
    - 
    -// Pluck off n bytes from an array of buffers.
    -// Length is the combined lengths of all the buffers in the list.
    -function fromList(n, state) {
    -  var list = state.buffer;
    -  var length = state.length;
    -  var stringMode = !!state.decoder;
    -  var objectMode = !!state.objectMode;
    -  var ret;
    - 
    -  // nothing in the list, definitely empty.
    -  if (list.length === 0) return null;
    - 
    -  Iif (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) {
    -    // read it all, truncate the array.
    -    if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);
    -    list.length = 0;
    -  } else {
    -    // read just some of it.
    -    if (n < list[0].length) {
    -      // just take a part of the first list item.
    -      // slice is the same for buffers and strings.
    -      var buf = list[0];
    -      ret = buf.slice(0, n);
    -      list[0] = buf.slice(n);
    -    } else if (n === list[0].length) {
    -      // first list is a perfect match
    -      ret = list.shift();
    -    } else {
    -      // complex case.
    -      // we have enough to cover it, but it spans past the first buffer.
    -      if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n);
    - 
    -      var c = 0;
    -      for (var i = 0, l = list.length; i < l && c < n; i++) {
    -        var _buf = list[0];
    -        var cpy = Math.min(n - c, _buf.length);
    - 
    -        if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy);
    - 
    -        if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift();
    - 
    -        c += cpy;
    -      }
    -    }
    -  }
    - 
    -  return ret;
    -}
    - 
    -function endReadable(stream) {
    -  var state = stream._readableState;
    - 
    -  // If we get here before consuming all the bytes, then that is a
    -  // bug in node.  Should never happen.
    -  Iif (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
    - 
    -  if (!state.endEmitted) {
    -    state.ended = true;
    -    processNextTick(endReadableNT, state, stream);
    -  }
    -}
    - 
    -function endReadableNT(state, stream) {
    -  // Check that we didn't get one last unshift.
    -  if (!state.endEmitted && state.length === 0) {
    -    state.endEmitted = true;
    -    stream.readable = false;
    -    stream.emit('end');
    -  }
    -}
    - 
    -function forEach(xs, f) {
    -  for (var i = 0, l = xs.length; i < l; i++) {
    -    f(xs[i], i);
    -  }
    -}
    - 
    -function indexOf(xs, x) {
    -  for (var i = 0, l = xs.length; i < l; i++) {
    -    if (xs[i] === x) return i;
    -  }
    -  return -1;
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html deleted file mode 100644 index 3542da4f637927..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html +++ /dev/null @@ -1,602 +0,0 @@ - - - - Code coverage report for lib/_stream_transform.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_transform.js -

    -
    -
    - 92.11% - Statements - 70/76 -
    -
    - 84.21% - Branches - 32/38 -
    -
    - 90.91% - Functions - 10/11 -
    -
    - 98.48% - Lines - 65/66 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -49× -  -49× -  -  -49× -49× -  -  -49× -  -49× -24× -116× -  -  -24× -24× -24× -24× -24× -  -  -49× -116× -116× -  -116× -  -116× -  -116× -116× -  -116× -  -116× -  -116× -116× -116× -113× -  -  -  -49× -24× -  -24× -  -24× -  -  -24× -  -  -24× -  -  -  -  -24× -  -24× -13× -  -13× -  -  -24× -19× - -17× -  -  -  -49× -127× -127× -  -  -  -  -  -  -  -  -  -  -  -  -49× -  -  -  -49× -117× -117× -117× -117× -117× -117× -117× -  -  -  -  -  -  -49× -310× -  -310× -116× -116× -  -  -  -194× -  -  -  -49× -19× -  -  -  -19× -19× -  -19× -  -19× -  -19× - 
    // a transform stream is a readable/writable stream where you do
    -// something with the data.  Sometimes it's called a "filter",
    -// but that's not a great name for it, since that implies a thing where
    -// some bits pass through, and others are simply ignored.  (That would
    -// be a valid example of a transform, of course.)
    -//
    -// While the output is causally related to the input, it's not a
    -// necessarily symmetric or synchronous transformation.  For example,
    -// a zlib stream might take multiple plain-text writes(), and then
    -// emit a single compressed chunk some time in the future.
    -//
    -// Here's how this works:
    -//
    -// The Transform stream has all the aspects of the readable and writable
    -// stream classes.  When you write(chunk), that calls _write(chunk,cb)
    -// internally, and returns false if there's a lot of pending writes
    -// buffered up.  When you call read(), that calls _read(n) until
    -// there's enough pending readable data buffered up.
    -//
    -// In a transform stream, the written data is placed in a buffer.  When
    -// _read(n) is called, it transforms the queued up data, calling the
    -// buffered _write cb's as it consumes chunks.  If consuming a single
    -// written chunk would result in multiple output chunks, then the first
    -// outputted bit calls the readcb, and subsequent chunks just go into
    -// the read buffer, and will cause it to emit 'readable' if necessary.
    -//
    -// This way, back-pressure is actually determined by the reading side,
    -// since _read has to be called to start processing a new chunk.  However,
    -// a pathological inflate type of transform can cause excessive buffering
    -// here.  For example, imagine a stream where every byte of input is
    -// interpreted as an integer from 0-255, and then results in that many
    -// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
    -// 1kb of data being output.  In this case, you could write a very small
    -// amount of input, and end up with a very large amount of output.  In
    -// such a pathological inflating mechanism, there'd be no way to tell
    -// the system to stop doing the transform.  A single 4MB write could
    -// cause the system to run out of memory.
    -//
    -// However, even in such a pathological case, only a single written chunk
    -// would be consumed, and then the rest would wait (un-transformed) until
    -// the results of the previous transformed chunk were consumed.
    - 
    -'use strict';
    - 
    -module.exports = Transform;
    - 
    -var Duplex = require('./_stream_duplex');
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -util.inherits(Transform, Duplex);
    - 
    -function TransformState(stream) {
    -  this.afterTransform = function (er, data) {
    -    return afterTransform(stream, er, data);
    -  };
    - 
    -  this.needTransform = false;
    -  this.transforming = false;
    -  this.writecb = null;
    -  this.writechunk = null;
    -  this.writeencoding = null;
    -}
    - 
    -function afterTransform(stream, er, data) {
    -  var ts = stream._transformState;
    -  ts.transforming = false;
    - 
    -  var cb = ts.writecb;
    - 
    -  Iif (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
    - 
    -  ts.writechunk = null;
    -  ts.writecb = null;
    - 
    -  if (data !== null && data !== undefined) stream.push(data);
    - 
    -  cb(er);
    - 
    -  var rs = stream._readableState;
    -  rs.reading = false;
    -  if (rs.needReadable || rs.length < rs.highWaterMark) {
    -    stream._read(rs.highWaterMark);
    -  }
    -}
    - 
    -function Transform(options) {
    -  Iif (!(this instanceof Transform)) return new Transform(options);
    - 
    -  Duplex.call(this, options);
    - 
    -  this._transformState = new TransformState(this);
    - 
    -  // when the writable side finishes, then flush out anything remaining.
    -  var stream = this;
    - 
    -  // start out asking for a readable event once data is transformed.
    -  this._readableState.needReadable = true;
    - 
    -  // we have implemented the _read method, and done the other things
    -  // that Readable wants before the first _read call, so unset the
    -  // sync guard flag.
    -  this._readableState.sync = false;
    - 
    -  if (options) {
    -    if (typeof options.transform === 'function') this._transform = options.transform;
    - 
    -    if (typeof options.flush === 'function') this._flush = options.flush;
    -  }
    - 
    -  this.once('prefinish', function () {
    -    if (typeof this._flush === 'function') this._flush(function (er) {
    -      done(stream, er);
    -    });else done(stream);
    -  });
    -}
    - 
    -Transform.prototype.push = function (chunk, encoding) {
    -  this._transformState.needTransform = false;
    -  return Duplex.prototype.push.call(this, chunk, encoding);
    -};
    - 
    -// This is the part where you do stuff!
    -// override this function in implementation classes.
    -// 'chunk' is an input chunk.
    -//
    -// Call `push(newChunk)` to pass along transformed output
    -// to the readable side.  You may call 'push' zero or more times.
    -//
    -// Call `cb(err)` when you are done with this chunk.  If you pass
    -// an error, then that'll put the hurt on the whole operation.  If you
    -// never call cb(), then you'll never get another chunk.
    -Transform.prototype._transform = function (chunk, encoding, cb) {
    -  throw new Error('Not implemented');
    -};
    - 
    -Transform.prototype._write = function (chunk, encoding, cb) {
    -  var ts = this._transformState;
    -  ts.writecb = cb;
    -  ts.writechunk = chunk;
    -  ts.writeencoding = encoding;
    -  Eif (!ts.transforming) {
    -    var rs = this._readableState;
    -    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
    -  }
    -};
    - 
    -// Doesn't matter what the args are here.
    -// _transform does all the work.
    -// That we got here means that the readable side wants more data.
    -Transform.prototype._read = function (n) {
    -  var ts = this._transformState;
    - 
    -  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
    -    ts.transforming = true;
    -    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
    -  } else {
    -    // mark that we need a transform, so that any data that comes in
    -    // will get processed, now that we've asked for it.
    -    ts.needTransform = true;
    -  }
    -};
    - 
    -function done(stream, er) {
    -  Iif (er) return stream.emit('error', er);
    - 
    -  // if there's nothing in the write buffer, then that means
    -  // that nothing more will ever be provided
    -  var ws = stream._writableState;
    -  var ts = stream._transformState;
    - 
    -  Iif (ws.length) throw new Error('Calling transform done when ws.length != 0');
    - 
    -  Iif (ts.transforming) throw new Error('Calling transform done when still transforming');
    - 
    -  return stream.push(null);
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html deleted file mode 100644 index 0b200c9e09744b..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html +++ /dev/null @@ -1,1640 +0,0 @@ - - - - Code coverage report for lib/_stream_writable.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_writable.js -

    -
    -
    - 95.52% - Statements - 277/290 -
    -
    - 94% - Branches - 141/150 -
    -
    - 90.91% - Functions - 30/33 -
    -
    - 96.58% - Lines - 254/263 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 -377 -378 -379 -380 -381 -382 -383 -384 -385 -386 -387 -388 -389 -390 -391 -392 -393 -394 -395 -396 -397 -398 -399 -400 -401 -402 -403 -404 -405 -406 -407 -408 -409 -410 -411 -412 -413 -414 -415 -416 -417 -418 -419 -420 -421 -422 -423 -424 -425 -426 -427 -428 -429 -430 -431 -432 -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444 -445 -446 -447 -448 -449 -450 -451 -452 -453 -454 -455 -456 -457 -458 -459 -460 -461 -462 -463 -464 -465 -466 -467 -468 -469 -470 -471 -472 -473 -474 -475 -476 -477 -478 -479 -480 -481 -482 -483 -484 -485 -486 -487 -488 -489 -490 -491 -492 -493 -494 -495 -496 -497 -498 -499 -500 -501 -502 -503 -504 -505 -506 -507 -508 -509 -510 -511 -512 -513 -514 -515 -516 -517 -518 -519 -520 -521 -522 -523 -524 -525 -526  -  -  -  -  -  -49× -  -  -49× -  -  -  -49× -  -  -49× -  -  -49× -49× -  -  -  -49× -  -  -  -  -  -49× -49× -49× -49× -  -49× -  -  -  -  -49× -  -49× -  -  -49× -  -49× -  -49× -2305× -2305× -2305× -2305× -  -  -49× -49× -96× -  -96× -  -  -  -96× -  -96× -  -  -  -  -96× -96× -96× -  -  -96× -  -96× -  -96× -  -96× -  -96× -  -  -  -  -96× -96× -  -  -  -  -96× -  -  -  -  -96× -  -  -96× -  -  -96× -  -  -  -  -  -96× -  -  -  -  -96× -  -  -96× -4574× -  -  -  -96× -  -  -96× -  -96× -96× -  -  -  -96× -  -  -  -96× -  -  -96× -  -  -96× -  -  -  -96× -  -  -49× - - - - - -  - -  -  -49× -49× -49× -  -  -  -  -  -  -  -49× -49× -97× -  -  -  -97× -  -96× -  -  -96× -  -96× -50× -  -50× -  -  -96× -  -  -  -49× - -  -  -49× - -  - - -  -  -  -  -  -  -  -49× -4625× -4625× -  -  -  -4625× - -4623× - -  -4625× - - - -  -4623× -  -  -49× -4626× -4626× -  -4626× -59× -59× -  -  -4626× -  -4626× -  -4626× -4621× -4621× -  -  -4624× -  -  -49× -13× -  -13× -  -  -49× -13× -  -13× -13× -  -13× -  -  -  -49× -  - - - - -  -  -49× -4621× -2273× -  -4621× -  -  -  -  -  -49× -4621× -  -4621× -4621× -  -4621× -  -4621× -  -4621× -  -4621× -2305× -2305× -2305× -2265× -  -40× -  -2305× -  -2316× -  -  -4621× -  -  -49× -4582× -4582× -4582× -4582× -4582× -4582× -  -  -49× -  -  -  -  -  -  -  -49× -4574× -4574× -4574× -4574× -  -  -49× -4574× -4574× -4574× -  -4574× -  -4574× -  -4574× -  -4574× -2254× -  -  -4574× -  -2230× -  -  -2344× -  -  -  -  -49× -4574× -4574× -4574× -4574× -  -  -  -  -  -49× -4557× -27× -27× -  -  -  -  -49× -2263× -2263× -  -2263× -  - - - - -  - - -42× -42× -42× -  -  - -  -  -  - - - -  -  -  - -  -  -  -2254× -2257× -2257× -2257× -2257× -  -2257× -2257× -  -  -  -  -2257× -2252× -  -  -  -2254× -  -  -2263× -2263× -2263× -  -  -49× -  -  -  -49× -  -49× -65× -  -65× -11× -11× -11× -54× - - -  -  -65× -  -  -65× - - -  -  -  -65× -  -  -49× -9209× -  -  -49× -125× -57× -57× -  -  -  -49× -4635× -4635× -125× -57× -57× -57× -  -68× -  -  -4635× -  -  -49× -61× -61× -61× -13× -  -61× -61× -  -  -  -  -49× -105× -  -105× -105× -  -105× - - - -40× -40× -40× -40× -  - - -  -  -  -  - 
    // A bit simpler than readable streams.
    -// Implement an async ._write(chunk, encoding, cb), and it'll handle all
    -// the drain event emission and buffering.
    - 
    -'use strict';
    - 
    -module.exports = Writable;
    - 
    -/*<replacement>*/
    -var processNextTick = require('process-nextick-args');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
    -/*</replacement>*/
    - 
    -Writable.WritableState = WritableState;
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var internalUtil = {
    -  deprecate: require('util-deprecate')
    -};
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var Stream;
    -(function () {
    -  try {
    -    Stream = require('st' + 'ream');
    -  } catch (_) {} finally {
    -    Iif (!Stream) Stream = require('events').EventEmitter;
    -  }
    -})();
    -/*</replacement>*/
    - 
    -var Buffer = require('buffer').Buffer;
    -/*<replacement>*/
    -var bufferShim = require('buffer-shims');
    -/*</replacement>*/
    - 
    -util.inherits(Writable, Stream);
    - 
    -function nop() {}
    - 
    -function WriteReq(chunk, encoding, cb) {
    -  this.chunk = chunk;
    -  this.encoding = encoding;
    -  this.callback = cb;
    -  this.next = null;
    -}
    - 
    -var Duplex;
    -function WritableState(options, stream) {
    -  Duplex = Duplex || require('./_stream_duplex');
    - 
    -  options = options || {};
    - 
    -  // object stream flag to indicate whether or not this stream
    -  // contains buffers or objects.
    -  this.objectMode = !!options.objectMode;
    - 
    -  if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
    - 
    -  // the point at which write() starts returning false
    -  // Note: 0 is a valid value, means that we always return false if
    -  // the entire buffer is not flushed immediately on write()
    -  var hwm = options.highWaterMark;
    -  var defaultHwm = this.objectMode ? 16 : 16 * 1024;
    -  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
    - 
    -  // cast to ints.
    -  this.highWaterMark = ~ ~this.highWaterMark;
    - 
    -  this.needDrain = false;
    -  // at the start of calling end()
    -  this.ending = false;
    -  // when end() has been called, and returned
    -  this.ended = false;
    -  // when 'finish' is emitted
    -  this.finished = false;
    - 
    -  // should we decode strings into buffers before passing to _write?
    -  // this is here so that some node-core streams can optimize string
    -  // handling at a lower level.
    -  var noDecode = options.decodeStrings === false;
    -  this.decodeStrings = !noDecode;
    - 
    -  // Crypto is kind of old and crusty.  Historically, its default string
    -  // encoding is 'binary' so we have to make this configurable.
    -  // Everything else in the universe uses 'utf8', though.
    -  this.defaultEncoding = options.defaultEncoding || 'utf8';
    - 
    -  // not an actual buffer we keep track of, but a measurement
    -  // of how much we're waiting to get pushed to some underlying
    -  // socket or file.
    -  this.length = 0;
    - 
    -  // a flag to see when we're in the middle of a write.
    -  this.writing = false;
    - 
    -  // when true all writes will be buffered until .uncork() call
    -  this.corked = 0;
    - 
    -  // a flag to be able to tell if the onwrite cb is called immediately,
    -  // or on a later tick.  We set this to true at first, because any
    -  // actions that shouldn't happen until "later" should generally also
    -  // not happen before the first write call.
    -  this.sync = true;
    - 
    -  // a flag to know if we're processing previously buffered items, which
    -  // may call the _write() callback in the same tick, so that we don't
    -  // end up in an overlapped onwrite situation.
    -  this.bufferProcessing = false;
    - 
    -  // the callback that's passed to _write(chunk,cb)
    -  this.onwrite = function (er) {
    -    onwrite(stream, er);
    -  };
    - 
    -  // the callback that the user supplies to write(chunk,encoding,cb)
    -  this.writecb = null;
    - 
    -  // the amount that is being written when _write is called.
    -  this.writelen = 0;
    - 
    -  this.bufferedRequest = null;
    -  this.lastBufferedRequest = null;
    - 
    -  // number of pending user-supplied write callbacks
    -  // this must be 0 before 'finish' can be emitted
    -  this.pendingcb = 0;
    - 
    -  // emit prefinish if the only thing we're waiting for is _write cbs
    -  // This is relevant for synchronous Transform streams
    -  this.prefinished = false;
    - 
    -  // True if the error was already emitted and should not be thrown again
    -  this.errorEmitted = false;
    - 
    -  // count buffered requests
    -  this.bufferedRequestCount = 0;
    - 
    -  // allocate the first CorkedRequest, there is always
    -  // one allocated and free to use, and we maintain at most two
    -  this.corkedRequestsFree = new CorkedRequest(this);
    -}
    - 
    -WritableState.prototype.getBuffer = function writableStateGetBuffer() {
    -  var current = this.bufferedRequest;
    -  var out = [];
    -  while (current) {
    -    out.push(current);
    -    current = current.next;
    -  }
    -  return out;
    -};
    - 
    -(function () {
    -  try {
    -    Object.defineProperty(WritableState.prototype, 'buffer', {
    -      get: internalUtil.deprecate(function () {
    -        return this.getBuffer();
    -      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')
    -    });
    -  } catch (_) {}
    -})();
    - 
    -var Duplex;
    -function Writable(options) {
    -  Duplex = Duplex || require('./_stream_duplex');
    - 
    -  // Writable ctor is applied to Duplexes, though they're not
    -  // instanceof Writable, they're instanceof Readable.
    -  if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);
    - 
    -  this._writableState = new WritableState(options, this);
    - 
    -  // legacy.
    -  this.writable = true;
    - 
    -  if (options) {
    -    if (typeof options.write === 'function') this._write = options.write;
    - 
    -    if (typeof options.writev === 'function') this._writev = options.writev;
    -  }
    - 
    -  Stream.call(this);
    -}
    - 
    -// Otherwise people can pipe Writable streams, which is just wrong.
    -Writable.prototype.pipe = function () {
    -  this.emit('error', new Error('Cannot pipe, not readable'));
    -};
    - 
    -function writeAfterEnd(stream, cb) {
    -  var er = new Error('write after end');
    -  // TODO: defer error events consistently everywhere, not just the cb
    -  stream.emit('error', er);
    -  processNextTick(cb, er);
    -}
    - 
    -// If we get something that is not a buffer, string, null, or undefined,
    -// and we're not in objectMode, then that's an error.
    -// Otherwise stream chunks are all considered to be of length=1, and the
    -// watermarks determine how many objects to keep in the buffer, rather than
    -// how many bytes or characters.
    -function validChunk(stream, state, chunk, cb) {
    -  var valid = true;
    -  var er = false;
    -  // Always throw error if a null is written
    -  // if we are not in object mode then throw
    -  // if it is not a buffer, string, or undefined.
    -  if (chunk === null) {
    -    er = new TypeError('May not write null values to stream');
    -  } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    -    er = new TypeError('Invalid non-string/buffer chunk');
    -  }
    -  if (er) {
    -    stream.emit('error', er);
    -    processNextTick(cb, er);
    -    valid = false;
    -  }
    -  return valid;
    -}
    - 
    -Writable.prototype.write = function (chunk, encoding, cb) {
    -  var state = this._writableState;
    -  var ret = false;
    - 
    -  if (typeof encoding === 'function') {
    -    cb = encoding;
    -    encoding = null;
    -  }
    - 
    -  if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
    - 
    -  if (typeof cb !== 'function') cb = nop;
    - 
    -  if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
    -    state.pendingcb++;
    -    ret = writeOrBuffer(this, state, chunk, encoding, cb);
    -  }
    - 
    -  return ret;
    -};
    - 
    -Writable.prototype.cork = function () {
    -  var state = this._writableState;
    - 
    -  state.corked++;
    -};
    - 
    -Writable.prototype.uncork = function () {
    -  var state = this._writableState;
    - 
    -  Eif (state.corked) {
    -    state.corked--;
    - 
    -    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
    -  }
    -};
    - 
    -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
    -  // node::ParseEncoding() requires lower case.
    -  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
    -  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
    -  this._writableState.defaultEncoding = encoding;
    -  return this;
    -};
    - 
    -function decodeChunk(state, chunk, encoding) {
    -  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
    -    chunk = bufferShim.from(chunk, encoding);
    -  }
    -  return chunk;
    -}
    - 
    -// if we're already writing something, then just put this
    -// in the queue, and wait our turn.  Otherwise, call _write
    -// If we return false, then we need a drain event, so set that flag.
    -function writeOrBuffer(stream, state, chunk, encoding, cb) {
    -  chunk = decodeChunk(state, chunk, encoding);
    - 
    -  if (Buffer.isBuffer(chunk)) encoding = 'buffer';
    -  var len = state.objectMode ? 1 : chunk.length;
    - 
    -  state.length += len;
    - 
    -  var ret = state.length < state.highWaterMark;
    -  // we must ensure that previous needDrain will not be reset to false.
    -  if (!ret) state.needDrain = true;
    - 
    -  if (state.writing || state.corked) {
    -    var last = state.lastBufferedRequest;
    -    state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
    -    if (last) {
    -      last.next = state.lastBufferedRequest;
    -    } else {
    -      state.bufferedRequest = state.lastBufferedRequest;
    -    }
    -    state.bufferedRequestCount += 1;
    -  } else {
    -    doWrite(stream, state, false, len, chunk, encoding, cb);
    -  }
    - 
    -  return ret;
    -}
    - 
    -function doWrite(stream, state, writev, len, chunk, encoding, cb) {
    -  state.writelen = len;
    -  state.writecb = cb;
    -  state.writing = true;
    -  state.sync = true;
    -  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
    -  state.sync = false;
    -}
    - 
    -function onwriteError(stream, state, sync, er, cb) {
    -  --state.pendingcb;
    -  if (sync) processNextTick(cb, er);else cb(er);
    - 
    -  stream._writableState.errorEmitted = true;
    -  stream.emit('error', er);
    -}
    - 
    -function onwriteStateUpdate(state) {
    -  state.writing = false;
    -  state.writecb = null;
    -  state.length -= state.writelen;
    -  state.writelen = 0;
    -}
    - 
    -function onwrite(stream, er) {
    -  var state = stream._writableState;
    -  var sync = state.sync;
    -  var cb = state.writecb;
    - 
    -  onwriteStateUpdate(state);
    - 
    -  Iif (er) onwriteError(stream, state, sync, er, cb);else {
    -    // Check if we're actually ready to finish, but don't emit yet
    -    var finished = needFinish(state);
    - 
    -    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
    -      clearBuffer(stream, state);
    -    }
    - 
    -    if (sync) {
    -      /*<replacement>*/
    -      asyncWrite(afterWrite, stream, state, finished, cb);
    -      /*</replacement>*/
    -    } else {
    -        afterWrite(stream, state, finished, cb);
    -      }
    -  }
    -}
    - 
    -function afterWrite(stream, state, finished, cb) {
    -  if (!finished) onwriteDrain(stream, state);
    -  state.pendingcb--;
    -  cb();
    -  finishMaybe(stream, state);
    -}
    - 
    -// Must force callback to be called on nextTick, so that we don't
    -// emit 'drain' before the write() consumer gets the 'false' return
    -// value, and has a chance to attach a 'drain' listener.
    -function onwriteDrain(stream, state) {
    -  if (state.length === 0 && state.needDrain) {
    -    state.needDrain = false;
    -    stream.emit('drain');
    -  }
    -}
    - 
    -// if there's something in the buffer waiting, then process it
    -function clearBuffer(stream, state) {
    -  state.bufferProcessing = true;
    -  var entry = state.bufferedRequest;
    - 
    -  if (stream._writev && entry && entry.next) {
    -    // Fast case, write everything using _writev()
    -    var l = state.bufferedRequestCount;
    -    var buffer = new Array(l);
    -    var holder = state.corkedRequestsFree;
    -    holder.entry = entry;
    - 
    -    var count = 0;
    -    while (entry) {
    -      buffer[count] = entry;
    -      entry = entry.next;
    -      count += 1;
    -    }
    - 
    -    doWrite(stream, state, true, state.length, buffer, '', holder.finish);
    - 
    -    // doWrite is almost always async, defer these to save a bit of time
    -    // as the hot path ends with doWrite
    -    state.pendingcb++;
    -    state.lastBufferedRequest = null;
    -    Iif (holder.next) {
    -      state.corkedRequestsFree = holder.next;
    -      holder.next = null;
    -    } else {
    -      state.corkedRequestsFree = new CorkedRequest(state);
    -    }
    -  } else {
    -    // Slow case, write chunks one-by-one
    -    while (entry) {
    -      var chunk = entry.chunk;
    -      var encoding = entry.encoding;
    -      var cb = entry.callback;
    -      var len = state.objectMode ? 1 : chunk.length;
    - 
    -      doWrite(stream, state, false, len, chunk, encoding, cb);
    -      entry = entry.next;
    -      // if we didn't call the onwrite immediately, then
    -      // it means that we need to wait until it does.
    -      // also, that means that the chunk and cb are currently
    -      // being processed, so move the buffer counter past them.
    -      if (state.writing) {
    -        break;
    -      }
    -    }
    - 
    -    if (entry === null) state.lastBufferedRequest = null;
    -  }
    - 
    -  state.bufferedRequestCount = 0;
    -  state.bufferedRequest = entry;
    -  state.bufferProcessing = false;
    -}
    - 
    -Writable.prototype._write = function (chunk, encoding, cb) {
    -  cb(new Error('not implemented'));
    -};
    - 
    -Writable.prototype._writev = null;
    - 
    -Writable.prototype.end = function (chunk, encoding, cb) {
    -  var state = this._writableState;
    - 
    -  if (typeof chunk === 'function') {
    -    cb = chunk;
    -    chunk = null;
    -    encoding = null;
    -  } else if (typeof encoding === 'function') {
    -    cb = encoding;
    -    encoding = null;
    -  }
    - 
    -  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
    - 
    -  // .end() fully uncorks
    -  if (state.corked) {
    -    state.corked = 1;
    -    this.uncork();
    -  }
    - 
    -  // ignore unnecessary end() calls.
    -  if (!state.ending && !state.finished) endWritable(this, state, cb);
    -};
    - 
    -function needFinish(state) {
    -  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
    -}
    - 
    -function prefinish(stream, state) {
    -  if (!state.prefinished) {
    -    state.prefinished = true;
    -    stream.emit('prefinish');
    -  }
    -}
    - 
    -function finishMaybe(stream, state) {
    -  var need = needFinish(state);
    -  if (need) {
    -    if (state.pendingcb === 0) {
    -      prefinish(stream, state);
    -      state.finished = true;
    -      stream.emit('finish');
    -    } else {
    -      prefinish(stream, state);
    -    }
    -  }
    -  return need;
    -}
    - 
    -function endWritable(stream, state, cb) {
    -  state.ending = true;
    -  finishMaybe(stream, state);
    -  if (cb) {
    -    if (state.finished) processNextTick(cb);else stream.once('finish', cb);
    -  }
    -  state.ended = true;
    -  stream.writable = false;
    -}
    - 
    -// It seems a linked list but it is not
    -// there will be only 2 of these for each stream
    -function CorkedRequest(state) {
    -  var _this = this;
    - 
    -  this.next = null;
    -  this.entry = null;
    - 
    -  this.finish = function (err) {
    -    var entry = _this.entry;
    -    _this.entry = null;
    -    while (entry) {
    -      var cb = entry.callback;
    -      state.pendingcb--;
    -      cb(err);
    -      entry = entry.next;
    -    }
    -    Eif (state.corkedRequestsFree) {
    -      state.corkedRequestsFree.next = _this;
    -    } else {
    -      state.corkedRequestsFree = _this;
    -    }
    -  };
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html deleted file mode 100644 index 5240d877ea3b9e..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - Code coverage report for lib/ - - - - - - - -
    -
    -

    - all files lib/ -

    -
    -
    - 90.63% - Statements - 851/939 -
    -
    - 87.94% - Branches - 496/564 -
    -
    - 86.54% - Functions - 90/104 -
    -
    - 92.73% - Lines - 765/825 -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    _stream_duplex.js
    69.23%27/3968.18%15/2240%2/575.76%25/33
    _stream_passthrough.js
    90.91%10/1150%1/2100%2/2100%10/10
    _stream_readable.js
    89.29%467/52387.22%307/35286.79%46/5390.73%411/453
    _stream_transform.js
    92.11%70/7684.21%32/3890.91%10/1198.48%65/66
    _stream_writable.js
    95.52%277/29094%141/15090.91%30/3396.58%254/263
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7cda31a44..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js deleted file mode 100644 index ef51e03866898f..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js +++ /dev/null @@ -1 +0,0 @@ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 03f704a609c6fd..00000000000000 Binary files a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png and /dev/null differ diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js deleted file mode 100644 index 6c5034e403c709..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js +++ /dev/null @@ -1,158 +0,0 @@ -var addSorting = (function () { - "use strict"; - var cols, - currentSort = { - index: 0, - desc: false - }; - - // returns the summary table element - function getTable() { return document.querySelector('.coverage-summary'); } - // returns the thead element of the summary table - function getTableHeader() { return getTable().querySelector('thead tr'); } - // returns the tbody element of the summary table - function getTableBody() { return getTable().querySelector('tbody'); } - // returns the th element for nth column - function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; } - - // loads all columns - function loadColumns() { - var colNodes = getTableHeader().querySelectorAll('th'), - colNode, - cols = [], - col, - i; - - for (i = 0; i < colNodes.length; i += 1) { - colNode = colNodes[i]; - col = { - key: colNode.getAttribute('data-col'), - sortable: !colNode.getAttribute('data-nosort'), - type: colNode.getAttribute('data-type') || 'string' - }; - cols.push(col); - if (col.sortable) { - col.defaultDescSort = col.type === 'number'; - colNode.innerHTML = colNode.innerHTML + ''; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function (a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function (a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function () { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i =0 ; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function () { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(cols); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov.info b/deps/npm/node_modules/readable-stream/coverage/lcov.info deleted file mode 100644 index d0012ea3cb9dac..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov.info +++ /dev/null @@ -1,1642 +0,0 @@ -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_readable.js -FN:18,(anonymous_1) -FN:25,(anonymous_2) -FN:50,(anonymous_3) -FN:60,prependListener -FN:72,ReadableState -FN:139,Readable -FN:158,(anonymous_7) -FN:173,(anonymous_8) -FN:178,(anonymous_9) -FN:182,readableAddChunk -FN:237,needMoreData -FN:242,(anonymous_12) -FN:251,computeNewHighWaterMark -FN:267,howMuchToRead -FN:299,(anonymous_15) -FN:399,chunkInvalid -FN:407,onEofChunk -FN:425,emitReadable -FN:435,emitReadable_ -FN:447,maybeReadMore -FN:454,maybeReadMore_ -FN:470,(anonymous_22) -FN:474,(anonymous_23) -FN:498,onunpipe -FN:505,onend -FN:518,cleanup -FN:541,ondata -FN:559,onerror -FN:570,onclose -FN:575,onfinish -FN:582,unpipe -FN:599,pipeOnDrain -FN:600,(anonymous_33) -FN:611,(anonymous_34) -FN:662,(anonymous_35) -FN:689,nReadingNextTick -FN:696,(anonymous_37) -FN:706,resume -FN:713,resume_ -FN:725,(anonymous_40) -FN:735,flow -FN:748,(anonymous_42) -FN:753,(anonymous_43) -FN:763,(anonymous_44) -FN:781,(anonymous_45) -FN:782,(anonymous_46) -FN:791,(anonymous_47) -FN:797,(anonymous_48) -FN:813,fromList -FN:860,endReadable -FN:873,endReadableNT -FN:882,forEach -FN:888,indexOf -FNF:53 -FNH:46 -FNDA:269,(anonymous_1) -FNDA:49,(anonymous_2) -FNDA:0,(anonymous_3) -FNDA:38,prependListener -FNDA:82,ReadableState -FNDA:84,Readable -FNDA:276927,(anonymous_7) -FNDA:41,(anonymous_8) -FNDA:4,(anonymous_9) -FNDA:276968,readableAddChunk -FNDA:276966,needMoreData -FNDA:5,(anonymous_12) -FNDA:4,computeNewHighWaterMark -FNDA:554235,howMuchToRead -FNDA:277657,(anonymous_15) -FNDA:276968,chunkInvalid -FNDA:67,onEofChunk -FNDA:276722,emitReadable -FNDA:1123,emitReadable_ -FNDA:276881,maybeReadMore -FNDA:225,maybeReadMore_ -FNDA:0,(anonymous_22) -FNDA:38,(anonymous_23) -FNDA:25,onunpipe -FNDA:12,onend -FNDA:24,cleanup -FNDA:395,ondata -FNDA:5,onerror -FNDA:0,onclose -FNDA:6,onfinish -FNDA:11,unpipe -FNDA:38,pipeOnDrain -FNDA:265,(anonymous_33) -FNDA:27,(anonymous_34) -FNDA:226,(anonymous_35) -FNDA:25,nReadingNextTick -FNDA:57,(anonymous_37) -FNDA:56,resume -FNDA:42,resume_ -FNDA:272,(anonymous_40) -FNDA:1428,flow -FNDA:1,(anonymous_42) -FNDA:1,(anonymous_43) -FNDA:0,(anonymous_44) -FNDA:0,(anonymous_45) -FNDA:0,(anonymous_46) -FNDA:5,(anonymous_47) -FNDA:0,(anonymous_48) -FNDA:757,fromList -FNDA:316,endReadable -FNDA:314,endReadableNT -FNDA:1,forEach -FNDA:2,indexOf -DA:3,49 -DA:6,49 -DA:10,49 -DA:13,49 -DA:16,49 -DA:18,49 -DA:19,269 -DA:24,49 -DA:25,49 -DA:26,49 -DA:27,49 -DA:29,49 -DA:34,49 -DA:36,49 -DA:40,49 -DA:41,49 -DA:45,49 -DA:46,49 -DA:47,49 -DA:48,49 -DA:50,0 -DA:54,49 -DA:56,49 -DA:58,49 -DA:60,49 -DA:61,38 -DA:68,38 -DA:71,49 -DA:72,49 -DA:73,82 -DA:75,82 -DA:79,82 -DA:81,82 -DA:85,82 -DA:86,82 -DA:87,82 -DA:90,82 -DA:92,82 -DA:93,82 -DA:94,82 -DA:95,82 -DA:96,82 -DA:97,82 -DA:98,82 -DA:99,82 -DA:105,82 -DA:109,82 -DA:110,82 -DA:111,82 -DA:112,82 -DA:117,82 -DA:121,82 -DA:124,82 -DA:127,82 -DA:129,82 -DA:130,82 -DA:131,82 -DA:132,10 -DA:133,10 -DA:134,10 -DA:138,49 -DA:139,49 -DA:140,84 -DA:142,84 -DA:144,82 -DA:147,82 -DA:149,82 -DA:151,82 -DA:158,49 -DA:159,276927 -DA:161,276927 -DA:162,37 -DA:163,37 -DA:164,10 -DA:165,10 -DA:169,276927 -DA:173,49 -DA:174,41 -DA:175,41 -DA:178,49 -DA:179,4 -DA:182,49 -DA:183,276968 -DA:184,276968 -DA:185,0 -DA:186,276968 -DA:187,67 -DA:188,67 -DA:189,276901 -DA:190,276883 -DA:191,1 -DA:192,1 -DA:193,276882 -DA:194,1 -DA:195,1 -DA:197,276881 -DA:198,276881 -DA:199,23 -DA:200,23 -DA:203,276881 -DA:207,276881 -DA:209,276875 -DA:210,108 -DA:211,108 -DA:214,276767 -DA:215,276767 -DA:217,276767 -DA:221,276881 -DA:223,18 -DA:224,9 -DA:227,276966 -DA:237,49 -DA:238,276966 -DA:242,49 -DA:243,5 -DA:244,5 -DA:245,5 -DA:246,5 -DA:250,49 -DA:251,49 -DA:252,4 -DA:253,0 -DA:256,4 -DA:257,4 -DA:258,4 -DA:259,4 -DA:260,4 -DA:261,4 -DA:262,4 -DA:264,4 -DA:267,49 -DA:268,554235 -DA:270,553951 -DA:272,553860 -DA:274,421 -DA:277,553439 -DA:283,2087 -DA:286,2087 -DA:287,1711 -DA:288,1697 -DA:289,1697 -DA:291,14 -DA:295,376 -DA:299,49 -DA:300,277657 -DA:301,277657 -DA:302,277657 -DA:304,277657 -DA:309,277657 -DA:310,6 -DA:311,6 -DA:312,6 -DA:315,277651 -DA:318,277651 -DA:319,279 -DA:320,279 -DA:346,277372 -DA:347,277372 -DA:350,277372 -DA:351,277365 -DA:352,277365 -DA:357,277372 -DA:358,556 -DA:359,556 -DA:362,277372 -DA:363,276809 -DA:364,276809 -DA:365,276809 -DA:367,276809 -DA:369,276809 -DA:370,276809 -DA:375,277372 -DA:377,277372 -DA:378,277372 -DA:380,277372 -DA:381,276627 -DA:382,276627 -DA:385,277372 -DA:389,277372 -DA:392,277372 -DA:394,277372 -DA:396,277372 -DA:399,49 -DA:400,276968 -DA:401,276968 -DA:402,0 -DA:404,276968 -DA:407,49 -DA:408,67 -DA:409,59 -DA:410,14 -DA:411,14 -DA:412,4 -DA:413,4 -DA:416,59 -DA:419,59 -DA:425,49 -DA:426,276722 -DA:427,276722 -DA:428,276722 -DA:429,1123 -DA:430,1123 -DA:431,1123 -DA:435,49 -DA:436,1123 -DA:437,1123 -DA:438,1123 -DA:447,49 -DA:448,276881 -DA:449,225 -DA:450,225 -DA:454,49 -DA:455,225 -DA:456,225 -DA:457,275597 -DA:458,275597 -DA:459,275597 -DA:461,275571 -DA:463,225 -DA:470,49 -DA:471,0 -DA:474,49 -DA:475,38 -DA:476,38 -DA:478,38 -DA:480,37 -DA:481,37 -DA:483,1 -DA:484,1 -DA:486,0 -DA:487,0 -DA:489,38 -DA:490,38 -DA:492,38 -DA:494,38 -DA:495,38 -DA:497,38 -DA:498,49 -DA:499,25 -DA:500,25 -DA:501,24 -DA:505,49 -DA:506,12 -DA:507,12 -DA:514,38 -DA:515,38 -DA:517,38 -DA:518,49 -DA:519,24 -DA:521,24 -DA:522,24 -DA:523,24 -DA:524,24 -DA:525,24 -DA:526,24 -DA:527,24 -DA:528,24 -DA:530,24 -DA:537,24 -DA:540,38 -DA:541,49 -DA:542,395 -DA:543,395 -DA:544,395 -DA:549,264 -DA:550,263 -DA:551,263 -DA:553,264 -DA:559,49 -DA:560,5 -DA:561,5 -DA:562,5 -DA:563,5 -DA:567,38 -DA:570,49 -DA:571,0 -DA:572,0 -DA:574,38 -DA:575,49 -DA:576,6 -DA:577,6 -DA:578,6 -DA:580,38 -DA:582,49 -DA:583,11 -DA:584,11 -DA:588,38 -DA:591,38 -DA:592,12 -DA:593,12 -DA:596,38 -DA:599,49 -DA:600,38 -DA:601,265 -DA:602,265 -DA:603,265 -DA:604,265 -DA:605,263 -DA:606,263 -DA:611,49 -DA:612,27 -DA:615,27 -DA:618,24 -DA:620,24 -DA:622,24 -DA:625,24 -DA:626,24 -DA:627,24 -DA:628,24 -DA:629,24 -DA:634,0 -DA:636,0 -DA:637,0 -DA:638,0 -DA:639,0 -DA:640,0 -DA:642,0 -DA:643,0 -DA:644,0 -DA:648,0 -DA:649,0 -DA:651,0 -DA:652,0 -DA:653,0 -DA:655,0 -DA:657,0 -DA:662,49 -DA:663,226 -DA:667,226 -DA:668,36 -DA:671,226 -DA:672,38 -DA:673,38 -DA:674,28 -DA:675,28 -DA:676,28 -DA:677,28 -DA:678,25 -DA:679,3 -DA:680,1 -DA:685,226 -DA:687,49 -DA:689,49 -DA:690,25 -DA:691,25 -DA:696,49 -DA:697,57 -DA:698,57 -DA:699,56 -DA:700,56 -DA:701,56 -DA:703,57 -DA:706,49 -DA:707,56 -DA:708,42 -DA:709,42 -DA:713,49 -DA:714,42 -DA:715,38 -DA:716,38 -DA:719,42 -DA:720,42 -DA:721,42 -DA:722,42 -DA:725,49 -DA:726,272 -DA:727,272 -DA:728,270 -DA:729,270 -DA:730,270 -DA:732,272 -DA:735,49 -DA:736,1428 -DA:737,1428 -DA:738,1428 -DA:739,345 -DA:740,395 -DA:748,49 -DA:749,1 -DA:750,1 -DA:752,1 -DA:753,1 -DA:754,1 -DA:755,1 -DA:756,0 -DA:757,0 -DA:760,1 -DA:763,1 -DA:764,0 -DA:765,0 -DA:768,0 -DA:770,0 -DA:771,0 -DA:772,0 -DA:773,0 -DA:779,1 -DA:780,16 -DA:781,0 -DA:782,0 -DA:783,0 -DA:790,1 -DA:791,1 -DA:792,5 -DA:797,1 -DA:798,0 -DA:799,0 -DA:800,0 -DA:801,0 -DA:805,1 -DA:809,49 -DA:813,49 -DA:814,757 -DA:815,757 -DA:816,757 -DA:817,757 -DA:818,757 -DA:821,757 -DA:823,753 -DA:825,280 -DA:826,280 -DA:829,434 -DA:832,114 -DA:833,114 -DA:834,114 -DA:835,320 -DA:837,264 -DA:841,56 -DA:843,56 -DA:844,56 -DA:845,186 -DA:846,186 -DA:848,186 -DA:850,186 -DA:852,186 -DA:857,753 -DA:860,49 -DA:861,316 -DA:865,316 -DA:867,316 -DA:868,314 -DA:869,314 -DA:873,49 -DA:875,314 -DA:876,54 -DA:877,54 -DA:878,54 -DA:882,49 -DA:883,1 -DA:884,5 -DA:888,49 -DA:889,2 -DA:890,3 -DA:892,0 -LF:453 -LH:411 -BRDA:29,1,0,0 -BRDA:29,1,1,49 -BRDA:47,2,0,49 -BRDA:47,2,1,0 -BRDA:47,3,0,49 -BRDA:47,3,1,49 -BRDA:61,4,0,0 -BRDA:61,4,1,38 -BRDA:68,5,0,33 -BRDA:68,5,1,5 -BRDA:68,6,0,38 -BRDA:68,6,1,38 -BRDA:68,7,0,0 -BRDA:68,7,1,5 -BRDA:73,8,0,82 -BRDA:73,8,1,0 -BRDA:75,9,0,82 -BRDA:75,9,1,40 -BRDA:81,10,0,25 -BRDA:81,10,1,57 -BRDA:81,11,0,25 -BRDA:81,11,1,17 -BRDA:86,12,0,19 -BRDA:86,12,1,63 -BRDA:87,13,0,15 -BRDA:87,13,1,67 -BRDA:87,14,0,82 -BRDA:87,14,1,67 -BRDA:117,15,0,82 -BRDA:117,15,1,82 -BRDA:131,16,0,10 -BRDA:131,16,1,72 -BRDA:132,17,0,6 -BRDA:132,17,1,4 -BRDA:140,18,0,84 -BRDA:140,18,1,39 -BRDA:142,19,0,2 -BRDA:142,19,1,82 -BRDA:149,20,0,1 -BRDA:149,20,1,81 -BRDA:149,21,0,82 -BRDA:149,21,1,42 -BRDA:161,22,0,37 -BRDA:161,22,1,276890 -BRDA:161,23,0,276927 -BRDA:161,23,1,276819 -BRDA:162,24,0,37 -BRDA:162,24,1,37 -BRDA:163,25,0,10 -BRDA:163,25,1,27 -BRDA:184,26,0,0 -BRDA:184,26,1,276968 -BRDA:186,27,0,67 -BRDA:186,27,1,276901 -BRDA:189,28,0,276883 -BRDA:189,28,1,18 -BRDA:189,29,0,276901 -BRDA:189,29,1,276810 -BRDA:189,29,2,276810 -BRDA:190,30,0,1 -BRDA:190,30,1,276882 -BRDA:190,31,0,276883 -BRDA:190,31,1,3 -BRDA:193,32,0,1 -BRDA:193,32,1,276881 -BRDA:193,33,0,276882 -BRDA:193,33,1,1 -BRDA:198,34,0,23 -BRDA:198,34,1,276858 -BRDA:198,35,0,276881 -BRDA:198,35,1,50 -BRDA:198,35,2,50 -BRDA:200,36,0,23 -BRDA:200,36,1,23 -BRDA:203,37,0,276850 -BRDA:203,37,1,31 -BRDA:207,38,0,276875 -BRDA:207,38,1,6 -BRDA:209,39,0,108 -BRDA:209,39,1,276767 -BRDA:209,40,0,276875 -BRDA:209,40,1,152 -BRDA:209,40,2,143 -BRDA:214,41,0,51 -BRDA:214,41,1,276716 -BRDA:215,42,0,31 -BRDA:215,42,1,276736 -BRDA:217,43,0,276660 -BRDA:217,43,1,107 -BRDA:223,44,0,9 -BRDA:223,44,1,9 -BRDA:238,45,0,276966 -BRDA:238,45,1,276896 -BRDA:238,45,2,276704 -BRDA:238,45,3,64 -BRDA:243,46,0,1 -BRDA:243,46,1,4 -BRDA:252,47,0,0 -BRDA:252,47,1,4 -BRDA:268,48,0,284 -BRDA:268,48,1,553951 -BRDA:268,49,0,554235 -BRDA:268,49,1,715 -BRDA:270,50,0,91 -BRDA:270,50,1,553860 -BRDA:270,51,0,46 -BRDA:270,51,1,45 -BRDA:272,52,0,421 -BRDA:272,52,1,553439 -BRDA:272,53,0,553860 -BRDA:272,53,1,553860 -BRDA:274,54,0,304 -BRDA:274,54,1,117 -BRDA:274,55,0,421 -BRDA:274,55,1,353 -BRDA:277,56,0,551352 -BRDA:277,56,1,2087 -BRDA:283,57,0,4 -BRDA:283,57,1,2083 -BRDA:286,58,0,1711 -BRDA:286,58,1,376 -BRDA:287,59,0,1697 -BRDA:287,59,1,14 -BRDA:304,60,0,1859 -BRDA:304,60,1,275798 -BRDA:304,61,0,277657 -BRDA:304,61,1,277162 -BRDA:309,62,0,6 -BRDA:309,62,1,277651 -BRDA:309,63,0,277657 -BRDA:309,63,1,275798 -BRDA:309,63,2,275735 -BRDA:309,63,3,275734 -BRDA:311,64,0,4 -BRDA:311,64,1,2 -BRDA:311,65,0,6 -BRDA:311,65,1,4 -BRDA:318,66,0,279 -BRDA:318,66,1,277372 -BRDA:318,67,0,277651 -BRDA:318,67,1,277088 -BRDA:319,68,0,277 -BRDA:319,68,1,2 -BRDA:350,69,0,277365 -BRDA:350,69,1,7 -BRDA:350,70,0,277372 -BRDA:350,70,1,276947 -BRDA:357,71,0,556 -BRDA:357,71,1,276816 -BRDA:357,72,0,277372 -BRDA:357,72,1,277056 -BRDA:362,73,0,276809 -BRDA:362,73,1,563 -BRDA:367,74,0,349 -BRDA:367,74,1,276460 -BRDA:375,75,0,276584 -BRDA:375,75,1,788 -BRDA:375,76,0,277372 -BRDA:375,76,1,276809 -BRDA:378,77,0,749 -BRDA:378,77,1,276623 -BRDA:380,78,0,276627 -BRDA:380,78,1,745 -BRDA:389,79,0,454 -BRDA:389,79,1,276918 -BRDA:389,80,0,277372 -BRDA:389,80,1,492 -BRDA:392,81,0,35 -BRDA:392,81,1,277337 -BRDA:392,82,0,277372 -BRDA:392,82,1,1242 -BRDA:392,82,2,307 -BRDA:394,83,0,745 -BRDA:394,83,1,276627 -BRDA:401,84,0,0 -BRDA:401,84,1,276968 -BRDA:401,85,0,276968 -BRDA:401,85,1,185 -BRDA:401,85,2,131 -BRDA:401,85,3,64 -BRDA:401,85,4,64 -BRDA:408,86,0,8 -BRDA:408,86,1,59 -BRDA:409,87,0,14 -BRDA:409,87,1,45 -BRDA:411,88,0,4 -BRDA:411,88,1,10 -BRDA:411,89,0,14 -BRDA:411,89,1,4 -BRDA:413,90,0,0 -BRDA:413,90,1,4 -BRDA:428,91,0,1123 -BRDA:428,91,1,275599 -BRDA:431,92,0,1003 -BRDA:431,92,1,120 -BRDA:448,93,0,225 -BRDA:448,93,1,276656 -BRDA:456,94,0,275796 -BRDA:456,94,1,275697 -BRDA:456,94,2,275647 -BRDA:456,94,3,275626 -BRDA:459,95,0,26 -BRDA:459,95,1,275571 -BRDA:478,96,0,37 -BRDA:478,96,1,1 -BRDA:478,96,2,0 -BRDA:492,97,0,38 -BRDA:492,97,1,1 -BRDA:492,97,2,37 -BRDA:492,97,3,36 -BRDA:494,98,0,36 -BRDA:494,98,1,2 -BRDA:495,99,0,1 -BRDA:495,99,1,37 -BRDA:500,100,0,24 -BRDA:500,100,1,1 -BRDA:537,101,0,1 -BRDA:537,101,1,23 -BRDA:537,102,0,24 -BRDA:537,102,1,1 -BRDA:537,102,2,1 -BRDA:544,103,0,264 -BRDA:544,103,1,131 -BRDA:549,104,0,263 -BRDA:549,104,1,1 -BRDA:549,105,0,264 -BRDA:549,105,1,262 -BRDA:549,105,2,3 -BRDA:549,105,3,2 -BRDA:549,105,4,263 -BRDA:563,106,0,2 -BRDA:563,106,1,3 -BRDA:591,107,0,12 -BRDA:591,107,1,26 -BRDA:603,108,0,261 -BRDA:603,108,1,4 -BRDA:604,109,0,263 -BRDA:604,109,1,2 -BRDA:604,110,0,265 -BRDA:604,110,1,264 -BRDA:615,111,0,3 -BRDA:615,111,1,24 -BRDA:618,112,0,24 -BRDA:618,112,1,0 -BRDA:620,113,0,0 -BRDA:620,113,1,24 -BRDA:620,114,0,24 -BRDA:620,114,1,24 -BRDA:622,115,0,0 -BRDA:622,115,1,24 -BRDA:628,116,0,24 -BRDA:628,116,1,0 -BRDA:634,117,0,0 -BRDA:634,117,1,0 -BRDA:649,118,0,0 -BRDA:649,118,1,0 -BRDA:653,119,0,0 -BRDA:653,119,1,0 -BRDA:667,120,0,36 -BRDA:667,120,1,190 -BRDA:667,121,0,226 -BRDA:667,121,1,48 -BRDA:671,122,0,38 -BRDA:671,122,1,188 -BRDA:671,123,0,226 -BRDA:671,123,1,38 -BRDA:673,124,0,28 -BRDA:673,124,1,10 -BRDA:677,125,0,25 -BRDA:677,125,1,3 -BRDA:679,126,0,1 -BRDA:679,126,1,2 -BRDA:698,127,0,56 -BRDA:698,127,1,1 -BRDA:707,128,0,42 -BRDA:707,128,1,14 -BRDA:714,129,0,38 -BRDA:714,129,1,4 -BRDA:722,130,0,12 -BRDA:722,130,1,30 -BRDA:722,131,0,42 -BRDA:722,131,1,27 -BRDA:727,132,0,270 -BRDA:727,132,1,2 -BRDA:738,133,0,345 -BRDA:738,133,1,1083 -BRDA:741,134,0,395 -BRDA:741,134,1,310 -BRDA:755,135,0,0 -BRDA:755,135,1,1 -BRDA:755,136,0,1 -BRDA:755,136,1,0 -BRDA:757,137,0,0 -BRDA:757,137,1,0 -BRDA:757,138,0,0 -BRDA:757,138,1,0 -BRDA:765,139,0,0 -BRDA:765,139,1,0 -BRDA:768,140,0,0 -BRDA:768,140,1,0 -BRDA:768,141,0,0 -BRDA:768,141,1,0 -BRDA:768,141,2,0 -BRDA:768,142,0,0 -BRDA:768,142,1,0 -BRDA:768,143,0,0 -BRDA:768,143,1,0 -BRDA:768,143,2,0 -BRDA:771,144,0,0 -BRDA:771,144,1,0 -BRDA:780,145,0,0 -BRDA:780,145,1,16 -BRDA:780,146,0,16 -BRDA:780,146,1,1 -BRDA:799,147,0,0 -BRDA:799,147,1,0 -BRDA:821,148,0,4 -BRDA:821,148,1,753 -BRDA:823,149,0,0 -BRDA:823,149,1,753 -BRDA:823,150,0,39 -BRDA:823,150,1,714 -BRDA:823,151,0,280 -BRDA:823,151,1,434 -BRDA:823,152,0,714 -BRDA:823,152,1,714 -BRDA:825,153,0,21 -BRDA:825,153,1,259 -BRDA:825,154,0,66 -BRDA:825,154,1,193 -BRDA:829,155,0,114 -BRDA:829,155,1,320 -BRDA:835,156,0,264 -BRDA:835,156,1,56 -BRDA:841,157,0,1 -BRDA:841,157,1,55 -BRDA:844,158,0,242 -BRDA:844,158,1,219 -BRDA:848,159,0,2 -BRDA:848,159,1,184 -BRDA:850,160,0,39 -BRDA:850,160,1,147 -BRDA:865,161,0,0 -BRDA:865,161,1,316 -BRDA:867,162,0,314 -BRDA:867,162,1,2 -BRDA:875,163,0,54 -BRDA:875,163,1,260 -BRDA:875,164,0,314 -BRDA:875,164,1,54 -BRDA:890,165,0,2 -BRDA:890,165,1,1 -BRF:352 -BRH:307 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_writable.js -FN:32,(anonymous_1) -FN:48,nop -FN:50,WriteReq -FN:58,WritableState -FN:121,(anonymous_5) -FN:153,writableStateGetBuffer -FN:163,(anonymous_7) -FN:166,(anonymous_8) -FN:174,Writable -FN:196,(anonymous_10) -FN:200,writeAfterEnd -FN:212,validChunk -FN:231,(anonymous_13) -FN:252,(anonymous_14) -FN:258,(anonymous_15) -FN:268,setDefaultEncoding -FN:276,decodeChunk -FN:286,writeOrBuffer -FN:314,doWrite -FN:323,onwriteError -FN:331,onwriteStateUpdate -FN:338,onwrite -FN:363,afterWrite -FN:373,onwriteDrain -FN:381,clearBuffer -FN:438,(anonymous_26) -FN:444,(anonymous_27) -FN:468,needFinish -FN:472,prefinish -FN:479,finishMaybe -FN:493,endWritable -FN:505,CorkedRequest -FN:511,(anonymous_33) -FNF:33 -FNH:30 -FNDA:49,(anonymous_1) -FNDA:2512,nop -FNDA:2305,WriteReq -FNDA:96,WritableState -FNDA:4574,(anonymous_5) -FNDA:1,writableStateGetBuffer -FNDA:49,(anonymous_7) -FNDA:0,(anonymous_8) -FNDA:97,Writable -FNDA:1,(anonymous_10) -FNDA:1,writeAfterEnd -FNDA:4625,validChunk -FNDA:4626,(anonymous_13) -FNDA:13,(anonymous_14) -FNDA:13,(anonymous_15) -FNDA:3,setDefaultEncoding -FNDA:4621,decodeChunk -FNDA:4621,writeOrBuffer -FNDA:4582,doWrite -FNDA:0,onwriteError -FNDA:4574,onwriteStateUpdate -FNDA:4574,onwrite -FNDA:4574,afterWrite -FNDA:4557,onwriteDrain -FNDA:2263,clearBuffer -FNDA:0,(anonymous_26) -FNDA:65,(anonymous_27) -FNDA:9209,needFinish -FNDA:125,prefinish -FNDA:4635,finishMaybe -FNDA:61,endWritable -FNDA:105,CorkedRequest -FNDA:8,(anonymous_33) -DA:7,49 -DA:10,49 -DA:14,49 -DA:17,49 -DA:20,49 -DA:21,49 -DA:25,49 -DA:31,49 -DA:32,49 -DA:33,49 -DA:34,49 -DA:36,49 -DA:41,49 -DA:43,49 -DA:46,49 -DA:48,49 -DA:50,49 -DA:51,2305 -DA:52,2305 -DA:53,2305 -DA:54,2305 -DA:57,49 -DA:58,49 -DA:59,96 -DA:61,96 -DA:65,96 -DA:67,96 -DA:72,96 -DA:73,96 -DA:74,96 -DA:77,96 -DA:79,96 -DA:81,96 -DA:83,96 -DA:85,96 -DA:90,96 -DA:91,96 -DA:96,96 -DA:101,96 -DA:104,96 -DA:107,96 -DA:113,96 -DA:118,96 -DA:121,96 -DA:122,4574 -DA:126,96 -DA:129,96 -DA:131,96 -DA:132,96 -DA:136,96 -DA:140,96 -DA:143,96 -DA:146,96 -DA:150,96 -DA:153,49 -DA:154,1 -DA:155,1 -DA:156,1 -DA:157,5 -DA:158,5 -DA:160,1 -DA:163,49 -DA:164,49 -DA:165,49 -DA:167,0 -DA:173,49 -DA:174,49 -DA:175,97 -DA:179,97 -DA:181,96 -DA:184,96 -DA:186,96 -DA:187,50 -DA:189,50 -DA:192,96 -DA:196,49 -DA:197,1 -DA:200,49 -DA:201,1 -DA:203,1 -DA:204,1 -DA:212,49 -DA:213,4625 -DA:214,4625 -DA:218,4625 -DA:219,2 -DA:220,4623 -DA:221,2 -DA:223,4625 -DA:224,4 -DA:225,2 -DA:226,2 -DA:228,4623 -DA:231,49 -DA:232,4626 -DA:233,4626 -DA:235,4626 -DA:236,59 -DA:237,59 -DA:240,4626 -DA:242,4626 -DA:244,4626 -DA:245,4621 -DA:246,4621 -DA:249,4624 -DA:252,49 -DA:253,13 -DA:255,13 -DA:258,49 -DA:259,13 -DA:261,13 -DA:262,13 -DA:264,13 -DA:268,49 -DA:270,3 -DA:271,3 -DA:272,2 -DA:273,2 -DA:276,49 -DA:277,4621 -DA:278,2273 -DA:280,4621 -DA:286,49 -DA:287,4621 -DA:289,4621 -DA:290,4621 -DA:292,4621 -DA:294,4621 -DA:296,4621 -DA:298,4621 -DA:299,2305 -DA:300,2305 -DA:301,2305 -DA:302,2265 -DA:304,40 -DA:306,2305 -DA:308,2316 -DA:311,4621 -DA:314,49 -DA:315,4582 -DA:316,4582 -DA:317,4582 -DA:318,4582 -DA:319,4582 -DA:320,4582 -DA:323,49 -DA:324,0 -DA:325,0 -DA:327,0 -DA:328,0 -DA:331,49 -DA:332,4574 -DA:333,4574 -DA:334,4574 -DA:335,4574 -DA:338,49 -DA:339,4574 -DA:340,4574 -DA:341,4574 -DA:343,4574 -DA:345,4574 -DA:347,4574 -DA:349,4574 -DA:350,2254 -DA:353,4574 -DA:355,2230 -DA:358,2344 -DA:363,49 -DA:364,4574 -DA:365,4574 -DA:366,4574 -DA:367,4574 -DA:373,49 -DA:374,4557 -DA:375,27 -DA:376,27 -DA:381,49 -DA:382,2263 -DA:383,2263 -DA:385,2263 -DA:387,9 -DA:388,9 -DA:389,9 -DA:390,9 -DA:392,9 -DA:393,9 -DA:394,42 -DA:395,42 -DA:396,42 -DA:399,9 -DA:403,9 -DA:404,9 -DA:405,9 -DA:406,0 -DA:407,0 -DA:409,9 -DA:413,2254 -DA:414,2257 -DA:415,2257 -DA:416,2257 -DA:417,2257 -DA:419,2257 -DA:420,2257 -DA:425,2257 -DA:426,2252 -DA:430,2254 -DA:433,2263 -DA:434,2263 -DA:435,2263 -DA:438,49 -DA:439,0 -DA:442,49 -DA:444,49 -DA:445,65 -DA:447,65 -DA:448,11 -DA:449,11 -DA:450,11 -DA:451,54 -DA:452,1 -DA:453,1 -DA:456,65 -DA:459,65 -DA:460,5 -DA:461,5 -DA:465,65 -DA:468,49 -DA:469,9209 -DA:472,49 -DA:473,125 -DA:474,57 -DA:475,57 -DA:479,49 -DA:480,4635 -DA:481,4635 -DA:482,125 -DA:483,57 -DA:484,57 -DA:485,57 -DA:487,68 -DA:490,4635 -DA:493,49 -DA:494,61 -DA:495,61 -DA:496,61 -DA:497,13 -DA:499,61 -DA:500,61 -DA:505,49 -DA:506,105 -DA:508,105 -DA:509,105 -DA:511,105 -DA:512,8 -DA:513,8 -DA:514,8 -DA:515,40 -DA:516,40 -DA:517,40 -DA:518,40 -DA:520,8 -DA:521,8 -DA:523,0 -LF:263 -LH:254 -BRDA:14,1,0,0 -BRDA:14,1,1,49 -BRDA:14,2,0,49 -BRDA:14,2,1,49 -BRDA:36,3,0,0 -BRDA:36,3,1,49 -BRDA:59,4,0,96 -BRDA:59,4,1,0 -BRDA:61,5,0,96 -BRDA:61,5,1,46 -BRDA:67,6,0,25 -BRDA:67,6,1,71 -BRDA:67,7,0,25 -BRDA:67,7,1,17 -BRDA:73,8,0,23 -BRDA:73,8,1,73 -BRDA:74,9,0,8 -BRDA:74,9,1,88 -BRDA:74,10,0,96 -BRDA:74,10,1,88 -BRDA:96,11,0,96 -BRDA:96,11,1,96 -BRDA:175,12,0,97 -BRDA:175,12,1,28 -BRDA:179,13,0,1 -BRDA:179,13,1,96 -BRDA:179,14,0,97 -BRDA:179,14,1,26 -BRDA:186,15,0,50 -BRDA:186,15,1,46 -BRDA:187,16,0,1 -BRDA:187,16,1,49 -BRDA:189,17,0,1 -BRDA:189,17,1,49 -BRDA:218,18,0,2 -BRDA:218,18,1,4623 -BRDA:220,19,0,2 -BRDA:220,19,1,4621 -BRDA:220,20,0,4623 -BRDA:220,20,1,2425 -BRDA:220,20,2,61 -BRDA:220,20,3,61 -BRDA:223,21,0,4 -BRDA:223,21,1,4621 -BRDA:235,22,0,59 -BRDA:235,22,1,4567 -BRDA:240,23,0,2198 -BRDA:240,23,1,2428 -BRDA:240,24,0,2301 -BRDA:240,24,1,127 -BRDA:242,25,0,2527 -BRDA:242,25,1,2099 -BRDA:244,26,0,1 -BRDA:244,26,1,4625 -BRDA:244,27,0,4621 -BRDA:244,27,1,2 -BRDA:261,28,0,13 -BRDA:261,28,1,0 -BRDA:264,29,0,9 -BRDA:264,29,1,4 -BRDA:264,30,0,13 -BRDA:264,30,1,13 -BRDA:264,30,2,9 -BRDA:264,30,3,9 -BRDA:264,30,4,9 -BRDA:270,31,0,2 -BRDA:270,31,1,1 -BRDA:271,32,0,1 -BRDA:271,32,1,2 -BRDA:277,33,0,2273 -BRDA:277,33,1,2348 -BRDA:277,34,0,4621 -BRDA:277,34,1,4547 -BRDA:277,34,2,4467 -BRDA:289,35,0,4471 -BRDA:289,35,1,150 -BRDA:290,36,0,74 -BRDA:290,36,1,4547 -BRDA:296,37,0,177 -BRDA:296,37,1,4444 -BRDA:298,38,0,2305 -BRDA:298,38,1,2316 -BRDA:298,39,0,4621 -BRDA:298,39,1,2358 -BRDA:301,40,0,2265 -BRDA:301,40,1,40 -BRDA:319,41,0,9 -BRDA:319,41,1,4573 -BRDA:325,42,0,0 -BRDA:325,42,1,0 -BRDA:345,43,0,0 -BRDA:345,43,1,4574 -BRDA:349,44,0,2254 -BRDA:349,44,1,2320 -BRDA:349,45,0,4574 -BRDA:349,45,1,4557 -BRDA:349,45,2,4557 -BRDA:349,45,3,4544 -BRDA:353,46,0,2230 -BRDA:353,46,1,2344 -BRDA:364,47,0,4557 -BRDA:364,47,1,17 -BRDA:374,48,0,27 -BRDA:374,48,1,4530 -BRDA:374,49,0,4557 -BRDA:374,49,1,2302 -BRDA:385,50,0,9 -BRDA:385,50,1,2254 -BRDA:385,51,0,2263 -BRDA:385,51,1,9 -BRDA:385,51,2,9 -BRDA:405,52,0,0 -BRDA:405,52,1,9 -BRDA:417,53,0,4 -BRDA:417,53,1,2253 -BRDA:425,54,0,2252 -BRDA:425,54,1,5 -BRDA:430,55,0,29 -BRDA:430,55,1,2225 -BRDA:447,56,0,11 -BRDA:447,56,1,54 -BRDA:451,57,0,1 -BRDA:451,57,1,53 -BRDA:456,58,0,10 -BRDA:456,58,1,55 -BRDA:456,59,0,65 -BRDA:456,59,1,54 -BRDA:459,60,0,5 -BRDA:459,60,1,60 -BRDA:465,61,0,61 -BRDA:465,61,1,4 -BRDA:465,62,0,65 -BRDA:465,62,1,61 -BRDA:469,63,0,9209 -BRDA:469,63,1,420 -BRDA:469,63,2,149 -BRDA:469,63,3,146 -BRDA:469,63,4,145 -BRDA:473,64,0,57 -BRDA:473,64,1,68 -BRDA:481,65,0,125 -BRDA:481,65,1,4510 -BRDA:482,66,0,57 -BRDA:482,66,1,68 -BRDA:496,67,0,13 -BRDA:496,67,1,48 -BRDA:497,68,0,1 -BRDA:497,68,1,12 -BRDA:520,69,0,8 -BRDA:520,69,1,0 -BRF:150 -BRH:141 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_duplex.js -FN:10,(anonymous_1) -FN:40,Duplex -FN:57,onend -FN:67,onEndNT -FN:71,forEach -FNF:5 -FNH:2 -FNDA:0,(anonymous_1) -FNDA:25,Duplex -FNDA:18,onend -FNDA:0,onEndNT -FNDA:0,forEach -DA:10,49 -DA:11,0 -DA:12,0 -DA:13,0 -DA:14,0 -DA:18,49 -DA:21,49 -DA:25,49 -DA:26,49 -DA:29,49 -DA:30,49 -DA:32,49 -DA:34,49 -DA:35,49 -DA:36,392 -DA:37,392 -DA:40,49 -DA:41,25 -DA:43,25 -DA:44,25 -DA:46,25 -DA:48,25 -DA:50,25 -DA:51,25 -DA:53,25 -DA:57,49 -DA:60,18 -DA:64,0 -DA:67,49 -DA:68,0 -DA:71,49 -DA:72,0 -DA:73,0 -LF:33 -LH:25 -BRDA:10,1,0,49 -BRDA:10,1,1,0 -BRDA:37,2,0,343 -BRDA:37,2,1,49 -BRDA:41,3,0,0 -BRDA:41,3,1,25 -BRDA:46,4,0,0 -BRDA:46,4,1,25 -BRDA:46,5,0,25 -BRDA:46,5,1,13 -BRDA:48,6,0,0 -BRDA:48,6,1,25 -BRDA:48,7,0,25 -BRDA:48,7,1,13 -BRDA:51,8,0,0 -BRDA:51,8,1,25 -BRDA:51,9,0,25 -BRDA:51,9,1,13 -BRDA:60,10,0,18 -BRDA:60,10,1,0 -BRDA:60,11,0,18 -BRDA:60,11,1,0 -BRF:22 -BRH:15 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_transform.js -FN:56,TransformState -FN:57,(anonymous_2) -FN:68,afterTransform -FN:90,Transform -FN:114,(anonymous_5) -FN:115,(anonymous_6) -FN:121,(anonymous_7) -FN:136,(anonymous_8) -FN:140,(anonymous_9) -FN:154,(anonymous_10) -FN:167,done -FNF:11 -FNH:10 -FNDA:24,TransformState -FNDA:116,(anonymous_2) -FNDA:116,afterTransform -FNDA:24,Transform -FNDA:19,(anonymous_5) -FNDA:2,(anonymous_6) -FNDA:127,(anonymous_7) -FNDA:0,(anonymous_8) -FNDA:117,(anonymous_9) -FNDA:310,(anonymous_10) -FNDA:19,done -DA:45,49 -DA:47,49 -DA:50,49 -DA:51,49 -DA:54,49 -DA:56,49 -DA:57,24 -DA:58,116 -DA:61,24 -DA:62,24 -DA:63,24 -DA:64,24 -DA:65,24 -DA:68,49 -DA:69,116 -DA:70,116 -DA:72,116 -DA:74,116 -DA:76,116 -DA:77,116 -DA:79,116 -DA:81,116 -DA:83,116 -DA:84,116 -DA:85,116 -DA:86,113 -DA:90,49 -DA:91,24 -DA:93,24 -DA:95,24 -DA:98,24 -DA:101,24 -DA:106,24 -DA:108,24 -DA:109,13 -DA:111,13 -DA:114,24 -DA:115,19 -DA:116,2 -DA:117,17 -DA:121,49 -DA:122,127 -DA:123,127 -DA:136,49 -DA:137,0 -DA:140,49 -DA:141,117 -DA:142,117 -DA:143,117 -DA:144,117 -DA:145,117 -DA:146,117 -DA:147,117 -DA:154,49 -DA:155,310 -DA:157,310 -DA:158,116 -DA:159,116 -DA:163,194 -DA:167,49 -DA:168,19 -DA:172,19 -DA:173,19 -DA:175,19 -DA:177,19 -DA:179,19 -LF:66 -LH:65 -BRDA:74,1,0,0 -BRDA:74,1,1,116 -BRDA:79,2,0,61 -BRDA:79,2,1,55 -BRDA:79,3,0,116 -BRDA:79,3,1,116 -BRDA:85,4,0,113 -BRDA:85,4,1,3 -BRDA:85,5,0,116 -BRDA:85,5,1,55 -BRDA:91,6,0,0 -BRDA:91,6,1,24 -BRDA:108,7,0,13 -BRDA:108,7,1,11 -BRDA:109,8,0,1 -BRDA:109,8,1,12 -BRDA:111,9,0,1 -BRDA:111,9,1,12 -BRDA:115,10,0,2 -BRDA:115,10,1,17 -BRDA:145,11,0,117 -BRDA:145,11,1,0 -BRDA:147,12,0,116 -BRDA:147,12,1,1 -BRDA:147,13,0,117 -BRDA:147,13,1,33 -BRDA:147,13,2,11 -BRDA:157,14,0,116 -BRDA:157,14,1,194 -BRDA:157,15,0,310 -BRDA:157,15,1,152 -BRDA:157,15,2,152 -BRDA:168,16,0,0 -BRDA:168,16,1,19 -BRDA:175,17,0,0 -BRDA:175,17,1,19 -BRDA:177,18,0,0 -BRDA:177,18,1,19 -BRF:38 -BRH:32 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_passthrough.js -FN:18,PassThrough -FN:24,(anonymous_2) -FNF:2 -FNH:2 -FNDA:8,PassThrough -FNDA:59,(anonymous_2) -DA:7,49 -DA:9,49 -DA:12,49 -DA:13,49 -DA:16,49 -DA:18,49 -DA:19,8 -DA:21,8 -DA:24,49 -DA:25,59 -LF:10 -LH:10 -BRDA:19,1,0,0 -BRDA:19,1,1,8 -BRF:2 -BRH:1 -end_of_record diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json index ef5ff11b1d33f2..1932ad2ac7a3f8 100644 --- a/deps/npm/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/readable-stream/package.json @@ -2,53 +2,57 @@ "_args": [ [ { - "name": "readable-stream", - "raw": "readable-stream@2.1.3", - "rawSpec": "2.1.3", + "raw": "readable-stream@latest", "scope": null, - "spec": "2.1.3", - "type": "version" + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, - "/Users/zkat/Documents/code/npm" + "/Users/rebecca/code/npm" ] ], - "_from": "readable-stream@2.1.3", - "_id": "readable-stream@2.1.3", + "_from": "readable-stream@latest", + "_id": "readable-stream@2.1.4", "_inCache": true, "_installable": true, "_location": "/readable-stream", "_nodeVersion": "5.11.0", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.1.3.tgz_1463587875388_0.811288726516068" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/readable-stream-2.1.4.tgz_1463679605032_0.6917394688352942" }, "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" }, "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "name": "readable-stream", - "raw": "readable-stream@2.1.3", - "rawSpec": "2.1.3", + "raw": "readable-stream@latest", "scope": null, - "spec": "2.1.3", - "type": "version" + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, "_requiredBy": [ + "#USER", "/", "/fs-write-stream-atomic", + "/node-gyp/npmlog/are-we-there-yet", "/npmlog/are-we-there-yet", "/sha", "/tap", "/tap/tap-parser" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.3.tgz", - "_shasum": "9db8ec4025b4c71e69aec60b453b590c8afeb0df", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz", + "_shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", "_shrinkwrap": null, - "_spec": "readable-stream@2.1.3", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "readable-stream@latest", + "_where": "/Users/rebecca/code/npm", "browser": { "util": false }, @@ -70,14 +74,15 @@ "nyc": "^6.4.0", "tap": "~0.7.1", "tape": "~4.5.1", - "zuul": "~3.9.0" + "zuul": "~3.9.0", + "zuul-ngrok": "^4.0.0" }, "directories": {}, "dist": { - "shasum": "9db8ec4025b4c71e69aec60b453b590c8afeb0df", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.3.tgz" + "shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" }, - "gitHead": "abcff84645534aaedaed4192c4ce788af9112bc2", + "gitHead": "7752832fba237929388dea6c96911a0a6379abfc", "homepage": "https://github.com/nodejs/readable-stream#readme", "keywords": [ "readable", @@ -88,20 +93,20 @@ "main": "readable.js", "maintainers": [ { - "email": "isaacs@npmjs.com", - "name": "isaacs" + "name": "isaacs", + "email": "isaacs@npmjs.com" }, { - "email": "nathan@tootallnate.net", - "name": "tootallnate" + "name": "tootallnate", + "email": "nathan@tootallnate.net" }, { - "email": "rod@vagg.org", - "name": "rvagg" + "name": "rvagg", + "email": "rod@vagg.org" }, { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" } ], "name": "readable-stream", @@ -122,7 +127,7 @@ "local": "zuul --local -- test/browser.js", "report": "nyc report --reporter=lcov", "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + "write-zuul": "printf \"ui: tape\ntunnel: ngrok\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" }, - "version": "2.1.3" + "version": "2.1.4" } diff --git a/deps/npm/node_modules/which/CHANGELOG.md b/deps/npm/node_modules/which/CHANGELOG.md index 83095804241a02..56106119e9a645 100644 --- a/deps/npm/node_modules/which/CHANGELOG.md +++ b/deps/npm/node_modules/which/CHANGELOG.md @@ -1,6 +1,10 @@ # Changes +## v1.2.10 + +* Use env.PATH only, not env.Path + ## v1.2.9 * fix for paths starting with ../ diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json index 9f1f7a9fcd30ab..27071d747a9d0d 100644 --- a/deps/npm/node_modules/which/package.json +++ b/deps/npm/node_modules/which/package.json @@ -2,56 +2,56 @@ "_args": [ [ { - "name": "which", - "raw": "which@1.2.9", - "rawSpec": "1.2.9", + "raw": "which@latest", "scope": null, - "spec": "1.2.9", - "type": "version" + "escapedName": "which", + "name": "which", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, - "/Users/zkat/Documents/code/npm" + "/Users/rebecca/code/npm" ] ], - "_from": "which@1.2.9", - "_id": "which@1.2.9", + "_from": "which@latest", + "_id": "which@1.2.10", "_inCache": true, "_installable": true, "_location": "/which", "_nodeVersion": "4.4.4", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/which-1.2.9.tgz_1463603459182_0.9633393425028771" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/which-1.2.10.tgz_1465116744337_0.4818702598568052" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "3.9.1", "_phantomChildren": {}, "_requested": { - "name": "which", - "raw": "which@1.2.9", - "rawSpec": "1.2.9", + "raw": "which@latest", "scope": null, - "spec": "1.2.9", - "type": "version" + "escapedName": "which", + "name": "which", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, "_requiredBy": [ + "#USER", "/", "/node-gyp", - "/tap/foreground-child", - "/tap/foreground-child/cross-spawn-async", - "/tap/nyc/istanbul", - "/tap/nyc/spawn-wrap" + "/tap/foreground-child/cross-spawn" ], - "_resolved": "https://registry.npmjs.org/which/-/which-1.2.9.tgz", - "_shasum": "0b3a0e5c073bc10ca7b9ec13534eeef8a71ab61f", + "_resolved": "https://registry.npmjs.org/which/-/which-1.2.10.tgz", + "_shasum": "91cd9bd0751322411b659b40f054b21de957ab2d", "_shrinkwrap": null, - "_spec": "which@1.2.9", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "which@latest", + "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me" }, "bin": { @@ -71,21 +71,21 @@ }, "directories": {}, "dist": { - "shasum": "0b3a0e5c073bc10ca7b9ec13534eeef8a71ab61f", - "tarball": "https://registry.npmjs.org/which/-/which-1.2.9.tgz" + "shasum": "91cd9bd0751322411b659b40f054b21de957ab2d", + "tarball": "https://registry.npmjs.org/which/-/which-1.2.10.tgz" }, "files": [ "which.js", "bin/which" ], - "gitHead": "34aac93a4c4ee9e3c7a49fe09778ca942e636cce", + "gitHead": "3f590834623ee940d922e12b1c8b9cbf24bd5012", "homepage": "https://github.com/isaacs/node-which#readme", "license": "ISC", "main": "which.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "which", @@ -100,5 +100,5 @@ "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", "test": "tap test/*.js --cov" }, - "version": "1.2.9" + "version": "1.2.10" } diff --git a/deps/npm/node_modules/which/which.js b/deps/npm/node_modules/which/which.js index b61da894ffc1fd..5a9b15ca60403f 100644 --- a/deps/npm/node_modules/which/which.js +++ b/deps/npm/node_modules/which/which.js @@ -19,7 +19,7 @@ function getNotFoundError (cmd) { function getPathInfo (cmd, opt) { var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.Path || process.env.PATH || '' + var pathEnv = opt.path || process.env.PATH || '' var pathExt = [''] pathEnv = pathEnv.split(colon) diff --git a/deps/npm/node_modules/wrappy/package.json b/deps/npm/node_modules/wrappy/package.json index a617a72bb24187..10c34634a16b4d 100644 --- a/deps/npm/node_modules/wrappy/package.json +++ b/deps/npm/node_modules/wrappy/package.json @@ -1,36 +1,101 @@ { - "name": "wrappy", - "version": "1.0.1", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "directories": { - "test": "test" + "_args": [ + [ + { + "raw": "wrappy@latest", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" + }, + "/Users/rebecca/code/npm" + ] + ], + "_from": "wrappy@latest", + "_id": "wrappy@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/wrappy", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" }, - "dependencies": {}, - "devDependencies": { - "tap": "^0.4.12" + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "wrappy@latest", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, + "_requiredBy": [ + "#USER", + "/", + "/dezalgo", + "/inflight", + "/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "_shrinkwrap": null, + "_spec": "wrappy@latest", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "license": "ISC", "bugs": { "url": "https://github.com/npm/wrappy/issues" }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "files": [ + "wrappy.js" + ], + "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", "homepage": "https://github.com/npm/wrappy", - "readme": "# wrappy\n\nCallback wrapping utility\n\n## USAGE\n\n```javascript\nvar wrappy = require(\"wrappy\")\n\n// var wrapper = wrappy(wrapperFunction)\n\n// make sure a cb is called only once\n// See also: http://npm.im/once for this specific use case\nvar once = wrappy(function (cb) {\n var called = false\n return function () {\n if (called) return\n called = true\n return cb.apply(this, arguments)\n }\n})\n\nfunction printBoo () {\n console.log('boo')\n}\n// has some rando property\nprintBoo.iAmBooPrinter = true\n\nvar onlyPrintOnce = once(printBoo)\n\nonlyPrintOnce() // prints 'boo'\nonlyPrintOnce() // does nothing\n\n// random property is retained!\nassert.equal(onlyPrintOnce.iAmBooPrinter, true)\n```\n", - "readmeFilename": "README.md", - "_id": "wrappy@1.0.1", - "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "_from": "wrappy@>=1.0.1 <1.1.0" + "license": "ISC", + "main": "wrappy.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "wrappy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" } diff --git a/deps/npm/node_modules/wrappy/test/basic.js b/deps/npm/node_modules/wrappy/test/basic.js deleted file mode 100644 index 5ed0fcdfd9c52e..00000000000000 --- a/deps/npm/node_modules/wrappy/test/basic.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tap').test -var wrappy = require('../wrappy.js') - -test('basic', function (t) { - function onceifier (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } - } - onceifier.iAmOnce = {} - var once = wrappy(onceifier) - t.equal(once.iAmOnce, onceifier.iAmOnce) - - var called = 0 - function boo () { - t.equal(called, 0) - called++ - } - // has some rando property - boo.iAmBoo = true - - var onlyPrintOnce = once(boo) - - onlyPrintOnce() // prints 'boo' - onlyPrintOnce() // does nothing - t.equal(called, 1) - - // random property is retained! - t.equal(onlyPrintOnce.iAmBoo, true) - - var logs = [] - var logwrap = wrappy(function (msg, cb) { - logs.push(msg + ' wrapping cb') - return function () { - logs.push(msg + ' before cb') - var ret = cb.apply(this, arguments) - logs.push(msg + ' after cb') - } - }) - - var c = logwrap('foo', function () { - t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) - }) - c() - t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) - - t.end() -}) diff --git a/deps/npm/package.json b/deps/npm/package.json index 2001ea150cdc70..65759d5d33b449 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "3.9.5", + "version": "3.10.2", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -30,11 +30,12 @@ "main": "./lib/npm.js", "bin": "./bin/npm-cli.js", "dependencies": { - "abbrev": "~1.0.7", + "abbrev": "~1.0.9", "ansicolors": "~0.3.2", "ansistyles": "~0.1.3", "aproba": "~1.0.3", "archy": "~1.0.0", + "asap": "~2.0.4", "chownr": "~1.0.1", "cmd-shim": "~2.0.2", "columnify": "~1.5.4", @@ -43,9 +44,9 @@ "editor": "~1.0.0", "fs-vacuum": "~1.2.9", "fs-write-stream-atomic": "~1.0.8", - "fstream": "~1.0.8", + "fstream": "~1.0.10", "fstream-npm": "~1.1.0", - "glob": "~7.0.3", + "glob": "~7.0.4", "graceful-fs": "~4.1.4", "has-unicode": "~2.0.0", "hosted-git-info": "~2.1.5", @@ -57,8 +58,6 @@ "lockfile": "~1.0.1", "lodash._baseuniq": "~4.6.0", "lodash.clonedeep": "~4.3.2", - "lodash.isarray": "~4.0.0", - "lodash.keys": "~4.0.7", "lodash.union": "~4.4.0", "lodash.uniq": "~4.3.0", "lodash.without": "~4.2.0", @@ -69,10 +68,10 @@ "normalize-package-data": "~2.3.5", "npm-cache-filename": "~1.0.2", "npm-install-checks": "~3.0.0", - "npm-package-arg": "~4.1.1", - "npm-registry-client": "~7.1.0", - "npm-user-validate": "~0.1.2", - "npmlog": "~2.0.3", + "npm-package-arg": "~4.2.0", + "npm-registry-client": "~7.1.2", + "npm-user-validate": "~0.1.4", + "npmlog": "~3.1.2", "once": "~1.3.3", "opener": "~1.4.1", "osenv": "~0.1.3", @@ -82,7 +81,7 @@ "read-installed": "~4.0.3", "read-package-json": "~2.0.4", "read-package-tree": "~5.1.4", - "readable-stream": "~2.1.3", + "readable-stream": "~2.1.4", "realize-package-specifier": "~3.0.3", "request": "~2.72.0", "retry": "~0.9.0", @@ -99,8 +98,8 @@ "unique-filename": "~1.1.0", "unpipe": "~1.0.0", "validate-npm-package-name": "~2.2.2", - "which": "~1.2.9", - "wrappy": "~1.0.1", + "which": "~1.2.10", + "wrappy": "~1.0.2", "write-file-atomic": "~1.1.4" }, "bundleDependencies": [ @@ -110,6 +109,7 @@ "ansistyles", "aproba", "archy", + "asap", "chownr", "cmd-shim", "columnify", @@ -139,8 +139,6 @@ "lodash._createcache", "lodash._getnative", "lodash.clonedeep", - "lodash.isarray", - "lodash.keys", "lodash.restparam", "lodash.union", "lodash.uniq", @@ -194,11 +192,11 @@ "marked-man": "~0.1.5", "npm-registry-couchapp": "~2.6.12", "npm-registry-mock": "~1.0.1", - "require-inject": "~1.3.1", + "require-inject": "~1.4.0", "sprintf-js": "~1.0.3", "standard": "~6.0.8", "tacks": "~1.2.1", - "tap": "~5.7.1" + "tap": "~5.7.2" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", diff --git a/deps/npm/test/tap/bundled-transitive-deps.js b/deps/npm/test/tap/bundled-transitive-deps.js new file mode 100644 index 00000000000000..4aefe5b9cce82d --- /dev/null +++ b/deps/npm/test/tap/bundled-transitive-deps.js @@ -0,0 +1,83 @@ +'use strict' +var fs = require('fs') +var path = require('path') +var test = require('tap').test +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir +var common = require('../common-tap.js') +var npm = require('../../lib/npm.js') +var tar = require('../../lib/utils/tar.js') + +var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var packed = path.join(testdir, 'packed') + +var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'bundled-transitive-deps', + version: '1.0.0', + dependencies: { + 'a': '1.0.0' + }, + bundleDependencies: [ + 'a' + ] + }), + node_modules: Dir({ + 'a': Dir({ + 'package.json': File({ + name: 'a', + version: '1.0.0', + dependencies: { + 'b': '1.0.0' + } + }) + }), + 'b': Dir({ + 'package.json': File({ + name: 'b', + version: '1.0.0' + }) + }) + }) + }) +) + +function setup () { + cleanup() + fixture.create(testdir) +} + +function cleanup () { + fixture.remove(testdir) +} + +test('setup', function (t) { + setup() + npm.load({}, t.end) +}) + +test('bundled-transitive-deps', function (t) { + common.npm(['pack'], {cwd: testdir}, thenCheckPack) + function thenCheckPack (err, code, stdout, stderr) { + if (err) throw err + var tarball = stdout.trim() + t.comment(stderr.trim()) + t.is(code, 0, 'pack successful') + tar.unpack(path.join(testdir, tarball), packed, thenCheckContents) + } + function thenCheckContents (err) { + t.ifError(err, 'unpack successful') + var transitivePackedDep = path.join(packed, 'node_modules', 'b') + t.doesNotThrow(transitivePackedDep + ' exists', function () { + fs.statSync(transitivePackedDep) + }) + t.end() + } +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) diff --git a/deps/npm/test/tap/check-install-self.js b/deps/npm/test/tap/check-install-self.js index 821d8eb4d4994c..2cde1606a91e05 100644 --- a/deps/npm/test/tap/check-install-self.js +++ b/deps/npm/test/tap/check-install-self.js @@ -22,19 +22,22 @@ test('setup', function (t) { t.end() }) -var INSTALL_OPTS = ['--loglevel', 'silent'] var EXEC_OPTS = {cwd: installIn} test('install self', function (t) { - common.npm(['install', installFrom].concat(INSTALL_OPTS), EXEC_OPTS, function (err, code) { - t.ifError(err, 'npm ran without issue') + common.npm(['install', installFrom], EXEC_OPTS, function (err, code, stdout, stderr) { + if (err) throw err + t.comment(stdout.trim()) + t.comment(stderr.trim()) t.is(code, 1, 'npm install refused to install a package in itself') t.end() }) }) test('force install self', function (t) { - common.npm(['install', '--force', installFrom].concat(INSTALL_OPTS), EXEC_OPTS, function (err, code) { - t.ifError(err, 'npm ran without issue') + common.npm(['install', '--force', installFrom], EXEC_OPTS, function (err, code, stdout, stderr) { + if (err) throw err + t.comment(stdout.trim()) + t.comment(stderr.trim()) t.is(code, 0, 'npm install happily installed a package in itself with --force') t.end() }) diff --git a/deps/npm/test/tap/ignore-scripts.js b/deps/npm/test/tap/ignore-scripts.js index 8c0d350198a29a..785921d7eb2d67 100644 --- a/deps/npm/test/tap/ignore-scripts.js +++ b/deps/npm/test/tap/ignore-scripts.js @@ -40,7 +40,10 @@ var json = { postrestart: 'exit 123', preversion: 'exit 123', version: 'exit 123', - postversion: 'exit 123' + postversion: 'exit 123', + preshrinkwrap: 'exit 123', + shrinkwrap: 'exit 123', + postshrinkwrap: 'exit 123' } } @@ -73,7 +76,8 @@ var scripts = [ 'prestop', 'stop', 'poststop', 'prestart', 'start', 'poststart', 'prerestart', 'restart', 'postrestart', - 'preversion', 'version', 'postversion' + 'preversion', 'version', 'postversion', + 'preshrinkwrap', 'shrinkwrap', 'postshrinkwrap' ] scripts.forEach(function (script) { diff --git a/deps/npm/test/tap/install-actions.js b/deps/npm/test/tap/install-actions.js index c71b0044e1d603..ad75cacb5edd3d 100644 --- a/deps/npm/test/tap/install-actions.js +++ b/deps/npm/test/tap/install-actions.js @@ -20,7 +20,7 @@ test('setup', function (t) { test('->optdep:a->dep:b', function (t) { var moduleA = { name: 'a', - path: '/', + path: '/a', package: { scripts: { postinstall: 'false' @@ -28,11 +28,12 @@ test('->optdep:a->dep:b', function (t) { dependencies: { b: '*' } - } + }, + isTop: true } var moduleB = { name: 'b', - path: '/', + path: '/b', package: {}, requires: [], requiredBy: [moduleA] @@ -47,13 +48,16 @@ test('->optdep:a->dep:b', function (t) { } }, children: [moduleA, moduleB], - requires: [moduleA] + requires: [moduleA], + isTop: true } moduleA.requiredBy = [tree] + moduleA.parent = tree + moduleB.parent = tree t.plan(3) actions.postinstall('/', '/', moduleA, mockLog, function (er) { - t.ok(er && er.code === 'ELIFECYCLE', 'Lifecycle failed') + t.is(er && er.code, 'ELIFECYCLE', 'Lifecycle failed') t.ok(moduleA.failed, 'moduleA (optional dep) is marked failed') t.ok(moduleB.failed, 'moduleB (direct dep of moduleA) is marked as failed') t.end() @@ -71,14 +75,16 @@ test('->dep:b,->optdep:a->dep:b', function (t) { dependencies: { b: '*' } - } + }, + isTop: false } var moduleB = { name: 'b', path: '/', package: {}, requires: [], - requiredBy: [moduleA] + requiredBy: [moduleA], + isTop: false } moduleA.requires = [moduleB] @@ -93,10 +99,13 @@ test('->dep:b,->optdep:a->dep:b', function (t) { } }, children: [moduleA, moduleB], - requires: [moduleA, moduleB] + requires: [moduleA, moduleB], + isTop: true } moduleA.requiredBy = [tree] moduleB.requiredBy.push(tree) + moduleA.parent = tree + moduleB.parent = tree t.plan(3) actions.postinstall('/', '/', moduleA, mockLog, function (er) { diff --git a/deps/npm/test/tap/install-order.js b/deps/npm/test/tap/install-order.js index c1c4e9dca61f9f..80b3f6f45ebf77 100644 --- a/deps/npm/test/tap/install-order.js +++ b/deps/npm/test/tap/install-order.js @@ -1,15 +1,42 @@ 'use strict' var test = require('tap').test var sortActions = require('../../lib/install/diff-trees.js').sortActions - +var top = { + location: '/', + package: {}, + requiredBy: [], + requires: [a, b], + isTop: true +} var a = { - package: {_location: '/a', _requiredBy: []} + location: '/a', + package: {}, + requiredBy: [], + requires: [c], + isTop: false, + userRequired: false, + existing: false, + parent: top } var b = { - package: {_location: '/b', _requiredBy: []} + location: '/b', + package: {}, + requiredBy: [], + requires: [c], + isTop: false, + userRequired: false, + existing: false, + parent: top } var c = { - package: {_location: '/c', _requiredBy: ['/a', '/b']} + location: '/c', + package: {}, + requiredBy: [a, b], + requires: [], + isTop: false, + userRequired: false, + existing: false, + parent: top } test('install-order when installing deps', function (t) { diff --git a/deps/npm/test/tap/outdated-bad-read-tree.js b/deps/npm/test/tap/outdated-bad-read-tree.js new file mode 100644 index 00000000000000..eb4bac36ef0836 --- /dev/null +++ b/deps/npm/test/tap/outdated-bad-read-tree.js @@ -0,0 +1,21 @@ +'use strict' +var test = require('tap').test +var requireInject = require('require-inject') +var npm = require('../../lib/npm.js') + +test('setup', function (t) { + npm.load({progress: false}, t.end) +}) + +test('outdated', function (t) { + var rptError = new Error('read-package-tree') + var outdated = requireInject('../../lib/outdated.js', { + 'read-package-tree': function (dir, cb) { + cb(rptError) + } + }) + outdated([], function (err) { + t.is(err, rptError) + t.end() + }) +}) diff --git a/deps/npm/test/tap/progress-config.js b/deps/npm/test/tap/progress-config.js index 634c9e8596c17f..94d9b15f1b3896 100644 --- a/deps/npm/test/tap/progress-config.js +++ b/deps/npm/test/tap/progress-config.js @@ -13,19 +13,22 @@ var requireInject = require('require-inject') // Make sure existing environment vars don't muck up the test process.env = {} - -function hasOnlyAscii (s) { - return /^[\000-\177]*$/.test(s) -} +// Pretend that stderr is a tty regardless, so we can get consistent +// results. +process.stderr.isTTY = true test('setup', function (t) { fs.writeFileSync(configName, '') t.done() }) +function getFreshNpm () { + return requireInject.withEmptyCache('../../lib/npm.js', {npmlog: log}) +} + test('disabled', function (t) { t.plan(1) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, progress: false}, function () { t.is(log.progressEnabled, false, 'should be disabled') }) @@ -33,7 +36,7 @@ test('disabled', function (t) { test('enabled', function (t) { t.plan(1) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, progress: true}, function () { t.is(log.progressEnabled, true, 'should be enabled') }) @@ -41,7 +44,7 @@ test('enabled', function (t) { test('default', function (t) { t.plan(1) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName}, function () { t.is(log.progressEnabled, true, 'should be enabled') }) @@ -49,41 +52,37 @@ test('default', function (t) { test('default-travis', function (t) { t.plan(1) - global.process.env.TRAVIS = 'true' - var npm = requireInject('../../lib/npm.js', {}) + process.env.TRAVIS = 'true' + var npm = getFreshNpm() npm.load({userconfig: configName}, function () { t.is(log.progressEnabled, false, 'should be disabled') - delete global.process.env.TRAVIS + delete process.env.TRAVIS }) }) test('default-ci', function (t) { t.plan(1) - global.process.env.CI = 'true' - var npm = requireInject('../../lib/npm.js', {}) + process.env.CI = 'true' + var npm = getFreshNpm() npm.load({userconfig: configName}, function () { t.is(log.progressEnabled, false, 'should be disabled') - delete global.process.env.CI + delete process.env.CI }) }) test('unicode-true', function (t) { - t.plan(6) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, unicode: true}, function () { - Object.keys(log.gauge.theme).forEach(function (key) { - t.notOk(hasOnlyAscii(log.gauge.theme[key]), 'only unicode') - }) + t.is(log.gauge._theme.hasUnicode, true, 'unicode will be selected') + t.done() }) }) test('unicode-false', function (t) { - t.plan(6) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, unicode: false}, function () { - Object.keys(log.gauge.theme).forEach(function (key) { - t.ok(hasOnlyAscii(log.gauge.theme[key]), 'only ASCII') - }) + t.is(log.gauge._theme.hasUnicode, false, 'unicode will NOT be selected') + t.done() }) }) diff --git a/deps/npm/test/tap/shared-linked.js b/deps/npm/test/tap/shared-linked.js new file mode 100644 index 00000000000000..63c2538da1f7a4 --- /dev/null +++ b/deps/npm/test/tap/shared-linked.js @@ -0,0 +1,152 @@ +'use strict' +var path = require('path') +var test = require('tap').test +var Tacks = require('tacks') +var File = Tacks.File +var Symlink = Tacks.Symlink +var Dir = Tacks.Dir +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var extend = Object.assign || require('util')._extend + +var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var bugdir = path.join(testdir, 'modules', 'bug') + +// This is an absolutely minimal version of the optimist included with +// npm-registry-mock. +var optimist = Dir({ + 'package.json': File({ + dependencies: { + minimist: '~0.0.1', + wordwrap: '~0.0.2' + }, + name: 'optimist', + version: '0.6.0' + }), + node_modules: Dir({ + minimist: Dir({ + 'package.json': File({ + _shasum: 'd7aa327bcecf518f9106ac6b8f003fa3bcea8566', + name: 'minimist', + version: '0.0.5' + }) + }), + wordwrap: Dir({ + 'package.json': File({ + _shasum: 'b79669bb42ecb409f83d583cad52ca17eaa1643f', + name: 'wordwrap', + version: '0.0.2' + }) + }) + }) +}) + +var fixture = new Tacks( + Dir({ + cache: Dir({}), + global: Dir({ + lib: Dir({ + node_modules: Dir({ + linked1: Symlink('../../../modules/linked1/'), + linked2: Symlink('../../../modules/linked2/') + }) + }) + }), + modules: Dir({ + bug: Dir({ + node_modules: Dir({ + linked1: Symlink('../../../global/lib/node_modules/linked1'), + linked2: Symlink('../../../global/lib/node_modules/linked2') + }), + 'package.json': File({ + name: 'bug', + version: '10800.0.0', + devDependencies: { + optimist: '0.6.0', + linked1: '^1.0.0', + linked2: '^1.0.0' + } + }) + }), + linked1: Dir({ + 'package.json': File({ + name: 'linked1', + version: '1.0.0', + devDependencies: { + optimist: '0.6.0' + } + }), + node_modules: Dir({ + optimist: optimist + }) + }), + linked2: Dir({ + 'package.json': File({ + name: 'linked2', + version: '1.0.0', + devDependencies: { + optimist: '0.6.0', + linked1: '^1.0.0' + } + }), + node_modules: Dir({ + linked1: Symlink('../../../global/lib/node_modules/linked1'), + optimist: optimist + }) + }) + }) + }) +) + +function setup () { + cleanup() + fixture.create(testdir) +} + +function cleanup () { + fixture.remove(testdir) +} + +var server +test('setup', function (t) { + setup() + mr({port: common.port}, function (er, s) { + t.ifError(er) + server = s + t.end() + }) +}) + +test('shared-linked', function (t) { + var options = { + cwd: bugdir, + env: extend(extend({}, process.env), { + npm_config_prefix: path.join(testdir, 'global') + }) + } + var config = [ + '--cache', path.join(testdir, 'cache'), + '--registry', common.registry, + '--unicode', 'false' + ] + + common.npm(config.concat(['install', '--dry-run']), options, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0) + var got = stdout.trim().replace(/\s+\n/g, '\n') + var expected = + 'bug@10800.0.0 ' + bugdir + '\n' + + '`-- optimist@0.6.0\n' + + ' +-- minimist@0.0.5\n' + + ' `-- wordwrap@0.0.2' + t.is(got, expected, 'just an optimist install please') + server.done() + t.end() + }) +}) + +test('cleanup', function (t) { + if (server) server.close() + cleanup() + t.end() +}) diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle.js b/deps/npm/test/tap/shrinkwrap-lifecycle.js new file mode 100644 index 00000000000000..0e84259667c488 --- /dev/null +++ b/deps/npm/test/tap/shrinkwrap-lifecycle.js @@ -0,0 +1,55 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var pkg = path.resolve(__dirname, 'shrinkwrap-lifecycle') + +test('npm shrinkwrap execution order', function (t) { + setup() + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ + author: 'Simen Bekkhus', + name: 'shrinkwrap-lifecycle', + shrinkwrap: '0.0.0', + description: 'Test for npm shrinkwrap execution order', + scripts: { + preshrinkwrap: 'echo this happens first', + shrinkwrap: 'echo this happens second', + postshrinkwrap: 'echo this happens third' + } + }), 'utf8') + common.npm(['shrinkwrap'], [], function (err, code, stdout) { + if (err) throw err + + var indexOfFirst = stdout.indexOf('echo this happens first') + var indexOfSecond = stdout.indexOf('echo this happens second') + var indexOfThird = stdout.indexOf('wrote npm-shrinkwrap.json') + var indexOfFourth = stdout.indexOf('echo this happens third') + + t.ok(indexOfFirst >= 0) + t.ok(indexOfSecond >= 0) + t.ok(indexOfThird >= 0) + t.ok(indexOfFourth >= 0) + + t.ok(indexOfFirst < indexOfSecond) + t.ok(indexOfSecond < indexOfThird) + t.ok(indexOfThird < indexOfFourth) + + t.end() + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + t.end() +}) + +function setup () { + mkdirp.sync(pkg) + process.chdir(pkg) +} diff --git a/deps/npm/test/tap/unit-deps-childDependencySpecifier.js b/deps/npm/test/tap/unit-deps-childDependencySpecifier.js new file mode 100644 index 00000000000000..600b719fb2bade --- /dev/null +++ b/deps/npm/test/tap/unit-deps-childDependencySpecifier.js @@ -0,0 +1,56 @@ +'use strict' +var test = require('tap').test +var requireInject = require('require-inject') +var asap = require('asap') + +// we're just mocking to avoid having to call `npm.load` +var deps = requireInject('../../lib/install/deps.js', { + '../../lib/npm.js': { + config: { + get: function () { return 'mock' } + } + } +}) + +var childDependencySpecifier = deps._childDependencySpecifier + +test('childDependencySpecifier', function (t) { + var tree = { + resolved: {}, + package: { + name: 'bar', + _requested: '' + } + } + + childDependencySpecifier(tree, 'foo', '^1.0.0', function () { + t.deepEqual(tree.resolved, { + foo: { + '^1.0.0': { + raw: 'foo@^1.0.0', + escapedName: 'foo', + scope: null, + name: 'foo', + rawSpec: '^1.0.0', + spec: '>=1.0.0 <2.0.0', + type: 'range' + } + } + }, 'should populate resolved') + + var order = [] + + childDependencySpecifier(tree, 'foo', '^1.0.0', function () { + order.push(1) + childDependencySpecifier(tree, 'foo', '^1.0.0', function () { + order.push(3) + t.deepEqual(order, [1, 2, 3], 'should yield nested callbacks') + t.end() + }) + }) + + asap(function () { + order.push(2) + }) + }) +}) diff --git a/deps/npm/test/tap/unit-deps-removeObsoleteDep.js b/deps/npm/test/tap/unit-deps-removeObsoleteDep.js index 2e34fd730f2b6f..8bba0d0da1bac6 100644 --- a/deps/npm/test/tap/unit-deps-removeObsoleteDep.js +++ b/deps/npm/test/tap/unit-deps-removeObsoleteDep.js @@ -11,7 +11,7 @@ var deps = requireInject('../../lib/install/deps.js', { } }) -var removeObsoleteDep = deps._removeObsoleteDep +var removeObsoleteDep = deps.removeObsoleteDep test('removeObsoleteDep', function (t) { var child1 = {requiredBy: []} diff --git a/deps/npm/test/tap/unit-deps-replaceModule.js b/deps/npm/test/tap/unit-deps-replaceModule.js index d38aa9985d7fed..d5f0fdbf89f268 100644 --- a/deps/npm/test/tap/unit-deps-replaceModule.js +++ b/deps/npm/test/tap/unit-deps-replaceModule.js @@ -6,45 +6,60 @@ test('setup', function (t) { npm.load({}, t.done) }) -test('replaceModule', function (t) { - var replaceModule = require('../../lib/install/deps')._replaceModule +test('replaceModuleByName', function (t) { + var replaceModuleByName = require('../../lib/install/deps')._replaceModuleByName var mods = [] for (var ii = 0; ii < 10; ++ii) { - mods.push({package: {name: ii}}) + mods.push({package: {name: ii}, path: '/path/to/' + ii}) } var test = {} test.A = mods.slice(0, 4) - replaceModule(test, 'A', mods[2]) + replaceModuleByName(test, 'A', mods[2]) t.isDeeply(test.A, mods.slice(0, 4), 'replacing an existing module leaves the order alone') - replaceModule(test, 'A', mods[7]) + replaceModuleByName(test, 'A', mods[7]) t.isDeeply(test.A, mods.slice(0, 4).concat(mods[7]), 'replacing a new module appends') test.B = mods.slice(0, 4) var replacement = {package: {name: 1}, isReplacement: true} - replaceModule(test, 'B', replacement) + replaceModuleByName(test, 'B', replacement) t.isDeeply(test.B, [mods[0], replacement, mods[2], mods[3]], 'replacing existing module swaps out for the new version') - replaceModule(test, 'C', mods[7]) + replaceModuleByName(test, 'C', mods[7]) t.isDeeply(test.C, [mods[7]], 'replacing when the key does not exist yet, causes its creation') + + test.D = mods.slice(0, 4) + var duplicateByPath = {package: {name: 'dup'}, path: test.D[0].path} + replaceModuleByName(test, 'D', duplicateByPath) + t.isDeeply(test.D, mods.slice(0, 4).concat(duplicateByPath), 'replacing with a duplicate path but diff names appends') t.end() }) -test('replaceModuleName', function (t) { - var replaceModuleName = require('../../lib/install/deps')._replaceModuleName +test('replaceModuleByPath', function (t) { + var replaceModuleByPath = require('../../lib/install/deps')._replaceModuleByPath var mods = [] for (var ii = 0; ii < 10; ++ii) { - mods.push('pkg' + ii) + mods.push({package: {name: ii}, path: '/path/to/' + ii}) } var test = {} test.A = mods.slice(0, 4) - replaceModuleName(test, 'A', mods[2]) + replaceModuleByPath(test, 'A', mods[2]) t.isDeeply(test.A, mods.slice(0, 4), 'replacing an existing module leaves the order alone') - replaceModuleName(test, 'A', mods[7]) + replaceModuleByPath(test, 'A', mods[7]) t.isDeeply(test.A, mods.slice(0, 4).concat(mods[7]), 'replacing a new module appends') - replaceModuleName(test, 'C', mods[7]) + test.B = mods.slice(0, 4) + var replacement = {package: {name: 1}, isReplacement: true, path: '/path/to/1'} + replaceModuleByPath(test, 'B', replacement) + t.isDeeply(test.B, [mods[0], replacement, mods[2], mods[3]], 'replacing existing module swaps out for the new version') + + replaceModuleByPath(test, 'C', mods[7]) t.isDeeply(test.C, [mods[7]], 'replacing when the key does not exist yet, causes its creation') + + test.D = mods.slice(0, 4) + var duplicateByPath = {package: {name: 'dup'}, path: test.D[0].path} + replaceModuleByPath(test, 'D', duplicateByPath) + t.isDeeply(test.D, [duplicateByPath].concat(mods.slice(1, 4)), 'replacing with a duplicate path but diff names replaces') t.end() })