diff --git a/deps/npm/.eslintrc b/deps/npm/.eslintrc deleted file mode 100644 index 3c262a61a14db0..00000000000000 --- a/deps/npm/.eslintrc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "env" : { - "node" : true - }, - "rules" : { - "semi": [2, "never"], - "strict": 0, - "quotes": [1, "double", "avoid-escape"], - "no-use-before-define": 0, - "curly": 0, - "no-underscore-dangle": 0, - "no-lonely-if": 1, - "no-shadow": 0, - "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], - "no-mixed-requires": 0, - "space-infix-ops": 0, - "key-spacing": 0, - "no-multi-spaces": 0 - } -} diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 7ba0c9e8f9978b..a56ba0922ef852 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -274,3 +274,8 @@ erik wienhold James Butler Kevin Kragenbrink Arnaud Rinquin +Mike MacCana +Antti Mattila +laiso +Matt Zorn +Kyle Mitchell diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 1c9cc5f4663b77..56536255252b04 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,161 @@ +### v2.10.1 (2015-05-14): + +#### BUG FIXES & DOCUMENTATION TWEAKS + +* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) + When getting back a 404 from a request to a private registry that uses a + registry path that extends past the root + (`http://registry.enterprise.co/path/to/registry`), display the name of the + nonexistent package, rather than the first element in the registry API path. + Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) +* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) + Make clearer that `--registry` can be used on a per-publish basis to push a + package to a non-default registry. ([@mischkl](https://github.com/mischkl)) +* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) + Did you know that GitHub shortcuts can have commit-ishes included + (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) +* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) + Some errors from `readPackage` were being swallowed, potentially leading to + invalid package trees on disk. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! + +* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) + `lru-cache@2.6.3`: Removed some cruft from the published package. + ([@isaacs](https://github.com/isaacs)) +* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) + `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, + added (Travis) support for Node 0.12 and io.js. + ([@isaacs](https://github.com/isaacs)) +* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) + `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) +* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) + `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) + (done by [@othiym23](https://github.com/othiym23), and then debugged and + fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. + ([@othiym23](https://github.com/othiym23) / + [@iarna](https://github.com/iarna)) +* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) + `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on + `process.env`. ([@isaacs](https://github.com/isaacs)) + +### v2.10.0 (2015-05-8): + +#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR + +If you've done much development in The Enterprise®™, you know that keeping +track of software licenses is far more important than one might expect / hope / +fear. Tracking licenses is a hassle, and while many (if not most) of us have +(reluctantly) gotten around to setting a license to use by default with all our +new projects (even if it's just WTFPL), that's about as far as most of us think +about it. In big enterprise shops, ensuring that projects don't inadvertently +use software with unacceptably encumbered licenses is serious business, and +developers spend a surprising (and appalling) amount of time ensuring that +licensing is covered by writing automated checkers and other license auditing +tools. + +The Linux Foundation has been working on a machine-parseable syntax for license +expressions in the form of [SPDX](https://spdx.org/), an appropriately +enterprisey acronym. IP attorney and JavaScript culture hero [Kyle +Mitchell](http://kemitchell.com/) has put a considerable amount of effort into +bringing SPDX to JavaScript and Node. He's written +[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX +expression parser, and has integrated it into npm in a few different ways. + +For you as a user of npm, this means: + +* npm now has proper support for dual licensing in `package.json`, due to + SPDX's compound expression syntax. Run `npm help package.json` for details. +* npm will warn you if the `package.json` for your project is either missing a + `"license"` field, or if the value of that field isn't a valid SPDX + expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you + really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the + [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) + is its own package). +* `npm init` now demands that you use a valid SPDX expression when using it + interactively (pro tip: I mostly use `npm init -y`, having previously run + `npm config set init.license=MIT` / `npm config set init.author.email=foo` / + `npm config set init.author.name=me`). +* The documentation for `package.json` has been updated to tell you how to use + the `"license"` field properly with SPDX. + +In general, this shouldn't be a big deal for anybody other than people trying +to run their own automated license validators, but in the long run, if +everybody switches to this format, many people's lives will be made much +simpler. I think this is an important improvement for npm and am very thankful +to Kyle for taking the lead on this. Also, even if you think all of this is +completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) +anyway. Future you will thank past you someday, unless you are +[djb](http://cr.yp.to/), in which case you are djb, and more power to you. + +* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) + [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in + `license` stanzas in `package.json`, including how to migrate from old busted + license declaration arrays to fancy new compound-license clauses. + ([@kemitchell](https://github.com/kemitchell)) +* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) + [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` + Ensure that packages bootstrapped with `npm init` use an SPDX-compliant + license expression. ([@kemitchell](https://github.com/kemitchell)) +* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) + [#8197](https://github.com/npm/npm/issues/8197) + `normalize-package-data@2.1.0`: Warn when a package is missing a license + declaration, or using a license expression that isn't valid SPDX. + ([@kemitchell](https://github.com/kemitchell)) +* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) + [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) + [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) + [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) + +As a corollary to the previous changes, I've put some work into making `npm +install` spew out fewer pointless warnings about missing values in transitive +dependencies. From now on, npm will only warn you about missing READMEs, +license fields, and the like for top-level projects (including packages you +directly install into your application, but we may relax that eventually). + +Practically _nobody_ liked having those warnings displayed for child +dependencies, for the simple reason that there was very little that anybody +could _do_ about those warnings, unless they happened to be the maintainers of +those dependencies themselves. Since many, many projects don't have +SPDX-compliant licenses, the number of warnings reached a level where they ran +the risk of turning into a block of visual noise that developers (read: me, and +probably you) would ignore forever. + +So I fixed it. If you still want to see the messages about child dependencies, +they're still there, but have been pushed down a logging level to `info`. You +can display them by running `npm install -d` or `npm install --loglevel=info`. + +* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) + Only warn on normalization errors for top-level dependencies. Transitive + dependency validation warnings are logged at `info` level. + ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES + +* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) + `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work + properly with the new major version of `node-tap`. Look at all the colors! + ([@isaacs](https://github.com/isaacs)) +* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) + `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) +* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) + [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly + recognizing dependencies installed from GitHub repositories as git + dependencies, and so wasn't displaying them as such. + ([@zornme](https://github.com/zornme)) +* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) + In some cases, `npm help` was using something that looked like a regular + expression where a glob pattern should be used, and vice versa. + ([@isaacs](https://github.com/isaacs)) + ### v2.9.1 (2015-04-30): #### WOW! MORE GIT FIXES! YOU LOVE THOSE! diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md index 6c732c4f67fd6f..b2f4e077b40070 100644 --- a/deps/npm/doc/cli/npm-install.md +++ b/deps/npm/doc/cli/npm-install.md @@ -155,71 +155,70 @@ after packing it up into a tarball (b). npm install sax@">=0.1.0 <0.2.0" npm install @myorg/privatepackage@">=0.1.0 <0.2.0" -* `npm install /`: +* `npm install `: - Install the package at `https://github.com/githubname/githubrepo` by - attempting to clone it using `git`. + Install a package by cloning a git remote url. The format of the git + url is: - Example: + ://[[:]@][:][:/][#] - npm install mygithubuser/myproject + `` is one of `git`, `git+ssh`, `git+http`, or + `git+https`. If no `` is specified, then `master` is + used. - To reference a package in a generic git repo (not on GitHub), see git remote - urls below. + Examples: -* `npm install github:/`: + git+ssh://git@github.com:npm/npm.git#v1.0.27 + git+https://isaacs@github.com/npm/npm.git + git://github.com/npm/npm.git#v1.0.27 - The same as the above, but explicitly marked as a GitHub dependency. +* `npm install /[#]`: +* `npm install github:/[#]`: - Example: + Install the package at `https://github.com/githubname/githubrepo` by + attempting to clone it using `git`. + + If you don't specify a *commit-ish* then `master` will be used. + + Examples: - npm install github:npm/npm + npm install mygithubuser/myproject + npm install github:mygithubuser/myproject -* `npm install gist:[/]`: +* `npm install gist:[/][#]`: Install the package at `https://gist.github.com/gistID` by attempting to clone it using `git`. The GitHub username associated with the gist is optional and will not be saved in `package.json` if `--save` is used. + If you don't specify a *commit-ish* then `master` will be used. + Example: npm install gist:101a11beef -* `npm install bitbucket:/`: +* `npm install bitbucket:/[#]`: Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo` by attempting to clone it using `git`. + If you don't specify a *commit-ish* then `master` will be used. + Example: npm install bitbucket:mybitbucketuser/myproject -* `npm install gitlab:/`: +* `npm install gitlab:/[#]`: Install the package at `https://gitlab.com/gitlabname/gitlabrepo` by attempting to clone it using `git`. + If you don't specify a *commit-ish* then `master` will be used. + Example: npm install gitlab:mygitlabuser/myproject -* `npm install `: - - Install a package by cloning a git remote url. The format of the git - url is: - - ://[[:]@][#] - - `` is one of `git`, `git+ssh`, `git+http`, or - `git+https`. If no `` is specified, then `master` is - used. - - Examples: - - git+ssh://git@github.com:npm/npm.git#v1.0.27 - git+https://isaacs@github.com/npm/npm.git - git://github.com/npm/npm.git#v1.0.27 - You may combine multiple arguments, and even multiple types of arguments. For example: diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index b02773814c0d2a..0f091bc835b987 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -98,9 +98,8 @@ If a url is provided, it will be used by the `npm bugs` command. You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it. -The simplest way, assuming you're using a common license such as BSD-3-Clause -or MIT, is to just specify the standard SPDX ID of the license you're using, -like this: +If you're using a common license such as BSD-2-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: { "license" : "BSD-3-Clause" } @@ -108,8 +107,45 @@ You can check [the full list of SPDX license IDs](https://spdx.org/licenses/). Ideally you should pick one that is [OSI](http://opensource.org/licenses/alphabetical) approved. -It's also a good idea to include a LICENSE file at the top level in -your package. +If your package is licensed under multiple common licenses, use an [SPDX license +expression syntax version 2.0 string](http://npmjs.com/package/spdx), like this: + + { "license" : "(ISC OR GPL-3.0)" } + +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use the following valid SPDX expression: + + { "license" : "LicenseRef-LICENSE" } + +Then include a LICENSE file at the top level of the package. + +Some old packages used license objects or a "licenses" property containing an +array of license objects: + + // Not valid metadata + { "license" : + { "type" : "ISC" + , "url" : "http://opensource.org/licenses/ISC" + } + } + + // Not valid metadata + { "licenses" : + [ + { "type": "MIT" + , "url": "http://www.opensource.org/licenses/mit-license.php" + } + , { "type": "Apache-2.0" + , "url": "http://opensource.org/licenses/apache2.0.php" + } + ] + } + +Those styles are now deprecated. Instead, use SPDX expressions, like this: + + { "license": "ISC" } + + { "license": "(MIT OR Apache-2.0)" } ## people fields: author, contributors diff --git a/deps/npm/doc/misc/npm-registry.md b/deps/npm/doc/misc/npm-registry.md index b0487f6df9db20..0875a5d4ebad4a 100644 --- a/deps/npm/doc/misc/npm-registry.md +++ b/deps/npm/doc/misc/npm-registry.md @@ -31,9 +31,10 @@ similar) design doc to implement the APIs. If you set up continuous replication from the official CouchDB, and then set your internal CouchDB as the registry config, then you'll be able to read any published packages, in addition to your private ones, and by -default will only publish internally. If you then want to publish a -package for the whole world to see, you can simply override the -`--registry` config for that command. +default will only publish internally. + +If you then want to publish a package for the whole world to see, you can +simply override the `--registry` option for that `publish` command. ## I don't want my package published in the official registry. It's private. diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 707f59fe802c81..86b948a6e0749a 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -126,7 +126,7 @@

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

+support@npmjs.com and explain the situation.

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

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

SEE ALSO

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

SEE ALSO

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

SEE ALSO

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

SEE ALSO

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

SEE ALSO

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

global

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

SYNOPSIS

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

SEE ALSO

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

SEE ALSO

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

CONFIGURATION

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

SYNOPSIS

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

SEE ALSO

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

SYNOPSIS

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

SEE ALSO

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-submodule.html b/deps/npm/html/doc/api/npm-submodule.html deleted file mode 100644 index 35364403c35ce4..00000000000000 --- a/deps/npm/html/doc/api/npm-submodule.html +++ /dev/null @@ -1,46 +0,0 @@ - - - npm-submodule - - - - - - -
- -

npm-submodule

Add a package as a git submodule

-

SYNOPSIS

-
npm.commands.submodule(packages, callback)
-

DESCRIPTION

-

For each package specified, npm will check if it has a git repository url -in its package.json description then add it as a git submodule at -node_modules/<pkg name>.

-

This is a convenience only. From then on, it's up to you to manage -updates by using the appropriate git commands. npm will stubbornly -refuse to update, modify, or remove anything with a .git subfolder -in it.

-

This command also does not install missing dependencies, if the package -does not include them in its git repository. If npm ls reports that -things are missing, you can either install, link, or submodule them yourself, -or you can do npm explore <pkgname> -- npm install to install the -dependencies into the submodule folder.

-

SEE ALSO

-
    -
  • npm help json
  • -
  • git help submodule
  • -
- -
- - - - - - - - - - - - diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index 87e7480ccaa6db..a7a8e47f105429 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

SYNOPSIS

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

SEE ALSO

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

SYNOPSIS

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

RETURN VALUE

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

SYNOPSIS

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

SYNOPSIS

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

VERSION

-

2.9.1

+

2.10.1

DESCRIPTION

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

ABBREVS

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 611046f7132092..1175859955c299 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 57610bec6a4fa8..d33a757d55b7fc 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 6316feebffc494..217c9724fed4a1 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 84842fd34452d1..b7b72121c6aaca 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 434fa55e74df85..3343f79992ba61 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 1ee216ea51df47..991be9f641a0f5 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 b873975725bbed..7e0fc62afc82da 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@

SEE ALSO

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

SEE ALSO

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 05c380224b94a3..8a7ec9a2d64d92 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 ff080d66c4a6ab..1211dfecf5bff4 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -77,5 +77,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index e94aa6af0e6f13..be146f0cf763b1 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 a49d795c6c9ae9..6a903c4df26668 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 2b94434260ac89..0a85fc2a08af5e 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 f1beb0a798a53b..afe18a73a59af9 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 7d3d6cf8e9773e..9f9c1de6559513 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@

SEE ALSO

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index caf36b9f141575..c475cc74601ef4 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -131,50 +131,50 @@

SYNOPSIS

    npm install sax@">=0.1.0 <0.2.0"
     npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
 
-
  • npm install <githubname>/<githubrepo>:

    +
  • npm install <git remote url>:

    +

    Install a package by cloning a git remote url. The format of the git + url is:

    +
        <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit-ish>]
    +

    <protocol> is one of git, git+ssh, git+http, or + git+https. If no <commit-ish> is specified, then master is + used.

    +

    Examples:

    +
        git+ssh://git@github.com:npm/npm.git#v1.0.27
    +    git+https://isaacs@github.com/npm/npm.git
    +    git://github.com/npm/npm.git#v1.0.27
    +
  • +
  • npm install <githubname>/<githubrepo>[#<commit-ish>]:

    +
  • +
  • npm install github:<githubname>/<githubrepo>[#<commit-ish>]:

    Install the package at https://github.com/githubname/githubrepo by attempting to clone it using git.

    -

    Example:

    +

    If you don't specify a commit-ish then master will be used.

    +

    Examples:

        npm install mygithubuser/myproject
    -

    To reference a package in a generic git repo (not on GitHub), see git remote - urls below.

    -
  • -
  • npm install github:<githubname>/<githubrepo>:

    -

    The same as the above, but explicitly marked as a GitHub dependency.

    -

    Example:

    -
        npm install github:npm/npm
    +    npm install github:mygithubuser/myproject
     
  • -
  • npm install gist:[<githubname>/]<gistID>:

    +
  • npm install gist:[<githubname>/]<gistID>[#<commit-ish>]:

    Install the package at https://gist.github.com/gistID by attempting to clone it using git. The GitHub username associated with the gist is optional and will not be saved in package.json if --save is used.

    +

    If you don't specify a commit-ish then master will be used.

    Example:

        npm install gist:101a11beef
     
  • -
  • npm install bitbucket:<bitbucketname>/<bitbucketrepo>:

    +
  • npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]:

    Install the package at https://bitbucket.org/bitbucketname/bitbucketrepo by attempting to clone it using git.

    +

    If you don't specify a commit-ish then master will be used.

    Example:

        npm install bitbucket:mybitbucketuser/myproject
     
  • -
  • npm install gitlab:<gitlabname>/<gitlabrepo>:

    +
  • npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]:

    Install the package at https://gitlab.com/gitlabname/gitlabrepo by attempting to clone it using git.

    +

    If you don't specify a commit-ish then master will be used.

    Example:

        npm install gitlab:mygitlabuser/myproject
     
  • -
  • npm install <git remote url>:

    -

    Install a package by cloning a git remote url. The format of the git - url is:

    -
        <protocol>://[<user>[:<password>]@]<hostname><separator><path>[#<commit-ish>]
    -

    <protocol> is one of git, git+ssh, git+http, or - git+https. If no <commit-ish> is specified, then master is - used.

    -

    Examples:

    -
        git+ssh://git@github.com:npm/npm.git#v1.0.27
    -    git+https://isaacs@github.com/npm/npm.git
    -    git://github.com/npm/npm.git#v1.0.27
    -
  • You may combine multiple arguments, and even multiple types of arguments. For example:

    @@ -264,5 +264,5 @@

    SEE ALSO

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

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 69906c60378fe0..f9a4c095fbbce5 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -55,5 +55,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 73893326a4c264..0b9c8e91fa0eaf 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,7 @@

    SYNOPSIS

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

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

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

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 167193d0059c4d..8b1a867e0e8119 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -67,5 +67,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 5537ea2b0c7af5..70e8aeccdc3f3d 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 362c2b28a2578a..d402ba4fe6eb56 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 9e2783e54524c5..78b744222b0092 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -164,5 +164,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 2d5d0bbe2083f1..9a5099d485e336 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 dd57f622493558..9892b2521e1410 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 777b8a69670b66..406bbc85a5e627 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 6b8d9e84be461c..71c0005bdc1d26 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-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html deleted file mode 100644 index 6716c4a11cce24..00000000000000 --- a/deps/npm/html/doc/cli/npm-submodule.html +++ /dev/null @@ -1,46 +0,0 @@ - - - npm-submodule - - - - - - -
    - -

    npm-submodule

    Add a package as a git submodule

    -

    SYNOPSIS

    -
    npm submodule <pkg>
    -

    DESCRIPTION

    -

    If the specified package has a git repository url in its package.json -description, then this command will add it as a git submodule at -node_modules/<pkg name>.

    -

    This is a convenience only. From then on, it's up to you to manage -updates by using the appropriate git commands. npm will stubbornly -refuse to update, modify, or remove anything with a .git subfolder -in it.

    -

    This command also does not install missing dependencies, if the package -does not include them in its git repository. If npm ls reports that -things are missing, you can either install, link, or submodule them yourself, -or you can do npm explore <pkgname> -- npm install to install the -dependencies into the submodule folder.

    -

    SEE ALSO

    - - -
    - - - - - - - - - - - - diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index cb73a330078326..f3f581c33ecc75 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -62,5 +62,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 9d50339debf990..87bd2328455a17 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index d53e1540211fe1..86a7aaee519e71 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -57,5 +57,5 @@

    SYNOPSIS

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

    SEE ALSO

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

    SEE ALSO

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

    SEE ALSO

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

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    2.9.1

    +

    2.10.1

    DESCRIPTION

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

    CONTRIBUTIONS

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

    @@ -118,7 +118,7 @@

    BUGS

  • web: http://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com

    Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -128,7 +128,7 @@

    AUTHOR

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

    +i@izs.me

    SEE ALSO

    You may combine multiple arguments, and even multiple types of arguments. For example:

    diff --git a/deps/npm/html/partial/doc/cli/npm-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html index 45be4bb595e66b..448aae4d11bd41 100644 --- a/deps/npm/html/partial/doc/cli/npm-ls.html +++ b/deps/npm/html/partial/doc/cli/npm-ls.html @@ -11,7 +11,7 @@

    SYNOPSIS

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

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

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

    diff --git a/deps/npm/html/partial/doc/cli/npm-submodule.html b/deps/npm/html/partial/doc/cli/npm-submodule.html deleted file mode 100644 index 1e259e1f2f6911..00000000000000 --- a/deps/npm/html/partial/doc/cli/npm-submodule.html +++ /dev/null @@ -1,22 +0,0 @@ -

    npm-submodule

    Add a package as a git submodule

    -

    SYNOPSIS

    -
    npm submodule <pkg>
    -

    DESCRIPTION

    -

    If the specified package has a git repository url in its package.json -description, then this command will add it as a git submodule at -node_modules/<pkg name>.

    -

    This is a convenience only. From then on, it's up to you to manage -updates by using the appropriate git commands. npm will stubbornly -refuse to update, modify, or remove anything with a .git subfolder -in it.

    -

    This command also does not install missing dependencies, if the package -does not include them in its git repository. If npm ls reports that -things are missing, you can either install, link, or submodule them yourself, -or you can do npm explore <pkgname> -- npm install to install the -dependencies into the submodule folder.

    -

    SEE ALSO

    - - diff --git a/deps/npm/html/partial/doc/cli/npm.html b/deps/npm/html/partial/doc/cli/npm.html index 61fb642e0dd063..da99841671dd05 100644 --- a/deps/npm/html/partial/doc/cli/npm.html +++ b/deps/npm/html/partial/doc/cli/npm.html @@ -2,7 +2,7 @@

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    2.9.1

    +

    2.10.1

    DESCRIPTION

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

    CONTRIBUTIONS

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

    @@ -107,7 +107,7 @@

    BUGS

  • web: http://github.com/npm/npm/issues
  • email: -npm-@googlegroups.com
  • +npm-@googlegroups.com

    Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

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

    AUTHOR

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

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html index f5fadd1b647c36..055f8c486053a3 100644 --- a/deps/npm/html/partial/doc/files/npm-json.html +++ b/deps/npm/html/partial/doc/files/npm-json.html @@ -69,16 +69,44 @@

      bugs

      license

      You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it.

      -

      The simplest way, assuming you're using a common license such as BSD-3-Clause -or MIT, is to just specify the standard SPDX ID of the license you're using, -like this:

      +

      If you're using a common license such as BSD-2-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this:

      { "license" : "BSD-3-Clause" }
       

      You can check the full list of SPDX license IDs. Ideally you should pick one that is OSI approved.

      -

      It's also a good idea to include a LICENSE file at the top level in -your package.

      -

      people fields: author, contributors

      +

      If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2.0 string, like this:

      +
      { "license" : "(ISC OR GPL-3.0)" }
      +

      If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use the following valid SPDX expression:

      +
      { "license" : "LicenseRef-LICENSE" }
      +

      Then include a LICENSE file at the top level of the package.

      +

      Some old packages used license objects or a "licenses" property containing an +array of license objects:

      +
      // Not valid metadata
      +{ "license" :
      +  { "type" : "ISC"
      +  , "url" : "http://opensource.org/licenses/ISC"
      +  }
      +}
      +
      +// Not valid metadata
      +{ "licenses" :
      +  [
      +    { "type": "MIT"
      +    , "url": "http://www.opensource.org/licenses/mit-license.php"
      +    }
      +  , { "type": "Apache-2.0"
      +    , "url": "http://opensource.org/licenses/apache2.0.php"
      +    }
      +  ]
      +}
      +

      Those styles are now deprecated. Instead, use SPDX expressions, like this:

      +
      { "license": "ISC" }
      +
      +{ "license": "(MIT OR Apache-2.0)" }
      +

      people fields: author, contributors

      The "author" is one person. "contributors" is an array of people. A "person" is an object with a "name" field and optionally "url" and "email", like this:

      { "name" : "Barney Rubble"
      diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html
      index f5fadd1b647c36..055f8c486053a3 100644
      --- a/deps/npm/html/partial/doc/files/package.json.html
      +++ b/deps/npm/html/partial/doc/files/package.json.html
      @@ -69,16 +69,44 @@ 

      bugs

      license

      You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it.

      -

      The simplest way, assuming you're using a common license such as BSD-3-Clause -or MIT, is to just specify the standard SPDX ID of the license you're using, -like this:

      +

      If you're using a common license such as BSD-2-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this:

      { "license" : "BSD-3-Clause" }
       

      You can check the full list of SPDX license IDs. Ideally you should pick one that is OSI approved.

      -

      It's also a good idea to include a LICENSE file at the top level in -your package.

      -

      people fields: author, contributors

      +

      If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2.0 string, like this:

      +
      { "license" : "(ISC OR GPL-3.0)" }
      +

      If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use the following valid SPDX expression:

      +
      { "license" : "LicenseRef-LICENSE" }
      +

      Then include a LICENSE file at the top level of the package.

      +

      Some old packages used license objects or a "licenses" property containing an +array of license objects:

      +
      // Not valid metadata
      +{ "license" :
      +  { "type" : "ISC"
      +  , "url" : "http://opensource.org/licenses/ISC"
      +  }
      +}
      +
      +// Not valid metadata
      +{ "licenses" :
      +  [
      +    { "type": "MIT"
      +    , "url": "http://www.opensource.org/licenses/mit-license.php"
      +    }
      +  , { "type": "Apache-2.0"
      +    , "url": "http://opensource.org/licenses/apache2.0.php"
      +    }
      +  ]
      +}
      +

      Those styles are now deprecated. Instead, use SPDX expressions, like this:

      +
      { "license": "ISC" }
      +
      +{ "license": "(MIT OR Apache-2.0)" }
      +

      people fields: author, contributors

      The "author" is one person. "contributors" is an array of people. A "person" is an object with a "name" field and optionally "url" and "email", like this:

      { "name" : "Barney Rubble"
      diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html
      index 07374e1f1b0f37..ed9e224c55a204 100644
      --- a/deps/npm/html/partial/doc/misc/npm-disputes.html
      +++ b/deps/npm/html/partial/doc/misc/npm-disputes.html
      @@ -2,7 +2,7 @@ 

      npm-disputes

      Handling Module

      SYNOPSIS

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

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

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

      DESCRIPTION

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

      I get ECONNREFUSED a lot. What'

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

      -

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

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

      diff --git a/deps/npm/html/partial/doc/misc/npm-registry.html b/deps/npm/html/partial/doc/misc/npm-registry.html index 2a7c16014586b6..8dd80d4d25b281 100644 --- a/deps/npm/html/partial/doc/misc/npm-registry.html +++ b/deps/npm/html/partial/doc/misc/npm-registry.html @@ -21,9 +21,9 @@

      Can I run my own private registry?If you set up continuous replication from the official CouchDB, and then set your internal CouchDB as the registry config, then you'll be able to read any published packages, in addition to your private ones, and by -default will only publish internally. If you then want to publish a -package for the whole world to see, you can simply override the ---registry config for that command.

      +default will only publish internally.

      +

      If you then want to publish a package for the whole world to see, you can +simply override the --registry option for that publish command.

      I don't want my package published in the official registry. It's private.

      Set "private": true in your package.json to prevent it from being published at all, or diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js index a479a971c35462..cf960a67d8b8aa 100644 --- a/deps/npm/lib/access.js +++ b/deps/npm/lib/access.js @@ -119,5 +119,5 @@ function ls (args, cb) { } function edit (args, cb) { - return cb(new Error("npm edit ls isn't implemented yet!")) + return cb(new Error("npm access edit isn't implemented yet!")) } diff --git a/deps/npm/lib/cache/add-named.js b/deps/npm/lib/cache/add-named.js index 07d5b7f01b36f9..cd06aa28893dd8 100644 --- a/deps/npm/lib/cache/add-named.js +++ b/deps/npm/lib/cache/add-named.js @@ -17,6 +17,18 @@ var path = require("path") module.exports = addNamed function getOnceFromRegistry (name, from, next, done) { + function fixName(err, data, json, resp) { + // this is only necessary until npm/npm-registry-client#80 is fixed + if (err && err.pkgid && err.pkgid !== name) { + err.message = err.message.replace( + new RegExp(': ' + err.pkgid.replace(/(\W)/g, '\\$1') + '$'), + ': ' + name + ) + err.pkgid = name + } + next(err, data, json, resp) + } + mapToRegistry(name, npm.config, function (er, uri, auth) { if (er) return done(er) @@ -25,7 +37,7 @@ function getOnceFromRegistry (name, from, next, done) { if (!next) return log.verbose(from, key, "already in flight; waiting") else log.verbose(from, key, "not in flight; fetching") - npm.registry.get(uri, { auth : auth }, next) + npm.registry.get(uri, { auth : auth }, fixName) }) } diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js index 6cfccf8f898e3b..d4281a8aeaef43 100644 --- a/deps/npm/lib/cache/add-remote-git.js +++ b/deps/npm/lib/cache/add-remote-git.js @@ -267,7 +267,7 @@ function updateRemote (from, cloneURL, treeish, cachedRemote, cb) { } // branches and tags are both symbolic labels that can be attached to different -// commits, so resolve the commitish to the current actual treeish the label +// commits, so resolve the commit-ish to the current actual treeish the label // corresponds to // // important for shrinkwrap diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js index cb1d5715f9d3e8..942d27b41e17b8 100644 --- a/deps/npm/lib/help.js +++ b/deps/npm/lib/help.js @@ -63,8 +63,11 @@ function help (args, cb) { else if (section === "json") section = "package.json" // find either /section.n or /npm-section.n - var compext = "\\.+(gz|bz2|lzma|[FYzZ]|xz)$" - var f = "+(npm-" + section + "|" + section + ").[0-9]?(" + compext + ")" + // The glob is used in the glob. The regexp is used much + // further down. Globs and regexps are different + var compextglob = ".+(gz|bz2|lzma|[FYzZ]|xz)" + var compextre = "\\.(gz|bz2|lzma|[FYzZ]|xz)$" + var f = "+(npm-" + section + "|" + section + ").[0-9]?(" + compextglob + ")" return glob(manroot + "/*/" + f, function (er, mans) { if (er) return cb(er) @@ -72,7 +75,7 @@ function help (args, cb) { mans = mans.map(function (man) { var ext = path.extname(man) - if (man.match(new RegExp(compext))) man = path.basename(man, ext) + if (man.match(new RegExp(compextre))) man = path.basename(man, ext) return man }) diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 1777148095ccf5..4ab248a492d5e3 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -644,7 +644,7 @@ function installManyTop_ (what, where, context, cb) { return path.resolve(nm, p, "package.json") }), function (jsonPath, cb) { log.verbose('installManyTop', 'reading scoped package data from', jsonPath) - readJson(jsonPath, log.warn, function (er, data) { + readJson(jsonPath, log.info, function (er, data) { if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) if (er) return cb(null, []) cb(null, [[data.name, data.version]]) @@ -799,7 +799,7 @@ function targetResolver (where, context, deps, devDeps) { asyncMap(inst, function (pkg, cb) { var jsonPath = path.resolve(name, pkg, 'package.json') log.verbose('targetResolver', 'reading package data from', jsonPath) - readJson(jsonPath, log.warn, function (er, d) { + readJson(jsonPath, log.info, function (er, d) { if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) // error means it's not a package, most likely. if (er) return cb(null, []) @@ -892,7 +892,8 @@ function targetResolver (where, context, deps, devDeps) { return cb(null, []) } - var isGit = (npa(what).type === "git" || npa(what).type === "hosted") + var type = npa(what).type + var isGit = type === "git" || type === "hosted" if (!er && data && @@ -918,7 +919,8 @@ function installOne (target, where, context, cb) { // the --link flag makes this a "link" command if it's at the // the top level. var isGit = false - if (target && target._from) isGit = (npa(target._from).type === 'git' || npa(target._from).type === 'hosted') + var type = npa(target._from).type + if (target && target._from) isGit = type === 'git' || type === 'hosted' if (where === npm.prefix && npm.config.get("link") && !npm.config.get("global") && !isGit) { @@ -1095,6 +1097,7 @@ function write (target, targetFolder, context, cb_) { // before continuing to installing dependencies, check for a shrinkwrap. var opt = { dev: npm.config.get("dev") } readDependencies(context, targetFolder, opt, function (er, data, wrap) { + if (er) return cb(er); var deps = prepareForInstallMany(data, "dependencies", bundled, wrap, family) var depsTargetFolder = targetFolder diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index 05166ee6ab0aac..c7877b925e6be7 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -293,8 +293,11 @@ function makeArchy_ (data, long, dir, depth, parent, d) { // add giturl to name@version if (data._resolved) { - if (npa(data._resolved).type === "git") - out.label += " (" + data._resolved + ")" + var type = npa(data._resolved).type + var isGit = type === 'git' || type === 'hosted' + if (isGit) { + out.label += ' (' + data._resolved + ')' + } } if (long) { diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 12abe8fb870aa3..5e9345cfd926b8 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -181,33 +181,48 @@ fetch the package by name if it is not valid\. .fi .RE .IP \(bu 2 -\fBnpm install /\fR: - Install the package at \fBhttps://github\.com/githubname/githubrepo\fR by - attempting to clone it using \fBgit\fR\|\. - Example: +\fBnpm install \fR: + Install a package by cloning a git remote url\. The format of the git + url is: .P .RS 2 .nf - npm install mygithubuser/myproject + ://[[:]@][:][:/][#] +.fi +.RE + \fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or + \fBgit+https\fR\|\. If no \fB\fR is specified, then \fBmaster\fR is + used\. + Examples: +.P +.RS 2 +.nf + git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27 + git+https://isaacs@github\.com/npm/npm\.git + git://github\.com/npm/npm\.git#v1\.0\.27 .fi .RE - To reference a package in a generic git repo (not on GitHub), see git remote - urls below\. .IP \(bu 2 -\fBnpm install github:/\fR: - The same as the above, but explicitly marked as a GitHub dependency\. - Example: +\fBnpm install /[#]\fR: +.IP \(bu 2 +\fBnpm install github:/[#]\fR: + Install the package at \fBhttps://github\.com/githubname/githubrepo\fR by + attempting to clone it using \fBgit\fR\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fR will be used\. + Examples: .P .RS 2 .nf - npm install github:npm/npm + npm install mygithubuser/myproject + npm install github:mygithubuser/myproject .fi .RE .IP \(bu 2 -\fBnpm install gist:[/]\fR: +\fBnpm install gist:[/][#]\fR: Install the package at \fBhttps://gist\.github\.com/gistID\fR by attempting to clone it using \fBgit\fR\|\. The GitHub username associated with the gist is optional and will not be saved in \fBpackage\.json\fR if \fB\-\-save\fR is used\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fR will be used\. Example: .P .RS 2 @@ -216,9 +231,10 @@ fetch the package by name if it is not valid\. .fi .RE .IP \(bu 2 -\fBnpm install bitbucket:/\fR: +\fBnpm install bitbucket:/[#]\fR: Install the package at \fBhttps://bitbucket\.org/bitbucketname/bitbucketrepo\fR by attempting to clone it using \fBgit\fR\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fR will be used\. Example: .P .RS 2 @@ -227,9 +243,10 @@ fetch the package by name if it is not valid\. .fi .RE .IP \(bu 2 -\fBnpm install gitlab:/\fR: +\fBnpm install gitlab:/[#]\fR: Install the package at \fBhttps://gitlab\.com/gitlabname/gitlabrepo\fR by attempting to clone it using \fBgit\fR\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fR will be used\. Example: .P .RS 2 @@ -237,28 +254,6 @@ fetch the package by name if it is not valid\. npm install gitlab:mygitlabuser/myproject .fi .RE -.IP \(bu 2 -\fBnpm install \fR: - Install a package by cloning a git remote url\. The format of the git - url is: -.P -.RS 2 -.nf - ://[[:]@][#] -.fi -.RE - \fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or - \fBgit+https\fR\|\. If no \fB\fR is specified, then \fBmaster\fR is - used\. - Examples: -.P -.RS 2 -.nf - git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27 - git+https://isaacs@github\.com/npm/npm\.git - git://github\.com/npm/npm\.git#v1\.0\.27 -.fi -.RE .RE .P diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 12b2564d9d75ac..32f13d8ef5447c 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show: .P .RS 2 .nf -npm@2.9.1 /path/to/npm +npm@2.10.1 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-submodule.1 b/deps/npm/man/man1/npm-submodule.1 deleted file mode 100644 index 71853335c59984..00000000000000 --- a/deps/npm/man/man1/npm-submodule.1 +++ /dev/null @@ -1,42 +0,0 @@ -.\" Generated with Ronnjs 0.3.8 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-SUBMODULE" "1" "September 2014" "" "" -. -.SH "NAME" -\fBnpm-submodule\fR \-\- Add a package as a git submodule -. -.SH "SYNOPSIS" -. -.nf -npm submodule -. -.fi -. -.SH "DESCRIPTION" -If the specified package has a git repository url in its package\.json -description, then this command will add it as a git submodule at \fBnode_modules/\fR\|\. -. -.P -This is a convenience only\. From then on, it\'s up to you to manage -updates by using the appropriate git commands\. npm will stubbornly -refuse to update, modify, or remove anything with a \fB\|\.git\fR subfolder -in it\. -. -.P -This command also does not install missing dependencies, if the package -does not include them in its git repository\. If \fBnpm ls\fR reports that -things are missing, you can either install, link, or submodule them yourself, -or you can do \fBnpm explore \-\- npm install\fR to install the -dependencies into the submodule folder\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm help 5 package\.json -. -.IP "\(bu" 4 -git help submodule -. -.IP "" 0 - diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 28c6ceb58bc076..9305fef29d9df1 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -2.9.1 +2.10.1 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm-submodule.3 b/deps/npm/man/man3/npm-submodule.3 deleted file mode 100644 index 95739ce3b08428..00000000000000 --- a/deps/npm/man/man3/npm-submodule.3 +++ /dev/null @@ -1,42 +0,0 @@ -.\" Generated with Ronnjs 0.3.8 -.\" http://github.com/kapouer/ronnjs/ -. -.TH "NPM\-SUBMODULE" "3" "September 2014" "" "" -. -.SH "NAME" -\fBnpm-submodule\fR \-\- Add a package as a git submodule -. -.SH "SYNOPSIS" -. -.nf -npm\.commands\.submodule(packages, callback) -. -.fi -. -.SH "DESCRIPTION" -For each package specified, npm will check if it has a git repository url -in its package\.json description then add it as a git submodule at \fBnode_modules/\fR\|\. -. -.P -This is a convenience only\. From then on, it\'s up to you to manage -updates by using the appropriate git commands\. npm will stubbornly -refuse to update, modify, or remove anything with a \fB\|\.git\fR subfolder -in it\. -. -.P -This command also does not install missing dependencies, if the package -does not include them in its git repository\. If \fBnpm ls\fR reports that -things are missing, you can either install, link, or submodule them yourself, -or you can do \fBnpm explore \-\- npm install\fR to install the -dependencies into the submodule folder\. -. -.SH "SEE ALSO" -. -.IP "\(bu" 4 -npm help json -. -.IP "\(bu" 4 -git help submodule -. -.IP "" 0 - diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index 4a2fdb6c3811b4..7fd9d79b9c9b42 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) { .RE .SH VERSION .P -2.9.1 +2.10.1 .SH DESCRIPTION .P This is the API documentation for npm\. diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 898490e4785d95..b0cb4e94dd538f 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -107,9 +107,8 @@ If a url is provided, it will be used by the \fBnpm bugs\fR command\. You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it\. .P -The simplest way, assuming you're using a common license such as BSD\-3\-Clause -or MIT, is to just specify the standard SPDX ID of the license you're using, -like this: +If you're using a common license such as BSD\-2\-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: .P .RS 2 .nf @@ -121,8 +120,61 @@ You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\f Ideally you should pick one that is OSI \fIhttp://opensource\.org/licenses/alphabetical\fR approved\. .P -It's also a good idea to include a LICENSE file at the top level in -your package\. +If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2\.0 string \fIhttp://npmjs\.com/package/spdx\fR, like this: +.P +.RS 2 +.nf +{ "license" : "(ISC OR GPL\-3\.0)" } +.fi +.RE +.P +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use the following valid SPDX expression: +.P +.RS 2 +.nf +{ "license" : "LicenseRef\-LICENSE" } +.fi +.RE +.P +Then include a LICENSE file at the top level of the package\. +.P +Some old packages used license objects or a "licenses" property containing an +array of license objects: +.P +.RS 2 +.nf +// Not valid metadata +{ "license" : + { "type" : "ISC" + , "url" : "http://opensource\.org/licenses/ISC" + } +} + +// Not valid metadata +{ "licenses" : + [ + { "type": "MIT" + , "url": "http://www\.opensource\.org/licenses/mit\-license\.php" + } + , { "type": "Apache\-2\.0" + , "url": "http://opensource\.org/licenses/apache2\.0\.php" + } + ] +} +.fi +.RE +.P +Those styles are now deprecated\. Instead, use SPDX expressions, like this: +.P +.RS 2 +.nf +{ "license": "ISC" } + +{ "license": "(MIT OR Apache\-2\.0)" } +.fi +.RE .SH people fields: author, contributors .P The "author" is one person\. "contributors" is an array of people\. A "person" diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 898490e4785d95..b0cb4e94dd538f 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -107,9 +107,8 @@ If a url is provided, it will be used by the \fBnpm bugs\fR command\. You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it\. .P -The simplest way, assuming you're using a common license such as BSD\-3\-Clause -or MIT, is to just specify the standard SPDX ID of the license you're using, -like this: +If you're using a common license such as BSD\-2\-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: .P .RS 2 .nf @@ -121,8 +120,61 @@ You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\f Ideally you should pick one that is OSI \fIhttp://opensource\.org/licenses/alphabetical\fR approved\. .P -It's also a good idea to include a LICENSE file at the top level in -your package\. +If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2\.0 string \fIhttp://npmjs\.com/package/spdx\fR, like this: +.P +.RS 2 +.nf +{ "license" : "(ISC OR GPL\-3\.0)" } +.fi +.RE +.P +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use the following valid SPDX expression: +.P +.RS 2 +.nf +{ "license" : "LicenseRef\-LICENSE" } +.fi +.RE +.P +Then include a LICENSE file at the top level of the package\. +.P +Some old packages used license objects or a "licenses" property containing an +array of license objects: +.P +.RS 2 +.nf +// Not valid metadata +{ "license" : + { "type" : "ISC" + , "url" : "http://opensource\.org/licenses/ISC" + } +} + +// Not valid metadata +{ "licenses" : + [ + { "type": "MIT" + , "url": "http://www\.opensource\.org/licenses/mit\-license\.php" + } + , { "type": "Apache\-2\.0" + , "url": "http://opensource\.org/licenses/apache2\.0\.php" + } + ] +} +.fi +.RE +.P +Those styles are now deprecated\. Instead, use SPDX expressions, like this: +.P +.RS 2 +.nf +{ "license": "ISC" } + +{ "license": "(MIT OR Apache\-2\.0)" } +.fi +.RE .SH people fields: author, contributors .P The "author" is one person\. "contributors" is an array of people\. A "person" diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index c5c84485ea3b7c..2735f6a54f7a42 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -30,9 +30,10 @@ similar) design doc to implement the APIs\. If you set up continuous replication from the official CouchDB, and then set your internal CouchDB as the registry config, then you'll be able to read any published packages, in addition to your private ones, and by -default will only publish internally\. If you then want to publish a -package for the whole world to see, you can simply override the -\fB\-\-registry\fR config for that command\. +default will only publish internally\. +.P +If you then want to publish a package for the whole world to see, you can +simply override the \fB\-\-registry\fR option for that \fBpublish\fR command\. .SH I don't want my package published in the official registry\. It's private\. .P Set \fB"private": true\fR in your package\.json to prevent it from being diff --git a/deps/npm/node_modules/fstream/.travis.yml b/deps/npm/node_modules/fstream/.travis.yml index 2d26206d58cbb7..a092c82b26fc41 100644 --- a/deps/npm/node_modules/fstream/.travis.yml +++ b/deps/npm/node_modules/fstream/.travis.yml @@ -1,3 +1,9 @@ language: node_js node_js: - - 0.6 + - iojs + - 0.12 + - 0.10 + - 0.8 +before_install: + - "npm config set spin false" + - "npm install -g npm/npm" diff --git a/deps/npm/node_modules/fstream/LICENSE b/deps/npm/node_modules/fstream/LICENSE index 0c44ae716db8f3..19129e315fe593 100644 --- a/deps/npm/node_modules/fstream/LICENSE +++ b/deps/npm/node_modules/fstream/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +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. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +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/fstream/examples/filter-pipe.js b/deps/npm/node_modules/fstream/examples/filter-pipe.js index 983649bb9d5814..fc59cfc7abae44 100644 --- a/deps/npm/node_modules/fstream/examples/filter-pipe.js +++ b/deps/npm/node_modules/fstream/examples/filter-pipe.js @@ -1,77 +1,78 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) && - !this.basename.match(/^deep-copy$/) && - !this.basename.match(/^filter-copy$/) - } - }) +var fstream = require('../fstream.js') +var path = require('path') + +var r = fstream.Reader({ + path: path.dirname(__dirname), + filter: function () { + return !this.basename.match(/^\./) && + !this.basename.match(/^node_modules$/) && + !this.basename.match(/^deep-copy$/) && + !this.basename.match(/^filter-copy$/) + } +}) // this writer will only write directories -var w = fstream.Writer({ path: path.resolve(__dirname, "filter-copy") - , type: "Directory" - , filter: function () { - return this.type === "Directory" - } - }) +var w = fstream.Writer({ + path: path.resolve(__dirname, 'filter-copy'), + type: 'Directory', + filter: function () { + return this.type === 'Directory' + } +}) -var indent = "" -var escape = {} +var indent = '' -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) +r.on('entry', appears) +r.on('ready', function () { + console.error('ready to begin!', r.path) }) function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename) + console.error(indent + 'a %s appears!', entry.type, entry.basename, typeof entry.basename) if (foggy) { - console.error("FOGGY!") + console.error('FOGGY!') var p = entry do { console.error(p.depth, p.path, p._paused) - } while (p = p.parent) + p = p.parent + } while (p) - throw new Error("\033[mshould not have entries while foggy") + throw new Error('\u001b[mshould not have entries while foggy') } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) + indent += '\t' + entry.on('data', missile(entry)) + entry.on('end', runaway(entry)) + entry.on('entry', appears) } var foggy function missile (entry) { - if (entry.type === "Directory") { + function liftFog (who) { + if (!foggy) return + if (who) { + console.error('%s breaks the spell!', who && who.path) + } else { + console.error('the spell expires!') + } + console.error('\u001b[mthe fog lifts!\n') + clearTimeout(foggy) + foggy = null + if (entry._paused) entry.resume() + } + + if (entry.type === 'Directory') { var ended = false - entry.once("end", function () { ended = true }) + entry.once('end', function () { ended = true }) return function (c) { // throw in some pathological pause()/resume() behavior // just for extra fun. process.nextTick(function () { if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") + console.error(indent + '%s casts a spell', entry.basename) + console.error('\na slowing fog comes over the battlefield...\n\u001b[32m') entry.pause() - entry.once("resume", liftFog) + entry.once('resume', liftFog) foggy = setTimeout(liftFog, 1000) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - } }) } @@ -79,53 +80,54 @@ function missile (entry) { return function (c) { var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", + console.error(indent + '%s %s for %d damage!', entry.basename, - e ? "is struck" : "fires a chunk", + e ? 'is struck' : 'fires a chunk', c.length) } } -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - +function runaway (entry) { + return function () { + var e = Math.random() < 0.5 + console.error(indent + '%s %s', + entry.basename, + e ? 'turns to flee' : 'is vanquished!') + indent = indent.slice(0, -1) + } +} -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) +w.on('entry', attacks) +// w.on('ready', function () { attacks(w) }) function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) + console.error(indent + '%s %s!', entry.basename, + entry.type === 'Directory' ? 'calls for backup' : 'attacks') + entry.on('entry', attacks) } -ended = false +var ended = false var i = 1 -r.on("end", function () { +r.on('end', function () { if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") + console.error("\u001b[mIT'S OVER!!") + console.error('A WINNAR IS YOU!') - console.log("ok " + (i ++) + " A WINNAR IS YOU") + console.log('ok ' + (i++) + ' A WINNAR IS YOU') ended = true // now go through and verify that everything in there is a dir. - var p = path.resolve(__dirname, "filter-copy") + var p = path.resolve(__dirname, 'filter-copy') var checker = fstream.Reader({ path: p }) checker.checker = true - checker.on("child", function (e) { - var ok = e.type === "Directory" - console.log((ok ? "" : "not ") + "ok " + (i ++) + - " should be a dir: " + + checker.on('child', function (e) { + var ok = e.type === 'Directory' + console.log((ok ? '' : 'not ') + 'ok ' + (i++) + + ' should be a dir: ' + e.path.substr(checker.path.length + 1)) }) }) -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok " + (i ++) + " ended") +process.on('exit', function () { + console.log((ended ? '' : 'not ') + 'ok ' + (i++) + ' ended') }) r.pipe(w) diff --git a/deps/npm/node_modules/fstream/examples/pipe.js b/deps/npm/node_modules/fstream/examples/pipe.js index 0bad122f9bd6cc..c611dd5c47b507 100644 --- a/deps/npm/node_modules/fstream/examples/pipe.js +++ b/deps/npm/node_modules/fstream/examples/pipe.js @@ -1,72 +1,73 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) && - !this.basename.match(/^deep-copy$/) - } - }) +var fstream = require('../fstream.js') +var path = require('path') + +var r = fstream.Reader({ + path: path.dirname(__dirname), + filter: function () { + return !this.basename.match(/^\./) && + !this.basename.match(/^node_modules$/) && + !this.basename.match(/^deep-copy$/) + } +}) -var w = fstream.Writer({ path: path.resolve(__dirname, "deep-copy") - , type: "Directory" - }) +var w = fstream.Writer({ + path: path.resolve(__dirname, 'deep-copy'), + type: 'Directory' +}) -var indent = "" -var escape = {} +var indent = '' -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) +r.on('entry', appears) +r.on('ready', function () { + console.error('ready to begin!', r.path) }) function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename, entry) + console.error(indent + 'a %s appears!', entry.type, entry.basename, typeof entry.basename, entry) if (foggy) { - console.error("FOGGY!") + console.error('FOGGY!') var p = entry do { console.error(p.depth, p.path, p._paused) - } while (p = p.parent) + p = p.parent + } while (p) - throw new Error("\033[mshould not have entries while foggy") + throw new Error('\u001b[mshould not have entries while foggy') } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) + indent += '\t' + entry.on('data', missile(entry)) + entry.on('end', runaway(entry)) + entry.on('entry', appears) } var foggy function missile (entry) { - if (entry.type === "Directory") { + function liftFog (who) { + if (!foggy) return + if (who) { + console.error('%s breaks the spell!', who && who.path) + } else { + console.error('the spell expires!') + } + console.error('\u001b[mthe fog lifts!\n') + clearTimeout(foggy) + foggy = null + if (entry._paused) entry.resume() + } + + if (entry.type === 'Directory') { var ended = false - entry.once("end", function () { ended = true }) + entry.once('end', function () { ended = true }) return function (c) { // throw in some pathological pause()/resume() behavior // just for extra fun. process.nextTick(function () { if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") + console.error(indent + '%s casts a spell', entry.basename) + console.error('\na slowing fog comes over the battlefield...\n\u001b[32m') entry.pause() - entry.once("resume", liftFog) + entry.once('resume', liftFog) foggy = setTimeout(liftFog, 10) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - } }) } @@ -74,42 +75,43 @@ function missile (entry) { return function (c) { var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", + console.error(indent + '%s %s for %d damage!', entry.basename, - e ? "is struck" : "fires a chunk", + e ? 'is struck' : 'fires a chunk', c.length) } } -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - +function runaway (entry) { + return function () { + var e = Math.random() < 0.5 + console.error(indent + '%s %s', + entry.basename, + e ? 'turns to flee' : 'is vanquished!') + indent = indent.slice(0, -1) + } +} -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) +w.on('entry', attacks) +// w.on('ready', function () { attacks(w) }) function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) + console.error(indent + '%s %s!', entry.basename, + entry.type === 'Directory' ? 'calls for backup' : 'attacks') + entry.on('entry', attacks) } -ended = false -r.on("end", function () { +var ended = false +r.on('end', function () { if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") + console.error("\u001b[mIT'S OVER!!") + console.error('A WINNAR IS YOU!') - console.log("ok 1 A WINNAR IS YOU") + console.log('ok 1 A WINNAR IS YOU') ended = true }) -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok 2 ended") +process.on('exit', function () { + console.log((ended ? '' : 'not ') + 'ok 2 ended') }) r.pipe(w) diff --git a/deps/npm/node_modules/fstream/examples/reader.js b/deps/npm/node_modules/fstream/examples/reader.js index 3787ae376ffe1e..19affbe7e6e23d 100644 --- a/deps/npm/node_modules/fstream/examples/reader.js +++ b/deps/npm/node_modules/fstream/examples/reader.js @@ -1,68 +1,68 @@ -var fstream = require("../fstream.js") -var tap = require("tap") -var fs = require("fs") -var path = require("path") +var fstream = require('../fstream.js') +var tap = require('tap') +var fs = require('fs') +var path = require('path') var dir = path.dirname(__dirname) -tap.test("reader test", function (t) { +tap.test('reader test', function (t) { var children = -1 var gotReady = false var ended = false - var r = fstream.Reader({ path: dir - , filter: function () { - // return this.parent === r - return this.parent === r || this === r - } - }) + var r = fstream.Reader({ + path: dir, + filter: function () { + // return this.parent === r + return this.parent === r || this === r + } + }) - r.on("ready", function () { + r.on('ready', function () { gotReady = true children = fs.readdirSync(dir).length - console.error("Setting expected children to "+children) - t.equal(r.type, "Directory", "should be a directory") + console.error('Setting expected children to ' + children) + t.equal(r.type, 'Directory', 'should be a directory') }) - r.on("entry", function (entry) { - children -- + r.on('entry', function (entry) { + children-- if (!gotReady) { - t.fail("children before ready!") + t.fail('children before ready!') } - t.equal(entry.dirname, r.path, "basename is parent dir") + t.equal(entry.dirname, r.path, 'basename is parent dir') }) - r.on("error", function (er) { + r.on('error', function (er) { t.fail(er) t.end() process.exit(1) }) - r.on("end", function () { - t.equal(children, 0, "should have seen all children") + r.on('end', function () { + t.equal(children, 0, 'should have seen all children') ended = true }) var closed = false - r.on("close", function () { - t.ok(ended, "saw end before close") - t.notOk(closed, "close should only happen once") + r.on('close', function () { + t.ok(ended, 'saw end before close') + t.notOk(closed, 'close should only happen once') closed = true t.end() }) - }) -tap.test("reader error test", function (t) { +tap.test('reader error test', function (t) { // assumes non-root on a *nix system var r = fstream.Reader({ path: '/etc/shadow' }) - r.once("error", function (er) { - t.ok(true); + r.once('error', function (er) { + t.ok(true) t.end() }) - r.on("end", function () { - t.fail("reader ended without error"); + r.on('end', function () { + t.fail('reader ended without error') t.end() }) }) diff --git a/deps/npm/node_modules/fstream/examples/symlink-write.js b/deps/npm/node_modules/fstream/examples/symlink-write.js index d7816d24dddec5..f6f51099bc25cb 100644 --- a/deps/npm/node_modules/fstream/examples/symlink-write.js +++ b/deps/npm/node_modules/fstream/examples/symlink-write.js @@ -1,24 +1,25 @@ -var fstream = require("../fstream.js") - , closed = false +var fstream = require('../fstream.js') +var notOpen = false fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , isSymbolicLink: true - , mode: "0755" // octal strings supported - }) - .on("close", function () { - closed = true - var fs = require("fs") - var s = fs.lstatSync("path/to/symlink") + .Writer({ + path: 'path/to/symlink', + linkpath: './file', + isSymbolicLink: true, + mode: '0755' // octal strings supported + }) + .on('close', function () { + notOpen = true + var fs = require('fs') + var s = fs.lstatSync('path/to/symlink') var isSym = s.isSymbolicLink() - console.log((isSym?"":"not ") +"ok 1 should be symlink") - var t = fs.readlinkSync("path/to/symlink") - var isTarget = t === "./file" - console.log((isTarget?"":"not ") +"ok 2 should link to ./file") + console.log((isSym ? '' : 'not ') + 'ok 1 should be symlink') + var t = fs.readlinkSync('path/to/symlink') + var isTarget = t === './file' + console.log((isTarget ? '' : 'not ') + 'ok 2 should link to ./file') }) .end() -process.on("exit", function () { - console.log((closed?"":"not ")+"ok 3 should be closed") +process.on('exit', function () { + console.log((notOpen ? '' : 'not ') + 'ok 3 should be closed') }) diff --git a/deps/npm/node_modules/fstream/fstream.js b/deps/npm/node_modules/fstream/fstream.js index c66d26f519bbb1..c0eb3bea788036 100644 --- a/deps/npm/node_modules/fstream/fstream.js +++ b/deps/npm/node_modules/fstream/fstream.js @@ -1,22 +1,26 @@ -exports.Abstract = require("./lib/abstract.js") -exports.Reader = require("./lib/reader.js") -exports.Writer = require("./lib/writer.js") +exports.Abstract = require('./lib/abstract.js') +exports.Reader = require('./lib/reader.js') +exports.Writer = require('./lib/writer.js') -exports.File = - { Reader: require("./lib/file-reader.js") - , Writer: require("./lib/file-writer.js") } +exports.File = { + Reader: require('./lib/file-reader.js'), + Writer: require('./lib/file-writer.js') +} -exports.Dir = - { Reader : require("./lib/dir-reader.js") - , Writer : require("./lib/dir-writer.js") } +exports.Dir = { + Reader: require('./lib/dir-reader.js'), + Writer: require('./lib/dir-writer.js') +} -exports.Link = - { Reader : require("./lib/link-reader.js") - , Writer : require("./lib/link-writer.js") } +exports.Link = { + Reader: require('./lib/link-reader.js'), + Writer: require('./lib/link-writer.js') +} -exports.Proxy = - { Reader : require("./lib/proxy-reader.js") - , Writer : require("./lib/proxy-writer.js") } +exports.Proxy = { + Reader: require('./lib/proxy-reader.js'), + Writer: require('./lib/proxy-writer.js') +} exports.Reader.Dir = exports.DirReader = exports.Dir.Reader exports.Reader.File = exports.FileReader = exports.File.Reader @@ -28,4 +32,4 @@ exports.Writer.File = exports.FileWriter = exports.File.Writer exports.Writer.Link = exports.LinkWriter = exports.Link.Writer exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer -exports.collect = require("./lib/collect.js") +exports.collect = require('./lib/collect.js') diff --git a/deps/npm/node_modules/fstream/lib/abstract.js b/deps/npm/node_modules/fstream/lib/abstract.js index 11ef0e28fb3e2f..94af1ae08656dd 100644 --- a/deps/npm/node_modules/fstream/lib/abstract.js +++ b/deps/npm/node_modules/fstream/lib/abstract.js @@ -2,8 +2,8 @@ module.exports = Abstract -var Stream = require("stream").Stream - , inherits = require("inherits") +var Stream = require('stream').Stream +var inherits = require('inherits') function Abstract () { Stream.call(this) @@ -12,7 +12,7 @@ function Abstract () { inherits(Abstract, Stream) Abstract.prototype.on = function (ev, fn) { - if (ev === "ready" && this.ready) { + if (ev === 'ready' && this.ready) { process.nextTick(fn.bind(this)) } else { Stream.prototype.on.call(this, ev, fn) @@ -22,24 +22,24 @@ Abstract.prototype.on = function (ev, fn) { Abstract.prototype.abort = function () { this._aborted = true - this.emit("abort") + this.emit('abort') } Abstract.prototype.destroy = function () {} Abstract.prototype.warn = function (msg, code) { - var me = this - , er = decorate(msg, code, me) - if (!me.listeners("warn")) { - console.error("%s %s\n" + - "path = %s\n" + - "syscall = %s\n" + - "fstream_type = %s\n" + - "fstream_path = %s\n" + - "fstream_unc_path = %s\n" + - "fstream_class = %s\n" + - "fstream_stack =\n%s\n", - code || "UNKNOWN", + var self = this + var er = decorate(msg, code, self) + if (!self.listeners('warn')) { + console.error('%s %s\n' + + 'path = %s\n' + + 'syscall = %s\n' + + 'fstream_type = %s\n' + + 'fstream_path = %s\n' + + 'fstream_unc_path = %s\n' + + 'fstream_class = %s\n' + + 'fstream_stack =\n%s\n', + code || 'UNKNOWN', er.stack, er.path, er.syscall, @@ -47,38 +47,38 @@ Abstract.prototype.warn = function (msg, code) { er.fstream_path, er.fstream_unc_path, er.fstream_class, - er.fstream_stack.join("\n")) + er.fstream_stack.join('\n')) } else { - me.emit("warn", er) + self.emit('warn', er) } } Abstract.prototype.info = function (msg, code) { - this.emit("info", msg, code) + this.emit('info', msg, code) } Abstract.prototype.error = function (msg, code, th) { var er = decorate(msg, code, this) if (th) throw er - else this.emit("error", er) + else this.emit('error', er) } -function decorate (er, code, me) { +function decorate (er, code, self) { if (!(er instanceof Error)) er = new Error(er) er.code = er.code || code - er.path = er.path || me.path - er.fstream_type = er.fstream_type || me.type - er.fstream_path = er.fstream_path || me.path - if (me._path !== me.path) { - er.fstream_unc_path = er.fstream_unc_path || me._path + er.path = er.path || self.path + er.fstream_type = er.fstream_type || self.type + er.fstream_path = er.fstream_path || self.path + if (self._path !== self.path) { + er.fstream_unc_path = er.fstream_unc_path || self._path } - if (me.linkpath) { - er.fstream_linkpath = er.fstream_linkpath || me.linkpath + if (self.linkpath) { + er.fstream_linkpath = er.fstream_linkpath || self.linkpath } - er.fstream_class = er.fstream_class || me.constructor.name + er.fstream_class = er.fstream_class || self.constructor.name er.fstream_stack = er.fstream_stack || new Error().stack.split(/\n/).slice(3).map(function (s) { - return s.replace(/^ at /, "") + return s.replace(/^ {4}at /, '') }) return er diff --git a/deps/npm/node_modules/fstream/lib/collect.js b/deps/npm/node_modules/fstream/lib/collect.js index a36f780eb2c6b3..6245e6ce492d20 100644 --- a/deps/npm/node_modules/fstream/lib/collect.js +++ b/deps/npm/node_modules/fstream/lib/collect.js @@ -6,62 +6,63 @@ function collect (stream) { stream._collected = true stream.pause() - stream.on("data", save) - stream.on("end", save) + stream.on('data', save) + stream.on('end', save) var buf = [] function save (b) { - if (typeof b === "string") b = new Buffer(b) + if (typeof b === 'string') b = new Buffer(b) if (Buffer.isBuffer(b) && !b.length) return buf.push(b) } - stream.on("entry", saveEntry) + stream.on('entry', saveEntry) var entryBuffer = [] function saveEntry (e) { collect(e) entryBuffer.push(e) } - stream.on("proxy", proxyPause) + stream.on('proxy', proxyPause) function proxyPause (p) { p.pause() } - // replace the pipe method with a new version that will // unlock the buffered stuff. if you just call .pipe() // without a destination, then it'll re-play the events. - stream.pipe = (function (orig) { return function (dest) { - // console.error(" === open the pipes", dest && dest.path) + stream.pipe = (function (orig) { + return function (dest) { + // console.error(' === open the pipes', dest && dest.path) - // let the entries flow through one at a time. - // Once they're all done, then we can resume completely. - var e = 0 - ;(function unblockEntry () { - var entry = entryBuffer[e++] - // console.error(" ==== unblock entry", entry && entry.path) - if (!entry) return resume() - entry.on("end", unblockEntry) - if (dest) dest.add(entry) - else stream.emit("entry", entry) - })() + // let the entries flow through one at a time. + // Once they're all done, then we can resume completely. + var e = 0 + ;(function unblockEntry () { + var entry = entryBuffer[e++] + // console.error(" ==== unblock entry", entry && entry.path) + if (!entry) return resume() + entry.on('end', unblockEntry) + if (dest) dest.add(entry) + else stream.emit('entry', entry) + })() - function resume () { - stream.removeListener("entry", saveEntry) - stream.removeListener("data", save) - stream.removeListener("end", save) + function resume () { + stream.removeListener('entry', saveEntry) + stream.removeListener('data', save) + stream.removeListener('end', save) - stream.pipe = orig - if (dest) stream.pipe(dest) + stream.pipe = orig + if (dest) stream.pipe(dest) - buf.forEach(function (b) { - if (b) stream.emit("data", b) - else stream.emit("end") - }) + buf.forEach(function (b) { + if (b) stream.emit('data', b) + else stream.emit('end') + }) - stream.resume() - } + stream.resume() + } - return dest - }})(stream.pipe) + return dest + } + })(stream.pipe) } diff --git a/deps/npm/node_modules/fstream/lib/dir-reader.js b/deps/npm/node_modules/fstream/lib/dir-reader.js index 346ac2b8317716..820cdc85a8e9c4 100644 --- a/deps/npm/node_modules/fstream/lib/dir-reader.js +++ b/deps/npm/node_modules/fstream/lib/dir-reader.js @@ -4,31 +4,29 @@ module.exports = DirReader -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , Reader = require("./reader.js") - , assert = require("assert").ok +var fs = require('graceful-fs') +var inherits = require('inherits') +var path = require('path') +var Reader = require('./reader.js') +var assert = require('assert').ok inherits(DirReader, Reader) function DirReader (props) { - var me = this - if (!(me instanceof DirReader)) throw new Error( - "DirReader must be called as constructor.") + var self = this + if (!(self instanceof DirReader)) { + throw new Error('DirReader must be called as constructor.') + } // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - throw new Error("Non-directory type "+ props.type) + if (props.type !== 'Directory' || !props.Directory) { + throw new Error('Non-directory type ' + props.type) } - me.entries = null - me._index = -1 - me._paused = false - me._length = -1 + self.entries = null + self._index = -1 + self._paused = false + self._length = -1 if (props.sort) { this.sort = props.sort @@ -38,49 +36,49 @@ function DirReader (props) { } DirReader.prototype._getEntries = function () { - var me = this + var self = this // race condition. might pause() before calling _getEntries, // and then resume, and try to get them a second time. - if (me._gotEntries) return - me._gotEntries = true + if (self._gotEntries) return + self._gotEntries = true - fs.readdir(me._path, function (er, entries) { - if (er) return me.error(er) + fs.readdir(self._path, function (er, entries) { + if (er) return self.error(er) - me.entries = entries + self.entries = entries - me.emit("entries", entries) - if (me._paused) me.once("resume", processEntries) + self.emit('entries', entries) + if (self._paused) self.once('resume', processEntries) else processEntries() function processEntries () { - me._length = me.entries.length - if (typeof me.sort === "function") { - me.entries = me.entries.sort(me.sort.bind(me)) + self._length = self.entries.length + if (typeof self.sort === 'function') { + self.entries = self.entries.sort(self.sort.bind(self)) } - me._read() + self._read() } }) } // start walking the dir, and emit an "entry" event for each one. DirReader.prototype._read = function () { - var me = this + var self = this - if (!me.entries) return me._getEntries() + if (!self.entries) return self._getEntries() - if (me._paused || me._currentEntry || me._aborted) { - // console.error("DR paused=%j, current=%j, aborted=%j", me._paused, !!me._currentEntry, me._aborted) + if (self._paused || self._currentEntry || self._aborted) { + // console.error('DR paused=%j, current=%j, aborted=%j', self._paused, !!self._currentEntry, self._aborted) return } - me._index ++ - if (me._index >= me.entries.length) { - if (!me._ended) { - me._ended = true - me.emit("end") - me.emit("close") + self._index++ + if (self._index >= self.entries.length) { + if (!self._ended) { + self._ended = true + self.emit('end') + self.emit('close') } return } @@ -88,21 +86,21 @@ DirReader.prototype._read = function () { // ok, handle this one, then. // save creating a proxy, by stat'ing the thing now. - var p = path.resolve(me._path, me.entries[me._index]) - assert(p !== me._path) - assert(me.entries[me._index]) + var p = path.resolve(self._path, self.entries[self._index]) + assert(p !== self._path) + assert(self.entries[self._index]) // set this to prevent trying to _read() again in the stat time. - me._currentEntry = p - fs[ me.props.follow ? "stat" : "lstat" ](p, function (er, stat) { - if (er) return me.error(er) + self._currentEntry = p + fs[ self.props.follow ? 'stat' : 'lstat' ](p, function (er, stat) { + if (er) return self.error(er) - var who = me._proxy || me + var who = self._proxy || self stat.path = p stat.basename = path.basename(p) stat.dirname = path.dirname(p) - var childProps = me.getChildProps.call(who, stat) + var childProps = self.getChildProps.call(who, stat) childProps.path = p childProps.basename = path.basename(p) childProps.dirname = path.dirname(p) @@ -111,141 +109,144 @@ DirReader.prototype._read = function () { // console.error("DR Entry", p, stat.size) - me._currentEntry = entry + self._currentEntry = entry // "entry" events are for direct entries in a specific dir. // "child" events are for any and all children at all levels. // This nomenclature is not completely final. - entry.on("pause", function (who) { - if (!me._paused && !entry._disowned) { - me.pause(who) + entry.on('pause', function (who) { + if (!self._paused && !entry._disowned) { + self.pause(who) } }) - entry.on("resume", function (who) { - if (me._paused && !entry._disowned) { - me.resume(who) + entry.on('resume', function (who) { + if (self._paused && !entry._disowned) { + self.resume(who) } }) - entry.on("stat", function (props) { - me.emit("_entryStat", entry, props) + entry.on('stat', function (props) { + self.emit('_entryStat', entry, props) if (entry._aborted) return - if (entry._paused) entry.once("resume", function () { - me.emit("entryStat", entry, props) - }) - else me.emit("entryStat", entry, props) + if (entry._paused) { + entry.once('resume', function () { + self.emit('entryStat', entry, props) + }) + } else self.emit('entryStat', entry, props) }) - entry.on("ready", function EMITCHILD () { + entry.on('ready', function EMITCHILD () { // console.error("DR emit child", entry._path) - if (me._paused) { + if (self._paused) { // console.error(" DR emit child - try again later") // pause the child, and emit the "entry" event once we drain. // console.error("DR pausing child entry") - entry.pause(me) - return me.once("resume", EMITCHILD) + entry.pause(self) + return self.once('resume', EMITCHILD) } // skip over sockets. they can't be piped around properly, // so there's really no sense even acknowledging them. // if someone really wants to see them, they can listen to // the "socket" events. - if (entry.type === "Socket") { - me.emit("socket", entry) + if (entry.type === 'Socket') { + self.emit('socket', entry) } else { - me.emitEntry(entry) + self.emitEntry(entry) } }) var ended = false - entry.on("close", onend) - entry.on("disown", onend) + entry.on('close', onend) + entry.on('disown', onend) function onend () { if (ended) return ended = true - me.emit("childEnd", entry) - me.emit("entryEnd", entry) - me._currentEntry = null - if (!me._paused) { - me._read() + self.emit('childEnd', entry) + self.emit('entryEnd', entry) + self._currentEntry = null + if (!self._paused) { + self._read() } } // XXX Remove this. Works in node as of 0.6.2 or so. // Long filenames should not break stuff. - entry.on("error", function (er) { + entry.on('error', function (er) { if (entry._swallowErrors) { - me.warn(er) - entry.emit("end") - entry.emit("close") + self.warn(er) + entry.emit('end') + entry.emit('close') } else { - me.emit("error", er) + self.emit('error', er) } }) // proxy up some events. - ; [ "child" - , "childEnd" - , "warn" - ].forEach(function (ev) { - entry.on(ev, me.emit.bind(me, ev)) - }) + ;[ + 'child', + 'childEnd', + 'warn' + ].forEach(function (ev) { + entry.on(ev, self.emit.bind(self, ev)) + }) }) } DirReader.prototype.disown = function (entry) { - entry.emit("beforeDisown") + entry.emit('beforeDisown') entry._disowned = true entry.parent = entry.root = null if (entry === this._currentEntry) { this._currentEntry = null } - entry.emit("disown") + entry.emit('disown') } -DirReader.prototype.getChildProps = function (stat) { - return { depth: this.depth + 1 - , root: this.root || this - , parent: this - , follow: this.follow - , filter: this.filter - , sort: this.props.sort - , hardlinks: this.props.hardlinks - } +DirReader.prototype.getChildProps = function () { + return { + depth: this.depth + 1, + root: this.root || this, + parent: this, + follow: this.follow, + filter: this.filter, + sort: this.props.sort, + hardlinks: this.props.hardlinks + } } DirReader.prototype.pause = function (who) { - var me = this - if (me._paused) return - who = who || me - me._paused = true - if (me._currentEntry && me._currentEntry.pause) { - me._currentEntry.pause(who) + var self = this + if (self._paused) return + who = who || self + self._paused = true + if (self._currentEntry && self._currentEntry.pause) { + self._currentEntry.pause(who) } - me.emit("pause", who) + self.emit('pause', who) } DirReader.prototype.resume = function (who) { - var me = this - if (!me._paused) return - who = who || me - - me._paused = false - // console.error("DR Emit Resume", me._path) - me.emit("resume", who) - if (me._paused) { - // console.error("DR Re-paused", me._path) + var self = this + if (!self._paused) return + who = who || self + + self._paused = false + // console.error('DR Emit Resume', self._path) + self.emit('resume', who) + if (self._paused) { + // console.error('DR Re-paused', self._path) return } - if (me._currentEntry) { - if (me._currentEntry.resume) me._currentEntry.resume(who) - } else me._read() + if (self._currentEntry) { + if (self._currentEntry.resume) self._currentEntry.resume(who) + } else self._read() } DirReader.prototype.emitEntry = function (entry) { - this.emit("entry", entry) - this.emit("child", entry) + this.emit('entry', entry) + this.emit('child', entry) } diff --git a/deps/npm/node_modules/fstream/lib/dir-writer.js b/deps/npm/node_modules/fstream/lib/dir-writer.js index 7073b883ea282e..aed9e4db146d77 100644 --- a/deps/npm/node_modules/fstream/lib/dir-writer.js +++ b/deps/npm/node_modules/fstream/lib/dir-writer.js @@ -6,38 +6,37 @@ module.exports = DirWriter -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Writer = require("./writer.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , collect = require("./collect.js") +var Writer = require('./writer.js') +var inherits = require('inherits') +var mkdir = require('mkdirp') +var path = require('path') +var collect = require('./collect.js') inherits(DirWriter, Writer) function DirWriter (props) { - var me = this - if (!(me instanceof DirWriter)) me.error( - "DirWriter must be called as constructor.", null, true) + var self = this + if (!(self instanceof DirWriter)) { + self.error('DirWriter must be called as constructor.', null, true) + } // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - me.error("Non-directory type "+ props.type + " " + - JSON.stringify(props), null, true) + if (props.type !== 'Directory' || !props.Directory) { + self.error('Non-directory type ' + props.type + ' ' + + JSON.stringify(props), null, true) } Writer.call(this, props) } DirWriter.prototype._create = function () { - var me = this - mkdir(me._path, Writer.dirmode, function (er) { - if (er) return me.error(er) + var self = this + mkdir(self._path, Writer.dirmode, function (er) { + if (er) return self.error(er) // ready to start getting entries! - me.ready = true - me.emit("ready") - me._process() + self.ready = true + self.emit('ready') + self._process() }) } @@ -55,78 +54,82 @@ DirWriter.prototype.end = function () { } DirWriter.prototype.add = function (entry) { - var me = this + var self = this - // console.error("\tadd", entry._path, "->", me._path) + // console.error('\tadd', entry._path, '->', self._path) collect(entry) - if (!me.ready || me._currentEntry) { - me._buffer.push(entry) + if (!self.ready || self._currentEntry) { + self._buffer.push(entry) return false } // create a new writer, and pipe the incoming entry into it. - if (me._ended) { - return me.error("add after end") + if (self._ended) { + return self.error('add after end') } - me._buffer.push(entry) - me._process() + self._buffer.push(entry) + self._process() - return 0 === this._buffer.length + return this._buffer.length === 0 } DirWriter.prototype._process = function () { - var me = this + var self = this - // console.error("DW Process p=%j", me._processing, me.basename) + // console.error('DW Process p=%j', self._processing, self.basename) - if (me._processing) return + if (self._processing) return - var entry = me._buffer.shift() + var entry = self._buffer.shift() if (!entry) { // console.error("DW Drain") - me.emit("drain") - if (me._ended) me._finish() + self.emit('drain') + if (self._ended) self._finish() return } - me._processing = true + self._processing = true // console.error("DW Entry", entry._path) - me.emit("entry", entry) + self.emit('entry', entry) // ok, add this entry // // don't allow recursive copying var p = entry + var pp do { - var pp = p._path || p.path - if (pp === me.root._path || pp === me._path || - (pp && pp.indexOf(me._path) === 0)) { - // console.error("DW Exit (recursive)", entry.basename, me._path) - me._processing = false + pp = p._path || p.path + if (pp === self.root._path || pp === self._path || + (pp && pp.indexOf(self._path) === 0)) { + // console.error('DW Exit (recursive)', entry.basename, self._path) + self._processing = false if (entry._collected) entry.pipe() - return me._process() + return self._process() } - } while (p = p.parent) + p = p.parent + } while (p) // console.error("DW not recursive") // chop off the entry's root dir, replace with ours - var props = { parent: me - , root: me.root || me - , type: entry.type - , depth: me.depth + 1 } + var props = { + parent: self, + root: self.root || self, + type: entry.type, + depth: self.depth + 1 + } - var p = entry._path || entry.path || entry.props.path + pp = entry._path || entry.path || entry.props.path if (entry.parent) { - p = p.substr(entry.parent._path.length + 1) + pp = pp.substr(entry.parent._path.length + 1) } // get rid of any ../../ shenanigans - props.path = path.join(me.path, path.join("/", p)) + props.path = path.join(self.path, path.join('/', pp)) // if i have a filter, the child should inherit it. - props.filter = me.filter + props.filter = self.filter // all the rest of the stuff, copy over from the source. Object.keys(entry.props).forEach(function (k) { @@ -136,8 +139,8 @@ DirWriter.prototype._process = function () { }) // not sure at this point what kind of writer this is. - var child = me._currentChild = new Writer(props) - child.on("ready", function () { + var child = self._currentChild = new Writer(props) + child.on('ready', function () { // console.error("DW Child Ready", child.type, child._path) // console.error(" resuming", entry._path) entry.pipe(child) @@ -146,26 +149,26 @@ DirWriter.prototype._process = function () { // XXX Make this work in node. // Long filenames should not break stuff. - child.on("error", function (er) { + child.on('error', function (er) { if (child._swallowErrors) { - me.warn(er) - child.emit("end") - child.emit("close") + self.warn(er) + child.emit('end') + child.emit('close') } else { - me.emit("error", er) + self.emit('error', er) } }) // we fire _end internally *after* end, so that we don't move on // until any "end" listeners have had their chance to do stuff. - child.on("close", onend) + child.on('close', onend) var ended = false function onend () { if (ended) return ended = true // console.error("* DW Child end", child.basename) - me._currentChild = null - me._processing = false - me._process() + self._currentChild = null + self._processing = false + self._process() } } diff --git a/deps/npm/node_modules/fstream/lib/file-reader.js b/deps/npm/node_modules/fstream/lib/file-reader.js index 4720cd86a4aa38..0757b286b50bed 100644 --- a/deps/npm/node_modules/fstream/lib/file-reader.js +++ b/deps/npm/node_modules/fstream/lib/file-reader.js @@ -2,150 +2,149 @@ module.exports = FileReader -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - , EOF = {EOF: true} - , CLOSE = {CLOSE: true} +var fs = require('graceful-fs') +var inherits = require('inherits') +var Reader = require('./reader.js') +var EOF = {EOF: true} +var CLOSE = {CLOSE: true} inherits(FileReader, Reader) function FileReader (props) { // console.error(" FR create", props.path, props.size, new Error().stack) - var me = this - if (!(me instanceof FileReader)) throw new Error( - "FileReader must be called as constructor.") + var self = this + if (!(self instanceof FileReader)) { + throw new Error('FileReader must be called as constructor.') + } // should already be established as a File type // XXX Todo: preserve hardlinks by tracking dev+inode+nlink, // with a HardLinkReader class. - if (!((props.type === "Link" && props.Link) || - (props.type === "File" && props.File))) { - throw new Error("Non-file type "+ props.type) + if (!((props.type === 'Link' && props.Link) || + (props.type === 'File' && props.File))) { + throw new Error('Non-file type ' + props.type) } - me._buffer = [] - me._bytesEmitted = 0 - Reader.call(me, props) + self._buffer = [] + self._bytesEmitted = 0 + Reader.call(self, props) } FileReader.prototype._getStream = function () { - var me = this - , stream = me._stream = fs.createReadStream(me._path, me.props) + var self = this + var stream = self._stream = fs.createReadStream(self._path, self.props) - if (me.props.blksize) { - stream.bufferSize = me.props.blksize + if (self.props.blksize) { + stream.bufferSize = self.props.blksize } - stream.on("open", me.emit.bind(me, "open")) + stream.on('open', self.emit.bind(self, 'open')) - stream.on("data", function (c) { - // console.error("\t\t%d %s", c.length, me.basename) - me._bytesEmitted += c.length + stream.on('data', function (c) { + // console.error('\t\t%d %s', c.length, self.basename) + self._bytesEmitted += c.length // no point saving empty chunks - if (!c.length) return - else if (me._paused || me._buffer.length) { - me._buffer.push(c) - me._read() - } else me.emit("data", c) + if (!c.length) { + return + } else if (self._paused || self._buffer.length) { + self._buffer.push(c) + self._read() + } else self.emit('data', c) }) - stream.on("end", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering End", me._path) - me._buffer.push(EOF) - me._read() + stream.on('end', function () { + if (self._paused || self._buffer.length) { + // console.error('FR Buffering End', self._path) + self._buffer.push(EOF) + self._read() } else { - me.emit("end") + self.emit('end') } - if (me._bytesEmitted !== me.props.size) { - me.error("Didn't get expected byte count\n"+ - "expect: "+me.props.size + "\n" + - "actual: "+me._bytesEmitted) + if (self._bytesEmitted !== self.props.size) { + self.error("Didn't get expected byte count\n" + + 'expect: ' + self.props.size + '\n' + + 'actual: ' + self._bytesEmitted) } }) - stream.on("close", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering Close", me._path) - me._buffer.push(CLOSE) - me._read() + stream.on('close', function () { + if (self._paused || self._buffer.length) { + // console.error('FR Buffering Close', self._path) + self._buffer.push(CLOSE) + self._read() } else { - // console.error("FR close 1", me._path) - me.emit("close") + // console.error('FR close 1', self._path) + self.emit('close') } }) - stream.on("error", function (e) { - me.emit("error", e); - }); + stream.on('error', function (e) { + self.emit('error', e) + }) - me._read() + self._read() } FileReader.prototype._read = function () { - var me = this - // console.error("FR _read", me._path) - if (me._paused) { - // console.error("FR _read paused", me._path) + var self = this + // console.error('FR _read', self._path) + if (self._paused) { + // console.error('FR _read paused', self._path) return } - if (!me._stream) { - // console.error("FR _getStream calling", me._path) - return me._getStream() + if (!self._stream) { + // console.error('FR _getStream calling', self._path) + return self._getStream() } // clear out the buffer, if there is one. - if (me._buffer.length) { - // console.error("FR _read has buffer", me._buffer.length, me._path) - var buf = me._buffer - for (var i = 0, l = buf.length; i < l; i ++) { + if (self._buffer.length) { + // console.error('FR _read has buffer', self._buffer.length, self._path) + var buf = self._buffer + for (var i = 0, l = buf.length; i < l; i++) { var c = buf[i] if (c === EOF) { - // console.error("FR Read emitting buffered end", me._path) - me.emit("end") + // console.error('FR Read emitting buffered end', self._path) + self.emit('end') } else if (c === CLOSE) { - // console.error("FR Read emitting buffered close", me._path) - me.emit("close") + // console.error('FR Read emitting buffered close', self._path) + self.emit('close') } else { - // console.error("FR Read emitting buffered data", me._path) - me.emit("data", c) + // console.error('FR Read emitting buffered data', self._path) + self.emit('data', c) } - if (me._paused) { - // console.error("FR Read Re-pausing at "+i, me._path) - me._buffer = buf.slice(i) + if (self._paused) { + // console.error('FR Read Re-pausing at '+i, self._path) + self._buffer = buf.slice(i) return } } - me._buffer.length = 0 + self._buffer.length = 0 } // console.error("FR _read done") // that's about all there is to it. } FileReader.prototype.pause = function (who) { - var me = this - // console.error("FR Pause", me._path) - if (me._paused) return - who = who || me - me._paused = true - if (me._stream) me._stream.pause() - me.emit("pause", who) + var self = this + // console.error('FR Pause', self._path) + if (self._paused) return + who = who || self + self._paused = true + if (self._stream) self._stream.pause() + self.emit('pause', who) } FileReader.prototype.resume = function (who) { - var me = this - // console.error("FR Resume", me._path) - if (!me._paused) return - who = who || me - me.emit("resume", who) - me._paused = false - if (me._stream) me._stream.resume() - me._read() + var self = this + // console.error('FR Resume', self._path) + if (!self._paused) return + who = who || self + self.emit('resume', who) + self._paused = false + if (self._stream) self._stream.resume() + self._read() } diff --git a/deps/npm/node_modules/fstream/lib/file-writer.js b/deps/npm/node_modules/fstream/lib/file-writer.js index 5e9902a6316f02..4c803d8d68d2f5 100644 --- a/deps/npm/node_modules/fstream/lib/file-writer.js +++ b/deps/npm/node_modules/fstream/lib/file-writer.js @@ -1,104 +1,107 @@ module.exports = FileWriter -var fs = require("graceful-fs") - , mkdir = require("mkdirp") - , Writer = require("./writer.js") - , inherits = require("inherits") - , EOF = {} +var fs = require('graceful-fs') +var Writer = require('./writer.js') +var inherits = require('inherits') +var EOF = {} inherits(FileWriter, Writer) function FileWriter (props) { - var me = this - if (!(me instanceof FileWriter)) throw new Error( - "FileWriter must be called as constructor.") + var self = this + if (!(self instanceof FileWriter)) { + throw new Error('FileWriter must be called as constructor.') + } // should already be established as a File type - if (props.type !== "File" || !props.File) { - throw new Error("Non-file type "+ props.type) + if (props.type !== 'File' || !props.File) { + throw new Error('Non-file type ' + props.type) } - me._buffer = [] - me._bytesWritten = 0 + self._buffer = [] + self._bytesWritten = 0 Writer.call(this, props) } FileWriter.prototype._create = function () { - var me = this - if (me._stream) return + var self = this + if (self._stream) return var so = {} - if (me.props.flags) so.flags = me.props.flags + if (self.props.flags) so.flags = self.props.flags so.mode = Writer.filemode - if (me._old && me._old.blksize) so.bufferSize = me._old.blksize + if (self._old && self._old.blksize) so.bufferSize = self._old.blksize - me._stream = fs.createWriteStream(me._path, so) + self._stream = fs.createWriteStream(self._path, so) - me._stream.on("open", function (fd) { - // console.error("FW open", me._buffer, me._path) - me.ready = true - me._buffer.forEach(function (c) { - if (c === EOF) me._stream.end() - else me._stream.write(c) + self._stream.on('open', function () { + // console.error("FW open", self._buffer, self._path) + self.ready = true + self._buffer.forEach(function (c) { + if (c === EOF) self._stream.end() + else self._stream.write(c) }) - me.emit("ready") + self.emit('ready') // give this a kick just in case it needs it. - me.emit("drain") + self.emit('drain') }) - me._stream.on("drain", function () { me.emit("drain") }) + self._stream.on('error', function (er) { self.emit('error', er) }) + + self._stream.on('drain', function () { self.emit('drain') }) - me._stream.on("close", function () { - // console.error("\n\nFW Stream Close", me._path, me.size) - me._finish() + self._stream.on('close', function () { + // console.error('\n\nFW Stream Close', self._path, self.size) + self._finish() }) } FileWriter.prototype.write = function (c) { - var me = this + var self = this - me._bytesWritten += c.length + self._bytesWritten += c.length - if (!me.ready) { - if (!Buffer.isBuffer(c) && typeof c !== 'string') + if (!self.ready) { + if (!Buffer.isBuffer(c) && typeof c !== 'string') { throw new Error('invalid write data') - me._buffer.push(c) + } + self._buffer.push(c) return false } - var ret = me._stream.write(c) - // console.error("\t-- fw wrote, _stream says", ret, me._stream._queue.length) + var ret = self._stream.write(c) + // console.error('\t-- fw wrote, _stream says', ret, self._stream._queue.length) // allow 2 buffered writes, because otherwise there's just too // much stop and go bs. - if (ret === false && me._stream._queue) { - return me._stream._queue.length <= 2; + if (ret === false && self._stream._queue) { + return self._stream._queue.length <= 2 } else { - return ret; + return ret } } FileWriter.prototype.end = function (c) { - var me = this + var self = this - if (c) me.write(c) + if (c) self.write(c) - if (!me.ready) { - me._buffer.push(EOF) + if (!self.ready) { + self._buffer.push(EOF) return false } - return me._stream.end() + return self._stream.end() } FileWriter.prototype._finish = function () { - var me = this - if (typeof me.size === "number" && me._bytesWritten != me.size) { - me.error( - "Did not get expected byte count.\n" + - "expect: " + me.size + "\n" + - "actual: " + me._bytesWritten) + var self = this + if (typeof self.size === 'number' && self._bytesWritten !== self.size) { + self.error( + 'Did not get expected byte count.\n' + + 'expect: ' + self.size + '\n' + + 'actual: ' + self._bytesWritten) } - Writer.prototype._finish.call(me) + Writer.prototype._finish.call(self) } diff --git a/deps/npm/node_modules/fstream/lib/get-type.js b/deps/npm/node_modules/fstream/lib/get-type.js index cd65c41d8bcf9e..19f6a657db8475 100644 --- a/deps/npm/node_modules/fstream/lib/get-type.js +++ b/deps/npm/node_modules/fstream/lib/get-type.js @@ -1,26 +1,27 @@ module.exports = getType function getType (st) { - var types = - [ "Directory" - , "File" - , "SymbolicLink" - , "Link" // special for hardlinks from tarballs - , "BlockDevice" - , "CharacterDevice" - , "FIFO" - , "Socket" ] - , type + var types = [ + 'Directory', + 'File', + 'SymbolicLink', + 'Link', // special for hardlinks from tarballs + 'BlockDevice', + 'CharacterDevice', + 'FIFO', + 'Socket' + ] + var type - if (st.type && -1 !== types.indexOf(st.type)) { + if (st.type && types.indexOf(st.type) !== -1) { st[st.type] = true return st.type } - for (var i = 0, l = types.length; i < l; i ++) { + for (var i = 0, l = types.length; i < l; i++) { type = types[i] - var is = st[type] || st["is" + type] - if (typeof is === "function") is = is.call(st) + var is = st[type] || st['is' + type] + if (typeof is === 'function') is = is.call(st) if (is) { st[type] = true st.type = type diff --git a/deps/npm/node_modules/fstream/lib/link-reader.js b/deps/npm/node_modules/fstream/lib/link-reader.js index 7e7ab6ce5c0e07..a44dd39d7cdb98 100644 --- a/deps/npm/node_modules/fstream/lib/link-reader.js +++ b/deps/npm/node_modules/fstream/lib/link-reader.js @@ -6,25 +6,24 @@ module.exports = LinkReader -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") +var fs = require('graceful-fs') +var inherits = require('inherits') +var Reader = require('./reader.js') inherits(LinkReader, Reader) function LinkReader (props) { - var me = this - if (!(me instanceof LinkReader)) throw new Error( - "LinkReader must be called as constructor.") + var self = this + if (!(self instanceof LinkReader)) { + throw new Error('LinkReader must be called as constructor.') + } - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) + if (!((props.type === 'Link' && props.Link) || + (props.type === 'SymbolicLink' && props.SymbolicLink))) { + throw new Error('Non-link type ' + props.type) } - Reader.call(me, props) + Reader.call(self, props) } // When piping a LinkReader into a LinkWriter, we have to @@ -32,23 +31,23 @@ function LinkReader (props) { // happen *before* the "ready" event, which means we need to // override the _stat method. LinkReader.prototype._stat = function (currentStat) { - var me = this - fs.readlink(me._path, function (er, linkpath) { - if (er) return me.error(er) - me.linkpath = me.props.linkpath = linkpath - me.emit("linkpath", linkpath) - Reader.prototype._stat.call(me, currentStat) + var self = this + fs.readlink(self._path, function (er, linkpath) { + if (er) return self.error(er) + self.linkpath = self.props.linkpath = linkpath + self.emit('linkpath', linkpath) + Reader.prototype._stat.call(self, currentStat) }) } LinkReader.prototype._read = function () { - var me = this - if (me._paused) return + var self = this + if (self._paused) return // basically just a no-op, since we got all the info we need // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true + if (!self._ended) { + self.emit('end') + self.emit('close') + self._ended = true } } diff --git a/deps/npm/node_modules/fstream/lib/link-writer.js b/deps/npm/node_modules/fstream/lib/link-writer.js index 5c8f1e7012899d..07a9abf7e6f9cd 100644 --- a/deps/npm/node_modules/fstream/lib/link-writer.js +++ b/deps/npm/node_modules/fstream/lib/link-writer.js @@ -1,28 +1,28 @@ - module.exports = LinkWriter -var fs = require("graceful-fs") - , Writer = require("./writer.js") - , inherits = require("inherits") - , path = require("path") - , rimraf = require("rimraf") +var fs = require('graceful-fs') +var Writer = require('./writer.js') +var inherits = require('inherits') +var path = require('path') +var rimraf = require('rimraf') inherits(LinkWriter, Writer) function LinkWriter (props) { - var me = this - if (!(me instanceof LinkWriter)) throw new Error( - "LinkWriter must be called as constructor.") + var self = this + if (!(self instanceof LinkWriter)) { + throw new Error('LinkWriter must be called as constructor.') + } // should already be established as a Link type - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) + if (!((props.type === 'Link' && props.Link) || + (props.type === 'SymbolicLink' && props.SymbolicLink))) { + throw new Error('Non-link type ' + props.type) } - if (props.linkpath === "") props.linkpath = "." + if (props.linkpath === '') props.linkpath = '.' if (!props.linkpath) { - me.error("Need linkpath property to create " + props.type) + self.error('Need linkpath property to create ' + props.type) } Writer.call(this, props) @@ -30,32 +30,32 @@ function LinkWriter (props) { LinkWriter.prototype._create = function () { // console.error(" LW _create") - var me = this - , hard = me.type === "Link" || process.platform === "win32" - , link = hard ? "link" : "symlink" - , lp = hard ? path.resolve(me.dirname, me.linkpath) : me.linkpath + var self = this + var hard = self.type === 'Link' || process.platform === 'win32' + var link = hard ? 'link' : 'symlink' + var lp = hard ? path.resolve(self.dirname, self.linkpath) : self.linkpath // can only change the link path by clobbering // For hard links, let's just assume that's always the case, since // there's no good way to read them if we don't already know. - if (hard) return clobber(me, lp, link) + if (hard) return clobber(self, lp, link) - fs.readlink(me._path, function (er, p) { + fs.readlink(self._path, function (er, p) { // only skip creation if it's exactly the same link - if (p && p === lp) return finish(me) - clobber(me, lp, link) + if (p && p === lp) return finish(self) + clobber(self, lp, link) }) } -function clobber (me, lp, link) { - rimraf(me._path, function (er) { - if (er) return me.error(er) - create(me, lp, link) +function clobber (self, lp, link) { + rimraf(self._path, function (er) { + if (er) return self.error(er) + create(self, lp, link) }) } -function create (me, lp, link) { - fs[link](lp, me._path, function (er) { +function create (self, lp, link) { + fs[link](lp, self._path, function (er) { // if this is a hard link, and we're in the process of writing out a // directory, it's very possible that the thing we're linking to // doesn't exist yet (especially if it was intended as a symlink), @@ -65,24 +65,24 @@ function create (me, lp, link) { // A better solution would be to have fs.symlink be supported on // windows in some nice fashion. if (er) { - if ((er.code === "ENOENT" || - er.code === "EACCES" || - er.code === "EPERM" ) && process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} - } else return me.error(er) + if ((er.code === 'ENOENT' || + er.code === 'EACCES' || + er.code === 'EPERM') && process.platform === 'win32') { + self.ready = true + self.emit('ready') + self.emit('end') + self.emit('close') + self.end = self._finish = function () {} + } else return self.error(er) } - finish(me) + finish(self) }) } -function finish (me) { - me.ready = true - me.emit("ready") - if (me._ended && !me._finished) me._finish() +function finish (self) { + self.ready = true + self.emit('ready') + if (self._ended && !self._finished) self._finish() } LinkWriter.prototype.end = function () { diff --git a/deps/npm/node_modules/fstream/lib/proxy-reader.js b/deps/npm/node_modules/fstream/lib/proxy-reader.js index a0ece34a26828d..4f431c9d9e27d3 100644 --- a/deps/npm/node_modules/fstream/lib/proxy-reader.js +++ b/deps/npm/node_modules/fstream/lib/proxy-reader.js @@ -3,82 +3,84 @@ module.exports = ProxyReader -var Reader = require("./reader.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , fs = require("graceful-fs") +var Reader = require('./reader.js') +var getType = require('./get-type.js') +var inherits = require('inherits') +var fs = require('graceful-fs') inherits(ProxyReader, Reader) function ProxyReader (props) { - var me = this - if (!(me instanceof ProxyReader)) throw new Error( - "ProxyReader must be called as constructor.") + var self = this + if (!(self instanceof ProxyReader)) { + throw new Error('ProxyReader must be called as constructor.') + } - me.props = props - me._buffer = [] - me.ready = false + self.props = props + self._buffer = [] + self.ready = false - Reader.call(me, props) + Reader.call(self, props) } ProxyReader.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" + var self = this + var props = self.props + // stat the thing to see what the proxy should be. + var stat = props.follow ? 'stat' : 'lstat' fs[stat](props.path, function (er, current) { var type if (er || !current) { - type = "File" + type = 'File' } else { type = getType(current) } props[type] = true - props.type = me.type = type + props.type = self.type = type - me._old = current - me._addProxy(Reader(props, current)) + self._old = current + self._addProxy(Reader(props, current)) }) } ProxyReader.prototype._addProxy = function (proxy) { - var me = this - if (me._proxyTarget) { - return me.error("proxy already set") + var self = this + if (self._proxyTarget) { + return self.error('proxy already set') } - me._proxyTarget = proxy - proxy._proxy = me - - ; [ "error" - , "data" - , "end" - , "close" - , "linkpath" - , "entry" - , "entryEnd" - , "child" - , "childEnd" - , "warn" - , "stat" - ].forEach(function (ev) { - // console.error("~~ proxy event", ev, me.path) - proxy.on(ev, me.emit.bind(me, ev)) - }) - - me.emit("proxy", proxy) - - proxy.on("ready", function () { - // console.error("~~ proxy is ready!", me.path) - me.ready = true - me.emit("ready") + self._proxyTarget = proxy + proxy._proxy = self + + ;[ + 'error', + 'data', + 'end', + 'close', + 'linkpath', + 'entry', + 'entryEnd', + 'child', + 'childEnd', + 'warn', + 'stat' + ].forEach(function (ev) { + // console.error('~~ proxy event', ev, self.path) + proxy.on(ev, self.emit.bind(self, ev)) + }) + + self.emit('proxy', proxy) + + proxy.on('ready', function () { + // console.error("~~ proxy is ready!", self.path) + self.ready = true + self.emit('ready') }) - var calls = me._buffer - me._buffer.length = 0 + var calls = self._buffer + self._buffer.length = 0 calls.forEach(function (c) { proxy[c[0]].apply(proxy, c[1]) }) diff --git a/deps/npm/node_modules/fstream/lib/proxy-writer.js b/deps/npm/node_modules/fstream/lib/proxy-writer.js index b0476633a3a922..a6544621bfbe75 100644 --- a/deps/npm/node_modules/fstream/lib/proxy-writer.js +++ b/deps/npm/node_modules/fstream/lib/proxy-writer.js @@ -7,74 +7,76 @@ module.exports = ProxyWriter -var Writer = require("./writer.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , collect = require("./collect.js") - , fs = require("fs") +var Writer = require('./writer.js') +var getType = require('./get-type.js') +var inherits = require('inherits') +var collect = require('./collect.js') +var fs = require('fs') inherits(ProxyWriter, Writer) function ProxyWriter (props) { - var me = this - if (!(me instanceof ProxyWriter)) throw new Error( - "ProxyWriter must be called as constructor.") + var self = this + if (!(self instanceof ProxyWriter)) { + throw new Error('ProxyWriter must be called as constructor.') + } - me.props = props - me._needDrain = false + self.props = props + self._needDrain = false - Writer.call(me, props) + Writer.call(self, props) } ProxyWriter.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" + var self = this + var props = self.props + // stat the thing to see what the proxy should be. + var stat = props.follow ? 'stat' : 'lstat' fs[stat](props.path, function (er, current) { var type if (er || !current) { - type = "File" + type = 'File' } else { type = getType(current) } props[type] = true - props.type = me.type = type + props.type = self.type = type - me._old = current - me._addProxy(Writer(props, current)) + self._old = current + self._addProxy(Writer(props, current)) }) } ProxyWriter.prototype._addProxy = function (proxy) { // console.error("~~ set proxy", this.path) - var me = this - if (me._proxy) { - return me.error("proxy already set") + var self = this + if (self._proxy) { + return self.error('proxy already set') } - me._proxy = proxy - ; [ "ready" - , "error" - , "close" - , "pipe" - , "drain" - , "warn" - ].forEach(function (ev) { - proxy.on(ev, me.emit.bind(me, ev)) - }) + self._proxy = proxy + ;[ + 'ready', + 'error', + 'close', + 'pipe', + 'drain', + 'warn' + ].forEach(function (ev) { + proxy.on(ev, self.emit.bind(self, ev)) + }) - me.emit("proxy", proxy) + self.emit('proxy', proxy) - var calls = me._buffer + var calls = self._buffer calls.forEach(function (c) { // console.error("~~ ~~ proxy buffered call", c[0], c[1]) proxy[c[0]].apply(proxy, c[1]) }) - me._buffer.length = 0 - if (me._needsDrain) me.emit("drain") + self._buffer.length = 0 + if (self._needsDrain) self.emit('drain') } ProxyWriter.prototype.add = function (entry) { @@ -82,7 +84,7 @@ ProxyWriter.prototype.add = function (entry) { collect(entry) if (!this._proxy) { - this._buffer.push(["add", [entry]]) + this._buffer.push(['add', [entry]]) this._needDrain = true return false } @@ -90,9 +92,9 @@ ProxyWriter.prototype.add = function (entry) { } ProxyWriter.prototype.write = function (c) { - // console.error("~~ proxy write") + // console.error('~~ proxy write') if (!this._proxy) { - this._buffer.push(["write", [c]]) + this._buffer.push(['write', [c]]) this._needDrain = true return false } @@ -100,9 +102,9 @@ ProxyWriter.prototype.write = function (c) { } ProxyWriter.prototype.end = function (c) { - // console.error("~~ proxy end") + // console.error('~~ proxy end') if (!this._proxy) { - this._buffer.push(["end", [c]]) + this._buffer.push(['end', [c]]) return false } return this._proxy.end(c) diff --git a/deps/npm/node_modules/fstream/lib/reader.js b/deps/npm/node_modules/fstream/lib/reader.js index 0edb794d38f907..1d007ee211c1ab 100644 --- a/deps/npm/node_modules/fstream/lib/reader.js +++ b/deps/npm/node_modules/fstream/lib/reader.js @@ -1,33 +1,28 @@ - module.exports = Reader -var fs = require("graceful-fs") - , Stream = require("stream").Stream - , inherits = require("inherits") - , path = require("path") - , getType = require("./get-type.js") - , hardLinks = Reader.hardLinks = {} - , Abstract = require("./abstract.js") +var fs = require('graceful-fs') +var Stream = require('stream').Stream +var inherits = require('inherits') +var path = require('path') +var getType = require('./get-type.js') +var hardLinks = Reader.hardLinks = {} +var Abstract = require('./abstract.js') // Must do this *before* loading the child classes inherits(Reader, Abstract) -var DirReader = require("./dir-reader.js") - , FileReader = require("./file-reader.js") - , LinkReader = require("./link-reader.js") - , SocketReader = require("./socket-reader.js") - , ProxyReader = require("./proxy-reader.js") +var LinkReader = require('./link-reader.js') function Reader (props, currentStat) { - var me = this - if (!(me instanceof Reader)) return new Reader(props, currentStat) + var self = this + if (!(self instanceof Reader)) return new Reader(props, currentStat) - if (typeof props === "string") { + if (typeof props === 'string') { props = { path: props } } if (!props.path) { - me.error("Must provide a path", null, true) + self.error('Must provide a path', null, true) } // polymorphism. @@ -36,11 +31,10 @@ function Reader (props, currentStat) { // to be the *normal* state of affairs, since we rarely know // the type of a file prior to reading it. - var type - , ClassType + var ClassType - if (props.type && typeof props.type === "function") { + if (props.type && typeof props.type === 'function') { type = props.type ClassType = type } else { @@ -55,11 +49,11 @@ function Reader (props, currentStat) { } switch (type) { - case "Directory": - ClassType = DirReader + case 'Directory': + ClassType = require('./dir-reader.js') break - case "Link": + case 'Link': // XXX hard links are just files. // However, it would be good to keep track of files' dev+inode // and nlink values, and create a HardLinkReader that emits @@ -68,66 +62,66 @@ function Reader (props, currentStat) { // ClassType = HardLinkReader // break - case "File": - ClassType = FileReader + case 'File': + ClassType = require('./file-reader.js') break - case "SymbolicLink": + case 'SymbolicLink': ClassType = LinkReader break - case "Socket": - ClassType = SocketReader + case 'Socket': + ClassType = require('./socket-reader.js') break case null: - ClassType = ProxyReader + ClassType = require('./proxy-reader.js') break } - if (!(me instanceof ClassType)) { + if (!(self instanceof ClassType)) { return new ClassType(props) } - Abstract.call(me) + Abstract.call(self) - me.readable = true - me.writable = false + self.readable = true + self.writable = false - me.type = type - me.props = props - me.depth = props.depth = props.depth || 0 - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me + self.type = type + self.props = props + self.depth = props.depth = props.depth || 0 + self.parent = props.parent || null + self.root = props.root || (props.parent && props.parent.root) || self - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { + self._path = self.path = path.resolve(props.path) + if (process.platform === 'win32') { + self.path = self._path = self.path.replace(/\?/g, '_') + if (self._path.length >= 260) { // how DOES one create files on the moon? // if the path has spaces in it, then UNC will fail. - me._swallowErrors = true - //if (me._path.indexOf(" ") === -1) { - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") - //} + self._swallowErrors = true + // if (self._path.indexOf(" ") === -1) { + self._path = '\\\\?\\' + self.path.replace(/\//g, '\\') + // } } } - me.basename = props.basename = path.basename(me.path) - me.dirname = props.dirname = path.dirname(me.path) + self.basename = props.basename = path.basename(self.path) + self.dirname = props.dirname = path.dirname(self.path) // these have served their purpose, and are now just noisy clutter props.parent = props.root = null // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size - me.filter = typeof props.filter === "function" ? props.filter : null - if (props.sort === "alpha") props.sort = alphasort + self.size = props.size + self.filter = typeof props.filter === 'function' ? props.filter : null + if (props.sort === 'alpha') props.sort = alphasort // start the ball rolling. - // this will stat the thing, and then call me._read() + // this will stat the thing, and then call self._read() // to start reading whatever it is. // console.error("calling stat", props.path, currentStat) - me._stat(currentStat) + self._stat(currentStat) } function alphasort (a, b) { @@ -139,100 +133,100 @@ function alphasort (a, b) { } Reader.prototype._stat = function (currentStat) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - // console.error("Reader._stat", me._path, currentStat) + var self = this + var props = self.props + var stat = props.follow ? 'stat' : 'lstat' + // console.error("Reader._stat", self._path, currentStat) if (currentStat) process.nextTick(statCb.bind(null, null, currentStat)) - else fs[stat](me._path, statCb) - + else fs[stat](self._path, statCb) function statCb (er, props_) { - // console.error("Reader._stat, statCb", me._path, props_, props_.nlink) - if (er) return me.error(er) + // console.error("Reader._stat, statCb", self._path, props_, props_.nlink) + if (er) return self.error(er) Object.keys(props_).forEach(function (k) { props[k] = props_[k] }) // if it's not the expected size, then abort here. - if (undefined !== me.size && props.size !== me.size) { - return me.error("incorrect size") + if (undefined !== self.size && props.size !== self.size) { + return self.error('incorrect size') } - me.size = props.size + self.size = props.size var type = getType(props) var handleHardlinks = props.hardlinks !== false - + // special little thing for handling hardlinks. - if (handleHardlinks && type !== "Directory" && props.nlink && props.nlink > 1) { - var k = props.dev + ":" + props.ino - // console.error("Reader has nlink", me._path, k) - if (hardLinks[k] === me._path || !hardLinks[k]) hardLinks[k] = me._path - else { + if (handleHardlinks && type !== 'Directory' && props.nlink && props.nlink > 1) { + var k = props.dev + ':' + props.ino + // console.error("Reader has nlink", self._path, k) + if (hardLinks[k] === self._path || !hardLinks[k]) { + hardLinks[k] = self._path + } else { // switch into hardlink mode. - type = me.type = me.props.type = "Link" - me.Link = me.props.Link = true - me.linkpath = me.props.linkpath = hardLinks[k] - // console.error("Hardlink detected, switching mode", me._path, me.linkpath) + type = self.type = self.props.type = 'Link' + self.Link = self.props.Link = true + self.linkpath = self.props.linkpath = hardLinks[k] + // console.error("Hardlink detected, switching mode", self._path, self.linkpath) // Setting __proto__ would arguably be the "correct" // approach here, but that just seems too wrong. - me._stat = me._read = LinkReader.prototype._read + self._stat = self._read = LinkReader.prototype._read } } - if (me.type && me.type !== type) { - me.error("Unexpected type: " + type) + if (self.type && self.type !== type) { + self.error('Unexpected type: ' + type) } // if the filter doesn't pass, then just skip over this one. // still have to emit end so that dir-walking can move on. - if (me.filter) { - var who = me._proxy || me + if (self.filter) { + var who = self._proxy || self // special handling for ProxyReaders - if (!me.filter.call(who, who, props)) { - if (!me._disowned) { - me.abort() - me.emit("end") - me.emit("close") + if (!self.filter.call(who, who, props)) { + if (!self._disowned) { + self.abort() + self.emit('end') + self.emit('close') } return } } // last chance to abort or disown before the flow starts! - var events = ["_stat", "stat", "ready"] + var events = ['_stat', 'stat', 'ready'] var e = 0 ;(function go () { - if (me._aborted) { - me.emit("end") - me.emit("close") + if (self._aborted) { + self.emit('end') + self.emit('close') return } - if (me._paused && me.type !== "Directory") { - me.once("resume", go) + if (self._paused && self.type !== 'Directory') { + self.once('resume', go) return } - var ev = events[e ++] + var ev = events[e++] if (!ev) { - return me._read() + return self._read() } - me.emit(ev, props) + self.emit(ev, props) go() })() } } -Reader.prototype.pipe = function (dest, opts) { - var me = this - if (typeof dest.add === "function") { +Reader.prototype.pipe = function (dest) { + var self = this + if (typeof dest.add === 'function') { // piping to a multi-compatible, and we've got directory entries. - me.on("entry", function (entry) { + self.on('entry', function (entry) { var ret = dest.add(entry) - if (false === ret) { - me.pause() + if (ret === false) { + self.pause() } }) } @@ -244,19 +238,18 @@ Reader.prototype.pipe = function (dest, opts) { Reader.prototype.pause = function (who) { this._paused = true who = who || this - this.emit("pause", who) + this.emit('pause', who) if (this._stream) this._stream.pause(who) } Reader.prototype.resume = function (who) { this._paused = false who = who || this - this.emit("resume", who) + this.emit('resume', who) if (this._stream) this._stream.resume(who) this._read() } Reader.prototype._read = function () { - this.error("Cannot read unknown type: "+this.type) + this.error('Cannot read unknown type: ' + this.type) } - diff --git a/deps/npm/node_modules/fstream/lib/socket-reader.js b/deps/npm/node_modules/fstream/lib/socket-reader.js index e89c1731aa9c3d..e0456ba890ede8 100644 --- a/deps/npm/node_modules/fstream/lib/socket-reader.js +++ b/deps/npm/node_modules/fstream/lib/socket-reader.js @@ -5,34 +5,32 @@ module.exports = SocketReader -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") +var inherits = require('inherits') +var Reader = require('./reader.js') inherits(SocketReader, Reader) function SocketReader (props) { - var me = this - if (!(me instanceof SocketReader)) throw new Error( - "SocketReader must be called as constructor.") + var self = this + if (!(self instanceof SocketReader)) { + throw new Error('SocketReader must be called as constructor.') + } - if (!(props.type === "Socket" && props.Socket)) { - throw new Error("Non-socket type "+ props.type) + if (!(props.type === 'Socket' && props.Socket)) { + throw new Error('Non-socket type ' + props.type) } - Reader.call(me, props) + Reader.call(self, props) } SocketReader.prototype._read = function () { - var me = this - if (me._paused) return + var self = this + if (self._paused) return // basically just a no-op, since we got all the info we have // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true + if (!self._ended) { + self.emit('end') + self.emit('close') + self._ended = true } } diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js index 0700813b6797fc..25a608def22eff 100644 --- a/deps/npm/node_modules/fstream/lib/writer.js +++ b/deps/npm/node_modules/fstream/lib/writer.js @@ -1,233 +1,232 @@ - module.exports = Writer -var fs = require("graceful-fs") - , inherits = require("inherits") - , rimraf = require("rimraf") - , mkdir = require("mkdirp") - , path = require("path") - , umask = process.platform === "win32" ? 0 : process.umask() - , getType = require("./get-type.js") - , Abstract = require("./abstract.js") +var fs = require('graceful-fs') +var inherits = require('inherits') +var rimraf = require('rimraf') +var mkdir = require('mkdirp') +var path = require('path') +var umask = process.platform === 'win32' ? 0 : process.umask() +var getType = require('./get-type.js') +var Abstract = require('./abstract.js') // Must do this *before* loading the child classes inherits(Writer, Abstract) -Writer.dirmode = 0777 & (~umask) -Writer.filemode = 0666 & (~umask) +Writer.dirmode = parseInt('0777', 8) & (~umask) +Writer.filemode = parseInt('0666', 8) & (~umask) -var DirWriter = require("./dir-writer.js") - , LinkWriter = require("./link-writer.js") - , FileWriter = require("./file-writer.js") - , ProxyWriter = require("./proxy-writer.js") +var DirWriter = require('./dir-writer.js') +var LinkWriter = require('./link-writer.js') +var FileWriter = require('./file-writer.js') +var ProxyWriter = require('./proxy-writer.js') // props is the desired state. current is optionally the current stat, // provided here so that subclasses can avoid statting the target // more than necessary. function Writer (props, current) { - var me = this + var self = this - if (typeof props === "string") { + if (typeof props === 'string') { props = { path: props } } - if (!props.path) me.error("Must provide a path", null, true) + if (!props.path) self.error('Must provide a path', null, true) // polymorphism. // call fstream.Writer(dir) to get a DirWriter object, etc. var type = getType(props) - , ClassType = Writer + var ClassType = Writer switch (type) { - case "Directory": + case 'Directory': ClassType = DirWriter break - case "File": + case 'File': ClassType = FileWriter break - case "Link": - case "SymbolicLink": + case 'Link': + case 'SymbolicLink': ClassType = LinkWriter break case null: + default: // Don't know yet what type to create, so we wrap in a proxy. ClassType = ProxyWriter break } - if (!(me instanceof ClassType)) return new ClassType(props) + if (!(self instanceof ClassType)) return new ClassType(props) // now get down to business. - Abstract.call(me) + Abstract.call(self) // props is what we want to set. // set some convenience properties as well. - me.type = props.type - me.props = props - me.depth = props.depth || 0 - me.clobber = false === props.clobber ? props.clobber : true - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me - - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { - me._swallowErrors = true - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") + self.type = props.type + self.props = props + self.depth = props.depth || 0 + self.clobber = props.clobber === false ? props.clobber : true + self.parent = props.parent || null + self.root = props.root || (props.parent && props.parent.root) || self + + self._path = self.path = path.resolve(props.path) + if (process.platform === 'win32') { + self.path = self._path = self.path.replace(/\?/g, '_') + if (self._path.length >= 260) { + self._swallowErrors = true + self._path = '\\\\?\\' + self.path.replace(/\//g, '\\') } } - me.basename = path.basename(props.path) - me.dirname = path.dirname(props.path) - me.linkpath = props.linkpath || null + self.basename = path.basename(props.path) + self.dirname = path.dirname(props.path) + self.linkpath = props.linkpath || null props.parent = props.root = null // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size + self.size = props.size - if (typeof props.mode === "string") { + if (typeof props.mode === 'string') { props.mode = parseInt(props.mode, 8) } - me.readable = false - me.writable = true + self.readable = false + self.writable = true // buffer until ready, or while handling another entry - me._buffer = [] - me.ready = false + self._buffer = [] + self.ready = false - me.filter = typeof props.filter === "function" ? props.filter: null + self.filter = typeof props.filter === 'function' ? props.filter : null // start the ball rolling. // this checks what's there already, and then calls - // me._create() to call the impl-specific creation stuff. - me._stat(current) + // self._create() to call the impl-specific creation stuff. + self._stat(current) } // Calling this means that it's something we can't create. // Just assert that it's already there, otherwise raise a warning. Writer.prototype._create = function () { - var me = this - fs[me.props.follow ? "stat" : "lstat"](me._path, function (er, current) { + var self = this + fs[self.props.follow ? 'stat' : 'lstat'](self._path, function (er) { if (er) { - return me.warn("Cannot create " + me._path + "\n" + - "Unsupported type: "+me.type, "ENOTSUP") + return self.warn('Cannot create ' + self._path + '\n' + + 'Unsupported type: ' + self.type, 'ENOTSUP') } - me._finish() + self._finish() }) } Writer.prototype._stat = function (current) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - , who = me._proxy || me + var self = this + var props = self.props + var stat = props.follow ? 'stat' : 'lstat' + var who = self._proxy || self if (current) statCb(null, current) - else fs[stat](me._path, statCb) + else fs[stat](self._path, statCb) function statCb (er, current) { - if (me.filter && !me.filter.call(who, who, current)) { - me._aborted = true - me.emit("end") - me.emit("close") + if (self.filter && !self.filter.call(who, who, current)) { + self._aborted = true + self.emit('end') + self.emit('close') return } // if it's not there, great. We'll just create it. // if it is there, then we'll need to change whatever differs if (er || !current) { - return create(me) + return create(self) } - me._old = current + self._old = current var currentType = getType(current) // if it's a type change, then we need to clobber or error. // if it's not a type change, then let the impl take care of it. - if (currentType !== me.type) { - return rimraf(me._path, function (er) { - if (er) return me.error(er) - me._old = null - create(me) + if (currentType !== self.type) { + return rimraf(self._path, function (er) { + if (er) return self.error(er) + self._old = null + create(self) }) } // otherwise, just handle in the app-specific way // this creates a fs.WriteStream, or mkdir's, or whatever - create(me) + create(self) } } -function create (me) { - // console.error("W create", me._path, Writer.dirmode) +function create (self) { + // console.error("W create", self._path, Writer.dirmode) // XXX Need to clobber non-dirs that are in the way, // unless { clobber: false } in the props. - mkdir(path.dirname(me._path), Writer.dirmode, function (er, made) { - // console.error("W created", path.dirname(me._path), er) - if (er) return me.error(er) + mkdir(path.dirname(self._path), Writer.dirmode, function (er, made) { + // console.error("W created", path.dirname(self._path), er) + if (er) return self.error(er) // later on, we have to set the mode and owner for these - me._madeDir = made - return me._create() + self._madeDir = made + return self._create() }) } -function endChmod (me, want, current, path, cb) { - var wantMode = want.mode - , chmod = want.follow || me.type !== "SymbolicLink" - ? "chmod" : "lchmod" +function endChmod (self, want, current, path, cb) { + var wantMode = want.mode + var chmod = want.follow || self.type !== 'SymbolicLink' + ? 'chmod' : 'lchmod' if (!fs[chmod]) return cb() - if (typeof wantMode !== "number") return cb() + if (typeof wantMode !== 'number') return cb() - var curMode = current.mode & 0777 - wantMode = wantMode & 0777 + var curMode = current.mode & parseInt('0777', 8) + wantMode = wantMode & parseInt('0777', 8) if (wantMode === curMode) return cb() fs[chmod](path, wantMode, cb) } - -function endChown (me, want, current, path, cb) { +function endChown (self, want, current, path, cb) { // Don't even try it unless root. Too easy to EPERM. - if (process.platform === "win32") return cb() + if (process.platform === 'win32') return cb() if (!process.getuid || process.getuid() !== 0) return cb() - if (typeof want.uid !== "number" && - typeof want.gid !== "number" ) return cb() + if (typeof want.uid !== 'number' && + typeof want.gid !== 'number') return cb() if (current.uid === want.uid && current.gid === want.gid) return cb() - var chown = (me.props.follow || me.type !== "SymbolicLink") - ? "chown" : "lchown" + var chown = (self.props.follow || self.type !== 'SymbolicLink') + ? 'chown' : 'lchown' if (!fs[chown]) return cb() - if (typeof want.uid !== "number") want.uid = current.uid - if (typeof want.gid !== "number") want.gid = current.gid + if (typeof want.uid !== 'number') want.uid = current.uid + if (typeof want.gid !== 'number') want.gid = current.gid fs[chown](path, want.uid, want.gid, cb) } -function endUtimes (me, want, current, path, cb) { - if (!fs.utimes || process.platform === "win32") return cb() +function endUtimes (self, want, current, path, cb) { + if (!fs.utimes || process.platform === 'win32') return cb() - var utimes = (want.follow || me.type !== "SymbolicLink") - ? "utimes" : "lutimes" + var utimes = (want.follow || self.type !== 'SymbolicLink') + ? 'utimes' : 'lutimes' - if (utimes === "lutimes" && !fs[utimes]) { - utimes = "utimes" + if (utimes === 'lutimes' && !fs[utimes]) { + utimes = 'utimes' } if (!fs[utimes]) return cb() var curA = current.atime - , curM = current.mtime - , meA = want.atime - , meM = want.mtime + var curM = current.mtime + var meA = want.atime + var meM = want.mtime if (meA === undefined) meA = curA if (meM === undefined) meM = curM @@ -241,15 +240,14 @@ function endUtimes (me, want, current, path, cb) { fs[utimes](path, meA, meM, cb) } - // XXX This function is beastly. Break it up! Writer.prototype._finish = function () { - var me = this + var self = this - if (me._finishing) return - me._finishing = true + if (self._finishing) return + self._finishing = true - // console.error(" W Finish", me._path, me.size) + // console.error(" W Finish", self._path, self.size) // set up all the things. // At this point, we're already done writing whatever we've gotta write, @@ -258,35 +256,35 @@ Writer.prototype._finish = function () { var errState = null var done = false - if (me._old) { + if (self._old) { // the times will almost *certainly* have changed. // adds the utimes syscall, but remove another stat. - me._old.atime = new Date(0) - me._old.mtime = new Date(0) - // console.error(" W Finish Stale Stat", me._path, me.size) - setProps(me._old) + self._old.atime = new Date(0) + self._old.mtime = new Date(0) + // console.error(" W Finish Stale Stat", self._path, self.size) + setProps(self._old) } else { - var stat = me.props.follow ? "stat" : "lstat" - // console.error(" W Finish Stating", me._path, me.size) - fs[stat](me._path, function (er, current) { - // console.error(" W Finish Stated", me._path, me.size, current) + var stat = self.props.follow ? 'stat' : 'lstat' + // console.error(" W Finish Stating", self._path, self.size) + fs[stat](self._path, function (er, current) { + // console.error(" W Finish Stated", self._path, self.size, current) if (er) { // if we're in the process of writing out a // directory, it's very possible that the thing we're linking to // doesn't exist yet (especially if it was intended as a symlink), // so swallow ENOENT errors here and just soldier on. - if (er.code === "ENOENT" && - (me.type === "Link" || me.type === "SymbolicLink") && - process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} + if (er.code === 'ENOENT' && + (self.type === 'Link' || self.type === 'SymbolicLink') && + process.platform === 'win32') { + self.ready = true + self.emit('ready') + self.emit('end') + self.emit('close') + self.end = self._finish = function () {} return - } else return me.error(er) + } else return self.error(er) } - setProps(me._old = current) + setProps(self._old = current) }) } @@ -294,9 +292,9 @@ Writer.prototype._finish = function () { function setProps (current) { todo += 3 - endChmod(me, me.props, current, me._path, next("chmod")) - endChown(me, me.props, current, me._path, next("chown")) - endUtimes(me, me.props, current, me._path, next("utimes")) + endChmod(self, self.props, current, self._path, next('chmod')) + endChown(self, self.props, current, self._path, next('chown')) + endUtimes(self, self.props, current, self._path, next('utimes')) } function next (what) { @@ -305,7 +303,7 @@ Writer.prototype._finish = function () { if (errState) return if (er) { er.fstream_finish_call = what - return me.error(errState = er) + return self.error(errState = er) } if (--todo > 0) return if (done) return @@ -313,61 +311,61 @@ Writer.prototype._finish = function () { // we may still need to set the mode/etc. on some parent dirs // that were created previously. delay end/close until then. - if (!me._madeDir) return end() - else endMadeDir(me, me._path, end) + if (!self._madeDir) return end() + else endMadeDir(self, self._path, end) function end (er) { if (er) { - er.fstream_finish_call = "setupMadeDir" - return me.error(er) + er.fstream_finish_call = 'setupMadeDir' + return self.error(er) } // all the props have been set, so we're completely done. - me.emit("end") - me.emit("close") + self.emit('end') + self.emit('close') } } } } -function endMadeDir (me, p, cb) { - var made = me._madeDir - // everything *between* made and path.dirname(me._path) +function endMadeDir (self, p, cb) { + var made = self._madeDir + // everything *between* made and path.dirname(self._path) // needs to be set up. Note that this may just be one dir. var d = path.dirname(p) - endMadeDir_(me, d, function (er) { + endMadeDir_(self, d, function (er) { if (er) return cb(er) if (d === made) { return cb() } - endMadeDir(me, d, cb) + endMadeDir(self, d, cb) }) } -function endMadeDir_ (me, p, cb) { +function endMadeDir_ (self, p, cb) { var dirProps = {} - Object.keys(me.props).forEach(function (k) { - dirProps[k] = me.props[k] + Object.keys(self.props).forEach(function (k) { + dirProps[k] = self.props[k] // only make non-readable dirs if explicitly requested. - if (k === "mode" && me.type !== "Directory") { - dirProps[k] = dirProps[k] | 0111 + if (k === 'mode' && self.type !== 'Directory') { + dirProps[k] = dirProps[k] | parseInt('0111', 8) } }) var todo = 3 - , errState = null + var errState = null fs.stat(p, function (er, current) { if (er) return cb(errState = er) - endChmod(me, dirProps, current, p, next) - endChown(me, dirProps, current, p, next) - endUtimes(me, dirProps, current, p, next) + endChmod(self, dirProps, current, p, next) + endChown(self, dirProps, current, p, next) + endUtimes(self, dirProps, current, p, next) }) function next (er) { if (errState) return if (er) return cb(errState = er) - if (-- todo === 0) return cb() + if (--todo === 0) return cb() } } @@ -376,7 +374,7 @@ Writer.prototype.pipe = function () { } Writer.prototype.add = function () { - this.error("Cannot add to non-Directory type") + this.error("Can't add to non-Directory type") } Writer.prototype.write = function () { @@ -387,6 +385,6 @@ function objectToString (d) { return Object.prototype.toString.call(d) } -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; +function isDate (d) { + return typeof d === 'object' && objectToString(d) === '[object Date]' } diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json index 6b2de73a2fdaed..aa6bc1cf3e494b 100644 --- a/deps/npm/node_modules/fstream/package.json +++ b/deps/npm/node_modules/fstream/package.json @@ -6,7 +6,7 @@ }, "name": "fstream", "description": "Advanced file system stream things", - "version": "1.0.4", + "version": "1.0.6", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream.git" @@ -22,20 +22,45 @@ "rimraf": "2" }, "devDependencies": { - "tap": "" + "tap": "0", + "standard": "^2.3.2" }, "scripts": { - "test": "tap examples/*.js" + "test": "standard && tap examples/*.js" }, - "license": "BSD", - "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n", - "readmeFilename": "README.md", - "gitHead": "0bdcf1db6f9b04755b644f8268fc3726875367a6", + "license": "ISC", + "gitHead": "e0c0024379c5a94ca228d232e2794b6ffb0d3caf", "bugs": { "url": "https://github.com/isaacs/fstream/issues" }, - "homepage": "https://github.com/isaacs/fstream", - "_id": "fstream@1.0.4", - "_shasum": "6c52298473fd6351fd22fc4bf9254fcfebe80f2b", - "_from": "fstream@>=1.0.4 <1.1.0" + "homepage": "https://github.com/isaacs/fstream#readme", + "_id": "fstream@1.0.6", + "_shasum": "817e50312fb4ed90da865c8eb5ecd1d1d7aed0ec", + "_from": "fstream@>=1.0.6 <1.1.0", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "dist": { + "shasum": "817e50312fb4ed90da865c8eb5ecd1d1d7aed0ec", + "tarball": "http://registry.npmjs.org/fstream/-/fstream-1.0.6.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.6.tgz" } diff --git a/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json b/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json index fb42bcb3454301..39372636f3fb4f 100644 --- a/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json +++ b/deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json @@ -5,7 +5,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/sindresorhus/path-is-absolute" + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" }, "author": { "name": "Sindre Sorhus", @@ -65,5 +65,6 @@ "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index e60f438d3d700c..d2276e1b2b1bc4 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -6,7 +6,7 @@ }, "name": "glob", "description": "a little globber", - "version": "5.0.5", + "version": "5.0.6", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" @@ -30,7 +30,7 @@ "devDependencies": { "mkdirp": "0", "rimraf": "^2.2.8", - "tap": "^0.5.0", + "tap": "^1.0.3", "tick": "0.0.6" }, "scripts": { @@ -43,19 +43,23 @@ "benchclean": "bash benchclean.sh" }, "license": "ISC", - "gitHead": "9db1a83b44da0c60f5fdd31b28b1f9917ee6316d", + "gitHead": "7a0d65d7ed11871be6b5a68dc6f15e3f4b3fb93d", "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, - "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@5.0.5", - "_shasum": "784431e4e29a900ae0d47fba6aa1c7f16a8e7df7", - "_from": "glob@>=5.0.5 <5.1.0", - "_npmVersion": "2.7.6", - "_nodeVersion": "1.4.2", + "homepage": "https://github.com/isaacs/node-glob#readme", + "_id": "glob@5.0.6", + "_shasum": "51f1377c8d5ba36015997655d22bd7d20246accd", + "_from": "glob@>=5.0.6 <5.1.0", + "_npmVersion": "2.9.1", + "_nodeVersion": "2.0.1", "_npmUser": { "name": "isaacs", - "email": "i@izs.me" + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "51f1377c8d5ba36015997655d22bd7d20246accd", + "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.6.tgz" }, "maintainers": [ { @@ -63,10 +67,6 @@ "email": "i@izs.me" } ], - "dist": { - "shasum": "784431e4e29a900ae0d47fba6aa1c7f16a8e7df7", - "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.5.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.5.tgz" + "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.6.tgz" } diff --git a/deps/npm/node_modules/init-package-json/default-input.js b/deps/npm/node_modules/init-package-json/default-input.js index 6d8d9e7bd35ee5..fc65f2e056e344 100644 --- a/deps/npm/node_modules/init-package-json/default-input.js +++ b/deps/npm/node_modules/init-package-json/default-input.js @@ -1,6 +1,7 @@ var fs = require('fs') var glob = require('glob') var path = require('path') +var validateLicense = require('validate-npm-package-license') var validateName = require('validate-npm-package-name') var npa = require('npm-package-arg') @@ -216,4 +217,11 @@ var license = package.license || config.get('init.license') || config.get('init-license') || 'ISC' -exports.license = yes ? license : prompt('license', license) +exports.license = yes ? license : prompt('license', license, function (data) { + var its = validateLicense(data) + if (its.validForNewPackages) return data + var errors = (its.errors || []).concat(its.warnings || []) + var er = new Error('Sorry, ' + errors.join(' and ') + '.') + er.notValid = true + return er +}) diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/LICENSE.md b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/LICENSE.md new file mode 100644 index 00000000000000..2180a8c1a3676e --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/LICENSE.md @@ -0,0 +1,7 @@ +Copyright Kyle E. Mitchell + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/README.md b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/README.md new file mode 100644 index 00000000000000..904f74b9d3b810 --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/README.md @@ -0,0 +1,29 @@ +npm-validate-package-license +============================ + +Give me a string and I'll tell you if it's a valid npm package license. + +*This package is not endorsed or approved by npm. It is part of a proposal to add license field validation to the npm command-line interface.* + + + +```js +var validResult = { + validForNewPackages: true, + validForOldPackages: true +}; + +valid('Apache-2.0'); // => validResult +valid('GPL-3.0 OR BSD-2-Clause'); // => validResult + +var invalidResult = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [ + 'license should be a valid SPDX license expression', + 'license is similar to the valid expression "Apache-2.0"' + ] +}; + +valid('Apache 2.0'); // => invalidResult +``` diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/index.js b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/index.js new file mode 100644 index 00000000000000..c8407a5203792f --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/index.js @@ -0,0 +1,26 @@ +var spdx = require('spdx'); +var correct = require('spdx-correct'); + +module.exports = function(argument) { + if (spdx.valid(argument)) { + return { + validForNewPackages: true, + validForOldPackages: true + }; + } else { + var warnings = [ + 'license should be a valid SPDX license expression' + ]; + var corrected = correct(argument); + if (corrected) { + warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + return { + validForOldPackages: false, + validForNewPackages: false, + warnings: warnings + }; + } +}; diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/.npmignore b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/.npmignore new file mode 100644 index 00000000000000..5229acdc80bc4c --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/.npmignore @@ -0,0 +1,5 @@ +.gitignore +.jscsrc +.jshintrc +test +.travis.yml diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/README.md b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/README.md new file mode 100644 index 00000000000000..05cd9947d22ccd --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/README.md @@ -0,0 +1,21 @@ +spdx-correct.js +=============== + +[![npm version](https://img.shields.io/npm/v/spdx-correct.svg)](https://www.npmjs.com/package/spdx-correct) +[![license](https://img.shields.io/badge/license-Apache--2.0-303284.svg)](http://www.apache.org/licenses/LICENSE-2.0) +[![build status](https://img.shields.io/travis/kemitchell/spdx-correct.js.svg)](http://travis-ci.org/kemitchell/spdx-correct.js) + + +Correct invalid SPDX identifiers. + + + +```js +correct('mit'); // => 'MIT' + +correct('Apache 2'); // => 'Apache-2.0' + +correct('No idea what license'); // => null +``` diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json new file mode 100644 index 00000000000000..e3d291b602d25b --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json @@ -0,0 +1,63 @@ +{ + "name": "spdx-correct", + "description": "correct invalid SPDX identifiers", + "version": "1.0.0-prerelease-3", + "author": { + "name": "Kyle Mitchell", + "email": "kyle@kemitchell.com", + "url": "http://kemitchell.com" + }, + "bugs": { + "url": "https://github.com/kemitchell/spdx-correct/issues" + }, + "dependencies": { + "spdx": "^0.4.0" + }, + "devDependencies": { + "jscs": "^1.13.0", + "jshint": "^2.7.0", + "jsmd": "^0.3.0", + "tap": "^0.7.1" + }, + "homepage": "https://github.com/kemitchell/spdx-correct", + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata" + ], + "license": "Apache-2.0", + "main": "spdx-correct.js", + "repository": { + "type": "git", + "url": "git+https://github.com/kemitchell/spdx-correct.git" + }, + "scripts": { + "lint": "jshint spdx-correct.js test && jscs spdx-correct.js test", + "precommit": "npm run lint && npm run test", + "test": "jsmd README.md && tap test" + }, + "gitHead": "0289b9068391d4a1db571137083e0beb18a2faef", + "_id": "spdx-correct@1.0.0-prerelease-3", + "_shasum": "5706cc6ce05b928a65564c76e1d6809ba033ac7e", + "_from": "spdx-correct@1.0.0-prerelease-3", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + }, + "maintainers": [ + { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + } + ], + "dist": { + "shasum": "5706cc6ce05b928a65564c76e1d6809ba033ac7e", + "tarball": "http://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.0-prerelease-3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.0-prerelease-3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/spdx-correct.js b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/spdx-correct.js new file mode 100644 index 00000000000000..094712d62361c8 --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/spdx-correct.js @@ -0,0 +1,235 @@ +var spdx = require('spdx'); + +var valid = spdx.valid.bind(spdx); + +// Common transpositions of license identifier acronyms +var transpositions = [ + ['APGL', 'AGPL'], + ['Gpl', 'GPL'], + ['GLP', 'GPL'], + ['APL', 'Apache'], + ['ISD', 'ISC'], + ['GLP', 'GPL'], + ['IST', 'ISC'], + ['Claude', 'Clause'], + [' or later', '+'], + [' International', ''], + ['GNU', 'GPL'], + ['GUN', 'GPL'], + ['+', ''], + ['GNU GPL', 'GPL'], + ['GNU/GPL', 'GPL'], + ['GNU GLP', 'GPL'], + ['GNU General Public License', 'GPL'], + ['Gnu public license', 'GPL'], + ['GNU Public License', 'GPL'], + ['GNU GENERAL PUBLIC LICENSE', 'GPL'], + ['MTI', 'MIT'], + ['Mozilla Public License', 'MPL'], + ['WTH', 'WTF'], + ['-License', ''] +]; + +var TRANSPOSED = 0; +var CORRECT = 1; + +// Simple corrections to nearly valid identifiers. +var transforms = [ + // e.g. 'mit' + function(argument) { + return argument.toUpperCase(); + }, + // e.g. 'MIT ' + function(argument) { + return argument.trim(); + }, + // e.g. 'M.I.T.' + function(argument) { + return argument.replace(/\./g, ''); + }, + // e.g. 'Apache- 2.0' + function(argument) { + return argument.replace(/\s+/g, ''); + }, + // e.g. 'CC BY 4.0'' + function(argument) { + return argument.replace(/\s+/g, '-'); + }, + // e.g. 'LGPLv2.1' + function(argument) { + return argument.replace('v', '-'); + }, + // e.g. 'Apache 2.0' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1'); + }, + // e.g. 'GPL 2' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1.0'); + }, + // e.g. 'Apache Version 2.0' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2'); + }, + // e.g. 'Apache Version 2' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0'); + }, + // e.g. 'ZLIB' + function(argument) { + return argument[0].toUpperCase() + argument.slice(1); + }, + // e.g. 'MPL/2.0' + function(argument) { + return argument.replace('/', '-'); + }, + // e.g. 'Apache 2' + function(argument) { + return argument + .replace(/\s*V\s*(\d)/, '-$1') + .replace(/(\d)$/, '$1.0'); + }, + // e.g. 'GPL-2.0-' + function(argument) { + return argument.slice(0, argument.length - 1); + }, + // e.g. 'GPL2' + function(argument) { + return argument.replace(/(\d)$/, '-$1.0'); + }, + // e.g. 'BSD 3' + function(argument) { + return argument.replace(/(-| )?(\d)$/, '-$2-Clause'); + }, + // e.g. 'BSD clause 3' + function(argument) { + return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause'); + }, + // e.g. 'BY-NC-4.0' + function(argument) { + return 'CC-' + argument; + }, + // e.g. 'BY-NC' + function(argument) { + return 'CC-' + argument + '-4.0'; + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, ''); + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return 'CC-' + + argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + + '-4.0'; + } +]; + +// If all else fails, guess that strings containing certain substrings +// meant to identify certain licenses. +var lastResorts = [ + ['UNLI', 'Unlicense'], + ['WTF', 'WTFPL'], + ['2 CLAUSE', 'BSD-2-Clause'], + ['2-CLAUSE', 'BSD-2-Clause'], + ['3 CLAUSE', 'BSD-3-Clause'], + ['3-CLAUSE', 'BSD-3-Clause'], + ['AFFERO', 'AGPL-3.0'], + ['AGPL', 'AGPL-3.0'], + ['APACHE', 'Apache-2.0'], + ['ARTISTIC', 'Artistic-2.0'], + ['Affero', 'AGPL-3.0'], + ['BEER', 'Beerware'], + ['BOOST', 'BSL-1.0'], + ['BSD', 'BSD-2-Clause'], + ['ECLIPSE', 'EPL-1.0'], + ['FUCK', 'WTFPL'], + ['GNU', 'GPL-3.0'], + ['LGPL', 'LGPL-3.0'], + ['GPL', 'GPL-3.0'], + ['MIT', 'MIT'], + ['MPL', 'MPL-2.0'], + ['X11', 'X11'], + ['ZLIB', 'Zlib'] +]; + +var SUBSTRING = 0; +var IDENTIFIER = 1; + +var validTransformation = function(identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier); + if (transformed !== identifier && valid(transformed)) { + return transformed; + } + } + return null; +}; + +var validLastResort = function(identifier) { + var upperCased = identifier.toUpperCase(); + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i]; + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER]; + } + } + return null; +}; + +var anyCorrection = function(identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i]; + var transposed = transposition[TRANSPOSED]; + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace( + transposed, + transposition[CORRECT] + ); + var checked = check(corrected); + if (checked !== null) { + return checked; + } + } + } + return null; +}; + +module.exports = function(identifier) { + identifier = identifier.replace(/\+$/, ''); + if (valid(identifier)) { + return identifier; + } + var transformed = validTransformation(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, function(argument) { + if (valid(argument)) { + return argument; + } + return validTransformation(argument); + }); + if (transformed !== null) { + return transformed; + } + transformed = validLastResort(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, validLastResort); + if (transformed !== null) { + return transformed; + } + return null; +}; diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json new file mode 100644 index 00000000000000..4aaad362ad322d --- /dev/null +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json @@ -0,0 +1,59 @@ +{ + "name": "validate-npm-package-license", + "description": "Give me a string and I'll tell you if it's a valid npm package license", + "version": "1.0.0-prerelease-2", + "author": { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "http://kemitchell.com" + }, + "bugs": { + "url": "https://github.com/kemitchell/npm-valid-package-license/issues" + }, + "dependencies": { + "spdx": "^0.4.0", + "spdx-correct": "1.0.0-prerelease-3" + }, + "devDependencies": { + "jsmd": "^0.3.0" + }, + "homepage": "https://github.com/kemitchell/npm-valid-package-license", + "keywords": [ + "license", + "npm", + "package", + "validation" + ], + "license": "Apache-2.0", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/kemitchell/npm-valid-package-license.git" + }, + "scripts": { + "precommit": "npm run test", + "test": "jsmd README.md" + }, + "gitHead": "d6043c5bf03a71409daae8d584ba74281e3c55c3", + "_id": "validate-npm-package-license@1.0.0-prerelease-2", + "_shasum": "0f45adce1728091b289597035c1ad25a5ba549be", + "_from": "validate-npm-package-license@1.0.0-prerelease-2", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + }, + "maintainers": [ + { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + } + ], + "dist": { + "shasum": "0f45adce1728091b289597035c1ad25a5ba549be", + "tarball": "http://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-1.0.0-prerelease-2.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-1.0.0-prerelease-2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md index 97e7fc5207c20a..91a963b760e613 100644 --- a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md @@ -58,7 +58,7 @@ a change in the value of `validForNewPackages` property, and a warnings array will be present: ```js -validate("cRaZY-paCkAgE-with-mixed-case-and-more-than-fifty-characters") +validate("cRaZY-paCkAgE-with-mixed-case-and-more-than-214-characters-----------------------------------------------------------------------------------------------------------------------------------------------------------") ``` returns: @@ -69,7 +69,7 @@ returns: validForOldPackages: true, warnings: [ "name can no longer contain capital letters", - "name can no longer contain more than 50 characters" + "name can no longer contain more than 214 characters" ] } ``` diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js index fde5b7e9170711..66a1d47326b03d 100644 --- a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js @@ -58,8 +58,9 @@ var validate = module.exports = function(name) { }) // really-long-package-names-------------------------------such--length-----many---wow - if (name.length > 50) { - warnings.push("name can no longer contain more than 50 characters") + // the thisisareallyreallylongpackagenameitshouldpublishdowenowhavealimittothelengthofpackagenames-poch. + if (name.length > 214) { + warnings.push("name can no longer contain more than 214 characters") } // mIxeD CaSe nAMEs diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json index dd17dd820dd6d4..65a4587c664529 100644 --- a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json @@ -1,6 +1,6 @@ { "name": "validate-npm-package-name", - "version": "2.0.1", + "version": "2.2.0", "description": "Give me a string and I'll tell you if it's a valid npm package name", "main": "index.js", "directories": { @@ -33,26 +33,30 @@ "url": "https://github.com/npm/validate-npm-package-name/issues" }, "homepage": "https://github.com/npm/validate-npm-package-name", - "gitHead": "69f5c629525feeccfc941a6f1b9280ceed8a4b3a", - "_id": "validate-npm-package-name@2.0.1", - "_shasum": "ca006761b2b325f107fab172fb0cfcfc5e412c58", + "gitHead": "acef1219c13a0cf4cf6b8706d65f606d82a7d472", + "_id": "validate-npm-package-name@2.2.0", + "_shasum": "4cb6ff120bd7afb0b5681406cfaea8df2d763477", "_from": "validate-npm-package-name@>=2.0.1 <3.0.0", - "_npmVersion": "2.2.0", - "_nodeVersion": "0.10.31", + "_npmVersion": "2.7.6", + "_nodeVersion": "1.6.2", "_npmUser": { - "name": "zeke", - "email": "zeke@npmjs.com" + "name": "bcoe", + "email": "ben@npmjs.com" + }, + "dist": { + "shasum": "4cb6ff120bd7afb0b5681406cfaea8df2d763477", + "tarball": "http://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-2.2.0.tgz" }, "maintainers": [ { "name": "zeke", - "email": "zeke@sikelianos.com" + "email": "zeke@npmjs.com" + }, + { + "name": "bcoe", + "email": "ben@npmjs.com" } ], - "dist": { - "shasum": "ca006761b2b325f107fab172fb0cfcfc5e412c58", - "tarball": "http://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-2.0.1.tgz" - }, - "_resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-2.0.1.tgz", + "_resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-2.2.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js index 0a976dcc8262a6..1a7dca5de6fded 100644 --- a/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js +++ b/deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js @@ -80,10 +80,15 @@ test("validate-npm-package-name", function (t) { // Long Package Names - t.deepEqual(validate("1234567890123456789012345678901234567890-more-than-fifty"), { + t.deepEqual(validate("ifyouwanttogetthesumoftwonumberswherethosetwonumbersarechosenbyfindingthelargestoftwooutofthreenumbersandsquaringthemwhichismultiplyingthembyitselfthenyoushouldinputthreenumbersintothisfunctionanditwilldothatforyou-"), { validForNewPackages: false, validForOldPackages: true, - warnings: ["name can no longer contain more than 50 characters"] + warnings: ["name can no longer contain more than 214 characters"] + }) + + t.deepEqual(validate("ifyouwanttogetthesumoftwonumberswherethosetwonumbersarechosenbyfindingthelargestoftwooutofthreenumbersandsquaringthemwhichismultiplyingthembyitselfthenyoushouldinputthreenumbersintothisfunctionanditwilldothatforyou"), { + validForNewPackages: true, + validForOldPackages: true }) // Legacy Mixed-Case diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json index a0acb61d1dc9df..4ac14cb67b614b 100644 --- a/deps/npm/node_modules/init-package-json/package.json +++ b/deps/npm/node_modules/init-package-json/package.json @@ -1,6 +1,6 @@ { "name": "init-package-json", - "version": "1.4.2", + "version": "1.5.0", "main": "init-package-json.js", "scripts": { "test": "tap test/*.js" @@ -23,6 +23,7 @@ "read": "~1.0.1", "read-package-json": "1 || 2", "semver": "2.x || 3.x || 4", + "validate-npm-package-license": "1.0.0-prerelease-2", "validate-npm-package-name": "^2.0.1" }, "devDependencies": { @@ -42,12 +43,12 @@ ], "readme": "# init-package-json\n\nA node module to get your node module started.\n\n[![Build Status](https://secure.travis-ci.org/npm/init-package-json.svg)](http://travis-ci.org/npm/init-package-json)\n\n## Usage\n\n```javascript\nvar init = require('init-package-json')\nvar path = require('path')\n\n// a path to a promzard module. In the event that this file is\n// not found, one will be provided for you.\nvar initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nvar dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object. Exposed as 'config'\n// Optional.\nvar configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object. There will also be free\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\ninit(dir, initFile, configData, function (er, data) {\n // the data's already been written to {dir}/package.json\n // now you can do stuff with it\n})\n```\n\nOr from the command line:\n\n```\n$ npm-init\n```\n\nSee [PromZard](https://github.com/isaacs/promzard) for details about\nwhat can go in the config file.\n", "readmeFilename": "README.md", - "gitHead": "99bddf908a582daeacf27cf05bd46ec5b0ec5e42", + "gitHead": "17721cb55112690da3dc41b21d58354e89836067", "bugs": { "url": "https://github.com/isaacs/init-package-json/issues" }, "homepage": "https://github.com/isaacs/init-package-json#readme", - "_id": "init-package-json@1.4.2", - "_shasum": "66e606c5ab458340fb229fa4c25f9062879ffa88", - "_from": "init-package-json@>=1.4.2 <1.5.0" + "_id": "init-package-json@1.5.0", + "_shasum": "85b701b81463593d61da8bb66b46e352f4f2e298", + "_from": "init-package-json@>=1.5.0 <1.6.0" } diff --git a/deps/npm/node_modules/init-package-json/test/license.js b/deps/npm/node_modules/init-package-json/test/license.js new file mode 100644 index 00000000000000..87333fbf8f18ff --- /dev/null +++ b/deps/npm/node_modules/init-package-json/test/license.js @@ -0,0 +1,38 @@ +var test = require('tap').test +var init = require('../') +var rimraf = require('rimraf') +var common = require('./lib/common') + +test('license', function (t) { + init(__dirname, '', {}, function (er, data) { + t.ok(!er, 'should not error') + var wanted = { + name: 'the-name', + version: '1.0.0', + description: '', + scripts: { test: 'echo "Error: no test specified" && exit 1' }, + license: 'Apache-2.0', + author: '', + main: 'basic.js' + } + t.same(data, wanted) + t.end() + }) + common.drive([ + 'the-name\n', + '\n', + '\n', + '\n', + '\n', + '\n', + '\n', + '\n', + 'Apache\n', + 'Apache-2.0\n', + 'yes\n' + ]) +}) + +test('teardown', function (t) { + rimraf(__dirname + '/package.json', t.end.bind(t)) +}) diff --git a/deps/npm/node_modules/lru-cache/bar.js b/deps/npm/node_modules/lru-cache/bar.js deleted file mode 100644 index bccb258364f1f8..00000000000000 --- a/deps/npm/node_modules/lru-cache/bar.js +++ /dev/null @@ -1 +0,0 @@ -console.log("bar");module.exports = "bar"; require("./foo.js") diff --git a/deps/npm/node_modules/lru-cache/foo.js b/deps/npm/node_modules/lru-cache/foo.js deleted file mode 100644 index c8a77e36ea03de..00000000000000 --- a/deps/npm/node_modules/lru-cache/foo.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require(".")) diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index c3b70c765197e2..1e8b1a754a6162 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "2.6.2", + "version": "2.6.3", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" @@ -27,23 +27,23 @@ "type": "MIT", "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" }, - "gitHead": "278d05fcc714636eeedb3959bca80c20c19a61df", + "gitHead": "0654ce0b1f2d676a0cfc1f3001a097af9e7b0dfb", "bugs": { "url": "https://github.com/isaacs/node-lru-cache/issues" }, "homepage": "https://github.com/isaacs/node-lru-cache#readme", - "_id": "lru-cache@2.6.2", - "_shasum": "77741638c6dc972e503dbe41dcb6bfdfba499a38", - "_from": "lru-cache@>=2.6.2 <2.7.0", - "_npmVersion": "2.8.4", - "_nodeVersion": "1.4.2", + "_id": "lru-cache@2.6.3", + "_shasum": "51ccd0b4fc0c843587d7a5709ce4d3b7629bedc5", + "_from": "lru-cache@>=2.6.3 <2.7.0", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", "_npmUser": { "name": "isaacs", "email": "isaacs@npmjs.com" }, "dist": { - "shasum": "77741638c6dc972e503dbe41dcb6bfdfba499a38", - "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.2.tgz" + "shasum": "51ccd0b4fc0c843587d7a5709ce4d3b7629bedc5", + "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.3.tgz" }, "maintainers": [ { @@ -52,6 +52,5 @@ } ], "directories": {}, - "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.2.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.3.tgz" } diff --git a/deps/npm/node_modules/mkdirp/.npmignore b/deps/npm/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347ee69a1..00000000000000 --- a/deps/npm/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/deps/npm/node_modules/mkdirp/.travis.yml b/deps/npm/node_modules/mkdirp/.travis.yml index c693a939df9809..74c57bf15e2391 100644 --- a/deps/npm/node_modules/mkdirp/.travis.yml +++ b/deps/npm/node_modules/mkdirp/.travis.yml @@ -1,5 +1,8 @@ language: node_js node_js: - - 0.6 - - 0.8 + - "0.8" - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/deps/npm/node_modules/mkdirp/index.js b/deps/npm/node_modules/mkdirp/index.js index a1742b20694fe3..6ce241b58c100f 100644 --- a/deps/npm/node_modules/mkdirp/index.js +++ b/deps/npm/node_modules/mkdirp/index.js @@ -1,5 +1,6 @@ var path = require('path'); var fs = require('fs'); +var _0777 = parseInt('0777', 8); module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; @@ -16,7 +17,7 @@ function mkdirP (p, opts, f, made) { var xfs = opts.fs || fs; if (mode === undefined) { - mode = 0777 & (~process.umask()); + mode = _0777 & (~process.umask()); } if (!made) made = null; @@ -60,7 +61,7 @@ mkdirP.sync = function sync (p, opts, made) { var xfs = opts.fs || fs; if (mode === undefined) { - mode = 0777 & (~process.umask()); + mode = _0777 & (~process.umask()); } if (!made) made = null; diff --git a/deps/npm/node_modules/mkdirp/node_modules/minimist/package.json b/deps/npm/node_modules/mkdirp/node_modules/minimist/package.json index 09e9ec44107f63..7cd80f4f41ac5a 100644 --- a/deps/npm/node_modules/mkdirp/node_modules/minimist/package.json +++ b/deps/npm/node_modules/mkdirp/node_modules/minimist/package.json @@ -62,6 +62,5 @@ ], "directories": {}, "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" } diff --git a/deps/npm/node_modules/mkdirp/package.json b/deps/npm/node_modules/mkdirp/package.json index adb67f6a671866..24411034800529 100644 --- a/deps/npm/node_modules/mkdirp/package.json +++ b/deps/npm/node_modules/mkdirp/package.json @@ -1,20 +1,20 @@ { "name": "mkdirp", "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.5.0", + "version": "0.5.1", "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, - "main": "./index", + "main": "index.js", "keywords": [ "mkdir", "directory" ], "repository": { "type": "git", - "url": "https://github.com/substack/node-mkdirp.git" + "url": "git+https://github.com/substack/node-mkdirp.git" }, "scripts": { "test": "tap test/*.js" @@ -23,27 +23,30 @@ "minimist": "0.0.8" }, "devDependencies": { - "tap": "~0.4.0", - "mock-fs": "~2.2.0" + "tap": "1", + "mock-fs": "2 >=2.7.0" }, "bin": { "mkdirp": "bin/cmd.js" }, "license": "MIT", + "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", "bugs": { "url": "https://github.com/substack/node-mkdirp/issues" }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.5.0", - "dist": { - "shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12", - "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz" - }, - "_from": "mkdirp@latest", - "_npmVersion": "1.4.3", + "homepage": "https://github.com/substack/node-mkdirp#readme", + "_id": "mkdirp@0.5.1", + "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "_from": "mkdirp@>=0.5.1 <0.6.0", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", "_npmUser": { "name": "substack", - "email": "mail@substack.net" + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" }, "maintainers": [ { @@ -52,7 +55,5 @@ } ], "directories": {}, - "_shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12", - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" } diff --git a/deps/npm/node_modules/mkdirp/test/chmod.js b/deps/npm/node_modules/mkdirp/test/chmod.js index 520dcb8e9b5a75..6a404b932f941f 100644 --- a/deps/npm/node_modules/mkdirp/test/chmod.js +++ b/deps/npm/node_modules/mkdirp/test/chmod.js @@ -2,6 +2,9 @@ var mkdirp = require('../').mkdirp; var path = require('path'); var fs = require('fs'); var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); +var _0744 = parseInt('0744', 8); var ps = [ '', 'tmp' ]; @@ -13,20 +16,20 @@ for (var i = 0; i < 25; i++) { var file = ps.join('/'); test('chmod-pre', function (t) { - var mode = 0744 + var mode = _0744 mkdirp(file, mode, function (er) { t.ifError(er, 'should not error'); fs.stat(file, function (er, stat) { t.ifError(er, 'should exist'); t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); + t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); t.end(); }); }); }); test('chmod', function (t) { - var mode = 0755 + var mode = _0755 mkdirp(file, mode, function (er) { t.ifError(er, 'should not error'); fs.stat(file, function (er, stat) { diff --git a/deps/npm/node_modules/mkdirp/test/clobber.js b/deps/npm/node_modules/mkdirp/test/clobber.js index 0eb709987002f0..2433b9ad548557 100644 --- a/deps/npm/node_modules/mkdirp/test/clobber.js +++ b/deps/npm/node_modules/mkdirp/test/clobber.js @@ -2,6 +2,7 @@ var mkdirp = require('../').mkdirp; var path = require('path'); var fs = require('fs'); var test = require('tap').test; +var _0755 = parseInt('0755', 8); var ps = [ '', 'tmp' ]; @@ -29,7 +30,7 @@ test('clobber-pre', function (t) { test('clobber', function (t) { t.plan(2); - mkdirp(file, 0755, function (err) { + mkdirp(file, _0755, function (err) { t.ok(err); t.equal(err.code, 'ENOTDIR'); t.end(); diff --git a/deps/npm/node_modules/mkdirp/test/mkdirp.js b/deps/npm/node_modules/mkdirp/test/mkdirp.js index 3b624ddbeb0db8..eaa8921c7f1488 100644 --- a/deps/npm/node_modules/mkdirp/test/mkdirp.js +++ b/deps/npm/node_modules/mkdirp/test/mkdirp.js @@ -3,6 +3,8 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('woo', function (t) { t.plan(5); @@ -12,13 +14,13 @@ test('woo', function (t) { var file = '/tmp/' + [x,y,z].join('/'); - mkdirp(file, 0755, function (err) { + mkdirp(file, _0755, function (err) { t.ifError(err); exists(file, function (ex) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); }) }) diff --git a/deps/npm/node_modules/mkdirp/test/opts_fs.js b/deps/npm/node_modules/mkdirp/test/opts_fs.js index f1fbeca146d128..97186b62e0bb90 100644 --- a/deps/npm/node_modules/mkdirp/test/opts_fs.js +++ b/deps/npm/node_modules/mkdirp/test/opts_fs.js @@ -2,6 +2,8 @@ var mkdirp = require('../'); var path = require('path'); var test = require('tap').test; var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('opts.fs', function (t) { t.plan(5); @@ -13,13 +15,13 @@ test('opts.fs', function (t) { var file = '/beep/boop/' + [x,y,z].join('/'); var xfs = mockfs.fs(); - mkdirp(file, { fs: xfs, mode: 0755 }, function (err) { + mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { t.ifError(err); xfs.exists(file, function (ex) { t.ok(ex, 'created file'); xfs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); }); }); diff --git a/deps/npm/node_modules/mkdirp/test/opts_fs_sync.js b/deps/npm/node_modules/mkdirp/test/opts_fs_sync.js index 224b50642feafd..6c370aa6e93a20 100644 --- a/deps/npm/node_modules/mkdirp/test/opts_fs_sync.js +++ b/deps/npm/node_modules/mkdirp/test/opts_fs_sync.js @@ -2,6 +2,8 @@ var mkdirp = require('../'); var path = require('path'); var test = require('tap').test; var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('opts.fs sync', function (t) { t.plan(4); @@ -13,12 +15,12 @@ test('opts.fs sync', function (t) { var file = '/beep/boop/' + [x,y,z].join('/'); var xfs = mockfs.fs(); - mkdirp.sync(file, { fs: xfs, mode: 0755 }); + mkdirp.sync(file, { fs: xfs, mode: _0755 }); xfs.exists(file, function (ex) { t.ok(ex, 'created file'); xfs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); }); }); diff --git a/deps/npm/node_modules/mkdirp/test/perm.js b/deps/npm/node_modules/mkdirp/test/perm.js index 2c975905204646..fbce44b82bafee 100644 --- a/deps/npm/node_modules/mkdirp/test/perm.js +++ b/deps/npm/node_modules/mkdirp/test/perm.js @@ -3,18 +3,20 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('async perm', function (t) { t.plan(5); var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - mkdirp(file, 0755, function (err) { + mkdirp(file, _0755, function (err) { t.ifError(err); exists(file, function (ex) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); }) }) @@ -22,7 +24,7 @@ test('async perm', function (t) { }); test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { + mkdirp('/tmp', _0755, function (err) { if (err) t.fail(err); t.end(); }); diff --git a/deps/npm/node_modules/mkdirp/test/perm_sync.js b/deps/npm/node_modules/mkdirp/test/perm_sync.js index 327e54b2e951f2..398229fe54ab04 100644 --- a/deps/npm/node_modules/mkdirp/test/perm_sync.js +++ b/deps/npm/node_modules/mkdirp/test/perm_sync.js @@ -3,17 +3,19 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('sync perm', function (t) { t.plan(4); var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - mkdirp.sync(file, 0755); + mkdirp.sync(file, _0755); exists(file, function (ex) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); }); }); @@ -23,7 +25,7 @@ test('sync root perm', function (t) { t.plan(3); var file = '/tmp'; - mkdirp.sync(file, 0755); + mkdirp.sync(file, _0755); exists(file, function (ex) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { diff --git a/deps/npm/node_modules/mkdirp/test/race.js b/deps/npm/node_modules/mkdirp/test/race.js index 7c295f410de2cc..b0b9e183c902fb 100644 --- a/deps/npm/node_modules/mkdirp/test/race.js +++ b/deps/npm/node_modules/mkdirp/test/race.js @@ -3,9 +3,11 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('race', function (t) { - t.plan(6); + t.plan(10); var ps = [ '', 'tmp' ]; for (var i = 0; i < 25; i++) { @@ -15,24 +17,19 @@ test('race', function (t) { var file = ps.join('/'); var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); + mk(file); - mk(file, function () { - if (--res === 0) t.end(); - }); + mk(file); function mk (file, cb) { - mkdirp(file, 0755, function (err) { + mkdirp(file, _0755, function (err) { t.ifError(err); exists(file, function (ex) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); }); }) }); diff --git a/deps/npm/node_modules/mkdirp/test/rel.js b/deps/npm/node_modules/mkdirp/test/rel.js index d1f175c2406543..4ddb34276a72a2 100644 --- a/deps/npm/node_modules/mkdirp/test/rel.js +++ b/deps/npm/node_modules/mkdirp/test/rel.js @@ -3,6 +3,8 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('rel', function (t) { t.plan(5); @@ -15,14 +17,14 @@ test('rel', function (t) { var file = [x,y,z].join('/'); - mkdirp(file, 0755, function (err) { + mkdirp(file, _0755, function (err) { t.ifError(err); exists(file, function (ex) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); }) }) diff --git a/deps/npm/node_modules/mkdirp/test/root.js b/deps/npm/node_modules/mkdirp/test/root.js index 97ad7a2f358e93..9e7d079d9fc757 100644 --- a/deps/npm/node_modules/mkdirp/test/root.js +++ b/deps/npm/node_modules/mkdirp/test/root.js @@ -2,12 +2,13 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); var test = require('tap').test; +var _0755 = parseInt('0755', 8); test('root', function (t) { // '/' on unix, 'c:/' on windows. var file = path.resolve('/'); - mkdirp(file, 0755, function (err) { + mkdirp(file, _0755, function (err) { if (err) throw err fs.stat(file, function (er, stat) { if (er) throw er diff --git a/deps/npm/node_modules/mkdirp/test/sync.js b/deps/npm/node_modules/mkdirp/test/sync.js index 88fa4324ee1901..8c8dc938c8b4a8 100644 --- a/deps/npm/node_modules/mkdirp/test/sync.js +++ b/deps/npm/node_modules/mkdirp/test/sync.js @@ -3,6 +3,8 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('sync', function (t) { t.plan(4); @@ -13,7 +15,7 @@ test('sync', function (t) { var file = '/tmp/' + [x,y,z].join('/'); try { - mkdirp.sync(file, 0755); + mkdirp.sync(file, _0755); } catch (err) { t.fail(err); return t.end(); @@ -23,7 +25,7 @@ test('sync', function (t) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0755); + t.equal(stat.mode & _0777, _0755); t.ok(stat.isDirectory(), 'target not a directory'); }); }); diff --git a/deps/npm/node_modules/mkdirp/test/umask.js b/deps/npm/node_modules/mkdirp/test/umask.js index 82c393a006a8f5..2033c63a414efa 100644 --- a/deps/npm/node_modules/mkdirp/test/umask.js +++ b/deps/npm/node_modules/mkdirp/test/umask.js @@ -3,6 +3,8 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('implicit mode from umask', function (t) { t.plan(5); @@ -18,7 +20,7 @@ test('implicit mode from umask', function (t) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, 0777 & (~process.umask())); + t.equal(stat.mode & _0777, _0777 & (~process.umask())); t.ok(stat.isDirectory(), 'target not a directory'); }); }) diff --git a/deps/npm/node_modules/mkdirp/test/umask_sync.js b/deps/npm/node_modules/mkdirp/test/umask_sync.js index e537fbe4beebc2..11a76147496a52 100644 --- a/deps/npm/node_modules/mkdirp/test/umask_sync.js +++ b/deps/npm/node_modules/mkdirp/test/umask_sync.js @@ -3,6 +3,8 @@ var path = require('path'); var fs = require('fs'); var exists = fs.exists || path.exists; var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); test('umask sync modes', function (t) { t.plan(4); @@ -23,7 +25,7 @@ test('umask sync modes', function (t) { t.ok(ex, 'file created'); fs.stat(file, function (err, stat) { t.ifError(err); - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); + t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); t.ok(stat.isDirectory(), 'target not a directory'); }); }); diff --git a/deps/npm/node_modules/normalize-package-data/README.md b/deps/npm/node_modules/normalize-package-data/README.md index 4b159126d98f12..0b9d7b5b423c47 100644 --- a/deps/npm/node_modules/normalize-package-data/README.md +++ b/deps/npm/node_modules/normalize-package-data/README.md @@ -93,6 +93,10 @@ If `name` field is given, the value of the name field must be a string. The stri If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). +### Rules for license field + +The `license` field should be a valid *SDPDX license expression* string, as determined by the `spdx.valid` method. See [documentation for the spdx module](https://github.com/kemitchell/spdx.js). + ## Credits This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. diff --git a/deps/npm/node_modules/normalize-package-data/lib/fixer.js b/deps/npm/node_modules/normalize-package-data/lib/fixer.js index 59cd05f755795e..e8f917d86aad62 100644 --- a/deps/npm/node_modules/normalize-package-data/lib/fixer.js +++ b/deps/npm/node_modules/normalize-package-data/lib/fixer.js @@ -1,4 +1,5 @@ var semver = require("semver") +var spdx = require('spdx'); var hostedGitInfo = require("hosted-git-info") var depTypes = ["dependencies","devDependencies","optionalDependencies"] var extractDescription = require("./extract_description") @@ -283,6 +284,18 @@ var fixer = module.exports = { data.homepage = "http://" + data.homepage } } + +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else if ( + typeof(data.license) !== 'string' || + data.license.length < 1 || + !spdx.valid(data.license) + ) { + this.warn("nonSPDXLicense") + } + } } function isValidScopedPackageName(spec) { diff --git a/deps/npm/node_modules/normalize-package-data/lib/normalize.js b/deps/npm/node_modules/normalize-package-data/lib/normalize.js index 7e6beefdae8f02..c43a9263789e3b 100644 --- a/deps/npm/node_modules/normalize-package-data/lib/normalize.js +++ b/deps/npm/node_modules/normalize-package-data/lib/normalize.js @@ -4,7 +4,7 @@ var fixer = require("./fixer") var makeWarning = require("./make_warning") var fieldsToFix = ['name','version','description','repository','modules','scripts' - ,'files','bin','man','bugs','keywords','readme','homepage'] + ,'files','bin','man','bugs','keywords','readme','homepage','license'] var otherThingsToFix = ['dependencies','people', 'typos'] var thingsToFix = fieldsToFix.map(function(fieldName) { diff --git a/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json b/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json index 1877fe5de390a0..3bfce72cd4dd4a 100644 --- a/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json +++ b/deps/npm/node_modules/normalize-package-data/lib/warning_messages.json @@ -19,11 +19,13 @@ ,"nonStringDescription": "'description' field should be a string" ,"missingDescription": "No description" ,"missingReadme": "No README data" + ,"missingLicense": "No license field." ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}" ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted." ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted." ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted." ,"nonUrlHomepage": "homepage field must be a string url. Deleted." + ,"nonSPDXLicense": "license should be a valid SPDX license expression" ,"missingProtocolHomepage": "homepage field must start with a protocol." ,"typo": "%s should probably be %s." } diff --git a/deps/npm/node_modules/normalize-package-data/package.json b/deps/npm/node_modules/normalize-package-data/package.json index 8f4aeadca2c23b..5dbc3af3986d2b 100644 --- a/deps/npm/node_modules/normalize-package-data/package.json +++ b/deps/npm/node_modules/normalize-package-data/package.json @@ -1,6 +1,6 @@ { "name": "normalize-package-data", - "version": "2.0.0", + "version": "2.1.0", "author": { "name": "Meryn Stol", "email": "merynstol@gmail.com" @@ -16,7 +16,8 @@ }, "dependencies": { "hosted-git-info": "^2.0.2", - "semver": "2 || 3 || 4" + "semver": "2 || 3 || 4", + "spdx": "^0.4.0" }, "devDependencies": { "tap": "~0.2.5", @@ -37,43 +38,14 @@ "email": "rok@kowalski.gd" } ], - "gitHead": "ea0b959633e4803685bae2283d3d79a0115e6f8a", + "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readFileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readFileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readFileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved.\n* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL.\n* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `repository.url` is not a valid url, but in the style of \"[owner-name]/[repo-name]\", `repository.url` will be set to https://github.com/[owner-name]/[repo-name]\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n### Rules for license field\n\nThe `license` field should be a valid *SDPDX license expression* string, as determined by the `spdx.valid` method. See [documentation for the spdx module](https://github.com/kemitchell/spdx.js).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol \n", + "readmeFilename": "README.md", + "gitHead": "a168f6153570465db33d96601576b612a63ed446", "bugs": { "url": "https://github.com/npm/normalize-package-data/issues" }, - "homepage": "https://github.com/npm/normalize-package-data", - "_id": "normalize-package-data@2.0.0", - "_shasum": "8795d0d5c70c0e9ca36f419548aac0abf1f638bc", - "_from": "normalize-package-data@>=2.0.0 <2.1.0", - "_npmVersion": "2.7.5", - "_nodeVersion": "1.6.2", - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "maintainers": [ - { - "name": "meryn", - "email": "merynstol@gmail.com" - }, - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - }, - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "dist": { - "shasum": "8795d0d5c70c0e9ca36f419548aac0abf1f638bc", - "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.0.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.0.0.tgz", - "readme": "ERROR: No README data found!" + "homepage": "https://github.com/npm/normalize-package-data#readme", + "_id": "normalize-package-data@2.1.0", + "_shasum": "31381afb0567a8ab0ae730230c8652ff8a0cdd11", + "_from": "normalize-package-data@>=2.1.0 <2.2.0" } diff --git a/deps/npm/node_modules/normalize-package-data/test/fixtures/read-package-json.json b/deps/npm/node_modules/normalize-package-data/test/fixtures/read-package-json.json index f4a2b96f47caf8..7d0dae1d57a4e1 100644 --- a/deps/npm/node_modules/normalize-package-data/test/fixtures/read-package-json.json +++ b/deps/npm/node_modules/normalize-package-data/test/fixtures/read-package-json.json @@ -7,6 +7,7 @@ "type": "git", "url": "git://github.com/isaacs/read-package-json.git" }, + "license": "MIT", "main": "read-json.js", "scripts": { "test": "tap test/*.js" @@ -24,4 +25,4 @@ "npmlog": "0", "graceful-fs": "~1.1.8" } -} \ No newline at end of file +} diff --git a/deps/npm/node_modules/normalize-package-data/test/normalize.js b/deps/npm/node_modules/normalize-package-data/test/normalize.js index 96b2544533a004..3dce3c0577189d 100644 --- a/deps/npm/node_modules/normalize-package-data/test/normalize.js +++ b/deps/npm/node_modules/normalize-package-data/test/normalize.js @@ -53,7 +53,8 @@ tap.test("empty object", function(t) { t.same(warnings, [ warningMessages.missingDescription, warningMessages.missingRepository, - warningMessages.missingReadme + warningMessages.missingReadme, + warningMessages.missingLicense ]) t.end() }) @@ -76,7 +77,8 @@ tap.test("core module name", function(t) { safeFormat(warningMessages.conflictingName, 'http'), warningMessages.nonEmailUrlBugsString, warningMessages.emptyNormalizedBugs, - warningMessages.nonUrlHomepage + warningMessages.nonUrlHomepage, + warningMessages.missingLicense ] t.same(warnings, expect) t.end() @@ -110,9 +112,11 @@ tap.test("urls required", function(t) { warningMessages.nonEmailBugsEmailField, warningMessages.emptyNormalizedBugs, warningMessages.missingReadme, + warningMessages.missingLicense, warningMessages.nonEmailUrlBugsString, warningMessages.emptyNormalizedBugs, - warningMessages.nonUrlHomepage ] + warningMessages.nonUrlHomepage, + warningMessages.missingLicense] t.same(warnings, expect) t.end() }) @@ -133,12 +137,34 @@ tap.test("homepage field must start with a protocol.", function(t) { [ warningMessages.missingDescription, warningMessages.missingRepository, warningMessages.missingReadme, - warningMessages.missingProtocolHomepage ] + warningMessages.missingProtocolHomepage, + warningMessages.missingLicense] t.same(warnings, expect) t.same(a.homepage, 'http://example.org') t.end() }) +tap.test("license field should be a valid SPDX expression", function(t) { + var warnings = [] + function warn(w) { + warnings.push(w) + } + var a + normalize(a={ + license: 'Apache 2' + }, warn) + + console.error(a) + + var expect = + [ warningMessages.missingDescription, + warningMessages.missingRepository, + warningMessages.missingReadme, + warningMessages.nonSPDXLicense] + t.same(warnings, expect) + t.end() +}) + tap.test("gist bugs url", function(t) { var d = { repository: "git@gist.github.com:123456.git" @@ -159,14 +185,14 @@ tap.test("singularize repositories", function(t) { tap.test("treat visionmedia/express as github repo", function(t) { var d = {repository: {type: "git", url: "visionmedia/express"}} normalize(d) - t.same(d.repository, { type: "git", url: "https://github.com/visionmedia/express.git" }) + t.same(d.repository, { type: "git", url: "git+https://github.com/visionmedia/express.git" }) t.end() }); tap.test("treat isaacs/node-graceful-fs as github repo", function(t) { var d = {repository: {type: "git", url: "isaacs/node-graceful-fs"}} normalize(d) - t.same(d.repository, { type: "git", url: "https://github.com/isaacs/node-graceful-fs.git" }) + t.same(d.repository, { type: "git", url: "git+https://github.com/isaacs/node-graceful-fs.git" }) t.end() }); diff --git a/deps/npm/node_modules/normalize-package-data/test/typo.js b/deps/npm/node_modules/normalize-package-data/test/typo.js index dfa2b90e53016d..0cd3eb49d00ccf 100644 --- a/deps/npm/node_modules/normalize-package-data/test/typo.js +++ b/deps/npm/node_modules/normalize-package-data/test/typo.js @@ -15,6 +15,7 @@ test('typos', function(t) { var expect = [ warningMessages.missingRepository, + warningMessages.missingLicense, typoMessage('dependancies', 'dependencies'), typoMessage('dependecies', 'dependencies'), typoMessage('depdenencies', 'dependencies'), @@ -66,7 +67,8 @@ test('typos', function(t) { typoMessage("bugs['name']", "bugs['url']"), warningMessages.nonUrlBugsUrlField, warningMessages.emptyNormalizedBugs, - warningMessages.missingReadme ] + warningMessages.missingReadme, + warningMessages.missingLicense] normalize({name:"name" ,version:"1.2.5" @@ -79,6 +81,7 @@ test('typos', function(t) { [ warningMessages.missingDescription, warningMessages.missingRepository, warningMessages.missingReadme, + warningMessages.missingLicense, typoMessage('script', 'scripts') ] normalize({name:"name" @@ -93,7 +96,8 @@ test('typos', function(t) { warningMessages.missingRepository, typoMessage("scripts['server']", "scripts['start']"), typoMessage("scripts['tests']", "scripts['test']"), - warningMessages.missingReadme ] + warningMessages.missingReadme, + warningMessages.missingLicense] normalize({name:"name" ,version:"1.2.5" @@ -105,7 +109,8 @@ test('typos', function(t) { expect = [ warningMessages.missingDescription, warningMessages.missingRepository, - warningMessages.missingReadme ] + warningMessages.missingReadme, + warningMessages.missingLicense] normalize({name:"name" ,version:"1.2.5" diff --git a/deps/npm/node_modules/once/LICENSE b/deps/npm/node_modules/once/LICENSE index 0c44ae716db8f3..19129e315fe593 100644 --- a/deps/npm/node_modules/once/LICENSE +++ b/deps/npm/node_modules/once/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +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. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +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/once/package.json b/deps/npm/node_modules/once/package.json index eb8a4217a2734a..c85f12ebe1d4fa 100644 --- a/deps/npm/node_modules/once/package.json +++ b/deps/npm/node_modules/once/package.json @@ -1,6 +1,6 @@ { "name": "once", - "version": "1.3.1", + "version": "1.3.2", "description": "Run a function exactly one time", "main": "once.js", "directories": { @@ -17,7 +17,7 @@ }, "repository": { "type": "git", - "url": "git://github.com/isaacs/once" + "url": "git://github.com/isaacs/once.git" }, "keywords": [ "once", @@ -30,20 +30,24 @@ "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "license": "BSD", - "gitHead": "c90ac02a74f433ce47f6938869e68dd6196ffc2c", + "license": "ISC", + "gitHead": "e35eed5a7867574e2bf2260a1ba23970958b22f2", "bugs": { "url": "https://github.com/isaacs/once/issues" }, - "homepage": "https://github.com/isaacs/once", - "_id": "once@1.3.1", - "_shasum": "f3f3e4da5b7d27b5c732969ee3e67e729457b31f", - "_from": "once@>=1.3.1 <2.0.0", - "_npmVersion": "2.0.0", - "_nodeVersion": "0.10.31", + "homepage": "https://github.com/isaacs/once#readme", + "_id": "once@1.3.2", + "_shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", + "_from": "once@>=1.3.2 <1.4.0", + "_npmVersion": "2.9.1", + "_nodeVersion": "2.0.0", "_npmUser": { "name": "isaacs", - "email": "i@izs.me" + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", + "tarball": "http://registry.npmjs.org/once/-/once-1.3.2.tgz" }, "maintainers": [ { @@ -51,10 +55,6 @@ "email": "i@izs.me" } ], - "dist": { - "shasum": "f3f3e4da5b7d27b5c732969ee3e67e729457b31f", - "tarball": "http://registry.npmjs.org/once/-/once-1.3.1.tgz" - }, - "_resolved": "https://registry.npmjs.org/once/-/once-1.3.1.tgz", + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/.eslintrc b/deps/npm/node_modules/request/.eslintrc deleted file mode 100644 index 8538b419c1119f..00000000000000 --- a/deps/npm/node_modules/request/.eslintrc +++ /dev/null @@ -1,39 +0,0 @@ -{ - "env": { - "node": true - }, - "rules": { - // 2-space indentation - "indent": [2, 2], - // Disallow semi-colons, unless needed to disambiguate statement - "semi": [2, "never"], - // Require strings to use single quotes - "quotes": [2, "single"], - // Require curly braces for all control statements - "curly": 2, - // Disallow using variables and functions before they've been defined - "no-use-before-define": 2, - // Allow any case for variable naming - "camelcase": 0, - // Disallow unused variables, except as function arguments - "no-unused-vars": [2, {"args":"none"}], - // Allow leading underscores for method names - // REASON: we use underscores to denote private methods - "no-underscore-dangle": 0, - // Allow multi spaces around operators since they are - // used for alignment. This is not consistent in the - // code. - "no-multi-spaces": 0, - // Style rule is: most objects use { beforeColon: false, afterColon: true }, unless aligning which uses: - // - // { - // beforeColon : true, - // afterColon : true - // } - // - // eslint can't handle this, so the check is disabled. - "key-spacing": 0, - // Allow shadowing vars in outer scope (needs discussion) - "no-shadow": 0 - } -} diff --git a/deps/npm/node_modules/request/node_modules/bl/.jshintrc b/deps/npm/node_modules/request/node_modules/bl/.jshintrc deleted file mode 100644 index c8ef3ca4097f82..00000000000000 --- a/deps/npm/node_modules/request/node_modules/bl/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f0f2efc..00000000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/deps/npm/node_modules/request/node_modules/isstream/.jshintrc b/deps/npm/node_modules/request/node_modules/isstream/.jshintrc deleted file mode 100644 index c8ef3ca4097f82..00000000000000 --- a/deps/npm/node_modules/request/node_modules/isstream/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/qs/.jshintrc b/deps/npm/node_modules/request/node_modules/qs/.jshintrc deleted file mode 100644 index 997b3f7d45e31b..00000000000000 --- a/deps/npm/node_modules/request/node_modules/qs/.jshintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "node": true, - - "curly": true, - "latedef": true, - "quotmark": true, - "undef": true, - "unused": true, - "trailing": true -} diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc b/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc deleted file mode 100644 index 4c1c8d49723519..00000000000000 --- a/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "node": true, - "asi": true, - "laxcomma": true -} diff --git a/deps/npm/node_modules/semver/LICENSE b/deps/npm/node_modules/semver/LICENSE index 0c44ae716db8f3..19129e315fe593 100644 --- a/deps/npm/node_modules/semver/LICENSE +++ b/deps/npm/node_modules/semver/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +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. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +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/semver/package.json b/deps/npm/node_modules/semver/package.json index 7617ef8b50afb3..fa73f2a9f69b50 100644 --- a/deps/npm/node_modules/semver/package.json +++ b/deps/npm/node_modules/semver/package.json @@ -1,6 +1,6 @@ { "name": "semver", - "version": "4.3.3", + "version": "4.3.4", "description": "The semantic version parser used by npm.", "main": "semver.js", "browser": "semver.browser.js", @@ -13,7 +13,7 @@ "tap": "0.x >=0.0.4", "uglify-js": "~2.3.6" }, - "license": "BSD", + "license": "ISC", "repository": { "type": "git", "url": "git://github.com/npm/node-semver.git" @@ -21,34 +21,35 @@ "bin": { "semver": "./bin/semver" }, - "gitHead": "bb32a43bdfa7223e4c450d181e5a2184b00f24d4", + "gitHead": "d7d791dc9d321cb5f3211e39ce8857f6476922f9", "bugs": { "url": "https://github.com/npm/node-semver/issues" }, - "homepage": "https://github.com/npm/node-semver", - "_id": "semver@4.3.3", - "_shasum": "15466b61220bc371cd8f0e666a9f785329ea8228", - "_from": "semver@>=4.3.3 <4.4.0", - "_npmVersion": "2.7.4", - "_nodeVersion": "1.4.2", + "homepage": "https://github.com/npm/node-semver#readme", + "_id": "semver@4.3.4", + "_shasum": "bf43a1aae304de040e12a13f84200ca7aeab7589", + "_from": "semver@>=4.3.4 <4.4.0", + "_npmVersion": "2.9.1", + "_nodeVersion": "2.0.0", "_npmUser": { "name": "isaacs", "email": "isaacs@npmjs.com" }, + "dist": { + "shasum": "bf43a1aae304de040e12a13f84200ca7aeab7589", + "tarball": "http://registry.npmjs.org/semver/-/semver-4.3.4.tgz" + }, "maintainers": [ { "name": "isaacs", - "email": "i@izs.me" + "email": "isaacs@npmjs.com" }, { "name": "othiym23", "email": "ogd@aoaioxxysz.net" } ], - "dist": { - "shasum": "15466b61220bc371cd8f0e666a9f785329ea8228", - "tarball": "http://registry.npmjs.org/semver/-/semver-4.3.3.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/semver/-/semver-4.3.3.tgz" + "_resolved": "https://registry.npmjs.org/semver/-/semver-4.3.4.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/spdx/LICENSE.md b/deps/npm/node_modules/spdx/LICENSE.md new file mode 100644 index 00000000000000..2180a8c1a3676e --- /dev/null +++ b/deps/npm/node_modules/spdx/LICENSE.md @@ -0,0 +1,7 @@ +Copyright Kyle E. Mitchell + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/deps/npm/node_modules/spdx/README.md b/deps/npm/node_modules/spdx/README.md new file mode 100644 index 00000000000000..4bf07fe1715fba --- /dev/null +++ b/deps/npm/node_modules/spdx/README.md @@ -0,0 +1,141 @@ +spdx.js +======= + +[![npm version](https://img.shields.io/npm/v/spdx.svg)](https://www.npmjs.com/package/spdx) +[![SPDX License Expression Syntax version](https://img.shields.io/badge/SPDX-2.0-blue.svg)](http://spdx.org/SPDX-specifications/spdx-version-2.0) +[![license](https://img.shields.io/badge/license-Apache--2.0-303284.svg)](http://www.apache.org/licenses/LICENSE-2.0) +[![build status](https://img.shields.io/travis/kemitchell/spdx.js.svg)](http://travis-ci.org/kemitchell/spdx.js) + +SPDX License Expression Syntax parser + + + +Simple License Expressions +-------------------------- +```js +spdx.valid('Invalid-Identifier'); // => null +spdx.valid('GPL-2.0'); // => true +spdx.valid('GPL-2.0+'); // => true +spdx.valid('LicenseRef-23'); // => true +spdx.valid('LicenseRef-MIT-Style-1'); // => true +spdx.valid('DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2'); // => true +``` + +Composite License Expressions +----------------------------- + +### Disjunctive `OR` Operator +```js +spdx.valid('(LGPL-2.1 OR MIT)'); // => true +spdx.valid('(LGPL-2.1 OR MIT OR BSD-3-Clause)'); // => true +``` + +### Conjunctive `AND` Operator +```js +spdx.valid('(LGPL-2.1 AND MIT)'); // => true +spdx.valid('(LGPL-2.1 AND MIT AND BSD-2-Clause)'); // => true +``` + +### Exception `WITH` Operator +```js +spdx.valid('(GPL-2.0+ WITH Bison-exception-2.2)'); // => true +``` + +### Order of Precedence and Parentheses +```js +var firstAST = { + left: {license: 'LGPL-2.1'}, + conjunction: 'or', + right: { + left: {license: 'BSD-3-Clause'}, + conjunction: 'and', + right: {license: 'MIT'} + } +}; +spdx.parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'); // => firstAST + +var secondAST = { + left: {license: 'MIT'}, + conjunction: 'and', + right: { + left: {license: 'LGPL-2.1', plus: true}, + conjunction: 'and', + right: {license: 'BSD-3-Clause'} + } +}; +spdx.parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'); // => secondAST +``` + +Strict Whitespace Rules +----------------------- +```js +spdx.valid('MIT '); // => false +spdx.valid(' MIT'); // => false +spdx.valid('MIT AND BSD-3-Clause'); // => false +``` + +Identifier Lists +---------------- +```js +Array.isArray(spdx.licenses); // => true +spdx.licenses.indexOf('ISC') > -1; // => true +spdx.licenses.indexOf('Apache-1.7') > -1; // => false +spdx.licenses.every(function(element) { + return typeof element === 'string'; +}); // => true + +Array.isArray(spdx.exceptions); // => true +spdx.exceptions.indexOf('GCC-exception-3.1') > -1; // => true +spdx.exceptions.every(function(element) { + return typeof element === 'string'; +}); // => true +``` + +Comparison +---------- +```js +spdx.gt('GPL-3.0', 'GPL-2.0'); // => true +spdx.lt('MPL-1.0', 'MPL-2.0'); // => true + +spdx.gt('LPPL-1.3a', 'LPPL-1.0'); // => true +spdx.gt('LPPL-1.3a', 'LPPL-1.3a'); // => false +spdx.gt('MIT', 'ISC'); // => false + +try { + spdx.gt('(MIT OR ISC)', 'GPL-3.0'); +} catch (error) { + error.message; // => '"(MIT OR ISC)" is not a simple license identifier' +} + +spdx.satisfies('MIT', 'MIT'); // => true +spdx.satisfies('MIT', '(ISC OR MIT)'); // => true +spdx.satisfies('Zlib', '(ISC OR (MIT OR Zlib))'); // => true +spdx.satisfies('GPL-3.0', '(ISC OR MIT)'); // => false +spdx.satisfies('GPL-2.0', 'GPL-2.0+'); // => true +spdx.satisfies('GPL-3.0', 'GPL-2.0+'); // => true +spdx.satisfies('GPL-1.0', 'GPL-2.0+'); // => false + +spdx.satisfies('GPL-2.0', 'GPL-2.0+ WITH Bison-exception-2.2'); // => false +spdx.satisfies('GPL-3.0 WITH Bison-exception-2.2', 'GPL-2.0+ WITH Bison-exception-2.2'); // => true + +spdx.satisfies('(MIT OR GPL-2.0)', '(ISC OR MIT)'); // => true +spdx.satisfies('(MIT AND GPL-2.0)', '(MIT OR GPL-2.0)'); // => true +spdx.satisfies('(MIT AND GPL-2.0)', '(ISC OR GPL-2.0)'); // => false +``` + +Version Metadata +---------------- +```js +spdx.specificationVersion; // => '2.0' +spdx.implementationVersion; // => package.version +``` + +The Specification +----------------- +[The Software Package Data Exchange (SPDX) specification](http://spdx.org) is the work of the [Linux Foundation](http://www.linuxfoundation.org) and its contributors, and is licensed under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0")](http://spdx.org/licenses/CC-BY-3.0). "SPDX" is a United States federally registered trademark of the Linux Foundation. diff --git a/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/LICENSE b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/LICENSE new file mode 100644 index 00000000000000..68a49daad8ff7e --- /dev/null +++ b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to diff --git a/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/README.md b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/README.md new file mode 100755 index 00000000000000..c96e56b1e1d7d4 --- /dev/null +++ b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/README.md @@ -0,0 +1,55 @@ +# spdx-license-ids + +A list of [SPDX license](http://spdx.org/licenses/) identifiers + +[**Download JSON**](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/spdx-license-ids.json) + +## Use as a JavaScript Library + +[![NPM version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.org/package/spdx-license-ids) +[![Bower version](https://img.shields.io/bower/v/spdx-license-ids.svg)](https://github.com/shinnn/spdx-license-ids/releases) +[![Build Status](https://travis-ci.org/shinnn/spdx-license-ids.svg?branch=master)](https://travis-ci.org/shinnn/spdx-license-ids) +[![Coverage Status](https://img.shields.io/coveralls/shinnn/spdx-license-ids.svg)](https://coveralls.io/r/shinnn/spdx-license-ids) +[![devDependency Status](https://david-dm.org/shinnn/spdx-license-ids/dev-status.svg)](https://david-dm.org/shinnn/spdx-license-ids#info=devDependencies) + +### Installation + +#### Package managers + +##### [npm](https://www.npmjs.com/) + +```sh +npm install spdx-license-ids +``` + +##### [bower](http://bower.io/) + +```sh +bower install spdx-license-ids +``` + +##### [Duo](http://duojs.org/) + +```javascript +var spdxLicenseIds = require('shinnn/spdx-license-ids'); +``` + +#### Standalone + +[Download the script file directly.](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/spdx-license-ids-browser.js) + +### API + +#### spdxLicenseIds + +Type: `Array` of `String` + +It returns an array of SPDX license identifiers. + +```javascript +var spdxLicenseIds = require('spdx-license-ids'); //=> ['Glide', 'Abstyles', 'AFL-1.1', ... ] +``` + +## License + +[The Uicense](./LICENSE). diff --git a/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/package.json b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/package.json new file mode 100644 index 00000000000000..7ba26183b67a2f --- /dev/null +++ b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/package.json @@ -0,0 +1,83 @@ +{ + "name": "spdx-license-ids", + "version": "1.0.0", + "description": "A list of SPDX license identifiers", + "repository": { + "type": "git", + "url": "git+https://github.com/shinnn/spdx-license-ids.git" + }, + "author": { + "name": "Shinnosuke Watanabe", + "url": "https://github.com/shinnn" + }, + "scripts": { + "build": "node --harmony_arrow_functions build.js", + "lint": "eslint --config node_modules/@shinnn/eslintrc/rc.json --ignore-path .gitignore .", + "pretest": "${npm_package_scripts_build} && ${npm_package_scripts_lint}", + "test": "node --harmony_arrow_functions test.js", + "coverage": "node --harmony_arrow_functions node_modules/.bin/istanbul cover test.js", + "coveralls": "${npm_package_scripts_coverage} && istanbul-coveralls" + }, + "licenses": [ + { + "type": "Unlicense", + "url": "https://github.com/shinnn/spdx-license-ids/blob/master/LICENSE" + } + ], + "main": "spdx-license-ids.json", + "files": [ + "spdx-license-ids.json" + ], + "keywords": [ + "spdx", + "license", + "licenses", + "id", + "identifier", + "identifiers", + "json", + "array", + "oss", + "browser", + "client-side" + ], + "devDependencies": { + "@shinnn/eslintrc": "^1.0.0", + "each-async": "^1.1.1", + "eslint": "^0.20.0", + "istanbul": "^0.3.13", + "istanbul-coveralls": "^1.0.2", + "require-bower-files": "^2.0.0", + "rm-rf": "^0.1.0", + "spdx-license-list": "^2.0.0", + "stringify-object": "^1.0.1", + "tape": "^4.0.0" + }, + "gitHead": "64eecd85af21ddfc325dc024906b281b1ebdc120", + "bugs": { + "url": "https://github.com/shinnn/spdx-license-ids/issues" + }, + "homepage": "https://github.com/shinnn/spdx-license-ids#readme", + "_id": "spdx-license-ids@1.0.0", + "_shasum": "a966050150dec883ffce877431b361b36742a28d", + "_from": "spdx-license-ids@>=1.0.0 <2.0.0", + "_npmVersion": "2.8.4", + "_nodeVersion": "1.8.1", + "_npmUser": { + "name": "shinnn", + "email": "snnskwtnb@gmail.com" + }, + "maintainers": [ + { + "name": "shinnn", + "email": "snnskwtnb@gmail.com" + } + ], + "dist": { + "shasum": "a966050150dec883ffce877431b361b36742a28d", + "tarball": "http://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/spdx-license-ids.json b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/spdx-license-ids.json new file mode 100644 index 00000000000000..c04844d6dfb2c0 --- /dev/null +++ b/deps/npm/node_modules/spdx/node_modules/spdx-license-ids/spdx-license-ids.json @@ -0,0 +1,299 @@ +[ + "Glide", + "Abstyles", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AMPAS", + "APL-1.0", + "Adobe-Glyph", + "APAFML", + "Adobe-2006", + "AGPL-1.0", + "Afmparse", + "Aladdin", + "ADSL", + "AMDPLPA", + "ANTLR-PD", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "AML", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "AAL", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "BSL-1.0", + "Borceux", + "BSD-2-Clause", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "BSD-3-Clause", + "BSD-3-Clause-Clear", + "BSD-4-Clause", + "BSD-Protection", + "BSD-3-Clause-Attribution", + "BSD-4-Clause-UC", + "bzip2-1.0.5", + "bzip2-1.0.6", + "Caldera", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-B", + "CECILL-C", + "ClArtistic", + "MIT-CMU", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "CPOL-1.02", + "CDDL-1.0", + "CDDL-1.1", + "CPAL-1.0", + "CPL-1.0", + "CATOSL-1.1", + "Condor-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-4.0", + "CC0-1.0", + "Crossword", + "CUA-OPL-1.0", + "Cube", + "D-FSL-1.0", + "diffmark", + "WTFPL", + "DOC", + "Dotseqn", + "DSDP", + "dvipdfm", + "EPL-1.0", + "ECL-1.0", + "ECL-2.0", + "eGenix", + "EFL-1.0", + "EFL-2.0", + "MIT-advertising", + "MIT-enna", + "Entessa", + "ErlPL-1.1", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "Eurosym", + "Fair", + "MIT-feh", + "Frameworx-1.0", + "FreeImage", + "FTL", + "FSFUL", + "FSFULLR", + "Giftware", + "GL2PS", + "Glulxe", + "AGPL-3.0", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0", + "GPL-3.0", + "LGPL-2.1", + "LGPL-3.0", + "LGPL-2.0", + "gnuplot", + "gSOAP-1.3b", + "HaskellReport", + "HPND", + "IBM-pibs", + "IPL-1.0", + "ICU", + "ImageMagick", + "iMatix", + "Imlib2", + "IJG", + "Intel-ACPI", + "Intel", + "IPA", + "ISC", + "JasPer-2.0", + "JSON", + "LPPL-1.3a", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3c", + "Latex2e", + "BSD-3-Clause-LBNL", + "Leptonica", + "Libpng", + "libtiff", + "LPL-1.02", + "LPL-1.0", + "MakeIndex", + "MTLL", + "MS-PL", + "MS-RL", + "MirOS", + "MITNFA", + "MIT", + "Motosoto", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "mpich2", + "Multics", + "Mup", + "NASA-1.3", + "Naumen", + "NBPL-1.0", + "NetCDF", + "NGPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "Newsletr", + "NLPL", + "Nokia", + "NPOSL-3.0", + "Noweb", + "NRL", + "NTP", + "Nunit", + "OCLC-2.0", + "ODbL-1.0", + "PDDL-1.0", + "OGTSL", + "OLDAP-2.2.2", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OML", + "OPL-1.0", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenSSL", + "PHP-3.0", + "PHP-3.01", + "Plexus", + "PostgreSQL", + "psfrag", + "psutils", + "Python-2.0", + "QPL-1.0", + "Qhull", + "Rdisc", + "RPSL-1.0", + "RPL-1.1", + "RPL-1.5", + "RHeCos-1.1", + "RSCPL", + "RSA-MD", + "Ruby", + "SAX-PD", + "Saxpath", + "SCEA", + "SWL", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "OFL-1.0", + "OFL-1.1", + "SimPL-2.0", + "Sleepycat", + "SNIA", + "SMLNJ", + "SugarCRM-1.1.3", + "SISSL", + "SISSL-1.2", + "SPL-1.0", + "Watcom-1.0", + "TCL", + "Unlicense", + "TMate", + "TORQUE-1.1", + "TOSL", + "Unicode-TOU", + "UPL-1.0", + "NCSA", + "Vim", + "VOSTROM", + "VSL-1.0", + "W3C-19980720", + "W3C", + "Wsuipa", + "Xnet", + "X11", + "Xerox", + "XFree86-1.1", + "xinetd", + "xpp", + "XSkat", + "YPL-1.0", + "YPL-1.1", + "Zed", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "zlib-acknowledgement", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1" +] diff --git a/deps/npm/node_modules/spdx/package.json b/deps/npm/node_modules/spdx/package.json new file mode 100644 index 00000000000000..9c31ddb5076dff --- /dev/null +++ b/deps/npm/node_modules/spdx/package.json @@ -0,0 +1,72 @@ +{ + "name": "spdx", + "description": "SPDX License Expression Syntax parser", + "version": "0.4.0", + "author": { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "http://kemitchell.com" + }, + "bugs": { + "url": "https://github.com/kemitchell/spdx.js/issues" + }, + "dependencies": { + "spdx-license-ids": "^1.0.0" + }, + "devDependencies": { + "docco": "^0.7.0", + "fixpack": "^2.2.0", + "jison": "^0.4.15", + "jscs": "^1.12.0", + "jshint": "^2.7.0", + "jsmd": "^0.3.0" + }, + "homepage": "https://github.com/kemitchell/spdx.js", + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata", + "package", + "package.json", + "standards" + ], + "license": "Apache-2.0", + "main": "source/spdx.js", + "repository": { + "type": "git", + "url": "git+https://github.com/kemitchell/spdx.js.git" + }, + "scripts": { + "build": "node build/parser.js > source/parser.generated.js", + "doc": "docco --output documentation source/spdx.js", + "lint": "fixpack && jshint build source/spdx.js && jscs build source/spdx.js", + "precommit": "npm run lint && npm run test", + "prepublish": "npm run build", + "pretest": "npm run build", + "test": "jsmd README.md" + }, + "gitHead": "7186b8f92f0aa3c8f087e73b5f98bd1c776a4d3f", + "_id": "spdx@0.4.0", + "_shasum": "5a5cbff1a457b57b15204cafd3d0ea9ad9652ef8", + "_from": "spdx@0.4.0", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + }, + "maintainers": [ + { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + } + ], + "dist": { + "shasum": "5a5cbff1a457b57b15204cafd3d0ea9ad9652ef8", + "tarball": "http://registry.npmjs.org/spdx/-/spdx-0.4.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/spdx/-/spdx-0.4.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/spdx/source/exceptions.json b/deps/npm/node_modules/spdx/source/exceptions.json new file mode 100644 index 00000000000000..d588a1af7e11f8 --- /dev/null +++ b/deps/npm/node_modules/spdx/source/exceptions.json @@ -0,0 +1,11 @@ +[ + "Autoconf-exception-2.0", + "Autoconf-exception-3.0", + "Bison-exception-2.2", + "Classpath-exception-2.0", + "eCos-exception-2.0", + "Font-exception-2.0", + "GCC-exception-2.0", + "GCC-exception-3.1", + "WxWindows-exception-3.1" +] diff --git a/deps/npm/node_modules/spdx/source/parser.generated.js b/deps/npm/node_modules/spdx/source/parser.generated.js new file mode 100644 index 00000000000000..380609339cd77a --- /dev/null +++ b/deps/npm/node_modules/spdx/source/parser.generated.js @@ -0,0 +1,1255 @@ +/* parser generated by jison 0.4.15 */ +/* + Returns a Parser object of the following structure: + + Parser: { + yy: {} + } + + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + + + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + + + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var spdxparse = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, +productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +var $0 = $$.length - 1; +switch (yystate) { +case 1: +return this.$ = $$[$0-1]; +break; +case 2: case 4: case 5: +this.$ = { license: yytext }; +break; +case 3: +this.$ = { license: $$[$0-1], plus: true }; +break; +case 6: +this.$ = $$[$0]; +break; +case 7: +this.$ = { exception: $$[$0] }; +this.$.license = $$[$0-2].license; +if ($$[$0-2].hasOwnProperty('plus')) { + this.$.plus = $$[$0-2].plus; +} +break; +case 8: +this.$ = { conjunction: 'and', left: $$[$0-2], right: $$[$0] }; +break; +case 9: +this.$ = { conjunction: 'or', left: $$[$0-2], right: $$[$0] }; +break; +case 10: +this.$ = $$[$0-1] +break; +} +}, +table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], +defaultActions: {8:[2,1]}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + throw new Error(str); + } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + _token_stack: + function lex() { + var token; + token = lexer.lex() || EOF; + if (typeof token !== 'number') { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +}}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ + +EOF:1, + +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, + +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + + this._input = this._input.slice(1); + return ch; + }, + +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, + +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + + } + return this; + }, + +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, + +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, + +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function (match, indexed_rule) { + var token, + lines, + backup; + + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + return false; // rule action called reject() implying the next rule should be tested instead. + } + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + +// return next match that has a token +lex:function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin(condition) { + this.conditionStack.push(condition); + }, + +// pop the previously active lexer condition state off the condition stack +popState:function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + +// alias for begin(condition) +pushState:function pushState(condition) { + this.begin(condition); + }, + +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0:return 5; +break; +case 1:/* skip whitespace */ +break; +case 2:return 8; +break; +case 3:return 16; +break; +case 4:return 17; +break; +case 5:return 11; +break; +case 6:return 10; +break; +case 7:return 9; +break; +case 8:return 14; +break; +case 9:return 15; +break; +case 10:return 12; +break; +case 11:return 7; +break; +case 12:return 7; +break; +case 13:return 7; +break; +case 14:return 7; +break; +case 15:return 7; +break; +case 16:return 7; +break; +case 17:return 7; +break; +case 18:return 7; +break; +case 19:return 7; +break; +case 20:return 7; +break; +case 21:return 7; +break; +case 22:return 7; +break; +case 23:return 7; +break; +case 24:return 7; +break; +case 25:return 7; +break; +case 26:return 7; +break; +case 27:return 7; +break; +case 28:return 7; +break; +case 29:return 7; +break; +case 30:return 7; +break; +case 31:return 7; +break; +case 32:return 7; +break; +case 33:return 7; +break; +case 34:return 7; +break; +case 35:return 7; +break; +case 36:return 7; +break; +case 37:return 7; +break; +case 38:return 7; +break; +case 39:return 7; +break; +case 40:return 7; +break; +case 41:return 7; +break; +case 42:return 7; +break; +case 43:return 7; +break; +case 44:return 7; +break; +case 45:return 7; +break; +case 46:return 7; +break; +case 47:return 7; +break; +case 48:return 7; +break; +case 49:return 7; +break; +case 50:return 7; +break; +case 51:return 7; +break; +case 52:return 7; +break; +case 53:return 7; +break; +case 54:return 7; +break; +case 55:return 7; +break; +case 56:return 7; +break; +case 57:return 7; +break; +case 58:return 7; +break; +case 59:return 7; +break; +case 60:return 7; +break; +case 61:return 7; +break; +case 62:return 7; +break; +case 63:return 7; +break; +case 64:return 7; +break; +case 65:return 7; +break; +case 66:return 7; +break; +case 67:return 7; +break; +case 68:return 7; +break; +case 69:return 7; +break; +case 70:return 7; +break; +case 71:return 7; +break; +case 72:return 7; +break; +case 73:return 7; +break; +case 74:return 7; +break; +case 75:return 7; +break; +case 76:return 7; +break; +case 77:return 7; +break; +case 78:return 7; +break; +case 79:return 7; +break; +case 80:return 7; +break; +case 81:return 7; +break; +case 82:return 7; +break; +case 83:return 7; +break; +case 84:return 7; +break; +case 85:return 7; +break; +case 86:return 7; +break; +case 87:return 7; +break; +case 88:return 7; +break; +case 89:return 7; +break; +case 90:return 7; +break; +case 91:return 7; +break; +case 92:return 7; +break; +case 93:return 7; +break; +case 94:return 7; +break; +case 95:return 7; +break; +case 96:return 7; +break; +case 97:return 7; +break; +case 98:return 7; +break; +case 99:return 7; +break; +case 100:return 7; +break; +case 101:return 7; +break; +case 102:return 7; +break; +case 103:return 7; +break; +case 104:return 7; +break; +case 105:return 7; +break; +case 106:return 7; +break; +case 107:return 7; +break; +case 108:return 7; +break; +case 109:return 7; +break; +case 110:return 7; +break; +case 111:return 7; +break; +case 112:return 7; +break; +case 113:return 7; +break; +case 114:return 7; +break; +case 115:return 7; +break; +case 116:return 7; +break; +case 117:return 7; +break; +case 118:return 7; +break; +case 119:return 7; +break; +case 120:return 7; +break; +case 121:return 7; +break; +case 122:return 7; +break; +case 123:return 7; +break; +case 124:return 7; +break; +case 125:return 7; +break; +case 126:return 7; +break; +case 127:return 7; +break; +case 128:return 7; +break; +case 129:return 7; +break; +case 130:return 7; +break; +case 131:return 7; +break; +case 132:return 7; +break; +case 133:return 7; +break; +case 134:return 7; +break; +case 135:return 7; +break; +case 136:return 7; +break; +case 137:return 7; +break; +case 138:return 7; +break; +case 139:return 7; +break; +case 140:return 7; +break; +case 141:return 7; +break; +case 142:return 7; +break; +case 143:return 7; +break; +case 144:return 7; +break; +case 145:return 7; +break; +case 146:return 7; +break; +case 147:return 7; +break; +case 148:return 7; +break; +case 149:return 7; +break; +case 150:return 7; +break; +case 151:return 7; +break; +case 152:return 7; +break; +case 153:return 7; +break; +case 154:return 7; +break; +case 155:return 7; +break; +case 156:return 7; +break; +case 157:return 7; +break; +case 158:return 7; +break; +case 159:return 7; +break; +case 160:return 7; +break; +case 161:return 7; +break; +case 162:return 7; +break; +case 163:return 7; +break; +case 164:return 7; +break; +case 165:return 7; +break; +case 166:return 7; +break; +case 167:return 7; +break; +case 168:return 7; +break; +case 169:return 7; +break; +case 170:return 7; +break; +case 171:return 7; +break; +case 172:return 7; +break; +case 173:return 7; +break; +case 174:return 7; +break; +case 175:return 7; +break; +case 176:return 7; +break; +case 177:return 7; +break; +case 178:return 7; +break; +case 179:return 7; +break; +case 180:return 7; +break; +case 181:return 7; +break; +case 182:return 7; +break; +case 183:return 7; +break; +case 184:return 7; +break; +case 185:return 7; +break; +case 186:return 7; +break; +case 187:return 7; +break; +case 188:return 7; +break; +case 189:return 7; +break; +case 190:return 7; +break; +case 191:return 7; +break; +case 192:return 7; +break; +case 193:return 7; +break; +case 194:return 7; +break; +case 195:return 7; +break; +case 196:return 7; +break; +case 197:return 7; +break; +case 198:return 7; +break; +case 199:return 7; +break; +case 200:return 7; +break; +case 201:return 7; +break; +case 202:return 7; +break; +case 203:return 7; +break; +case 204:return 7; +break; +case 205:return 7; +break; +case 206:return 7; +break; +case 207:return 7; +break; +case 208:return 7; +break; +case 209:return 7; +break; +case 210:return 7; +break; +case 211:return 7; +break; +case 212:return 7; +break; +case 213:return 7; +break; +case 214:return 7; +break; +case 215:return 7; +break; +case 216:return 7; +break; +case 217:return 7; +break; +case 218:return 7; +break; +case 219:return 7; +break; +case 220:return 7; +break; +case 221:return 7; +break; +case 222:return 7; +break; +case 223:return 7; +break; +case 224:return 7; +break; +case 225:return 7; +break; +case 226:return 7; +break; +case 227:return 7; +break; +case 228:return 7; +break; +case 229:return 7; +break; +case 230:return 7; +break; +case 231:return 7; +break; +case 232:return 7; +break; +case 233:return 7; +break; +case 234:return 7; +break; +case 235:return 7; +break; +case 236:return 7; +break; +case 237:return 7; +break; +case 238:return 7; +break; +case 239:return 7; +break; +case 240:return 7; +break; +case 241:return 7; +break; +case 242:return 7; +break; +case 243:return 7; +break; +case 244:return 7; +break; +case 245:return 7; +break; +case 246:return 7; +break; +case 247:return 7; +break; +case 248:return 7; +break; +case 249:return 7; +break; +case 250:return 7; +break; +case 251:return 7; +break; +case 252:return 7; +break; +case 253:return 7; +break; +case 254:return 7; +break; +case 255:return 7; +break; +case 256:return 7; +break; +case 257:return 7; +break; +case 258:return 7; +break; +case 259:return 7; +break; +case 260:return 7; +break; +case 261:return 7; +break; +case 262:return 7; +break; +case 263:return 7; +break; +case 264:return 7; +break; +case 265:return 7; +break; +case 266:return 7; +break; +case 267:return 7; +break; +case 268:return 7; +break; +case 269:return 7; +break; +case 270:return 7; +break; +case 271:return 7; +break; +case 272:return 7; +break; +case 273:return 7; +break; +case 274:return 7; +break; +case 275:return 7; +break; +case 276:return 7; +break; +case 277:return 7; +break; +case 278:return 7; +break; +case 279:return 7; +break; +case 280:return 7; +break; +case 281:return 7; +break; +case 282:return 7; +break; +case 283:return 7; +break; +case 284:return 7; +break; +case 285:return 7; +break; +case 286:return 7; +break; +case 287:return 7; +break; +case 288:return 7; +break; +case 289:return 7; +break; +case 290:return 7; +break; +case 291:return 7; +break; +case 292:return 7; +break; +case 293:return 7; +break; +case 294:return 7; +break; +case 295:return 7; +break; +case 296:return 7; +break; +case 297:return 7; +break; +case 298:return 7; +break; +case 299:return 7; +break; +case 300:return 7; +break; +case 301:return 7; +break; +case 302:return 7; +break; +case 303:return 7; +break; +case 304:return 7; +break; +case 305:return 7; +break; +case 306:return 7; +break; +case 307:return 7; +break; +case 308:return 13; +break; +case 309:return 13; +break; +case 310:return 13; +break; +case 311:return 13; +break; +case 312:return 13; +break; +case 313:return 13; +break; +case 314:return 13; +break; +case 315:return 13; +break; +case 316:return 13; +break; +} +}, +rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:Glide)/,/^(?:Abstyles)/,/^(?:AFL-1.1)/,/^(?:AFL-1.2)/,/^(?:AFL-2.0)/,/^(?:AFL-2.1)/,/^(?:AFL-3.0)/,/^(?:AMPAS)/,/^(?:APL-1.0)/,/^(?:Adobe-Glyph)/,/^(?:APAFML)/,/^(?:Adobe-2006)/,/^(?:AGPL-1.0)/,/^(?:Afmparse)/,/^(?:Aladdin)/,/^(?:ADSL)/,/^(?:AMDPLPA)/,/^(?:ANTLR-PD)/,/^(?:Apache-1.0)/,/^(?:Apache-1.1)/,/^(?:Apache-2.0)/,/^(?:AML)/,/^(?:APSL-1.0)/,/^(?:APSL-1.1)/,/^(?:APSL-1.2)/,/^(?:APSL-2.0)/,/^(?:Artistic-1.0)/,/^(?:Artistic-1.0-Perl)/,/^(?:Artistic-1.0-cl8)/,/^(?:Artistic-2.0)/,/^(?:AAL)/,/^(?:Bahyph)/,/^(?:Barr)/,/^(?:Beerware)/,/^(?:BitTorrent-1.0)/,/^(?:BitTorrent-1.1)/,/^(?:BSL-1.0)/,/^(?:Borceux)/,/^(?:BSD-2-Clause)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:BSD-3-Clause)/,/^(?:BSD-3-Clause-Clear)/,/^(?:BSD-4-Clause)/,/^(?:BSD-Protection)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:BSD-4-Clause-UC)/,/^(?:bzip2-1.0.5)/,/^(?:bzip2-1.0.6)/,/^(?:Caldera)/,/^(?:CECILL-1.0)/,/^(?:CECILL-1.1)/,/^(?:CECILL-2.0)/,/^(?:CECILL-B)/,/^(?:CECILL-C)/,/^(?:ClArtistic)/,/^(?:MIT-CMU)/,/^(?:CNRI-Jython)/,/^(?:CNRI-Python)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:CPOL-1.02)/,/^(?:CDDL-1.0)/,/^(?:CDDL-1.1)/,/^(?:CPAL-1.0)/,/^(?:CPL-1.0)/,/^(?:CATOSL-1.1)/,/^(?:Condor-1.1)/,/^(?:CC-BY-1.0)/,/^(?:CC-BY-2.0)/,/^(?:CC-BY-2.5)/,/^(?:CC-BY-3.0)/,/^(?:CC-BY-4.0)/,/^(?:CC-BY-ND-1.0)/,/^(?:CC-BY-ND-2.0)/,/^(?:CC-BY-ND-2.5)/,/^(?:CC-BY-ND-3.0)/,/^(?:CC-BY-ND-4.0)/,/^(?:CC-BY-NC-1.0)/,/^(?:CC-BY-NC-2.0)/,/^(?:CC-BY-NC-2.5)/,/^(?:CC-BY-NC-3.0)/,/^(?:CC-BY-NC-4.0)/,/^(?:CC-BY-NC-ND-1.0)/,/^(?:CC-BY-NC-ND-2.0)/,/^(?:CC-BY-NC-ND-2.5)/,/^(?:CC-BY-NC-ND-3.0)/,/^(?:CC-BY-NC-ND-4.0)/,/^(?:CC-BY-NC-SA-1.0)/,/^(?:CC-BY-NC-SA-2.0)/,/^(?:CC-BY-NC-SA-2.5)/,/^(?:CC-BY-NC-SA-3.0)/,/^(?:CC-BY-NC-SA-4.0)/,/^(?:CC-BY-SA-1.0)/,/^(?:CC-BY-SA-2.0)/,/^(?:CC-BY-SA-2.5)/,/^(?:CC-BY-SA-3.0)/,/^(?:CC-BY-SA-4.0)/,/^(?:CC0-1.0)/,/^(?:Crossword)/,/^(?:CUA-OPL-1.0)/,/^(?:Cube)/,/^(?:D-FSL-1.0)/,/^(?:diffmark)/,/^(?:WTFPL)/,/^(?:DOC)/,/^(?:Dotseqn)/,/^(?:DSDP)/,/^(?:dvipdfm)/,/^(?:EPL-1.0)/,/^(?:ECL-1.0)/,/^(?:ECL-2.0)/,/^(?:eGenix)/,/^(?:EFL-1.0)/,/^(?:EFL-2.0)/,/^(?:MIT-advertising)/,/^(?:MIT-enna)/,/^(?:Entessa)/,/^(?:ErlPL-1.1)/,/^(?:EUDatagrid)/,/^(?:EUPL-1.0)/,/^(?:EUPL-1.1)/,/^(?:Eurosym)/,/^(?:Fair)/,/^(?:MIT-feh)/,/^(?:Frameworx-1.0)/,/^(?:FreeImage)/,/^(?:FTL)/,/^(?:FSFUL)/,/^(?:FSFULLR)/,/^(?:Giftware)/,/^(?:GL2PS)/,/^(?:Glulxe)/,/^(?:AGPL-3.0)/,/^(?:GFDL-1.1)/,/^(?:GFDL-1.2)/,/^(?:GFDL-1.3)/,/^(?:GPL-1.0)/,/^(?:GPL-2.0)/,/^(?:GPL-3.0)/,/^(?:LGPL-2.1)/,/^(?:LGPL-3.0)/,/^(?:LGPL-2.0)/,/^(?:gnuplot)/,/^(?:gSOAP-1.3b)/,/^(?:HaskellReport)/,/^(?:HPND)/,/^(?:IBM-pibs)/,/^(?:IPL-1.0)/,/^(?:ICU)/,/^(?:ImageMagick)/,/^(?:iMatix)/,/^(?:Imlib2)/,/^(?:IJG)/,/^(?:Intel-ACPI)/,/^(?:Intel)/,/^(?:IPA)/,/^(?:ISC)/,/^(?:JasPer-2.0)/,/^(?:JSON)/,/^(?:LPPL-1.3a)/,/^(?:LPPL-1.0)/,/^(?:LPPL-1.1)/,/^(?:LPPL-1.2)/,/^(?:LPPL-1.3c)/,/^(?:Latex2e)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:Leptonica)/,/^(?:Libpng)/,/^(?:libtiff)/,/^(?:LPL-1.02)/,/^(?:LPL-1.0)/,/^(?:MakeIndex)/,/^(?:MTLL)/,/^(?:MS-PL)/,/^(?:MS-RL)/,/^(?:MirOS)/,/^(?:MITNFA)/,/^(?:MIT)/,/^(?:Motosoto)/,/^(?:MPL-1.0)/,/^(?:MPL-1.1)/,/^(?:MPL-2.0)/,/^(?:MPL-2.0-no-copyleft-exception)/,/^(?:mpich2)/,/^(?:Multics)/,/^(?:Mup)/,/^(?:NASA-1.3)/,/^(?:Naumen)/,/^(?:NBPL-1.0)/,/^(?:NetCDF)/,/^(?:NGPL)/,/^(?:NOSL)/,/^(?:NPL-1.0)/,/^(?:NPL-1.1)/,/^(?:Newsletr)/,/^(?:NLPL)/,/^(?:Nokia)/,/^(?:NPOSL-3.0)/,/^(?:Noweb)/,/^(?:NRL)/,/^(?:NTP)/,/^(?:Nunit)/,/^(?:OCLC-2.0)/,/^(?:ODbL-1.0)/,/^(?:PDDL-1.0)/,/^(?:OGTSL)/,/^(?:OLDAP-2.2.2)/,/^(?:OLDAP-1.1)/,/^(?:OLDAP-1.2)/,/^(?:OLDAP-1.3)/,/^(?:OLDAP-1.4)/,/^(?:OLDAP-2.0)/,/^(?:OLDAP-2.0.1)/,/^(?:OLDAP-2.1)/,/^(?:OLDAP-2.2)/,/^(?:OLDAP-2.2.1)/,/^(?:OLDAP-2.3)/,/^(?:OLDAP-2.4)/,/^(?:OLDAP-2.5)/,/^(?:OLDAP-2.6)/,/^(?:OLDAP-2.7)/,/^(?:OLDAP-2.8)/,/^(?:OML)/,/^(?:OPL-1.0)/,/^(?:OSL-1.0)/,/^(?:OSL-1.1)/,/^(?:OSL-2.0)/,/^(?:OSL-2.1)/,/^(?:OSL-3.0)/,/^(?:OpenSSL)/,/^(?:PHP-3.0)/,/^(?:PHP-3.01)/,/^(?:Plexus)/,/^(?:PostgreSQL)/,/^(?:psfrag)/,/^(?:psutils)/,/^(?:Python-2.0)/,/^(?:QPL-1.0)/,/^(?:Qhull)/,/^(?:Rdisc)/,/^(?:RPSL-1.0)/,/^(?:RPL-1.1)/,/^(?:RPL-1.5)/,/^(?:RHeCos-1.1)/,/^(?:RSCPL)/,/^(?:RSA-MD)/,/^(?:Ruby)/,/^(?:SAX-PD)/,/^(?:Saxpath)/,/^(?:SCEA)/,/^(?:SWL)/,/^(?:SGI-B-1.0)/,/^(?:SGI-B-1.1)/,/^(?:SGI-B-2.0)/,/^(?:OFL-1.0)/,/^(?:OFL-1.1)/,/^(?:SimPL-2.0)/,/^(?:Sleepycat)/,/^(?:SNIA)/,/^(?:SMLNJ)/,/^(?:SugarCRM-1.1.3)/,/^(?:SISSL)/,/^(?:SISSL-1.2)/,/^(?:SPL-1.0)/,/^(?:Watcom-1.0)/,/^(?:TCL)/,/^(?:Unlicense)/,/^(?:TMate)/,/^(?:TORQUE-1.1)/,/^(?:TOSL)/,/^(?:Unicode-TOU)/,/^(?:UPL-1.0)/,/^(?:NCSA)/,/^(?:Vim)/,/^(?:VOSTROM)/,/^(?:VSL-1.0)/,/^(?:W3C-19980720)/,/^(?:W3C)/,/^(?:Wsuipa)/,/^(?:Xnet)/,/^(?:X11)/,/^(?:Xerox)/,/^(?:XFree86-1.1)/,/^(?:xinetd)/,/^(?:xpp)/,/^(?:XSkat)/,/^(?:YPL-1.0)/,/^(?:YPL-1.1)/,/^(?:Zed)/,/^(?:Zend-2.0)/,/^(?:Zimbra-1.3)/,/^(?:Zimbra-1.4)/,/^(?:Zlib)/,/^(?:zlib-acknowledgement)/,/^(?:ZPL-1.1)/,/^(?:ZPL-2.0)/,/^(?:ZPL-2.1)/,/^(?:Autoconf-exception-2.0)/,/^(?:Autoconf-exception-3.0)/,/^(?:Bison-exception-2.2)/,/^(?:Classpath-exception-2.0)/,/^(?:eCos-exception-2.0)/,/^(?:Font-exception-2.0)/,/^(?:GCC-exception-2.0)/,/^(?:GCC-exception-3.1)/,/^(?:WxWindows-exception-3.1)/], +conditions: {"INITIAL":{"rules":[0,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],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (typeof require !== 'undefined' && typeof exports !== 'undefined') { +exports.parser = spdxparse; +exports.Parser = spdxparse.Parser; +exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; +exports.main = function commonjsMain(args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); + } + var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if (typeof module !== 'undefined' && require.main === module) { + exports.main(process.argv.slice(1)); +} +} diff --git a/deps/npm/node_modules/spdx/source/ranges.json b/deps/npm/node_modules/spdx/source/ranges.json new file mode 100644 index 00000000000000..a3fc260e65f06a --- /dev/null +++ b/deps/npm/node_modules/spdx/source/ranges.json @@ -0,0 +1,196 @@ +[ + [ + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0" + ], + [ + "Apache-1.0", + "Apache-1.1", + "Apache-2.0" + ], + [ + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0" + ], + [ + "Artistic-1.0", + "Artistic-2.0" + ], + [ + "BitTorrent-1.0", + "BitTorrent-1.1" + ], + [ + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-4.0" + ], + [ + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-4.0" + ], + [ + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-4.0" + ], + [ + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-4.0" + ], + [ + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-4.0" + ], + [ + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-4.0" + ], + [ + "CDDL-1.0", + "CDDL-1.1" + ], + [ + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0" + ], + [ + "ECL-1.0", + "ECL-2.0" + ], + [ + "EFL-1.0", + "EFL-2.0" + ], + [ + "EUPL-1.0", + "EUPL-1.1" + ], + [ + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3" + ], + [ + "GPL-1.0", + "GPL-2.0", + "GPL-3.0" + ], + [ + "LGPL-2.0", + "LGPL-2.1", + "LGPL-3.0" + ], + [ + "LPL-1.0", + "LPL-1.02" + ], + [ + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a" + ], + [ + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3c" + ], + [ + "MPL-1.0", + "MPL-1.1", + "MPL-2.0" + ], + [ + "MPL-1.0", + "MPL-1.1", + "MPL-2.0-no-copyleft-exception" + ], + [ + "NPL-1.0", + "NPL-1.1" + ], + [ + "OFL-1.0", + "OFL-1.1" + ], + [ + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.2.2", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8" + ], + [ + "OPL-1.0", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0" + ], + [ + "PHP-3.0", + "PHP-3.01" + ], + [ + "RPL-1.1", + "RPL-1.5" + ], + [ + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0" + ], + [ + "YPL-1.0", + "YPL-1.1" + ], + [ + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1" + ], + [ + "Zimbra-1.3", + "Zimbra-1.4" + ], + [ + "bzip2-1.0.5", + "bzip2-1.0.6" + ] +] diff --git a/deps/npm/node_modules/spdx/source/spdx.js b/deps/npm/node_modules/spdx/source/spdx.js new file mode 100644 index 00000000000000..ab0a4f6b1d5881 --- /dev/null +++ b/deps/npm/node_modules/spdx/source/spdx.js @@ -0,0 +1,161 @@ +// spdx.js +// ======= +// SPDX License Expression Syntax parser + +// Validation +// ---------- + +// Require the generated parser. +var parser = require('./parser.generated.js').parser; + +exports.parse = function(argument) { + return parser.parse(argument); +}; + +var containsRepeatedSpace = /\s{2,}/; + +exports.valid = function(argument) { + if ( + argument.trim() !== argument || + containsRepeatedSpace.test(argument) + ) { + return false; + } + try { + parser.parse(argument); + return true; + } catch (e) { + // jison generates parsers that throw errors, while this function + // mimics `semver.valid` by returning null. + return null; + } +}; + +// Comparison +// ---------- + +var ranges = require('./ranges.json'); + +var notALicenseIdentifier = ' is not a simple license identifier'; + +var rangeComparison = function(comparison) { + return function(first, second) { + var firstAST = exports.parse(first); + if (!firstAST.hasOwnProperty('license')) { + throw new Error('"' + first + '"' + notALicenseIdentifier); + } + var secondAST = exports.parse(second); + if (!secondAST.hasOwnProperty('license')) { + throw new Error('"' + second + '"' + notALicenseIdentifier); + } + return ranges.some(function(range) { + var indexOfFirst = range.indexOf(firstAST.license); + if (indexOfFirst < 0) { + return false; + } + var indexOfSecond = range.indexOf(secondAST.license); + if (indexOfSecond < 0) { + return false; + } + return comparison(indexOfFirst, indexOfSecond); + }); + }; +}; + +exports.gt = rangeComparison(function(first, second) { + return first > second; +}); + +exports.lt = rangeComparison(function(first, second) { + return first < second; +}); + +exports.satisfies = (function() { + var rangesAreCompatible = function(first, second) { + return ( + first.license === second.license || + ranges.some(function(range) { + return ( + range.indexOf(first.license) > -1 && + range.indexOf(second.license) + ); + }) + ); + }; + + var identifierInRange = function(identifier, range) { + return ( + identifier.license === range.license || + exports.gt(identifier.license, range.license) + ); + }; + + var licensesAreCompatible = function(first, second) { + if (first.exception !== second.exception) { + return false; + } else if (second.hasOwnProperty('license')) { + if (second.hasOwnProperty('plus')) { + if (first.hasOwnProperty('plus')) { + // first+, second+ + return rangesAreCompatible(first, second); + } else { + // first, second+ + return identifierInRange(first, second); + } + } else { + if (first.hasOwnProperty('plus')) { + // first+, second + return identifierInRange(second, first); + } else { + // first, second + return first.license === second.license; + } + } + } + }; + + var recurseLeftAndRight = function(first, second) { + var firstConjunction = first.conjunction; + if (firstConjunction === 'and') { + return ( + recurse(first.left, second) && + recurse(first.right, second) + ); + } else if (firstConjunction === 'or') { + return ( + recurse(first.left, second) || + recurse(first.right, second) + ); + } + }; + + var recurse = function(first, second) { + if (first.hasOwnProperty('conjunction')) { + return recurseLeftAndRight(first, second); + } else if (second.hasOwnProperty('conjunction')) { + return recurseLeftAndRight(second, first); + } else { + return licensesAreCompatible(first, second); + } + }; + + return function(first, second) { + return recurse(parser.parse(first), parser.parse(second)); + }; +})(); + +// Reference Data +// -------------- + +// Require the same license and exception data used by the parser. +exports.licenses = require('spdx-license-ids'); +exports.exceptions = require('./exceptions.json'); + +// Version Metadata +// ---------------- + +// The License Expression Syntax version +exports.specificationVersion = '2.0'; + +// This module's semantic version +exports.implementationVersion = '0.4.0'; diff --git a/deps/npm/node_modules/tar/LICENCE b/deps/npm/node_modules/tar/LICENCE deleted file mode 100644 index 74489e2e2658e7..00000000000000 --- a/deps/npm/node_modules/tar/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/tar/LICENSE b/deps/npm/node_modules/tar/LICENSE new file mode 100644 index 00000000000000..019b7e40ea0568 --- /dev/null +++ b/deps/npm/node_modules/tar/LICENSE @@ -0,0 +1,12 @@ +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/tar/package.json b/deps/npm/node_modules/tar/package.json index 5483bf34607603..f160d0bd0a8ff1 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -6,7 +6,7 @@ }, "name": "tar", "description": "tar for node", - "version": "2.1.0", + "version": "2.1.1", "repository": { "type": "git", "url": "git://github.com/isaacs/node-tar.git" @@ -26,15 +26,15 @@ "tap": "0.x", "mkdirp": "^0.5.0" }, - "license": "BSD", + "license": "ISC", "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'. If the `fromBase` property is set to true,\nthe tar will contain files relative to the path passed, and not with\nthe path included.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", "readmeFilename": "README.md", - "gitHead": "b4c03a8e922fa522a3ddadaf2764bc1ab38d484e", + "gitHead": "2cbe6c805fc5d87ce099183ed13c43faba962224", "bugs": { "url": "https://github.com/isaacs/node-tar/issues" }, "homepage": "https://github.com/isaacs/node-tar#readme", - "_id": "tar@2.1.0", - "_shasum": "d287aad12e947c766e319ac364f3c234900f65ec", - "_from": "tar@>=2.1.0 <2.2.0" + "_id": "tar@2.1.1", + "_shasum": "ac0649e135fa4546e430c7698514e1da2e8a7cc4", + "_from": "tar@>=2.1.1 <2.2.0" } diff --git a/deps/npm/node_modules/which/README.md b/deps/npm/node_modules/which/README.md index ff1eb531a77731..d5571528af303d 100644 --- a/deps/npm/node_modules/which/README.md +++ b/deps/npm/node_modules/which/README.md @@ -1,5 +1,34 @@ -The "which" util from npm's guts. +# which + +Like the unix `which` utility. Finds the first instance of a specified executable in the PATH environment variable. Does not cache the results, so `hash -r` is not needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## OPTIONS + +If you pass in options, then `path` and `pathExt` are relevant. diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/LICENSE b/deps/npm/node_modules/which/node_modules/is-absolute/LICENSE new file mode 100644 index 00000000000000..904ab073b70946 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert.Copyright (c) 2009-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/which/node_modules/is-absolute/README.md b/deps/npm/node_modules/which/node_modules/is-absolute/README.md new file mode 100644 index 00000000000000..768f4b833966cc --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/README.md @@ -0,0 +1,53 @@ +# is-absolute [![NPM version](https://badge.fury.io/js/is-absolute.svg)](http://badge.fury.io/js/is-absolute) [![Build Status](https://travis-ci.org/jonschlinkert/is-absolute.svg)](https://travis-ci.org/jonschlinkert/is-absolute) + +> Return true if a file path is absolute. + +Based on the `isAbsolute` utility method in [express](https://github.com/visionmedia/express). + +## Install with [npm](npmjs.org) + +```bash +npm i is-absolute --save +``` + +## Usage + +```js +var isAbsolute = require('is-absolute'); +console.log(isAbsolute('a/b/c.js')); +//=> 'false'; +``` + +## Running tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-absolute/issues) + + +## Other projects +* [is-relative](https://github.com/jonschlinkert/is-relative): Returns `true` if the path appears to be relative. +* [is-dotfile](https://github.com/regexps/is-dotfile): Return true if a file path is (or has) a dotfile. +* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. +* [cwd](https://github.com/jonschlinkert/cwd): Node.js util for easily getting the current working directory of a project based on package.json or the given path. +* [git-config-path](https://github.com/jonschlinkert/git-config-path): Resolve the path to the user's global .gitconfig. + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014-2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 05, 2015._ diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/index.js b/deps/npm/node_modules/which/node_modules/is-absolute/index.js new file mode 100644 index 00000000000000..e7a40dd73bc351 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/index.js @@ -0,0 +1,27 @@ +/*! + * is-absolute + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isRelative = require('is-relative'); + +module.exports = function isAbsolute(filepath) { + if ('/' === filepath[0]) { + return true; + } + if (':' === filepath[1] && '\\' === filepath[2]) { + return true; + } + // Microsoft Azure absolute filepath + if ('\\\\' == filepath.substring(0, 2)) { + return true; + } + if (!isRelative(filepath)) { + return true; + } +}; + diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT new file mode 100644 index 00000000000000..b576e8d484df60 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jon Schlinkert + +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/which/node_modules/is-absolute/node_modules/is-relative/README.md b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/README.md new file mode 100644 index 00000000000000..760be8d065cdca --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/README.md @@ -0,0 +1,38 @@ +# is-relative [![NPM version](https://badge.fury.io/js/is-relative.svg)](http://badge.fury.io/js/is-relative) + +> Returns `true` if the path appears to be relative. + +## Install +### Install with [npm](npmjs.org) + +```bash +npm i is-relative --save +``` + +## Usage +### [isRelative](index.js#L16) + +* `filepath` **{String}**: Path to test. +* `returns`: {Boolean} + +```js +var isRelative = require('is-relative'); +isRelative('README.md'); +//=> true +``` + + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb](https://github.com/assemble/verb) on November 17, 2014._ \ No newline at end of file diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js new file mode 100644 index 00000000000000..ffc760a82a5dab --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js @@ -0,0 +1,21 @@ +'use strict'; + +/** + * ```js + * var isRelative = require('is-relative'); + * isRelative('README.md'); + * //=> true + * ``` + * + * @name isRelative + * @param {String} `filepath` Path to test. + * @return {Boolean} + * @api public + */ + +module.exports = function isRelative(filepath) { + if (typeof filepath !== 'string') { + throw new Error('isRelative expects a string.'); + } + return !/^([a-z]+:)?[\\\/]/i.test(filepath); +}; \ No newline at end of file diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json new file mode 100644 index 00000000000000..d582081dd157ca --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-relative", + "description": "Returns `true` if the path appears to be relative.", + "version": "0.1.3", + "homepage": "https://github.com/jonschlinkert/is-relative", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-relative.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-relative/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/jonschlinkert/is-relative/blob/master/LICENSE-MIT" + } + ], + "keywords": [ + "absolute", + "check", + "file", + "filepath", + "is", + "normalize", + "path", + "path.relative", + "relative", + "resolve", + "slash", + "slashes", + "uri", + "url" + ], + "main": "index.js", + "files": [ + "index.js", + "LICENSE-MIT" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha -R spec" + }, + "devDependencies": { + "mocha": "*", + "verb": ">= 0.2.6", + "verb-tag-jscomments": "^0.1.4" + }, + "_id": "is-relative@0.1.3", + "_shasum": "905fee8ae86f45b3ec614bc3c15c869df0876e82", + "_from": "is-relative@>=0.1.0 <0.2.0", + "_npmVersion": "1.4.9", + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "dist": { + "shasum": "905fee8ae86f45b3ec614bc3c15c869df0876e82", + "tarball": "http://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/package.json b/deps/npm/node_modules/which/node_modules/is-absolute/package.json new file mode 100644 index 00000000000000..4f954b855f11d4 --- /dev/null +++ b/deps/npm/node_modules/which/node_modules/is-absolute/package.json @@ -0,0 +1,76 @@ +{ + "name": "is-absolute", + "description": "Return true if a file path is absolute.", + "version": "0.1.7", + "homepage": "https://github.com/jonschlinkert/is-absolute", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-absolute.git" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-absolute/issues" + }, + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/is-absolute/blob/master/LICENSE" + }, + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-relative": "^0.1.0" + }, + "devDependencies": { + "mocha": "*" + }, + "keywords": [ + "absolute", + "check", + "file", + "filepath", + "is", + "normalize", + "path", + "path.relative", + "relative", + "resolve", + "slash", + "slashes", + "uri", + "url" + ], + "gitHead": "90cca7b671620bf28b778a61fddc8a986a2e1095", + "_id": "is-absolute@0.1.7", + "_shasum": "847491119fccb5fb436217cc737f7faad50f603f", + "_from": "is-absolute@>=0.1.7 <0.2.0", + "_npmVersion": "2.5.1", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "jonschlinkert", + "email": "github@sellside.com" + }, + "maintainers": [ + { + "name": "jonschlinkert", + "email": "github@sellside.com" + } + ], + "dist": { + "shasum": "847491119fccb5fb436217cc737f7faad50f603f", + "tarball": "http://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json index d2b7b166fc741a..8cffb7986e7ab6 100644 --- a/deps/npm/node_modules/which/package.json +++ b/deps/npm/node_modules/which/package.json @@ -6,7 +6,7 @@ }, "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "1.0.9", + "version": "1.1.1", "repository": { "type": "git", "url": "git://github.com/isaacs/node-which.git" @@ -16,20 +16,34 @@ "which": "./bin/which" }, "license": "ISC", - "gitHead": "df3d52a0ecd5f366d550e0f14d67ca4d5e621bad", + "dependencies": { + "is-absolute": "^0.1.7" + }, + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.3.3", + "tap": "^1.0.2" + }, + "scripts": { + "test": "tap test/*.js" + }, + "gitHead": "c80a08e9f8cf7a5c0f39c2e2f87f18f153b118a8", "bugs": { "url": "https://github.com/isaacs/node-which/issues" }, - "homepage": "https://github.com/isaacs/node-which", - "_id": "which@1.0.9", - "scripts": {}, - "_shasum": "460c1da0f810103d0321a9b633af9e575e64486f", - "_from": "which@>=1.0.9 <1.1.0", - "_npmVersion": "2.6.0", - "_nodeVersion": "1.1.0", + "homepage": "https://github.com/isaacs/node-which#readme", + "_id": "which@1.1.1", + "_shasum": "9ce512459946166e12c083f08ec073380fc8cbbb", + "_from": "which@>=1.1.1 <1.2.0", + "_npmVersion": "2.9.1", + "_nodeVersion": "2.0.1", "_npmUser": { "name": "isaacs", - "email": "i@izs.me" + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "9ce512459946166e12c083f08ec073380fc8cbbb", + "tarball": "http://registry.npmjs.org/which/-/which-1.1.1.tgz" }, "maintainers": [ { @@ -37,11 +51,6 @@ "email": "i@izs.me" } ], - "dist": { - "shasum": "460c1da0f810103d0321a9b633af9e575e64486f", - "tarball": "http://registry.npmjs.org/which/-/which-1.0.9.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/which/-/which-1.1.1.tgz" } diff --git a/deps/npm/node_modules/which/test/basic.js b/deps/npm/node_modules/which/test/basic.js new file mode 100644 index 00000000000000..189ca6d0ad5bb4 --- /dev/null +++ b/deps/npm/node_modules/which/test/basic.js @@ -0,0 +1,84 @@ +var t = require('tap') +var fs = require('fs') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var fixture = __dirname + '/fixture' +var which = require('../which.js') +var path = require('path') + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var skip = { skip: isWindows ? 'not relevant on windows' : false } + +t.test('setup', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(fixture + '/foo.sh', 'echo foo\n') + t.end() +}) + +t.test('does not find non-executable', skip, function (t) { + t.plan(2) + + t.test('absolute', function (t) { + t.plan(2) + which(fixture + '/foo.sh', function (er) { + t.isa(er, Error) + }) + + t.throws(function () { + which.sync(fixture + '/foo.sh') + }) + }) + + t.test('with path', function (t) { + t.plan(2) + which('foo.sh', { path: fixture }, function (er) { + t.isa(er, Error) + }) + + t.throws(function () { + which.sync('foo.sh', { path: fixture }) + }) + }) +}) + +t.test('make executable', function (t) { + fs.chmodSync(fixture + '/foo.sh', '0755') + t.end() +}) + +t.test('find when executable', function (t) { + t.plan(2) + var opt = { pathExt: '.sh' } + var expect = path.resolve(fixture, 'foo.sh').toLowerCase() + + t.test('absolute', function (t) { + t.plan(2) + runTest(t) + }) + + function runTest(t) { + which(fixture + '/foo.sh', opt, function (er, found) { + if (er) + throw er + t.equal(found.toLowerCase(), expect) + }) + + var found = which.sync(fixture + '/foo.sh', opt).toLowerCase() + t.equal(found, expect) + } + + t.test('with path', function (t) { + t.plan(2) + opt.path = fixture + runTest(t) + }) +}) + +t.test('clean', function (t) { + rimraf.sync(fixture) + t.end() +}) diff --git a/deps/npm/node_modules/which/which.js b/deps/npm/node_modules/which/which.js index 2a45417daced20..13fc26dcfbb0ce 100644 --- a/deps/npm/node_modules/which/which.js +++ b/deps/npm/node_modules/which/which.js @@ -1,54 +1,83 @@ module.exports = which which.sync = whichSync -var path = require("path") - , fs - , COLON = process.platform === "win32" ? ";" : ":" - , isExe - , fs = require("fs") +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' -if (process.platform == "win32") { +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isExe +var fs = require('fs') +var isAbsolute = require('is-absolute') + +if (isWindows) { // On windows, there is no good way to check that a file is executable isExe = function isExe () { return true } } else { isExe = function isExe (mod, uid, gid) { - //console.error(mod, uid, gid); - //console.error("isExe?", (mod & 0111).toString(8)) var ret = (mod & 0001) || (mod & 0010) && process.getgid && gid === process.getgid() - || (mod & 0010) && process.getuid && 0 === process.getuid() || (mod & 0100) && process.getuid && uid === process.getuid() - || (mod & 0100) && process.getuid && 0 === process.getuid() - //console.error("isExe?", ret) + || (mod & 0110) && process.getuid && 0 === process.getuid() + + if (process.getgroups && (mod & 0010)) { + var groups = process.getgroups() + for (var g = 0; g < groups.length; g++) { + if (groups[g] === gid) + return true + } + } + return ret } } +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] -function which (cmd, cb) { - if (isAbsolute(cmd)) return cb(null, cmd) - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") + // On windows, env.Path is common. + if (isWindows && !pathEnv) { + var k = Object.keys(process.env) + for (var p = 0; p < k.length; p++) { + if (p.toLowerCase() === 'path') { + pathEnv = process.env[p] + break + } + } } - //console.error("pathEnv", pathEnv) + + pathEnv = pathEnv.split(colon) + + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExt = (opt.pathExt || process.env.PATHEXT || '.EXE').split(colon) + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it's absolute, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (isAbsolute(cmd)) + pathEnv = [''] + ;(function F (i, l) { - if (i === l) return cb(new Error("not found: "+cmd)) + if (i === l) return cb(new Error('not found: '+cmd)) var p = path.resolve(pathEnv[i], cmd) ;(function E (ii, ll) { if (ii === ll) return F(i + 1, l) var ext = pathExt[ii] - //console.error(p + ext) fs.stat(p + ext, function (er, stat) { if (!er && - stat && stat.isFile() && isExe(stat.mode, stat.uid, stat.gid)) { - //console.error("yes, exe!", p + ext) return cb(null, p + ext) } return E(ii + 1, ll) @@ -57,45 +86,52 @@ function which (cmd, cb) { })(0, pathEnv.length) } -function whichSync (cmd) { - if (isAbsolute(cmd)) return cmd - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") +function whichSync (cmd, opt) { + if (!opt) + opt = {} + + var colon = opt.colon || COLON + + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + // On windows, env.Path is common. + if (isWindows && !pathEnv) { + var k = Object.keys(process.env) + for (var p = 0; p < k.length; p++) { + if (p.toLowerCase() === 'path') { + pathEnv = process.env[p] + break + } + } + } + + pathEnv = pathEnv.split(colon) + + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExt = (opt.pathExt || process.env.PATHEXT || '.EXE').split(colon) + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') } + + // If it's absolute, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (isAbsolute(cmd)) + pathEnv = [''] + for (var i = 0, l = pathEnv.length; i < l; i ++) { var p = path.join(pathEnv[i], cmd) for (var j = 0, ll = pathExt.length; j < ll; j ++) { var cur = p + pathExt[j] var stat - try { stat = fs.statSync(cur) } catch (ex) {} - if (stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) return cur + try { + stat = fs.statSync(cur) + if (stat.isFile() && isExe(stat.mode, stat.uid, stat.gid)) + return cur + } catch (ex) {} } } - throw new Error("not found: "+cmd) -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} -function absUnix (p) { - return p.charAt(0) === "/" || p === "" + throw new Error('not found: '+cmd) } diff --git a/deps/npm/package.json b/deps/npm/package.json index 304dbc0ff6e42e..2082ed8fbc7410 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "2.9.1", + "version": "2.10.1", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -48,32 +48,32 @@ "editor": "~1.0.0", "fs-vacuum": "~1.2.5", "fs-write-stream-atomic": "~1.0.2", - "fstream": "~1.0.4", + "fstream": "~1.0.6", "fstream-npm": "~1.0.2", "github-url-from-git": "~1.4.0", "github-url-from-username-repo": "~1.0.2", - "glob": "~5.0.5", + "glob": "~5.0.6", "graceful-fs": "~3.0.6", "hosted-git-info": "~2.1.2", "inflight": "~1.0.4", "inherits": "~2.0.1", "ini": "~1.3.3", - "init-package-json": "~1.4.2", + "init-package-json": "~1.5.0", "lockfile": "~1.0.0", - "lru-cache": "~2.6.2", + "lru-cache": "~2.6.3", "minimatch": "~2.0.7", - "mkdirp": "~0.5.0", + "mkdirp": "~0.5.1", "node-gyp": "~1.0.3", "nopt": "~3.0.1", "normalize-git-url": "~1.0.0", - "normalize-package-data": "~2.0.0", + "normalize-package-data": "~2.1.0", "npm-cache-filename": "~1.0.1", "npm-install-checks": "~1.0.5", "npm-package-arg": "~4.0.0", "npm-registry-client": "~6.3.3", "npm-user-validate": "~0.1.1", "npmlog": "~1.2.0", - "once": "~1.3.1", + "once": "~1.3.2", "opener": "~1.4.1", "osenv": "~0.1.0", "path-is-inside": "~1.0.0", @@ -85,16 +85,17 @@ "request": "~2.55.0", "retry": "~0.6.1", "rimraf": "~2.3.3", - "semver": "~4.3.3", + "semver": "~4.3.4", "sha": "~1.3.0", "slide": "~1.1.6", "sorted-object": "~1.0.0", + "spdx": "~0.4.0", "strip-ansi": "~2.0.1", - "tar": "~2.1.0", + "tar": "~2.1.1", "text-table": "~0.2.0", "uid-number": "0.0.6", "umask": "~1.1.0", - "which": "~1.0.9", + "which": "~1.1.1", "wrappy": "~1.0.1", "write-file-atomic": "~1.1.0" }, @@ -158,6 +159,7 @@ "sha", "slide", "sorted-object", + "spdx", "strip-ansi", "tar", "text-table", @@ -171,12 +173,12 @@ "deep-equal": "~1.0.0", "marked": "~0.3.3", "marked-man": "~0.1.4", - "nock": "~1.7.1", + "nock": "~2.0.1", "npm-registry-couchapp": "~2.6.7", "npm-registry-mock": "~1.0.0", "require-inject": "~1.2.0", "sprintf-js": "~1.0.2", - "tap": "~0.7.1" + "tap": "~1.0.4" }, "scripts": { "test-legacy": "node ./test/run.js", diff --git a/deps/npm/test/fixtures/config/userconfig-with-gc b/deps/npm/test/fixtures/config/userconfig-with-gc index 7268fcb3c611f9..824d492bce2730 100644 --- a/deps/npm/test/fixtures/config/userconfig-with-gc +++ b/deps/npm/test/fixtures/config/userconfig-with-gc @@ -1,4 +1,4 @@ -globalconfig=/Users/ogd/Documents/projects/npm/npm/test/fixtures/config/globalconfig +globalconfig=/Users/rebecca/code/npm-release/test/fixtures/config/globalconfig email=i@izs.me env-thing=asdf init.author.name=Isaac Z. Schlueter diff --git a/deps/npm/test/tap/404-private-registry-scoped.js b/deps/npm/test/tap/404-private-registry-scoped.js new file mode 100644 index 00000000000000..681fff05e8ec5f --- /dev/null +++ b/deps/npm/test/tap/404-private-registry-scoped.js @@ -0,0 +1,22 @@ +var nock = require('nock') +var test = require('tap').test +var npm = require('../../') +var addNamed = require('../../lib/cache/add-named') + +test('scoped package names not mangled on error with non-root registry', function test404 (t) { + nock('http://localhost:1337') + .get('/registry/@scope%2ffoo') + .reply(404, { + error: 'not_found', + reason: 'document not found' + }) + + npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { + addNamed('@scope/foo', '*', null, function checkError (err) { + t.ok(err, 'should error') + t.equal(err.message, '404 Not Found: @scope/foo', 'should have package name in error') + t.equal(err.pkgid, '@scope/foo', 'err.pkgid should match package name') + t.end() + }) + }) +}) diff --git a/deps/npm/test/tap/404-private-registry.js b/deps/npm/test/tap/404-private-registry.js new file mode 100644 index 00000000000000..9e05f483ebe865 --- /dev/null +++ b/deps/npm/test/tap/404-private-registry.js @@ -0,0 +1,22 @@ +var nock = require('nock') +var test = require('tap').test +var npm = require('../../') +var addNamed = require('../../lib/cache/add-named') + +test('package names not mangled on error with non-root registry', function test404 (t) { + nock('http://localhost:1337') + .get('/registry/foo') + .reply(404, { + error: 'not_found', + reason: 'document not found' + }) + + npm.load({registry: 'http://localhost:1337/registry', global: true}, function () { + addNamed('foo', '*', null, function checkError (err) { + t.ok(err, 'should error') + t.equal(err.message, '404 Not Found: foo', 'should have package name in error') + t.equal(err.pkgid, 'foo', 'err.pkgid should match package name') + t.end() + }) + }) +}) diff --git a/deps/npm/test/tap/access.js b/deps/npm/test/tap/access.js index aa97b1a203f833..5ac1d613841301 100644 --- a/deps/npm/test/tap/access.js +++ b/deps/npm/test/tap/access.js @@ -83,6 +83,102 @@ test("npm access on named package", function (t) { ) }) +test("npm change access on unscoped package", function (t) { + common.npm( + [ + "access", + "restricted", "yargs", + "--registry", common.registry + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.ok(stderr.match(/you can't change the access level of unscoped packages/)) + t.end() + } + ) +}) + +test('npm access add', function (t) { + common.npm( + [ + "access", + "add", "@scoped/another", + "--registry", common.registry + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.ok(stderr.match(/npm access add isn't implemented yet!/)) + t.end() + } + ) +}) + +test('npm access rm', function (t) { + common.npm( + [ + "access", + "rm", "@scoped/another", + "--registry", common.registry + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.ok(stderr.match(/npm access rm isn't implemented yet!/)) + t.end() + } + ) +}) + +test('npm access ls', function (t) { + common.npm( + [ + "access", + "ls", "@scoped/another", + "--registry", common.registry + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.ok(stderr.match(/npm access ls isn't implemented yet!/)) + t.end() + } + ) +}) + +test('npm access edit', function (t) { + common.npm( + [ + "access", + "edit", "@scoped/another", + "--registry", common.registry + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.ok(stderr.match(/npm access edit isn't implemented yet!/)) + t.end() + } + ) +}) + +test('npm access blerg', function (t) { + common.npm( + [ + "access", + "blerg", "@scoped/another", + "--registry", common.registry + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.ok(stderr.match(/Usage:/)) + t.end() + } + ) +}) + test("cleanup", function (t) { t.pass("cleaned up") rimraf.sync(pkg) diff --git a/deps/npm/test/tap/add-remote-git-fake-windows.js b/deps/npm/test/tap/add-remote-git-fake-windows.js index 0e0d539fb0599c..c9c9dd446b9e1a 100644 --- a/deps/npm/test/tap/add-remote-git-fake-windows.js +++ b/deps/npm/test/tap/add-remote-git-fake-windows.js @@ -16,6 +16,20 @@ var daemon var daemonPID var git +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + child: 'git://localhost:1233/child.git' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + + test('setup', function (t) { bootstrap() setup(function (er, r) { @@ -53,19 +67,6 @@ test('clean', function (t) { process.kill(daemonPID) }) -var pjParent = JSON.stringify({ - name: 'parent', - version: '1.2.3', - dependencies: { - child: 'git://localhost:1233/child.git' - } -}, null, 2) + '\n' - -var pjChild = JSON.stringify({ - name: 'child', - version: '1.0.3' -}, null, 2) + '\n' - function bootstrap () { rimraf.sync(pkg) mkdirp.sync(pkg) diff --git a/deps/npm/test/tap/add-remote-git-file.js b/deps/npm/test/tap/add-remote-git-file.js index b2a7be9039b355..673be4c2854ef4 100644 --- a/deps/npm/test/tap/add-remote-git-file.js +++ b/deps/npm/test/tap/add-remote-git-file.js @@ -16,6 +16,11 @@ var repo = resolve(__dirname, 'add-remote-git-file-repo') var git var cloneURL = 'git+file://' + resolve(pkg, 'child.git') +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + test('setup', function (t) { bootstrap() setup(function (er, r) { @@ -45,11 +50,6 @@ test('clean', function (t) { t.end() }) -var pjChild = JSON.stringify({ - name: 'child', - version: '1.0.3' -}, null, 2) + '\n' - function bootstrap () { cleanup() mkdirp.sync(pkg) diff --git a/deps/npm/test/tap/add-remote-git-shrinkwrap.js b/deps/npm/test/tap/add-remote-git-shrinkwrap.js index 94951e9a9d8639..f2982355e14b12 100644 --- a/deps/npm/test/tap/add-remote-git-shrinkwrap.js +++ b/deps/npm/test/tap/add-remote-git-shrinkwrap.js @@ -16,6 +16,19 @@ var daemon var daemonPID var git +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + 'child': 'git://localhost:1235/child.git#master' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + test('setup', function (t) { bootstrap() setup(function (er, r) { @@ -88,19 +101,6 @@ test('clean', function (t) { process.kill(daemonPID) }) -var pjParent = JSON.stringify({ - name: 'parent', - version: '1.2.3', - dependencies: { - 'child': 'git://localhost:1235/child.git#master' - } -}, null, 2) + '\n' - -var pjChild = JSON.stringify({ - name: 'child', - version: '1.0.3' -}, null, 2) + '\n' - function bootstrap () { mkdirp.sync(pkg) fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) diff --git a/deps/npm/test/tap/add-remote-git.js b/deps/npm/test/tap/add-remote-git.js index 269d0cac7d8e2c..e33d09c1a13473 100644 --- a/deps/npm/test/tap/add-remote-git.js +++ b/deps/npm/test/tap/add-remote-git.js @@ -16,6 +16,19 @@ var daemon var daemonPID var git +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + child: 'git://localhost:1234/child.git' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + test('setup', function (t) { bootstrap() setup(function (er, r) { @@ -47,19 +60,6 @@ test('clean', function (t) { process.kill(daemonPID) }) -var pjParent = JSON.stringify({ - name: 'parent', - version: '1.2.3', - dependencies: { - child: 'git://localhost:1234/child.git' - } -}, null, 2) + '\n' - -var pjChild = JSON.stringify({ - name: 'child', - version: '1.0.3' -}, null, 2) + '\n' - function bootstrap () { mkdirp.sync(pkg) fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) diff --git a/deps/npm/test/tap/bin.js b/deps/npm/test/tap/bin.js index 2eb4398432ba2d..ee4e1ff28c4827 100644 --- a/deps/npm/test/tap/bin.js +++ b/deps/npm/test/tap/bin.js @@ -3,7 +3,7 @@ var test = require("tap").test var common = require("../common-tap.js") var opts = { cwd: __dirname } var binDir = "../../node_modules/.bin" -var fixture = path.resolve(binDir) +var fixture = path.resolve(__dirname, binDir) test('npm bin', function (t) { common.npm(["bin"], opts, function (err, code, stdout, stderr) { diff --git a/deps/npm/test/tap/builtin-config.js b/deps/npm/test/tap/builtin-config.js index 75acd2be276216..d92551ed6ea227 100644 --- a/deps/npm/test/tap/builtin-config.js +++ b/deps/npm/test/tap/builtin-config.js @@ -32,6 +32,7 @@ test("setup", function (t) { test("install npm into first folder", function (t) { var args = ["install", npm, "-g", "--prefix=" + folder + "/first", + "--ignore-scripts", "--cache=" + folder + "/cache", "--no-spin", "--loglevel=silent", diff --git a/deps/npm/test/tap/bundled-dependencies-nonarray.js b/deps/npm/test/tap/bundled-dependencies-nonarray.js index 938aa629a5b287..bff0522d03122e 100644 --- a/deps/npm/test/tap/bundled-dependencies-nonarray.js +++ b/deps/npm/test/tap/bundled-dependencies-nonarray.js @@ -13,6 +13,22 @@ var dir = path.resolve(__dirname, 'bundleddependencies') var pkg = path.resolve(dir, 'pkg-with-bundled') var dep = path.resolve(dir, 'a-bundled-dep') +var pj = JSON.stringify({ + name: 'pkg-with-bundled', + version: '1.0.0', + dependencies: { + 'a-bundled-dep': 'file:../a-bundled-dep' + }, + bundledDependencies: { + 'a-bundled-dep': 'file:../a-bundled-dep' + } +}, null, 2) + '\n' + +var pjDep = JSON.stringify({ + name: 'a-bundled-dep', + version: '2.0.0' +}, null, 2) + '\n' + test('setup', function (t) { bootstrap() t.end() @@ -45,22 +61,6 @@ test('cleanup', function (t) { t.end() }) -var pj = JSON.stringify({ - name: 'pkg-with-bundled', - version: '1.0.0', - dependencies: { - 'a-bundled-dep': 'file:../a-bundled-dep' - }, - bundledDependencies: { - 'a-bundled-dep': 'file:../a-bundled-dep' - } -}, null, 2) + '\n' - -var pjDep = JSON.stringify({ - name: 'a-bundled-dep', - version: '2.0.0' -}, null, 2) + '\n' - function bootstrap () { mkdirp.sync(dir) diff --git a/deps/npm/test/tap/cache-add-unpublished.js b/deps/npm/test/tap/cache-add-unpublished.js index 46f0db232eb262..fe26929fce23ff 100644 --- a/deps/npm/test/tap/cache-add-unpublished.js +++ b/deps/npm/test/tap/cache-add-unpublished.js @@ -1,12 +1,34 @@ var common = require("../common-tap.js") var test = require("tap").test +var mr = require("npm-registry-mock") test("cache add", function (t) { - common.npm(["cache", "add", "superfoo"], {}, function (er, c, so, se) { - if (er) throw er - t.ok(c, "got non-zero exit code") - t.equal(so, "", "nothing printed to stdout") - t.similar(se, /404 Not Found: superfoo/, "got expected error") - t.end() + setup(function (er, s) { + if (er) { + throw er + } + common.npm([ + "cache", + "add", + "superfoo", + "--registry=http://localhost:1337/" + ], {}, function (er, c, so, se) { + if (er) throw er + t.ok(c, "got non-zero exit code") + t.equal(so, "", "nothing printed to stdout") + t.similar(se, /404 Not Found: superfoo/, "got expected error") + s.close() + t.end() + }) }) }) + +function setup (cb) { + var s = require("http").createServer(function (req, res) { + res.statusCode = 404 + res.end("{\"error\":\"not_found\"}\n") + }) + s.listen(1337, function () { + cb(null, s) + }) +} diff --git a/deps/npm/test/tap/config-meta.js b/deps/npm/test/tap/config-meta.js index 5e0c1b7e7c5300..3da27a872b3183 100644 --- a/deps/npm/test/tap/config-meta.js +++ b/deps/npm/test/tap/config-meta.js @@ -37,7 +37,7 @@ test("get files", function (t) { }) files.forEach(function (f) { try { - var s = fs.statSync(f) + var s = fs.lstatSync(f) } catch (er) { return } diff --git a/deps/npm/test/tap/dedupe-scoped.js b/deps/npm/test/tap/dedupe-scoped.js index dacf405fcfef23..a093e1f8c064bf 100644 --- a/deps/npm/test/tap/dedupe-scoped.js +++ b/deps/npm/test/tap/dedupe-scoped.js @@ -11,40 +11,6 @@ var modules = join(pkg, 'node_modules') var EXEC_OPTS = { cwd: pkg } -test('setup', function (t) { - setup() - t.end() -}) - -// we like the cars -function ltrimm (l) { return l.trim() } - -test('dedupe finds the common scoped modules and moves it up one level', function (t) { - common.npm( - [ - 'find-dupes' // I actually found a use for this command! - ], - EXEC_OPTS, - function (err, code, stdout, stderr) { - t.ifError(err, 'successful dry run against fake install') - t.notOk(code, 'npm ran without issue') - t.notOk(stderr, 'npm printed no errors') - t.same( - stdout.trim().split('\n').map(ltrimm), - [prolog].concat(body).map(ltrimm), - 'got expected output' - ) - - t.end() - } - ) -}) - -test('cleanup', function (t) { - cleanup() - t.end() -}) - var prolog = 'dedupe@0.0.0 ' + pkg var body = function () {/* ├─┬ first@1.0.0 @@ -95,6 +61,41 @@ var secondUnique = { 'version': '1.2.0' } + +test('setup', function (t) { + setup() + t.end() +}) + +// we like the cars +function ltrimm (l) { return l.trim() } + +test('dedupe finds the common scoped modules and moves it up one level', function (t) { + common.npm( + [ + 'find-dupes' // I actually found a use for this command! + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'successful dry run against fake install') + t.notOk(code, 'npm ran without issue') + t.notOk(stderr, 'npm printed no errors') + t.same( + stdout.trim().split('\n').map(ltrimm), + [prolog].concat(body).map(ltrimm), + 'got expected output' + ) + + t.end() + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + function setup (cb) { cleanup() diff --git a/deps/npm/test/tap/gently-rm-overeager.js b/deps/npm/test/tap/gently-rm-overeager.js index 7284d3e3685fe0..35f46cc2195280 100644 --- a/deps/npm/test/tap/gently-rm-overeager.js +++ b/deps/npm/test/tap/gently-rm-overeager.js @@ -13,6 +13,14 @@ var EXEC_OPTS = { cwd : pkg } +var fixture = { + name: "@test/whoops", + version: "1.0.0", + scripts: { + postinstall: "echo \"nope\" && exit 1" + } +} + test("setup", function (t) { cleanup() setup() @@ -40,14 +48,6 @@ test("cleanup", function (t) { }) -var fixture = { - name: "@test/whoops", - version: "1.0.0", - scripts: { - postinstall: "echo \"nope\" && exit 1" - } -} - function cleanup () { rimraf.sync(pkg) rimraf.sync(dep) diff --git a/deps/npm/test/tap/gently-rm-symlink.js b/deps/npm/test/tap/gently-rm-symlink.js index ff1524b04ac3d5..d69b62e5b271bd 100644 --- a/deps/npm/test/tap/gently-rm-symlink.js +++ b/deps/npm/test/tap/gently-rm-symlink.js @@ -15,6 +15,17 @@ var EXEC_OPTS = { cwd : pkg } + +var index = "module.exports = function () { console.log('whoop whoop') }" + +var fixture = { + name: "@test/linked", + version: "1.0.0", + bin: { + linked: "./index.js" + } +} + test("setup", function (t) { cleanup() setup() @@ -72,17 +83,6 @@ test("cleanup", function (t) { t.end() }) - -var index = "module.exports = function () { console.log('whoop whoop') }" - -var fixture = { - name: "@test/linked", - version: "1.0.0", - bin: { - linked: "./index.js" - } -} - function verify (t, stdout) { var binPath = resolve(lnk, "bin", "linked") var pkgPath = resolve(lnk, "lib", "node_modules", "@test", "linked") diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js index 92938b3426fdd9..cbb256d983d0f0 100644 --- a/deps/npm/test/tap/git-dependency-install-link.js +++ b/deps/npm/test/tap/git-dependency-install-link.js @@ -26,6 +26,20 @@ var EXEC_OPTS = { cache: cache } +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + 'child': 'git://localhost:1234/child.git' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + + test('setup', function (t) { bootstrap() setup(function (er, r) { @@ -93,19 +107,6 @@ test('clean', function (t) { process.kill(daemonPID) }) -var pjParent = JSON.stringify({ - name: 'parent', - version: '1.2.3', - dependencies: { - 'child': 'git://localhost:1234/child.git' - } -}, null, 2) + '\n' - -var pjChild = JSON.stringify({ - name: 'child', - version: '1.0.3' -}, null, 2) + '\n' - function bootstrap () { rimraf.sync(repo) rimraf.sync(pkg) diff --git a/deps/npm/test/tap/git-npmignore.js b/deps/npm/test/tap/git-npmignore.js index 6a703f0cf6f8f1..5e915a706faea7 100644 --- a/deps/npm/test/tap/git-npmignore.js +++ b/deps/npm/test/tap/git-npmignore.js @@ -27,6 +27,19 @@ var EXEC_OPTS = { cwd : pkg } +var gitignore = "node_modules/\n" +var npmignore = "t.js\n" + +var a = "console.log('hi');" +var t = "require('tap').test(function (t) { t.pass('I am a test!'); t.end(); });" +var fixture = { + "name" : "gitch", + "version" : "1.0.0", + "private" : true, + "main" : "a.js" +} + + test("setup", function (t) { setup(function (er) { t.ifError(er, "setup ran OK") @@ -85,18 +98,6 @@ function packInstallTest (spec, t) { ) } -var gitignore = "node_modules/\n" -var npmignore = "t.js\n" - -var a = "console.log('hi');" -var t = "require('tap').test(function (t) { t.pass('I am a test!'); t.end(); });" -var fixture = { - "name" : "gitch", - "version" : "1.0.0", - "private" : true, - "main" : "a.js" -} - function cleanup () { process.chdir(tmpdir()) rimraf.sync(pkg) diff --git a/deps/npm/test/tap/git-races.js b/deps/npm/test/tap/git-races.js index 7ac5b233439618..cdab7c34697aaa 100644 --- a/deps/npm/test/tap/git-races.js +++ b/deps/npm/test/tap/git-races.js @@ -154,13 +154,6 @@ function setup (cb) { } } -test('setup', function (t) { - setup(function (er) { - t.ifError(er, 'setup ran OK') - t.end() - }) -}) - // there are two (sic) valid trees that can result we don't care which one we // get in npm@2 var oneTree = [ @@ -187,8 +180,23 @@ var otherTree = [ ] ] +function toSimple (tree) { + var deps = [] + Object.keys(tree.dependencies || {}).forEach(function (dep) { + deps.push(toSimple(tree.dependencies[dep])) + }) + return [ tree['name'] + '@' + tree['version'], deps ] +} + +test('setup', function (t) { + setup(function (er) { + t.ifError(er, 'setup ran OK') + t.end() + }) +}) + test('correct versions are installed for git dependency', function (t) { - t.plan(4) + t.plan(3) t.comment('test for https://github.com/npm/npm/issues/7202') npm.commands.install([], function (er) { t.ifError(er, 'installed OK') @@ -203,10 +211,3 @@ test('correct versions are installed for git dependency', function (t) { }) }) -function toSimple (tree) { - var deps = [] - Object.keys(tree.dependencies || {}).forEach(function (dep) { - deps.push(toSimple(tree.dependencies[dep])) - }) - return [ tree['name'] + '@' + tree['version'], deps ] -} diff --git a/deps/npm/test/tap/graceful-restart.js b/deps/npm/test/tap/graceful-restart.js index bd1f3114418597..53264748056507 100644 --- a/deps/npm/test/tap/graceful-restart.js +++ b/deps/npm/test/tap/graceful-restart.js @@ -10,36 +10,6 @@ var common = require('../common-tap.js') var pkg = resolve(__dirname, 'graceful-restart') -test('setup', function (t) { - bootstrap() - t.end() -}) - -test('graceless restart', function (t) { - fs.writeFileSync(resolve(pkg, 'package.json'), pjGraceless) - createChild(['run-script', 'restart'], function (err, code, out) { - t.ifError(err, 'restart finished successfully') - t.equal(code, 0, 'npm run-script exited with code') - t.equal(out, outGraceless, 'expected all scripts to run') - t.end() - }) -}) - -test('graceful restart', function (t) { - fs.writeFileSync(resolve(pkg, 'package.json'), pjGraceful) - createChild(['run-script', 'restart'], function (err, code, out) { - t.ifError(err, 'restart finished successfully') - t.equal(code, 0, 'npm run-script exited with code') - t.equal(out, outGraceful, 'expected only *restart scripts to run') - t.end() - }) -}) - -test('clean', function (t) { - cleanup() - t.end() -}) - var outGraceless = [ 'prerestart', 'prestop', @@ -90,6 +60,36 @@ var pjGraceful = JSON.stringify({ } }, null, 2) + '\n' +test('setup', function (t) { + bootstrap() + t.end() +}) + +test('graceless restart', function (t) { + fs.writeFileSync(resolve(pkg, 'package.json'), pjGraceless) + createChild(['run-script', 'restart'], function (err, code, out) { + t.ifError(err, 'restart finished successfully') + t.equal(code, 0, 'npm run-script exited with code') + t.equal(out, outGraceless, 'expected all scripts to run') + t.end() + }) +}) + +test('graceful restart', function (t) { + fs.writeFileSync(resolve(pkg, 'package.json'), pjGraceful) + createChild(['run-script', 'restart'], function (err, code, out) { + t.ifError(err, 'restart finished successfully') + t.equal(code, 0, 'npm run-script exited with code') + t.equal(out, outGraceful, 'expected only *restart scripts to run') + t.end() + }) +}) + +test('clean', function (t) { + cleanup() + t.end() +}) + function bootstrap () { mkdirp.sync(pkg) } diff --git a/deps/npm/test/tap/install-bad-man.js b/deps/npm/test/tap/install-bad-man.js index 531509e9974dc5..9ec8a84734b755 100644 --- a/deps/npm/test/tap/install-bad-man.js +++ b/deps/npm/test/tap/install-bad-man.js @@ -15,6 +15,13 @@ var EXEC_OPTS = { cwd: target } +var json = { + name : "install-bad-man", + version : "1.2.3", + man : [ "./install-bad-man.1.lol" ] +} + + test("setup", function (t) { setup() t.pass("setup ran") @@ -54,12 +61,6 @@ test("clean", function (t) { t.end() }) -var json = { - name : "install-bad-man", - version : "1.2.3", - man : [ "./install-bad-man.1.lol" ] -} - function setup () { cleanup() mkdirp.sync(pkg) diff --git a/deps/npm/test/tap/install-man.js b/deps/npm/test/tap/install-man.js index 70879d81f12bf9..ebba5d87b01100 100644 --- a/deps/npm/test/tap/install-man.js +++ b/deps/npm/test/tap/install-man.js @@ -15,6 +15,12 @@ var EXEC_OPTS = { cwd: target } +var json = { + name : "install-man", + version : "1.2.3", + man : [ "./install-man.1" ] +} + test("setup", function (t) { setup() t.pass("setup ran") @@ -50,12 +56,6 @@ test("clean", function (t) { t.end() }) -var json = { - name : "install-man", - version : "1.2.3", - man : [ "./install-man.1" ] -} - function setup () { cleanup() mkdirp.sync(pkg) diff --git a/deps/npm/test/tap/link.js b/deps/npm/test/tap/link.js index 6562e35fd3a75e..ea47e8296a15c5 100644 --- a/deps/npm/test/tap/link.js +++ b/deps/npm/test/tap/link.js @@ -20,6 +20,31 @@ var OPTS = { } } +var readJSON = { + name: 'foo', + version: '1.0.0', + description: '', + main: 'index.js', + scripts: { + test: 'echo \"Error: no test specified\" && exit 1' + }, + author: '', + license: 'ISC' +} + +var installJSON = { + name: 'bar', + version: '1.0.0', + description: '', + main: 'index.js', + scripts: { + test: 'echo \"Error: no test specified\" && exit 1' + }, + author: '', + license: 'ISC' +} + + test('setup', function (t) { setup() common.npm(['ls', '-g', '--depth=0'], OPTS, function (err, c, out) { @@ -72,30 +97,6 @@ test('cleanup', function (t) { }) }) -var readJSON = { - name: 'foo', - version: '1.0.0', - description: '', - main: 'index.js', - scripts: { - test: 'echo \"Error: no test specified\" && exit 1' - }, - author: '', - license: 'ISC' -} - -var installJSON = { - name: 'bar', - version: '1.0.0', - description: '', - main: 'index.js', - scripts: { - test: 'echo \"Error: no test specified\" && exit 1' - }, - author: '', - license: 'ISC' -} - function cleanup () { rimraf.sync(linkRoot) rimraf.sync(link) diff --git a/deps/npm/test/tap/ls-l-depth-0.js b/deps/npm/test/tap/ls-l-depth-0.js index 5bbc1278c42a73..3b5ae4d20234cd 100644 --- a/deps/npm/test/tap/ls-l-depth-0.js +++ b/deps/npm/test/tap/ls-l-depth-0.js @@ -27,6 +27,18 @@ var server var EXEC_OPTS = { cwd: pkg } +var fixture = { + 'name': 'glock', + 'version': '1.8.7', + 'private': true, + 'description': 'an inexplicably hostile sample package', + 'homepage': 'https://glo.ck', + 'repository': 'https://github.com/npm/glo.ck', + 'dependencies': { + 'underscore': '1.5.1' + } +} + test('setup', function (t) { setup() mr({ port: common.port }, function (er, s) { @@ -85,18 +97,6 @@ test('cleanup', function (t) { t.end() }) -var fixture = { - 'name': 'glock', - 'version': '1.8.7', - 'private': true, - 'description': 'an inexplicably hostile sample package', - 'homepage': 'https://glo.ck', - 'repository': 'https://github.com/npm/glo.ck', - 'dependencies': { - 'underscore': '1.5.1' - } -} - function cleanup () { process.chdir(tmpdir()) rimraf.sync(pkg) diff --git a/deps/npm/test/tap/noargs-install-config-save.js b/deps/npm/test/tap/noargs-install-config-save.js index 15613d7a727a9c..b6900b431740d2 100644 --- a/deps/npm/test/tap/noargs-install-config-save.js +++ b/deps/npm/test/tap/noargs-install-config-save.js @@ -56,9 +56,8 @@ test("does not update the package.json with empty arguments", function (t) { var child = createChild([npm, "install"]) child.on("close", function () { var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) - t.ok(text.indexOf("\"dependencies") === -1) s.close() - t.end() + t.ok(text.indexOf("\"dependencies") === -1) }) }) }) @@ -70,10 +69,9 @@ test("updates the package.json (adds dependencies) with an argument", function ( mr({port : common.port}, function (er, s) { var child = createChild([npm, "install", "underscore"]) child.on("close", function () { + s.close() var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) t.ok(text.indexOf("\"dependencies") !== -1) - s.close() - t.end() }) }) }) diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision.js b/deps/npm/test/tap/optional-metadep-rollback-collision.js index 929c4fc0fc4e21..4b21f965ed12fc 100644 --- a/deps/npm/test/tap/optional-metadep-rollback-collision.js +++ b/deps/npm/test/tap/optional-metadep-rollback-collision.js @@ -63,87 +63,6 @@ var opdep = { } } -test('setup', function (t) { - cleanup() - - mkdirp.sync(pkg) - fs.writeFileSync( - path.join(pkg, 'package.json'), - JSON.stringify(json, null, 2) - ) - - mkdirp.sync(path.join(deps, 'd1')) - fs.writeFileSync( - path.join(deps, 'd1', 'package.json'), - JSON.stringify(d1, null, 2) - ) - - mkdirp.sync(path.join(deps, 'd2')) - fs.writeFileSync( - path.join(deps, 'd2', 'package.json'), - JSON.stringify(d2, null, 2) - ) - fs.writeFileSync(path.join(deps, 'd2', 'blart.js'), blart) - - mkdirp.sync(path.join(deps, 'opdep')) - fs.writeFileSync( - path.join(deps, 'opdep', 'package.json'), - JSON.stringify(opdep, null, 2) - ) - fs.writeFileSync(path.join(deps, 'opdep', 'bad-server.js'), badServer) - - t.end() -}) - -test('go go test racer', function (t) { - common.npm( - [ - '--prefix', pkg, - '--fetch-retries', '0', - '--loglevel', 'silent', - '--cache', cache, - 'install' - ], - { - cwd: pkg, - env: { - PATH: process.env.PATH, - Path: process.env.Path - }, - stdio: [0, 'pipe', 2] - }, - function (er, code, stdout, stderr) { - t.ifError(er, 'install ran to completion without error') - t.notOk(code, 'npm install exited with code 0') - - t.equal(stdout, 'ok\nok\n') - t.notOk(/not ok/.test(stdout), 'should not contain the string \'not ok\'') - t.end() - } - ) -}) - -test('verify results', function (t) { - t.throws(function () { - fs.statSync(nm) - }) - t.end() -}) - -test('cleanup', function (t) { - cleanup() - t.end() -}) - -function cleanup () { - process.chdir(osenv.tmpdir()) - try { - var pid = +fs.readFileSync(pidfile) - process.kill(pid, 'SIGKILL') - } catch (er) {} - - rimraf.sync(pkg) -} var badServer = function () {/* var createServer = require('http').createServer @@ -235,3 +154,84 @@ mkdirp(BASEDIR, function go () { }, 3 * 1000) }) */}.toString().split('\n').slice(1, -1).join('\n') +test('setup', function (t) { + cleanup() + + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + mkdirp.sync(path.join(deps, 'd1')) + fs.writeFileSync( + path.join(deps, 'd1', 'package.json'), + JSON.stringify(d1, null, 2) + ) + + mkdirp.sync(path.join(deps, 'd2')) + fs.writeFileSync( + path.join(deps, 'd2', 'package.json'), + JSON.stringify(d2, null, 2) + ) + fs.writeFileSync(path.join(deps, 'd2', 'blart.js'), blart) + + mkdirp.sync(path.join(deps, 'opdep')) + fs.writeFileSync( + path.join(deps, 'opdep', 'package.json'), + JSON.stringify(opdep, null, 2) + ) + fs.writeFileSync(path.join(deps, 'opdep', 'bad-server.js'), badServer) + + t.end() +}) + +test('go go test racer', function (t) { + common.npm( + [ + '--prefix', pkg, + '--fetch-retries', '0', + '--loglevel', 'silent', + '--cache', cache, + 'install' + ], + { + cwd: pkg, + env: { + PATH: process.env.PATH, + Path: process.env.Path + }, + stdio: [0, 'pipe', 2] + }, + function (er, code, stdout, stderr) { + t.ifError(er, 'install ran to completion without error') + t.notOk(code, 'npm install exited with code 0') + + t.equal(stdout, 'ok\nok\n') + t.notOk(/not ok/.test(stdout), 'should not contain the string \'not ok\'') + t.end() + } + ) +}) + +test('verify results', function (t) { + t.throws(function () { + fs.statSync(nm) + }) + t.end() +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + try { + var pid = +fs.readFileSync(pidfile) + process.kill(pid, 'SIGKILL') + } catch (er) {} + + rimraf.sync(pkg) +} diff --git a/deps/npm/test/tap/outdated-local.js b/deps/npm/test/tap/outdated-local.js index 04f1349c2b7f34..f9b8af4420f861 100644 --- a/deps/npm/test/tap/outdated-local.js +++ b/deps/npm/test/tap/outdated-local.js @@ -14,6 +14,58 @@ var pkgScopedLocal = path.resolve(pkg, 'another-local-module') var pkgLocalUnderscore = path.resolve(pkg, 'underscore') var pkgLocalOptimist = path.resolve(pkg, 'optimist') +var pjParent = JSON.stringify({ + name: 'outdated-local', + version: '1.0.0', + dependencies: { + 'local-module': 'file:local-module', // updated locally, not on repo + '@scoped/another-local-module': 'file:another-local-module', // updated locally, scoped, not on repo + 'underscore': 'file:underscore', // updated locally, updated but lesser version on repo + 'optimist': 'file:optimist' // updated locally, updated and greater version on repo + } +}, null, 2) + '\n' + +var pjLocal = JSON.stringify({ + name: 'local-module', + version: '1.0.0' +}, null, 2) + '\n' + +var pjLocalBumped = JSON.stringify({ + name: 'local-module', + version: '1.1.0' +}, null, 2) + '\n' + +var pjScopedLocal = JSON.stringify({ + name: '@scoped/another-local-module', + version: '1.0.0' +}, null, 2) + '\n' + +var pjScopedLocalBumped = JSON.stringify({ + name: '@scoped/another-local-module', + version: '1.2.0' +}, null, 2) + '\n' + +var pjLocalUnderscore = JSON.stringify({ + name: 'underscore', + version: '1.3.1' +}, null, 2) + '\n' + +var pjLocalUnderscoreBumped = JSON.stringify({ + name: 'underscore', + version: '1.6.1' +}, null, 2) + '\n' + +var pjLocalOptimist = JSON.stringify({ + name: 'optimist', + version: '0.4.0' +}, null, 2) + '\n' + +var pjLocalOptimistBumped = JSON.stringify({ + name: 'optimist', + version: '0.5.0' +}, null, 2) + '\n' + + function mocks (server) { server.get('/local-module') .reply(404) @@ -112,57 +164,6 @@ test('cleanup', function (t) { t.end() }) -var pjParent = JSON.stringify({ - name: 'outdated-local', - version: '1.0.0', - dependencies: { - 'local-module': 'file:local-module', // updated locally, not on repo - '@scoped/another-local-module': 'file:another-local-module', // updated locally, scoped, not on repo - 'underscore': 'file:underscore', // updated locally, updated but lesser version on repo - 'optimist': 'file:optimist' // updated locally, updated and greater version on repo - } -}, null, 2) + '\n' - -var pjLocal = JSON.stringify({ - name: 'local-module', - version: '1.0.0' -}, null, 2) + '\n' - -var pjLocalBumped = JSON.stringify({ - name: 'local-module', - version: '1.1.0' -}, null, 2) + '\n' - -var pjScopedLocal = JSON.stringify({ - name: '@scoped/another-local-module', - version: '1.0.0' -}, null, 2) + '\n' - -var pjScopedLocalBumped = JSON.stringify({ - name: '@scoped/another-local-module', - version: '1.2.0' -}, null, 2) + '\n' - -var pjLocalUnderscore = JSON.stringify({ - name: 'underscore', - version: '1.3.1' -}, null, 2) + '\n' - -var pjLocalUnderscoreBumped = JSON.stringify({ - name: 'underscore', - version: '1.6.1' -}, null, 2) + '\n' - -var pjLocalOptimist = JSON.stringify({ - name: 'optimist', - version: '0.4.0' -}, null, 2) + '\n' - -var pjLocalOptimistBumped = JSON.stringify({ - name: 'optimist', - version: '0.5.0' -}, null, 2) + '\n' - function bootstrap () { mkdirp.sync(pkg) fs.writeFileSync(path.resolve(pkg, 'package.json'), pjParent) diff --git a/deps/npm/test/tap/outdated-private.js b/deps/npm/test/tap/outdated-private.js index 0696988046ebca..882d7d9479cf4c 100644 --- a/deps/npm/test/tap/outdated-private.js +++ b/deps/npm/test/tap/outdated-private.js @@ -13,6 +13,39 @@ var pkgLocalPrivate = path.resolve(pkg, "local-private") var pkgScopedLocalPrivate = path.resolve(pkg, "another-local-private") var pkgLocalUnderscore = path.resolve(pkg, "underscore") +var pjParent = JSON.stringify({ + name : "outdated-private", + version : "1.0.0", + dependencies : { + "local-private" : "file:local-private", + "@scoped/another-local-private" : "file:another-local-private", + "underscore" : "file:underscore" + } +}, null, 2) + "\n" + +var pjLocalPrivate = JSON.stringify({ + name : "local-private", + version : "1.0.0", + private : true +}, null, 2) + "\n" + +var pjLocalPrivateBumped = JSON.stringify({ + name : "local-private", + version : "1.1.0", + private : true +}, null, 2) + "\n" + +var pjScopedLocalPrivate = JSON.stringify({ + name : "@scoped/another-local-private", + version : "1.0.0", + private : true +}, null, 2) + "\n" + +var pjLocalUnderscore = JSON.stringify({ + name : "underscore", + version : "1.3.1" +}, null, 2) + "\n" + test("setup", function (t) { bootstrap() t.end() @@ -55,39 +88,6 @@ test("cleanup", function (t) { t.end() }) -var pjParent = JSON.stringify({ - name : "outdated-private", - version : "1.0.0", - dependencies : { - "local-private" : "file:local-private", - "@scoped/another-local-private" : "file:another-local-private", - "underscore" : "file:underscore" - } -}, null, 2) + "\n" - -var pjLocalPrivate = JSON.stringify({ - name : "local-private", - version : "1.0.0", - private : true -}, null, 2) + "\n" - -var pjLocalPrivateBumped = JSON.stringify({ - name : "local-private", - version : "1.1.0", - private : true -}, null, 2) + "\n" - -var pjScopedLocalPrivate = JSON.stringify({ - name : "@scoped/another-local-private", - version : "1.0.0", - private : true -}, null, 2) + "\n" - -var pjLocalUnderscore = JSON.stringify({ - name : "underscore", - version : "1.3.1" -}, null, 2) + "\n" - function bootstrap () { mkdirp.sync(pkg) fs.writeFileSync(path.resolve(pkg, "package.json"), pjParent) diff --git a/deps/npm/test/tap/peer-deps-invalid.js b/deps/npm/test/tap/peer-deps-invalid.js index 7d630f866256bb..b256b8e2e3d95d 100644 --- a/deps/npm/test/tap/peer-deps-invalid.js +++ b/deps/npm/test/tap/peer-deps-invalid.js @@ -23,6 +23,31 @@ var json = { } } +var fileFail = function () { +/**package +* { "name": "npm-test-peer-deps-file-invalid" +* , "main": "index.js" +* , "version": "1.2.3" +* , "description":"This one should conflict with the other one" +* , "peerDependencies": { "underscore": "1.3.3" } +* } +**/ + module.exports = 'I\'m just a lonely index, naked as the day I was born.' +}.toString().split('\n').slice(1, -1).join('\n') + +var fileOK = function () { +/**package +* { "name": "npm-test-peer-deps-file" +* , "main": "index.js" +* , "version": "1.2.3" +* , "description":"No package.json in sight!" +* , "peerDependencies": { "underscore": "1.3.1" } +* , "dependencies": { "mkdirp": "0.3.5" } +* } +**/ + module.exports = 'I\'m just a lonely index, naked as the day I was born.' +}.toString().split('\n').slice(1, -1).join('\n') + test('setup', function (t) { cleanup() mkdirp.sync(cache) @@ -75,28 +100,3 @@ function cleanup () { process.chdir(osenv.tmpdir()) rimraf.sync(pkg) } - -var fileFail = function () { -/**package -* { "name": "npm-test-peer-deps-file-invalid" -* , "main": "index.js" -* , "version": "1.2.3" -* , "description":"This one should conflict with the other one" -* , "peerDependencies": { "underscore": "1.3.3" } -* } -**/ - module.exports = 'I\'m just a lonely index, naked as the day I was born.' -}.toString().split('\n').slice(1, -1).join('\n') - -var fileOK = function () { -/**package -* { "name": "npm-test-peer-deps-file" -* , "main": "index.js" -* , "version": "1.2.3" -* , "description":"No package.json in sight!" -* , "peerDependencies": { "underscore": "1.3.1" } -* , "dependencies": { "mkdirp": "0.3.5" } -* } -**/ - module.exports = 'I\'m just a lonely index, naked as the day I was born.' -}.toString().split('\n').slice(1, -1).join('\n') diff --git a/deps/npm/test/tap/peer-deps-without-package-json.js b/deps/npm/test/tap/peer-deps-without-package-json.js index 16a3a114f62a51..08322eefaa5035 100644 --- a/deps/npm/test/tap/peer-deps-without-package-json.js +++ b/deps/npm/test/tap/peer-deps-without-package-json.js @@ -14,6 +14,20 @@ var pkg = path.resolve(__dirname, 'peer-deps-without-package-json') var cache = path.resolve(pkg, 'cache') var nodeModules = path.resolve(pkg, 'node_modules') +var fileJS = function () { +/**package +* { "name": "npm-test-peer-deps-file" +* , "main": "index.js" +* , "version": "1.2.3" +* , "description":"No package.json in sight!" +* , "peerDependencies": { "underscore": "1.3.1" } +* , "dependencies": { "mkdirp": "0.3.5" } +* } +**/ + + module.exports = 'I\'m just a lonely index, naked as the day I was born.' +}.toString().split('\n').slice(1, -1).join('\n') + test('setup', function (t) { t.comment('test for https://github.com/npm/npm/issues/3049') cleanup() @@ -65,17 +79,3 @@ function cleanup () { process.chdir(osenv.tmpdir()) rimraf.sync(pkg) } - -var fileJS = function () { -/**package -* { "name": "npm-test-peer-deps-file" -* , "main": "index.js" -* , "version": "1.2.3" -* , "description":"No package.json in sight!" -* , "peerDependencies": { "underscore": "1.3.1" } -* , "dependencies": { "mkdirp": "0.3.5" } -* } -**/ - - module.exports = 'I\'m just a lonely index, naked as the day I was born.' -}.toString().split('\n').slice(1, -1).join('\n') diff --git a/deps/npm/test/tap/publish-config.js b/deps/npm/test/tap/publish-config.js index 9e537a920649f3..fd6dd4a2a4da11 100644 --- a/deps/npm/test/tap/publish-config.js +++ b/deps/npm/test/tap/publish-config.js @@ -21,9 +21,9 @@ fs.writeFileSync(pkg + "/fixture_npmrc", test(function (t) { var child + t.plan(4) require("http").createServer(function (req, res) { t.pass("got request on the fakey fake registry") - t.end() this.close() res.statusCode = 500 res.end(JSON.stringify({ diff --git a/deps/npm/test/tap/registry.js b/deps/npm/test/tap/registry.js index 20e7bbe811588a..060d9b67b67fcc 100644 --- a/deps/npm/test/tap/registry.js +++ b/deps/npm/test/tap/registry.js @@ -30,7 +30,7 @@ else { function runTests () { - var env = {} + var env = { TAP: 1 } for (var i in process.env) env[i] = process.env[i] env.npm = npmExec @@ -52,7 +52,7 @@ function runTests () { env: env, stdio: "inherit" } - common.npm(["test"], opts, function (err, code) { + common.npm(["test", "--", "-Rtap"], opts, function (err, code) { if (err) { throw err } if (code) { return test("need test to work", function (t) { diff --git a/deps/npm/test/tap/run-script.js b/deps/npm/test/tap/run-script.js index 60c9d3c4f9b8fb..8dfe574e139d69 100644 --- a/deps/npm/test/tap/run-script.js +++ b/deps/npm/test/tap/run-script.js @@ -13,43 +13,6 @@ var tmp = path.resolve(pkg, 'tmp') var opts = { cwd: pkg } -function testOutput (t, command, er, code, stdout, stderr) { - var lines - - if (er) - throw er - - if (stderr) - throw new Error('npm ' + command + ' stderr: ' + stderr.toString()) - - lines = stdout.trim().split('\n') - stdout = lines.filter(function (line) { - return line.trim() !== '' && line[0] !== '>' - }).join(';') - - t.equal(stdout, command) - t.end() -} - -function writeMetadata (object) { - fs.writeFileSync( - path.resolve(pkg, 'package.json'), - JSON.stringify(object, null, 2) + '\n' - ) -} - -function cleanup () { - rimraf.sync(pkg) -} - -test('setup', function (t) { - cleanup() - mkdirp.sync(cache) - mkdirp.sync(tmp) - writeMetadata(fullyPopulated) - t.end() -}) - var fullyPopulated = { 'name': 'runscript', 'version': '1.2.3', @@ -91,6 +54,44 @@ var both = { } } + +function testOutput (t, command, er, code, stdout, stderr) { + var lines + + if (er) + throw er + + if (stderr) + throw new Error('npm ' + command + ' stderr: ' + stderr.toString()) + + lines = stdout.trim().split('\n') + stdout = lines.filter(function (line) { + return line.trim() !== '' && line[0] !== '>' + }).join(';') + + t.equal(stdout, command) + t.end() +} + +function writeMetadata (object) { + fs.writeFileSync( + path.resolve(pkg, 'package.json'), + JSON.stringify(object, null, 2) + '\n' + ) +} + +function cleanup () { + rimraf.sync(pkg) +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(cache) + mkdirp.sync(tmp) + writeMetadata(fullyPopulated) + t.end() +}) + test('npm run-script start', function (t) { common.npm(['run-script', 'start'], opts, testOutput.bind(null, t, 'start')) }) diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js index b4d1f3a34ecb96..d24a24d4d8a8da 100644 --- a/deps/npm/test/tap/scripts-whitespace-windows.js +++ b/deps/npm/test/tap/scripts-whitespace-windows.js @@ -25,7 +25,8 @@ var json = { }, dependencies: { 'scripts-whitespace-windows-dep': '0.0.1' - } + }, + license: 'WTFPL' } var dependency = { @@ -34,6 +35,13 @@ var dependency = { bin: [ 'bin/foo' ] } +var foo = function () {/* +#!/usr/bin/env node + +if (process.argv.length === 8) + console.log('npm-test-fine') +*/}.toString().split('\n').slice(1, -1).join('\n') + test('setup', function (t) { cleanup() mkdirp.sync(tmp) @@ -72,9 +80,12 @@ test('setup', function (t) { test('test', function (t) { common.npm(['run', 'foo'], EXEC_OPTS, function (err, code, stdout, stderr) { + stderr = stderr.trim() + if (stderr) + console.error(stderr) t.ifErr(err, 'npm run finished without error') t.equal(code, 0, 'npm run exited ok') - t.notOk(stderr, 'no output stderr: ', stderr) + t.notOk(stderr, 'no output stderr: ' + stderr) stdout = stdout.trim() t.ok(/npm-test-fine/.test(stdout)) t.end() @@ -91,9 +102,3 @@ function cleanup () { rimraf.sync(pkg) } -var foo = function () {/* -#!/usr/bin/env node - -if (process.argv.length === 8) - console.log('npm-test-fine') -*/}.toString().split('\n').slice(1, -1).join('\n') diff --git a/deps/npm/test/tap/shrinkwrap-local-dependency.js b/deps/npm/test/tap/shrinkwrap-local-dependency.js index d9514e42d3237e..ffbde6574ee86a 100644 --- a/deps/npm/test/tap/shrinkwrap-local-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-local-dependency.js @@ -10,6 +10,34 @@ var PKG_DIR = path.resolve(__dirname, "shrinkwrap-local-dependency") var CACHE_DIR = path.resolve(PKG_DIR, "cache") var DEP_DIR = path.resolve(PKG_DIR, "dep") +var desired = { + "name": "npm-test-shrinkwrap-local-dependency", + "version": "0.0.0", + "dependencies": { + "npm-test-shrinkwrap-local-dependency-dep": { + "version": "0.0.0", + "from": "dep", + "resolved": "file:dep" + } + } +} + +var root = { + "author": "Thomas Torp", + "name": "npm-test-shrinkwrap-local-dependency", + "version": "0.0.0", + "dependencies": { + "npm-test-shrinkwrap-local-dependency-dep": "file:./dep" + } +} + +var dependency = { + "author": "Thomas Torp", + "name": "npm-test-shrinkwrap-local-dependency-dep", + "version": "0.0.0" +} + + test("shrinkwrap uses resolved with file: on local deps", function(t) { setup() @@ -67,33 +95,6 @@ test("cleanup", function(t) { t.end() }) -var desired = { - "name": "npm-test-shrinkwrap-local-dependency", - "version": "0.0.0", - "dependencies": { - "npm-test-shrinkwrap-local-dependency-dep": { - "version": "0.0.0", - "from": "dep", - "resolved": "file:dep" - } - } -} - -var root = { - "author": "Thomas Torp", - "name": "npm-test-shrinkwrap-local-dependency", - "version": "0.0.0", - "dependencies": { - "npm-test-shrinkwrap-local-dependency-dep": "file:./dep" - } -} - -var dependency = { - "author": "Thomas Torp", - "name": "npm-test-shrinkwrap-local-dependency-dep", - "version": "0.0.0" -} - function setup() { cleanup() mkdirp.sync(PKG_DIR) diff --git a/deps/npm/test/tap/unpublish-config.js b/deps/npm/test/tap/unpublish-config.js index e4d41800ae7c3a..58550ec4e59a12 100644 --- a/deps/npm/test/tap/unpublish-config.js +++ b/deps/npm/test/tap/unpublish-config.js @@ -36,6 +36,7 @@ test('setup', function (t) { test('cursory test of unpublishing with config', function (t) { var child + t.plan(4) http.createServer(function (req, res) { t.pass('got request on the fakey fake registry') this.close() @@ -44,7 +45,6 @@ test('cursory test of unpublishing with config', function (t) { error: 'shh no tears, only dreams now' })) child.kill() - t.end() }).listen(common.port, function () { t.pass('server is listening') diff --git a/deps/npm/test/tap/update-index.js b/deps/npm/test/tap/update-index.js index 0586269722c8cd..fe4244c308b650 100644 --- a/deps/npm/test/tap/update-index.js +++ b/deps/npm/test/tap/update-index.js @@ -13,74 +13,6 @@ var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var server -function setup (t, mock, extra) { - mkdirp.sync(CACHE_DIR) - mr({ port: common.port, plugin: mock }, function (er, s) { - npm.load({ cache: CACHE_DIR, registry: common.registry }, function (err) { - if (extra) { - Object.keys(extra).forEach(function (k) { - npm.config.set(k, extra[k], 'user') - }) - } - t.ifError(err, 'no error') - server = s - t.end() - }) - }) -} - -function cleanup (t) { - server.close(function () { - rimraf.sync(PKG_DIR) - - t.end() - }) -} - -test('setup basic', function (t) { - setup(t, mocks.basic) -}) - -test('request basic', function (t) { - updateIndex(0, function (er) { - t.ifError(er, 'no error') - t.end() - }) -}) - -test('cleanup basic', cleanup) - -test('setup auth', function (t) { - setup(t, mocks.auth) -}) - -test('request auth failure', function (t) { - updateIndex(0, function (er) { - t.equals(er.code, 'E401', 'gotta get that auth') - t.ok(/^unauthorized/.test(er.message), 'unauthorized message') - t.end() - }) -}) - -test('cleanup auth failure', cleanup) - -test('setup auth', function (t) { - // mimic as if alwaysAuth had been set - setup(t, mocks.auth, { - _auth: new Buffer('bobby:tables').toString('base64'), - 'always-auth': true - }) -}) - -test('request auth success', function (t) { - updateIndex(0, function (er) { - t.ifError(er, 'no error') - t.end() - }) -}) - -test('cleanup auth', cleanup) - var mocks = { basic: function (mock) { mock.get('/-/all').reply(200, allMock) @@ -193,3 +125,71 @@ var allMock = { } } } + +function setup (t, mock, extra) { + mkdirp.sync(CACHE_DIR) + mr({ port: common.port, plugin: mock }, function (er, s) { + npm.load({ cache: CACHE_DIR, registry: common.registry }, function (err) { + if (extra) { + Object.keys(extra).forEach(function (k) { + npm.config.set(k, extra[k], 'user') + }) + } + t.ifError(err, 'no error') + server = s + t.end() + }) + }) +} + +function cleanup (t) { + server.close(function () { + rimraf.sync(PKG_DIR) + + t.end() + }) +} + +test('setup basic', function (t) { + setup(t, mocks.basic) +}) + +test('request basic', function (t) { + updateIndex(0, function (er) { + t.ifError(er, 'no error') + t.end() + }) +}) + +test('cleanup basic', cleanup) + +test('setup auth', function (t) { + setup(t, mocks.auth) +}) + +test('request auth failure', function (t) { + updateIndex(0, function (er) { + t.equals(er.code, 'E401', 'gotta get that auth') + t.ok(/^unauthorized/.test(er.message), 'unauthorized message') + t.end() + }) +}) + +test('cleanup auth failure', cleanup) + +test('setup auth', function (t) { + // mimic as if alwaysAuth had been set + setup(t, mocks.auth, { + _auth: new Buffer('bobby:tables').toString('base64'), + 'always-auth': true + }) +}) + +test('request auth success', function (t) { + updateIndex(0, function (er) { + t.ifError(er, 'no error') + t.end() + }) +}) + +test('cleanup auth', cleanup)