deps: upgrade to npm 2.10.1
authorRebecca Turner <me@re-becca.org>
Fri, 22 May 2015 07:14:39 +0000 (03:14 -0400)
committerJeremiah Senkpiel <fishrock123@rocketmail.com>
Sat, 23 May 2015 23:48:00 +0000 (19:48 -0400)
PR-URL: https://github.com/nodejs/io.js/pull/1763
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
309 files changed:
deps/npm/.eslintrc [deleted file]
deps/npm/AUTHORS
deps/npm/CHANGELOG.md
deps/npm/Makefile
deps/npm/doc/cli/npm-build.md
deps/npm/doc/cli/npm-install.md
deps/npm/doc/cli/npm-shrinkwrap.md
deps/npm/doc/files/npmrc.md
deps/npm/doc/files/package.json.md
deps/npm/doc/misc/npm-registry.md
deps/npm/html/doc/README.html
deps/npm/html/doc/api/npm-bin.html
deps/npm/html/doc/api/npm-bugs.html
deps/npm/html/doc/api/npm-cache.html
deps/npm/html/doc/api/npm-commands.html
deps/npm/html/doc/api/npm-config.html
deps/npm/html/doc/api/npm-deprecate.html
deps/npm/html/doc/api/npm-docs.html
deps/npm/html/doc/api/npm-edit.html
deps/npm/html/doc/api/npm-explore.html
deps/npm/html/doc/api/npm-help-search.html
deps/npm/html/doc/api/npm-init.html
deps/npm/html/doc/api/npm-install.html
deps/npm/html/doc/api/npm-link.html
deps/npm/html/doc/api/npm-load.html
deps/npm/html/doc/api/npm-ls.html
deps/npm/html/doc/api/npm-outdated.html
deps/npm/html/doc/api/npm-owner.html
deps/npm/html/doc/api/npm-pack.html
deps/npm/html/doc/api/npm-prefix.html
deps/npm/html/doc/api/npm-prune.html
deps/npm/html/doc/api/npm-publish.html
deps/npm/html/doc/api/npm-rebuild.html
deps/npm/html/doc/api/npm-repo.html
deps/npm/html/doc/api/npm-restart.html
deps/npm/html/doc/api/npm-root.html
deps/npm/html/doc/api/npm-run-script.html
deps/npm/html/doc/api/npm-search.html
deps/npm/html/doc/api/npm-shrinkwrap.html
deps/npm/html/doc/api/npm-start.html
deps/npm/html/doc/api/npm-stop.html
deps/npm/html/doc/api/npm-submodule.html [deleted file]
deps/npm/html/doc/api/npm-tag.html
deps/npm/html/doc/api/npm-test.html
deps/npm/html/doc/api/npm-uninstall.html
deps/npm/html/doc/api/npm-unpublish.html
deps/npm/html/doc/api/npm-update.html
deps/npm/html/doc/api/npm-version.html
deps/npm/html/doc/api/npm-view.html
deps/npm/html/doc/api/npm-whoami.html
deps/npm/html/doc/api/npm.html
deps/npm/html/doc/cli/npm-access.html
deps/npm/html/doc/cli/npm-adduser.html
deps/npm/html/doc/cli/npm-bin.html
deps/npm/html/doc/cli/npm-bugs.html
deps/npm/html/doc/cli/npm-build.html
deps/npm/html/doc/cli/npm-bundle.html
deps/npm/html/doc/cli/npm-cache.html
deps/npm/html/doc/cli/npm-completion.html
deps/npm/html/doc/cli/npm-config.html
deps/npm/html/doc/cli/npm-dedupe.html
deps/npm/html/doc/cli/npm-deprecate.html
deps/npm/html/doc/cli/npm-dist-tag.html
deps/npm/html/doc/cli/npm-docs.html
deps/npm/html/doc/cli/npm-edit.html
deps/npm/html/doc/cli/npm-explore.html
deps/npm/html/doc/cli/npm-help-search.html
deps/npm/html/doc/cli/npm-help.html
deps/npm/html/doc/cli/npm-init.html
deps/npm/html/doc/cli/npm-install.html
deps/npm/html/doc/cli/npm-link.html
deps/npm/html/doc/cli/npm-logout.html
deps/npm/html/doc/cli/npm-ls.html
deps/npm/html/doc/cli/npm-outdated.html
deps/npm/html/doc/cli/npm-owner.html
deps/npm/html/doc/cli/npm-pack.html
deps/npm/html/doc/cli/npm-prefix.html
deps/npm/html/doc/cli/npm-prune.html
deps/npm/html/doc/cli/npm-publish.html
deps/npm/html/doc/cli/npm-rebuild.html
deps/npm/html/doc/cli/npm-repo.html
deps/npm/html/doc/cli/npm-restart.html
deps/npm/html/doc/cli/npm-rm.html
deps/npm/html/doc/cli/npm-root.html
deps/npm/html/doc/cli/npm-run-script.html
deps/npm/html/doc/cli/npm-search.html
deps/npm/html/doc/cli/npm-shrinkwrap.html
deps/npm/html/doc/cli/npm-star.html
deps/npm/html/doc/cli/npm-stars.html
deps/npm/html/doc/cli/npm-start.html
deps/npm/html/doc/cli/npm-stop.html
deps/npm/html/doc/cli/npm-submodule.html [deleted file]
deps/npm/html/doc/cli/npm-tag.html
deps/npm/html/doc/cli/npm-test.html
deps/npm/html/doc/cli/npm-uninstall.html
deps/npm/html/doc/cli/npm-unpublish.html
deps/npm/html/doc/cli/npm-update.html
deps/npm/html/doc/cli/npm-version.html
deps/npm/html/doc/cli/npm-view.html
deps/npm/html/doc/cli/npm-whoami.html
deps/npm/html/doc/cli/npm.html
deps/npm/html/doc/files/npm-folders.html
deps/npm/html/doc/files/npm-global.html
deps/npm/html/doc/files/npm-json.html
deps/npm/html/doc/files/npmrc.html
deps/npm/html/doc/files/package.json.html
deps/npm/html/doc/index.html
deps/npm/html/doc/misc/npm-coding-style.html
deps/npm/html/doc/misc/npm-config.html
deps/npm/html/doc/misc/npm-developers.html
deps/npm/html/doc/misc/npm-disputes.html
deps/npm/html/doc/misc/npm-faq.html
deps/npm/html/doc/misc/npm-index.html
deps/npm/html/doc/misc/npm-registry.html
deps/npm/html/doc/misc/npm-scope.html
deps/npm/html/doc/misc/npm-scripts.html
deps/npm/html/doc/misc/removing-npm.html
deps/npm/html/doc/misc/semver.html
deps/npm/html/partial/doc/README.html
deps/npm/html/partial/doc/api/npm-submodule.html [deleted file]
deps/npm/html/partial/doc/api/npm.html
deps/npm/html/partial/doc/cli/npm-build.html
deps/npm/html/partial/doc/cli/npm-install.html
deps/npm/html/partial/doc/cli/npm-ls.html
deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
deps/npm/html/partial/doc/cli/npm-submodule.html [deleted file]
deps/npm/html/partial/doc/cli/npm.html
deps/npm/html/partial/doc/files/npm-json.html
deps/npm/html/partial/doc/files/npmrc.html
deps/npm/html/partial/doc/files/package.json.html
deps/npm/html/partial/doc/misc/npm-disputes.html
deps/npm/html/partial/doc/misc/npm-faq.html
deps/npm/html/partial/doc/misc/npm-registry.html
deps/npm/lib/access.js
deps/npm/lib/bin.js
deps/npm/lib/cache/add-named.js
deps/npm/lib/cache/add-remote-git.js
deps/npm/lib/config/defaults.js
deps/npm/lib/help.js
deps/npm/lib/install.js
deps/npm/lib/ls.js
deps/npm/lib/run-script.js
deps/npm/man/man1/npm-build.1
deps/npm/man/man1/npm-install.1
deps/npm/man/man1/npm-ls.1
deps/npm/man/man1/npm-shrinkwrap.1
deps/npm/man/man1/npm-submodule.1 [deleted file]
deps/npm/man/man1/npm.1
deps/npm/man/man3/npm-submodule.3 [deleted file]
deps/npm/man/man3/npm.3
deps/npm/man/man5/npm-json.5
deps/npm/man/man5/npmrc.5
deps/npm/man/man5/package.json.5
deps/npm/man/man7/npm-registry.7
deps/npm/node_modules/fstream/.travis.yml
deps/npm/node_modules/fstream/LICENSE
deps/npm/node_modules/fstream/examples/filter-pipe.js
deps/npm/node_modules/fstream/examples/pipe.js
deps/npm/node_modules/fstream/examples/reader.js
deps/npm/node_modules/fstream/examples/symlink-write.js
deps/npm/node_modules/fstream/fstream.js
deps/npm/node_modules/fstream/lib/abstract.js
deps/npm/node_modules/fstream/lib/collect.js
deps/npm/node_modules/fstream/lib/dir-reader.js
deps/npm/node_modules/fstream/lib/dir-writer.js
deps/npm/node_modules/fstream/lib/file-reader.js
deps/npm/node_modules/fstream/lib/file-writer.js
deps/npm/node_modules/fstream/lib/get-type.js
deps/npm/node_modules/fstream/lib/link-reader.js
deps/npm/node_modules/fstream/lib/link-writer.js
deps/npm/node_modules/fstream/lib/proxy-reader.js
deps/npm/node_modules/fstream/lib/proxy-writer.js
deps/npm/node_modules/fstream/lib/reader.js
deps/npm/node_modules/fstream/lib/socket-reader.js
deps/npm/node_modules/fstream/lib/writer.js
deps/npm/node_modules/fstream/package.json
deps/npm/node_modules/glob/node_modules/path-is-absolute/package.json
deps/npm/node_modules/glob/package.json
deps/npm/node_modules/init-package-json/default-input.js
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/LICENSE.md [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/README.md [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/index.js [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/.npmignore [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/README.md [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/spdx-correct.js [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json [new file with mode: 0644]
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/README.md
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/index.js
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/package.json
deps/npm/node_modules/init-package-json/node_modules/validate-npm-package-name/test/index.js
deps/npm/node_modules/init-package-json/package.json
deps/npm/node_modules/init-package-json/test/license.js [new file with mode: 0644]
deps/npm/node_modules/lru-cache/lib/lru-cache.js
deps/npm/node_modules/lru-cache/package.json
deps/npm/node_modules/lru-cache/test/timeout.js [deleted file]
deps/npm/node_modules/minimatch/browser.js
deps/npm/node_modules/minimatch/minimatch.js
deps/npm/node_modules/minimatch/package.json
deps/npm/node_modules/mkdirp/.npmignore [deleted file]
deps/npm/node_modules/mkdirp/.travis.yml
deps/npm/node_modules/mkdirp/index.js
deps/npm/node_modules/mkdirp/node_modules/minimist/package.json
deps/npm/node_modules/mkdirp/package.json
deps/npm/node_modules/mkdirp/test/chmod.js
deps/npm/node_modules/mkdirp/test/clobber.js
deps/npm/node_modules/mkdirp/test/mkdirp.js
deps/npm/node_modules/mkdirp/test/opts_fs.js
deps/npm/node_modules/mkdirp/test/opts_fs_sync.js
deps/npm/node_modules/mkdirp/test/perm.js
deps/npm/node_modules/mkdirp/test/perm_sync.js
deps/npm/node_modules/mkdirp/test/race.js
deps/npm/node_modules/mkdirp/test/rel.js
deps/npm/node_modules/mkdirp/test/root.js
deps/npm/node_modules/mkdirp/test/sync.js
deps/npm/node_modules/mkdirp/test/umask.js
deps/npm/node_modules/mkdirp/test/umask_sync.js
deps/npm/node_modules/node-gyp/addon.gypi
deps/npm/node_modules/node-gyp/lib/build.js
deps/npm/node_modules/node-gyp/lib/install.js
deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c [deleted file]
deps/npm/node_modules/normalize-package-data/README.md
deps/npm/node_modules/normalize-package-data/lib/fixer.js
deps/npm/node_modules/normalize-package-data/lib/normalize.js
deps/npm/node_modules/normalize-package-data/lib/warning_messages.json
deps/npm/node_modules/normalize-package-data/package.json
deps/npm/node_modules/normalize-package-data/test/fixtures/read-package-json.json
deps/npm/node_modules/normalize-package-data/test/normalize.js
deps/npm/node_modules/normalize-package-data/test/typo.js
deps/npm/node_modules/once/LICENSE
deps/npm/node_modules/once/package.json
deps/npm/node_modules/request/.eslintrc [deleted file]
deps/npm/node_modules/request/node_modules/bl/.jshintrc [deleted file]
deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc [deleted file]
deps/npm/node_modules/request/node_modules/isstream/.jshintrc [deleted file]
deps/npm/node_modules/request/node_modules/qs/.jshintrc [deleted file]
deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc [deleted file]
deps/npm/node_modules/rimraf/package.json
deps/npm/node_modules/rimraf/rimraf.js
deps/npm/node_modules/semver/LICENSE
deps/npm/node_modules/semver/package.json
deps/npm/node_modules/spdx/LICENSE.md [new file with mode: 0644]
deps/npm/node_modules/spdx/README.md [new file with mode: 0644]
deps/npm/node_modules/spdx/node_modules/spdx-license-ids/LICENSE [new file with mode: 0644]
deps/npm/node_modules/spdx/node_modules/spdx-license-ids/README.md [new file with mode: 0755]
deps/npm/node_modules/spdx/node_modules/spdx-license-ids/package.json [new file with mode: 0644]
deps/npm/node_modules/spdx/node_modules/spdx-license-ids/spdx-license-ids.json [new file with mode: 0644]
deps/npm/node_modules/spdx/package.json [new file with mode: 0644]
deps/npm/node_modules/spdx/source/exceptions.json [new file with mode: 0644]
deps/npm/node_modules/spdx/source/parser.generated.js [new file with mode: 0644]
deps/npm/node_modules/spdx/source/ranges.json [new file with mode: 0644]
deps/npm/node_modules/spdx/source/spdx.js [new file with mode: 0644]
deps/npm/node_modules/tar/LICENCE [deleted file]
deps/npm/node_modules/tar/LICENSE [new file with mode: 0644]
deps/npm/node_modules/tar/package.json
deps/npm/node_modules/which/README.md
deps/npm/node_modules/which/node_modules/is-absolute/LICENSE [new file with mode: 0644]
deps/npm/node_modules/which/node_modules/is-absolute/README.md [new file with mode: 0644]
deps/npm/node_modules/which/node_modules/is-absolute/index.js [new file with mode: 0644]
deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT [new file with mode: 0644]
deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/README.md [new file with mode: 0644]
deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js [new file with mode: 0644]
deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json [new file with mode: 0644]
deps/npm/node_modules/which/node_modules/is-absolute/package.json [new file with mode: 0644]
deps/npm/node_modules/which/package.json
deps/npm/node_modules/which/test/basic.js [new file with mode: 0644]
deps/npm/node_modules/which/which.js
deps/npm/package.json
deps/npm/test/fixtures/config/userconfig-with-gc
deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz [new file with mode: 0644]
deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz [new file with mode: 0644]
deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz [new file with mode: 0644]
deps/npm/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz [new file with mode: 0644]
deps/npm/test/tap/404-private-registry-scoped.js [new file with mode: 0644]
deps/npm/test/tap/404-private-registry.js [new file with mode: 0644]
deps/npm/test/tap/access.js
deps/npm/test/tap/add-remote-git-fake-windows.js
deps/npm/test/tap/add-remote-git-file.js
deps/npm/test/tap/add-remote-git-shrinkwrap.js
deps/npm/test/tap/add-remote-git.js
deps/npm/test/tap/bin.js [new file with mode: 0644]
deps/npm/test/tap/builtin-config.js
deps/npm/test/tap/bundled-dependencies-nonarray.js
deps/npm/test/tap/cache-add-unpublished.js
deps/npm/test/tap/config-meta.js
deps/npm/test/tap/dedupe-scoped.js
deps/npm/test/tap/gently-rm-overeager.js
deps/npm/test/tap/gently-rm-symlink.js
deps/npm/test/tap/git-dependency-install-link.js
deps/npm/test/tap/git-npmignore.js
deps/npm/test/tap/git-races.js [new file with mode: 0644]
deps/npm/test/tap/graceful-restart.js
deps/npm/test/tap/install-bad-man.js
deps/npm/test/tap/install-man.js
deps/npm/test/tap/link.js
deps/npm/test/tap/ls-l-depth-0.js
deps/npm/test/tap/noargs-install-config-save.js
deps/npm/test/tap/optional-metadep-rollback-collision.js
deps/npm/test/tap/outdated-local.js
deps/npm/test/tap/outdated-private.js
deps/npm/test/tap/peer-deps-invalid.js
deps/npm/test/tap/peer-deps-without-package-json.js
deps/npm/test/tap/publish-config.js
deps/npm/test/tap/registry.js
deps/npm/test/tap/run-script.js
deps/npm/test/tap/scripts-whitespace-windows.js
deps/npm/test/tap/shrinkwrap-local-dependency.js
deps/npm/test/tap/unpublish-config.js
deps/npm/test/tap/update-index.js

diff --git a/deps/npm/.eslintrc b/deps/npm/.eslintrc
deleted file mode 100644 (file)
index 3c262a6..0000000
+++ /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
-  }
-}
index bad45ce..a56ba09 100644 (file)
@@ -272,3 +272,10 @@ Jakob Krigovsky <jakob.krigovsky@gmail.com>
 Charmander <~@charmander.me>
 erik wienhold <git@ewie.name>
 James Butler <james.butler@sandfox.co.uk>
+Kevin Kragenbrink <kevin@gaikai.com>
+Arnaud Rinquin <rinquin.arnaud@gmail.com>
+Mike MacCana <mike.maccana@gmail.com>
+Antti Mattila <anttti@fastmail.fm>
+laiso <laiso@lai.so>
+Matt Zorn <zornme@gmail.com>
+Kyle Mitchell <kyle@kemitchell.com>
index 52ff704..5653625 100644 (file)
@@ -1,3 +1,255 @@
+### 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!
+
+The first item below is actually a pretty big deal, as it fixes (with a
+one-word change and a much, much longer test case (thanks again,
+[@iarna](https://github.com/iarna))) a regression that's been around for months
+now. If you're depending on multiple branches of a single git dependency in a
+single project, you probably want to check out `npm@2.9.1` and verify that
+things (again?) work correctly in your project.
+
+* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313)
+  [#7202](https://github.com/npm/npm/issues/7202) When caching git
+  dependencies, do so by the whole URL, including the branch name, so that if a
+  single application depends on multiple branches from the same repository (in
+  practice, multiple version tags), every install is of the correct version,
+  instead of reusing whichever branch the caching process happened to check out
+  first.  ([@iarna](https://github.com/iarna))
+* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf)
+  [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket,
+  GitHub, and Gitlab dependencies are installed the same way as non-hosted git
+  dependencies, fixing `npm install --link`.
+  ([@laiso](https://github.com/laiso))
+
+#### DOCUMENTATION FIXES AND TWEAKS
+
+These changes may seem simple and small (except Lin's fix to the package name
+restrictions, which was more an egregious oversight on our part), but cleaner
+documentation makes npm significantly more pleasant to use. I really appreciate
+all the typo fixes, clarifications, and formatting tweaks people send us, and
+am delighted that we get so many of these pull requests. Thanks, everybody!
+
+* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291)
+  [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to
+  clearly document the full restrictions on package names.
+  [@linclark](https://github.com/linclark) has now fixed that, although we will
+  take with us to our graves the reasons why the maximum package name length is 214
+  characters (well, OK, it was that that was the longest name in the registry
+  when we decided to put a cap on the name length).
+  ([@linclark](https://github.com/linclark))
+* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936)
+  [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap`
+  documentation use code formatting for examples consistently. It would be
+  great to do this for more commands HINT HINT.
+  ([@RichardLitt](https://github.com/RichardLitt))
+* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc)
+  [#8105](https://github.com/npm/npm/issues/8105) Document that the global
+  `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`.
+  ([@anttti](https://github.com/anttti))
+* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621)
+  [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run
+  build` directly (hint: it's different from `npm build`!).
+  ([@mikemaccana](https://github.com/mikemaccana))
+* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383)
+  [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm
+  mailing list address out of `package.json`. It seems that people don't have
+  much trouble figuring out how to report errors to npm.
+  ([@robertkowalski](https://github.com/robertkowalski))
+
+#### ENROBUSTIFICATIONMENT
+
+* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9)
+  [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion
+  will only suggest run scripts, instead of including dependencies. If for some
+  reason you still wanted it to suggest dependencies, let us know.
+  ([@mantoni](https://github.com/mantoni))
+* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804)
+  [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the
+  environment's `PATH` in a platform-neutral way.
+  ([@watilde](https://github.com/watilde))
+* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3)
+  [#8094](https://github.com/npm/npm/issues/8094) When we refactored the
+  configuration code to split out checking for IPv4 local addresses, we
+  inadvertently completely broke it by failing to return the values. In
+  addition, just the call to `os.getInterfaces()` could throw on systems where
+  querying the network configuration requires elevated privileges (e.g. Amazon
+  Lambda). Add the return, and trap errors so they don't cause npm to explode.
+  Thanks to [@mhart](https://github.com/mhart) for bringing this to our
+  attention! ([@othiym23](https://github.com/othiym23))
+
+#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT
+
+* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37)
+  `rimraf@2.3.3`: More informative assertions on argument validation failure.
+  ([@isaacs](https://github.com/isaacs))
+* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb)
+  `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct
+  all along. ([@isaacs](https://github.com/isaacs))
+* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59)
+  `minimatch@2.0.7`: Feature detection and test improvements.
+  ([@isaacs](https://github.com/isaacs))
+* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329)
+  `nock@1.7.1` ([@pgte](https://github.com/pgte))
+
 ### v2.9.0 (2015-04-23):
 
 This week was kind of a breather to concentrate on fixing up the tests on the
index 15655f3..365d80d 100644 (file)
@@ -235,7 +235,7 @@ authors:
        git add AUTHORS &&\
        git commit -m "update AUTHORS" || true
 
-publish: link doc authors
+publish: authors link doc
        @git push origin :v$(shell npm -v) 2>&1 || true
        git clean -fd &&\
        git push origin $(BRANCH) &&\
index 53813c1..4d3467a 100644 (file)
@@ -12,7 +12,10 @@ npm-build(1) -- Build a package
 
 This is the plumbing command called by `npm link` and `npm install`.
 
-It should generally not be called directly.
+It should generally be called during installation, but if you need to run it
+directly, run:
+
+    npm run-script build
 
 ## SEE ALSO
 
index 6c732c4..b2f4e07 100644 (file)
@@ -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 <githubname>/<githubrepo>`:
+* `npm install <git remote url>`:
 
-    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:
+          <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit-ish>]
 
-          npm install mygithubuser/myproject
+    `<protocol>` is one of `git`, `git+ssh`, `git+http`, or
+    `git+https`.  If no `<commit-ish>` 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:<githubname>/<githubrepo>`:
+          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 <githubname>/<githubrepo>[#<commit-ish>]`:
+* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:
 
-    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:[<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:
 
index e17afcd..d781a68 100644 (file)
@@ -9,10 +9,10 @@ npm-shrinkwrap(1) -- Lock down dependency versions
 
 This command locks down the versions of a package's dependencies so
 that you can control exactly which versions of each dependency will be
-used when your package is installed. The "package.json" file is still
-required if you want to use "npm install".
+used when your package is installed. The `package.json` file is still
+required if you want to use `npm install`.
 
-By default, "npm install" recursively installs the target's
+By default, `npm install` recursively installs the target's
 dependencies (as specified in package.json), choosing the latest
 available version that satisfies the dependency's semver pattern. In
 some situations, particularly when shipping software where each change
@@ -53,13 +53,13 @@ and package C:
     }
 
 If these are the only versions of A, B, and C available in the
-registry, then a normal "npm install A" will install:
+registry, then a normal `npm install A` will install:
 
     A@0.1.0
     `-- B@0.0.1
         `-- C@0.0.1
 
-However, if B@0.0.2 is published, then a fresh "npm install A" will
+However, if B@0.0.2 is published, then a fresh `npm install A` will
 install:
 
     A@0.1.0
@@ -96,7 +96,7 @@ This generates npm-shrinkwrap.json, which will look something like this:
     }
 
 The shrinkwrap command has locked down the dependencies based on
-what's currently installed in node_modules.  When "npm install"
+what's currently installed in node_modules.  When `npm install`
 installs a package with a npm-shrinkwrap.json file in the package
 root, the shrinkwrap file (rather than package.json files) completely
 drives the installation of that package and all of its dependencies
@@ -109,31 +109,31 @@ files.
 ### Using shrinkwrapped packages
 
 Using a shrinkwrapped package is no different than using any other
-package: you can "npm install" it by hand, or add a dependency to your
-package.json file and "npm install" it.
+package: you can `npm install` it by hand, or add a dependency to your
+package.json file and `npm install` it.
 
 ### Building shrinkwrapped packages
 
 To shrinkwrap an existing package:
 
-1. Run "npm install" in the package root to install the current
+1. Run `npm install` in the package root to install the current
    versions of all dependencies.
 2. Validate that the package works as expected with these versions.
-3. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish
+3. Run `npm shrinkwrap`, add npm-shrinkwrap.json to git, and publish
    your package.
 
 To add or update a dependency in a shrinkwrapped package:
 
-1. Run "npm install" in the package root to install the current
+1. Run `npm install` in the package root to install the current
    versions of all dependencies.
-2. Add or update dependencies. "npm install" each new or updated
+2. Add or update dependencies. `npm install` each new or updated
    package individually and then update package.json.  Note that they
    must be explicitly named in order to be installed: running `npm
    install` with no arguments will merely reproduce the existing
    shrinkwrap.
 3. Validate that the package works as expected with the new
    dependencies.
-4. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and
+4. Run `npm shrinkwrap`, commit the new npm-shrinkwrap.json, and
    publish your package.
 
 You can use npm-outdated(1) to view dependencies with newer versions
@@ -142,13 +142,13 @@ available.
 ### Other Notes
 
 A shrinkwrap file must be consistent with the package's package.json
-file. "npm shrinkwrap" will fail if required dependencies are not
+file. `npm shrinkwrap` will fail if required dependencies are not
 already installed, since that would result in a shrinkwrap that
 wouldn't actually work. Similarly, the command will fail if there are
 extraneous packages (not referenced by package.json), since that would
 indicate that package.json is not correct.
 
-Since "npm shrinkwrap" is intended to lock down your dependencies for
+Since `npm shrinkwrap` is intended to lock down your dependencies for
 production use, `devDependencies` will not be included unless you
 explicitly set the `--dev` flag when you run `npm shrinkwrap`.  If
 installed `devDependencies` are excluded, then npm will print a
index a3eb438..345052b 100644 (file)
@@ -17,7 +17,7 @@ The four relevant files are:
 
 * per-project config file (/path/to/my/project/.npmrc)
 * per-user config file (~/.npmrc)
-* global config file ($PREFIX/npmrc)
+* global config file ($PREFIX/etc/npmrc)
 * npm builtin config file (/path/to/npm/npmrc)
 
 All npm config files are an ini-formatted list of `key = value`
index b1c8f21..0f091bc 100644 (file)
@@ -17,14 +17,23 @@ them.  The name and version together form an identifier that is assumed
 to be completely unique.  Changes to the package should come along with
 changes to the version.
 
-The name is what your thing is called.  Some tips:
+The name is what your thing is called.
 
+Some rules:
+
+* The name must be shorter than 214 characters. This includes the scope for
+  scoped packages.
+* The name can't start with a dot or an underscore.
+* New packages must not have uppercase letters in the name.
+* The name ends up being part of a URL, an argument on the command line, and a
+  folder name. Therefore, the name can't contain any non-URL-safe characters.
+
+Some tips:
+
+* Don't use the same name as a core Node module.
 * Don't put "js" or "node" in the name.  It's assumed that it's js, since you're
   writing a package.json file, and you can specify the engine using the "engines"
   field.  (See below.)
-* The name ends up being part of a URL, an argument on the command line, and a
-  folder name. Any name with non-url-safe characters will be rejected.
-  Also, it can't start with a dot or an underscore.
 * The name will probably be passed as an argument to require(), so it should
   be something short, but also reasonably descriptive.
 * You may want to check the npm registry to see if there's something by that name
@@ -89,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" }
 
@@ -99,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
 
index b0487f6..bfc978f 100644 (file)
@@ -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.
 
index b398935..86b948a 100644 (file)
@@ -126,7 +126,7 @@ specific purpose, or lack of malice in any given npm package.</p>
 <p>If you have a complaint about a package in the public npm registry,
 and cannot <a href="https://docs.npmjs.com/misc/disputes">resolve it with the package
 owner</a>, please email
-<a href="&#x6d;&#97;&#x69;&#x6c;&#x74;&#x6f;&#58;&#115;&#117;&#x70;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#111;&#109;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#111;&#109;</a> and explain the situation.</p>
+<a href="&#109;&#97;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#x73;&#117;&#112;&#112;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#109;&#x6a;&#x73;&#46;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#112;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#109;&#x6a;&#x73;&#46;&#99;&#x6f;&#x6d;</a> and explain the situation.</p>
 <p>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.</p>
@@ -169,5 +169,5 @@ will no doubt tell you to put the output in a gist or email.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@2.9.0</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@2.10.1</p>
 
index 22b1594..1a025d4 100644 (file)
@@ -28,5 +28,5 @@ to the <code>npm.bin</code> property.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-bin &mdash; npm@2.9.0</p>
+<p id="footer">npm-bin &mdash; npm@2.10.1</p>
 
index 5af9273..227cf6c 100644 (file)
@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-bugs &mdash; npm@2.9.0</p>
+<p id="footer">npm-bugs &mdash; npm@2.10.1</p>
 
index 7019262..0c304cc 100644 (file)
@@ -42,5 +42,5 @@ incrementation.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-cache &mdash; npm@2.9.0</p>
+<p id="footer">npm-cache &mdash; npm@2.10.1</p>
 
index 570d674..a9745c9 100644 (file)
@@ -36,5 +36,5 @@ usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-commands &mdash; npm@2.9.0</p>
+<p id="footer">npm-commands &mdash; npm@2.10.1</p>
 
index 4374a67..13cbad9 100644 (file)
@@ -57,5 +57,5 @@ functions instead.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-config &mdash; npm@2.9.0</p>
+<p id="footer">npm-config &mdash; npm@2.10.1</p>
 
index e1bc622..fd37285 100644 (file)
@@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-deprecate &mdash; npm@2.9.0</p>
+<p id="footer">npm-deprecate &mdash; npm@2.10.1</p>
 
index 2c17d9b..9a7f28b 100644 (file)
@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-docs &mdash; npm@2.9.0</p>
+<p id="footer">npm-docs &mdash; npm@2.10.1</p>
 
index 5b6c09b..9dd67f6 100644 (file)
@@ -36,5 +36,5 @@ and how this is used.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-edit &mdash; npm@2.9.0</p>
+<p id="footer">npm-edit &mdash; npm@2.10.1</p>
 
index d4ef21d..0fd2598 100644 (file)
@@ -31,5 +31,5 @@ sure to use <code>npm rebuild &lt;pkg&gt;</code> if you make any changes.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-explore &mdash; npm@2.9.0</p>
+<p id="footer">npm-explore &mdash; npm@2.10.1</p>
 
index 8a1edc6..3d420df 100644 (file)
@@ -44,5 +44,5 @@ Name of the file that matched</li>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-help-search &mdash; npm@2.9.0</p>
+<p id="footer">npm-help-search &mdash; npm@2.10.1</p>
 
index aa15528..2d876d1 100644 (file)
@@ -39,5 +39,5 @@ then go ahead and use this programmatically.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-init &mdash; npm@2.9.0</p>
+<p id="footer">npm-init &mdash; npm@2.10.1</p>
 
index 525a07f..b2e8011 100644 (file)
@@ -32,5 +32,5 @@ installed or when an error has been encountered.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-install &mdash; npm@2.9.0</p>
+<p id="footer">npm-install &mdash; npm@2.10.1</p>
 
index d4e2d7f..355f06b 100644 (file)
@@ -42,5 +42,5 @@ the package in the current working directory</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-link &mdash; npm@2.9.0</p>
+<p id="footer">npm-link &mdash; npm@2.10.1</p>
 
index a77d290..c830e87 100644 (file)
@@ -37,5 +37,5 @@ config object.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-load &mdash; npm@2.9.0</p>
+<p id="footer">npm-load &mdash; npm@2.10.1</p>
 
index 809202f..069b357 100644 (file)
@@ -63,5 +63,5 @@ dependency will only be output once.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-ls &mdash; npm@2.9.0</p>
+<p id="footer">npm-ls &mdash; npm@2.10.1</p>
 
index 76f7c8c..61bf763 100644 (file)
@@ -28,5 +28,5 @@ currently outdated.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-outdated &mdash; npm@2.9.0</p>
+<p id="footer">npm-outdated &mdash; npm@2.10.1</p>
 
index 9e782a5..a62c188 100644 (file)
@@ -47,5 +47,5 @@ that is not implemented at this time.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-owner &mdash; npm@2.9.0</p>
+<p id="footer">npm-owner &mdash; npm@2.10.1</p>
 
index b137da8..2383065 100644 (file)
@@ -33,5 +33,5 @@ overwritten the second time.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-pack &mdash; npm@2.9.0</p>
+<p id="footer">npm-pack &mdash; npm@2.10.1</p>
 
index 2ad3f0e..01cc635 100644 (file)
@@ -29,5 +29,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-prefix &mdash; npm@2.9.0</p>
+<p id="footer">npm-prefix &mdash; npm@2.10.1</p>
 
index 1b94f68..26810c3 100644 (file)
@@ -30,5 +30,5 @@ package&#39;s dependencies list.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-prune &mdash; npm@2.9.0</p>
+<p id="footer">npm-prune &mdash; npm@2.10.1</p>
 
index 0ba0f39..8d2af0d 100644 (file)
@@ -46,5 +46,5 @@ the registry.  Overwrites when the &quot;force&quot; environment variable is set
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-publish &mdash; npm@2.9.0</p>
+<p id="footer">npm-publish &mdash; npm@2.10.1</p>
 
index 6cbe44e..9ab09d5 100644 (file)
@@ -30,5 +30,5 @@ the new binary. If no &#39;packages&#39; parameter is specify, every package wil
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-rebuild &mdash; npm@2.9.0</p>
+<p id="footer">npm-rebuild &mdash; npm@2.10.1</p>
 
index 6e2b20f..77fb30c 100644 (file)
@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-repo &mdash; npm@2.9.0</p>
+<p id="footer">npm-repo &mdash; npm@2.10.1</p>
 
index 18f3bc1..0cb6c9c 100644 (file)
@@ -52,5 +52,5 @@ behavior will be accompanied by an increase in major version number</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-restart &mdash; npm@2.9.0</p>
+<p id="footer">npm-restart &mdash; npm@2.10.1</p>
 
index b7598bb..9f8a355 100644 (file)
@@ -29,5 +29,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-root &mdash; npm@2.9.0</p>
+<p id="footer">npm-root &mdash; npm@2.10.1</p>
 
index 0082a39..26f62e9 100644 (file)
@@ -41,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-run-script &mdash; npm@2.9.0</p>
+<p id="footer">npm-run-script &mdash; npm@2.10.1</p>
 
index c5820a8..16fa84d 100644 (file)
@@ -53,5 +53,5 @@ like).</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-search &mdash; npm@2.9.0</p>
+<p id="footer">npm-search &mdash; npm@2.10.1</p>
 
index f473d33..77715d7 100644 (file)
@@ -33,5 +33,5 @@ been saved.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-shrinkwrap &mdash; npm@2.9.0</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@2.10.1</p>
 
index 7128cf2..e39d4e2 100644 (file)
@@ -28,5 +28,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-start &mdash; npm@2.9.0</p>
+<p id="footer">npm-start &mdash; npm@2.10.1</p>
 
index 27e3184..de97718 100644 (file)
@@ -28,5 +28,5 @@ in the <code>packages</code> parameter.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-stop &mdash; npm@2.9.0</p>
+<p id="footer">npm-stop &mdash; npm@2.10.1</p>
 
diff --git a/deps/npm/html/doc/api/npm-submodule.html b/deps/npm/html/doc/api/npm-submodule.html
deleted file mode 100644 (file)
index 3536440..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<!doctype html>
-<html>
-  <title>npm-submodule</title>
-  <meta http-equiv="content-type" value="text/html;utf-8">
-  <link rel="stylesheet" type="text/css" href="../../static/style.css">
-  <link rel="canonical" href="https://www.npmjs.org/doc/api/npm-submodule.html">
-  <script async=true src="../../static/toc.js"></script>
-
-  <body>
-    <div id="wrapper">
-
-<h1><a href="../api/npm-submodule.html">npm-submodule</a></h1> <p>Add a package as a git submodule</p>
-<h2 id="synopsis">SYNOPSIS</h2>
-<pre><code>npm.commands.submodule(packages, callback)
-</code></pre><h2 id="description">DESCRIPTION</h2>
-<p>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
-<code>node_modules/&lt;pkg name&gt;</code>.</p>
-<p>This is a convenience only.  From then on, it&#39;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 <code>.git</code> subfolder
-in it.</p>
-<p>This command also does not install missing dependencies, if the package
-does not include them in its git repository.  If <code>npm ls</code> reports that
-things are missing, you can either install, link, or submodule them yourself,
-or you can do <code>npm explore &lt;pkgname&gt; -- npm install</code> to install the
-dependencies into the submodule folder.</p>
-<h2 id="see-also">SEE ALSO</h2>
-<ul>
-<li>npm help json</li>
-<li>git help submodule</li>
-</ul>
-
-</div>
-
-<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
-<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
-<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
-<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
-<tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
-<tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
-<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
-<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
-</table>
-<p id="footer">npm-submodule &mdash; npm@1.4.28</p>
-
index d71473e..a7a8e47 100644 (file)
@@ -36,5 +36,5 @@ used. For more information about how to set this config, check
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-tag &mdash; npm@2.9.0</p>
+<p id="footer">npm-tag &mdash; npm@2.10.1</p>
 
index c1f1174..9f8a9d1 100644 (file)
@@ -30,5 +30,5 @@ in the <code>packages</code> parameter.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-test &mdash; npm@2.9.0</p>
+<p id="footer">npm-test &mdash; npm@2.10.1</p>
 
index 13e084c..30133eb 100644 (file)
@@ -30,5 +30,5 @@ uninstalled or when an error has been encountered.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-uninstall &mdash; npm@2.9.0</p>
+<p id="footer">npm-uninstall &mdash; npm@2.10.1</p>
 
index 0616bda..aa75a23 100644 (file)
@@ -33,5 +33,5 @@ the root package entry is removed from the registry entirely.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-unpublish &mdash; npm@2.9.0</p>
+<p id="footer">npm-unpublish &mdash; npm@2.10.1</p>
 
index d7da1eb..be50788 100644 (file)
@@ -33,5 +33,5 @@ parameter will be called when done or when an error occurs.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-update &mdash; npm@2.9.0</p>
+<p id="footer">npm-update &mdash; npm@2.10.1</p>
 
index 0fe37d2..a0fd511 100644 (file)
@@ -32,5 +32,5 @@ not have exactly one element. The only element should be a version number.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-version &mdash; npm@2.9.0</p>
+<p id="footer">npm-version &mdash; npm@2.10.1</p>
 
index 50372ce..89c3b74 100644 (file)
@@ -81,5 +81,5 @@ the field name.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-view &mdash; npm@2.9.0</p>
+<p id="footer">npm-view &mdash; npm@2.10.1</p>
 
index df07797..1d03071 100644 (file)
@@ -29,5 +29,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-whoami &mdash; npm@2.9.0</p>
+<p id="footer">npm-whoami &mdash; npm@2.10.1</p>
 
index ac39fa7..7b57fcd 100644 (file)
@@ -23,7 +23,7 @@ npm.load([configObject, ]function (er, npm) {
   npm.commands.install([&quot;package&quot;], cb)
 })
 </code></pre><h2 id="version">VERSION</h2>
-<p>2.9.0</p>
+<p>2.10.1</p>
 <h2 id="description">DESCRIPTION</h2>
 <p>This is the API documentation for npm.
 To find documentation of the command line
@@ -109,5 +109,5 @@ method names.  Use the <code>npm.deref</code> method to find the real name.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm &mdash; npm@2.9.0</p>
+<p id="footer">npm &mdash; npm@2.10.1</p>
 
index d17e739..e7a604b 100644 (file)
@@ -75,5 +75,5 @@ with an HTTP 402 status code (logically enough), unless you use
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-access &mdash; npm@2.9.0</p>
+<p id="footer">npm-access &mdash; npm@2.10.1</p>
 
index c4e7b57..1175859 100644 (file)
@@ -68,5 +68,5 @@ precedence over any global configuration.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-adduser &mdash; npm@2.9.0</p>
+<p id="footer">npm-adduser &mdash; npm@2.10.1</p>
 
index fbb8263..d33a757 100644 (file)
@@ -35,5 +35,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-bin &mdash; npm@2.9.0</p>
+<p id="footer">npm-bin &mdash; npm@2.10.1</p>
 
index f59104f..217c972 100644 (file)
@@ -54,5 +54,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-bugs &mdash; npm@2.9.0</p>
+<p id="footer">npm-bugs &mdash; npm@2.10.1</p>
 
index 60ff425..b7b7212 100644 (file)
@@ -18,8 +18,10 @@ A folder containing a <code>package.json</code> file in its root.</li>
 </ul>
 <h2 id="description">DESCRIPTION</h2>
 <p>This is the plumbing command called by <code>npm link</code> and <code>npm install</code>.</p>
-<p>It should generally not be called directly.</p>
-<h2 id="see-also">SEE ALSO</h2>
+<p>It should generally be called during installation, but if you need to run it
+directly, run:</p>
+<pre><code>npm run-script build
+</code></pre><h2 id="see-also">SEE ALSO</h2>
 <ul>
 <li><a href="../cli/npm-install.html"><a href="../cli/npm-install.html">npm-install(1)</a></a></li>
 <li><a href="../cli/npm-link.html"><a href="../cli/npm-link.html">npm-link(1)</a></a></li>
@@ -38,5 +40,5 @@ A folder containing a <code>package.json</code> file in its root.</li>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-build &mdash; npm@2.9.0</p>
+<p id="footer">npm-build &mdash; npm@2.10.1</p>
 
index 261a96e..3343f79 100644 (file)
@@ -31,5 +31,5 @@ install packages into the local space.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-bundle &mdash; npm@2.9.0</p>
+<p id="footer">npm-bundle &mdash; npm@2.10.1</p>
 
index f53dc13..991be9f 100644 (file)
@@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-cache &mdash; npm@2.9.0</p>
+<p id="footer">npm-cache &mdash; npm@2.10.1</p>
 
index 7d6654f..7e0fc62 100644 (file)
@@ -42,5 +42,5 @@ completions based on the arguments.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-completion &mdash; npm@2.9.0</p>
+<p id="footer">npm-completion &mdash; npm@2.10.1</p>
 
index 6ae8ab1..3784723 100644 (file)
@@ -66,5 +66,5 @@ global config.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-config &mdash; npm@2.9.0</p>
+<p id="footer">npm-config &mdash; npm@2.10.1</p>
 
index c5ad9c5..ce864af 100644 (file)
@@ -63,5 +63,5 @@ versions.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-dedupe &mdash; npm@2.9.0</p>
+<p id="footer">npm-dedupe &mdash; npm@2.10.1</p>
 
index 2da3c56..8a7ec9a 100644 (file)
@@ -38,5 +38,5 @@ something like this:</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-deprecate &mdash; npm@2.9.0</p>
+<p id="footer">npm-deprecate &mdash; npm@2.10.1</p>
 
index f6e21da..1211dfe 100644 (file)
@@ -77,5 +77,5 @@ begin with a number or the letter <code>v</code>.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-dist-tag &mdash; npm@2.9.0</p>
+<p id="footer">npm-dist-tag &mdash; npm@2.10.1</p>
 
index 15ae573..be146f0 100644 (file)
@@ -56,5 +56,5 @@ the current folder and use the <code>name</code> property.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-docs &mdash; npm@2.9.0</p>
+<p id="footer">npm-docs &mdash; npm@2.10.1</p>
 
index e262c59..6a903c4 100644 (file)
@@ -49,5 +49,5 @@ or <code>&quot;notepad&quot;</code> on Windows.</li>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-edit &mdash; npm@2.9.0</p>
+<p id="footer">npm-edit &mdash; npm@2.10.1</p>
 
index 93de19e..0a85fc2 100644 (file)
@@ -49,5 +49,5 @@ Windows</li>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-explore &mdash; npm@2.9.0</p>
+<p id="footer">npm-explore &mdash; npm@2.10.1</p>
 
index 6e13cb2..afe18a7 100644 (file)
@@ -46,5 +46,5 @@ where the terms were found in the documentation.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-help-search &mdash; npm@2.9.0</p>
+<p id="footer">npm-help-search &mdash; npm@2.10.1</p>
 
index 7269d43..9f9c1de 100644 (file)
@@ -52,5 +52,5 @@ matches are equivalent to specifying a topic name.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-help &mdash; npm@2.9.0</p>
+<p id="footer">npm-help &mdash; npm@2.10.1</p>
 
index cf349e9..4b98a7b 100644 (file)
@@ -48,5 +48,5 @@ defaults and not prompt you for any options.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-init &mdash; npm@2.9.0</p>
+<p id="footer">npm-init &mdash; npm@2.10.1</p>
 
index 578af6d..c475cc7 100644 (file)
@@ -131,50 +131,50 @@ fetch the package by name if it is not valid.
 <pre><code>    npm install sax@&quot;&gt;=0.1.0 &lt;0.2.0&quot;
     npm install @myorg/privatepackage@&quot;&gt;=0.1.0 &lt;0.2.0&quot;
 </code></pre></li>
-<li><p><code>npm install &lt;githubname&gt;/&lt;githubrepo&gt;</code>:</p>
+<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
+<p>  Install a package by cloning a git remote url.  The format of the git
+  url is:</p>
+<pre><code>    &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;[:&lt;port&gt;][:/]&lt;path&gt;[#&lt;commit-ish&gt;]
+</code></pre><p>  <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
+  <code>git+https</code>.  If no <code>&lt;commit-ish&gt;</code> is specified, then <code>master</code> is
+  used.</p>
+<p>  Examples:</p>
+<pre><code>    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
+</code></pre></li>
+<li><p><code>npm install &lt;githubname&gt;/&lt;githubrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
+</li>
+<li><p><code>npm install github:&lt;githubname&gt;/&lt;githubrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://github.com/githubname/githubrepo</code> by
   attempting to clone it using <code>git</code>.</p>
-<p>  Example:</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
+<p>  Examples:</p>
 <pre><code>    npm install mygithubuser/myproject
-</code></pre><p> To reference a package in a generic git repo (not on GitHub), see git remote
- urls below.</p>
-</li>
-<li><p><code>npm install github:&lt;githubname&gt;/&lt;githubrepo&gt;</code>:</p>
-<p>  The same as the above, but explicitly marked as a GitHub dependency.</p>
-<p>  Example:</p>
-<pre><code>    npm install github:npm/npm
+    npm install github:mygithubuser/myproject
 </code></pre></li>
-<li><p><code>npm install gist:[&lt;githubname&gt;/]&lt;gistID&gt;</code>:</p>
+<li><p><code>npm install gist:[&lt;githubname&gt;/]&lt;gistID&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://gist.github.com/gistID</code> by attempting to
   clone it using <code>git</code>. The GitHub username associated with the gist is
   optional and will not be saved in <code>package.json</code> if <code>--save</code> is used.</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
 <p>  Example:</p>
 <pre><code>    npm install gist:101a11beef
 </code></pre></li>
-<li><p><code>npm install bitbucket:&lt;bitbucketname&gt;/&lt;bitbucketrepo&gt;</code>:</p>
+<li><p><code>npm install bitbucket:&lt;bitbucketname&gt;/&lt;bitbucketrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://bitbucket.org/bitbucketname/bitbucketrepo</code>
   by attempting to clone it using <code>git</code>.</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
 <p>  Example:</p>
 <pre><code>    npm install bitbucket:mybitbucketuser/myproject
 </code></pre></li>
-<li><p><code>npm install gitlab:&lt;gitlabname&gt;/&lt;gitlabrepo&gt;</code>:</p>
+<li><p><code>npm install gitlab:&lt;gitlabname&gt;/&lt;gitlabrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://gitlab.com/gitlabname/gitlabrepo</code>
   by attempting to clone it using <code>git</code>.</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
 <p>  Example:</p>
 <pre><code>    npm install gitlab:mygitlabuser/myproject
 </code></pre></li>
-<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
-<p>  Install a package by cloning a git remote url.  The format of the git
-  url is:</p>
-<pre><code>    &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]
-</code></pre><p>  <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
-  <code>git+https</code>.  If no <code>&lt;commit-ish&gt;</code> is specified, then <code>master</code> is
-  used.</p>
-<p>  Examples:</p>
-<pre><code>    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
-</code></pre></li>
 </ul>
 <p>You may combine multiple arguments, and even multiple types of arguments.
 For example:</p>
@@ -264,5 +264,5 @@ affects a real use-case, it will be investigated.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-install &mdash; npm@2.9.0</p>
+<p id="footer">npm-install &mdash; npm@2.10.1</p>
 
index b863110..022aaf4 100644 (file)
@@ -72,5 +72,5 @@ include that scope, e.g.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-link &mdash; npm@2.9.0</p>
+<p id="footer">npm-link &mdash; npm@2.10.1</p>
 
index 83e13d9..f9a4c09 100644 (file)
@@ -55,5 +55,5 @@ that registry at the same time.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-logout &mdash; npm@2.9.0</p>
+<p id="footer">npm-logout &mdash; npm@2.10.1</p>
 
index bd0b18a..0b9c8e9 100644 (file)
@@ -22,7 +22,7 @@ installed, as well as their dependencies, in a tree-structure.</p>
 limit the results to only the paths to the packages named.  Note that
 nested packages will <em>also</em> show the paths to the specified packages.
 For example, running <code>npm ls promzard</code> in npm&#39;s source tree will show:</p>
-<pre><code>npm@2.9.0 /path/to/npm
+<pre><code>npm@2.10.1 /path/to/npm
 â””─┬ init-package-json@0.0.4
   â””── promzard@0.1.5
 </code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
@@ -97,5 +97,5 @@ project.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-ls &mdash; npm@2.9.0</p>
+<p id="footer">npm-ls &mdash; npm@2.10.1</p>
 
index c679d76..8b1a867 100644 (file)
@@ -67,5 +67,5 @@ project.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-outdated &mdash; npm@2.9.0</p>
+<p id="footer">npm-outdated &mdash; npm@2.10.1</p>
 
index aeaf70c..70e8aec 100644 (file)
@@ -49,5 +49,5 @@ that is not implemented at this time.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-owner &mdash; npm@2.9.0</p>
+<p id="footer">npm-owner &mdash; npm@2.10.1</p>
 
index e032436..fa118a7 100644 (file)
@@ -41,5 +41,5 @@ overwritten the second time.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-pack &mdash; npm@2.9.0</p>
+<p id="footer">npm-pack &mdash; npm@2.10.1</p>
 
index 75e39a3..d01848a 100644 (file)
@@ -38,5 +38,5 @@ to contain a package.json file unless <code>-g</code> is also specified.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-prefix &mdash; npm@2.9.0</p>
+<p id="footer">npm-prefix &mdash; npm@2.10.1</p>
 
index cad75dd..1fce2b5 100644 (file)
@@ -39,5 +39,5 @@ packages specified in your <code>devDependencies</code>.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-prune &mdash; npm@2.9.0</p>
+<p id="footer">npm-prune &mdash; npm@2.10.1</p>
 
index ad94928..c840ff4 100644 (file)
@@ -66,5 +66,5 @@ it is removed with <a href="../cli/npm-unpublish.html"><a href="../cli/npm-unpub
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-publish &mdash; npm@2.9.0</p>
+<p id="footer">npm-publish &mdash; npm@2.10.1</p>
 
index 0daab74..f4c8435 100644 (file)
@@ -38,5 +38,5 @@ the new binary.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-rebuild &mdash; npm@2.9.0</p>
+<p id="footer">npm-rebuild &mdash; npm@2.10.1</p>
 
index ecd868f..998986f 100644 (file)
@@ -42,5 +42,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-repo &mdash; npm@2.9.0</p>
+<p id="footer">npm-repo &mdash; npm@2.10.1</p>
 
index af0b80f..f291d5a 100644 (file)
@@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-restart &mdash; npm@2.9.0</p>
+<p id="footer">npm-restart &mdash; npm@2.10.1</p>
 
index cb20f2e..a67f89a 100644 (file)
@@ -39,5 +39,5 @@ on its behalf.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-rm &mdash; npm@2.9.0</p>
+<p id="footer">npm-rm &mdash; npm@2.10.1</p>
 
index cb8e3ea..5457c3f 100644 (file)
@@ -35,5 +35,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-root &mdash; npm@2.9.0</p>
+<p id="footer">npm-root &mdash; npm@2.10.1</p>
 
index ffec40d..4d21c02 100644 (file)
@@ -56,5 +56,5 @@ you should write <code>&quot;scripts&quot;: {&quot;test&quot;: &quot;tap test/\*
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-run-script &mdash; npm@2.9.0</p>
+<p id="footer">npm-run-script &mdash; npm@2.10.1</p>
 
index ab21fb1..d402ba4 100644 (file)
@@ -49,5 +49,5 @@ fall on multiple lines.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-search &mdash; npm@2.9.0</p>
+<p id="footer">npm-search &mdash; npm@2.10.1</p>
 
index 0c7b4e5..78b7442 100644 (file)
@@ -15,9 +15,9 @@
 </code></pre><h2 id="description">DESCRIPTION</h2>
 <p>This command locks down the versions of a package&#39;s dependencies so
 that you can control exactly which versions of each dependency will be
-used when your package is installed. The &quot;package.json&quot; file is still
-required if you want to use &quot;npm install&quot;.</p>
-<p>By default, &quot;npm install&quot; recursively installs the target&#39;s
+used when your package is installed. The <code>package.json</code> file is still
+required if you want to use <code>npm install</code>.</p>
+<p>By default, <code>npm install</code> recursively installs the target&#39;s
 dependencies (as specified in package.json), choosing the latest
 available version that satisfies the dependency&#39;s semver pattern. In
 some situations, particularly when shipping software where each change
@@ -51,11 +51,11 @@ but that may be undesirable for other reasons.</p>
   &quot;version&quot;: &quot;0.0.1&quot;
 }
 </code></pre><p>If these are the only versions of A, B, and C available in the
-registry, then a normal &quot;npm install A&quot; will install:</p>
+registry, then a normal <code>npm install A</code> will install:</p>
 <pre><code>A@0.1.0
 `-- B@0.0.1
     `-- C@0.0.1
-</code></pre><p>However, if B@0.0.2 is published, then a fresh &quot;npm install A&quot; will
+</code></pre><p>However, if B@0.0.2 is published, then a fresh <code>npm install A</code> will
 install:</p>
 <pre><code>A@0.1.0
 `-- B@0.0.2
@@ -85,7 +85,7 @@ when B hasn&#39;t changed at all.</p>
   }
 }
 </code></pre><p>The shrinkwrap command has locked down the dependencies based on
-what&#39;s currently installed in node_modules.  When &quot;npm install&quot;
+what&#39;s currently installed in node_modules.  When <code>npm install</code>
 installs a package with a npm-shrinkwrap.json file in the package
 root, the shrinkwrap file (rather than package.json files) completely
 drives the installation of that package and all of its dependencies
@@ -95,41 +95,41 @@ dependencies and versions listed in A&#39;s, B&#39;s, and C&#39;s package.json
 files.</p>
 <h3 id="using-shrinkwrapped-packages">Using shrinkwrapped packages</h3>
 <p>Using a shrinkwrapped package is no different than using any other
-package: you can &quot;npm install&quot; it by hand, or add a dependency to your
-package.json file and &quot;npm install&quot; it.</p>
+package: you can <code>npm install</code> it by hand, or add a dependency to your
+package.json file and <code>npm install</code> it.</p>
 <h3 id="building-shrinkwrapped-packages">Building shrinkwrapped packages</h3>
 <p>To shrinkwrap an existing package:</p>
 <ol>
-<li>Run &quot;npm install&quot; in the package root to install the current
+<li>Run <code>npm install</code> in the package root to install the current
 versions of all dependencies.</li>
 <li>Validate that the package works as expected with these versions.</li>
-<li>Run &quot;npm shrinkwrap&quot;, add npm-shrinkwrap.json to git, and publish
+<li>Run <code>npm shrinkwrap</code>, add npm-shrinkwrap.json to git, and publish
 your package.</li>
 </ol>
 <p>To add or update a dependency in a shrinkwrapped package:</p>
 <ol>
-<li>Run &quot;npm install&quot; in the package root to install the current
+<li>Run <code>npm install</code> in the package root to install the current
 versions of all dependencies.</li>
-<li>Add or update dependencies. &quot;npm install&quot; each new or updated
+<li>Add or update dependencies. <code>npm install</code> each new or updated
 package individually and then update package.json.  Note that they
 must be explicitly named in order to be installed: running <code>npm
 install</code> with no arguments will merely reproduce the existing
 shrinkwrap.</li>
 <li>Validate that the package works as expected with the new
 dependencies.</li>
-<li>Run &quot;npm shrinkwrap&quot;, commit the new npm-shrinkwrap.json, and
+<li>Run <code>npm shrinkwrap</code>, commit the new npm-shrinkwrap.json, and
 publish your package.</li>
 </ol>
 <p>You can use <a href="../cli/npm-outdated.html"><a href="../cli/npm-outdated.html">npm-outdated(1)</a></a> to view dependencies with newer versions
 available.</p>
 <h3 id="other-notes">Other Notes</h3>
 <p>A shrinkwrap file must be consistent with the package&#39;s package.json
-file. &quot;npm shrinkwrap&quot; will fail if required dependencies are not
+file. <code>npm shrinkwrap</code> will fail if required dependencies are not
 already installed, since that would result in a shrinkwrap that
 wouldn&#39;t actually work. Similarly, the command will fail if there are
 extraneous packages (not referenced by package.json), since that would
 indicate that package.json is not correct.</p>
-<p>Since &quot;npm shrinkwrap&quot; is intended to lock down your dependencies for
+<p>Since <code>npm shrinkwrap</code> is intended to lock down your dependencies for
 production use, <code>devDependencies</code> will not be included unless you
 explicitly set the <code>--dev</code> flag when you run <code>npm shrinkwrap</code>.  If
 installed <code>devDependencies</code> are excluded, then npm will print a
@@ -164,5 +164,5 @@ contents rather than versions.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-shrinkwrap &mdash; npm@2.9.0</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@2.10.1</p>
 
index 6988717..9a5099d 100644 (file)
@@ -36,5 +36,5 @@ a vaguely positive way to show that you care.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-star &mdash; npm@2.9.0</p>
+<p id="footer">npm-star &mdash; npm@2.10.1</p>
 
index 1daaf68..9892b25 100644 (file)
@@ -37,5 +37,5 @@ you will most certainly enjoy this command.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-stars &mdash; npm@2.9.0</p>
+<p id="footer">npm-stars &mdash; npm@2.10.1</p>
 
index 2d50184..406bbc8 100644 (file)
@@ -34,5 +34,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-start &mdash; npm@2.9.0</p>
+<p id="footer">npm-start &mdash; npm@2.10.1</p>
 
index f2885fd..71c0005 100644 (file)
@@ -34,5 +34,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-stop &mdash; npm@2.9.0</p>
+<p id="footer">npm-stop &mdash; npm@2.10.1</p>
 
diff --git a/deps/npm/html/doc/cli/npm-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html
deleted file mode 100644 (file)
index 6716c4a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<!doctype html>
-<html>
-  <title>npm-submodule</title>
-  <meta http-equiv="content-type" value="text/html;utf-8">
-  <link rel="stylesheet" type="text/css" href="../../static/style.css">
-  <link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-submodule.html">
-  <script async=true src="../../static/toc.js"></script>
-
-  <body>
-    <div id="wrapper">
-
-<h1><a href="../cli/npm-submodule.html">npm-submodule</a></h1> <p>Add a package as a git submodule</p>
-<h2 id="synopsis">SYNOPSIS</h2>
-<pre><code>npm submodule &lt;pkg&gt;
-</code></pre><h2 id="description">DESCRIPTION</h2>
-<p>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
-<code>node_modules/&lt;pkg name&gt;</code>.</p>
-<p>This is a convenience only.  From then on, it&#39;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 <code>.git</code> subfolder
-in it.</p>
-<p>This command also does not install missing dependencies, if the package
-does not include them in its git repository.  If <code>npm ls</code> reports that
-things are missing, you can either install, link, or submodule them yourself,
-or you can do <code>npm explore &lt;pkgname&gt; -- npm install</code> to install the
-dependencies into the submodule folder.</p>
-<h2 id="see-also">SEE ALSO</h2>
-<ul>
-<li><a href="../files/package.json.html">package.json(5)</a></li>
-<li>git help submodule</li>
-</ul>
-
-</div>
-
-<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
-<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
-<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
-<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
-<tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
-<tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
-<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
-<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
-</table>
-<p id="footer">npm-submodule &mdash; npm@1.4.28</p>
-
index 8275bf3..f3f581c 100644 (file)
@@ -62,5 +62,5 @@ that do not begin with a number or the letter <code>v</code>.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-tag &mdash; npm@2.9.0</p>
+<p id="footer">npm-tag &mdash; npm@2.10.1</p>
 
index 223cc39..87bd232 100644 (file)
@@ -37,5 +37,5 @@ true.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-test &mdash; npm@2.9.0</p>
+<p id="footer">npm-test &mdash; npm@2.10.1</p>
 
index b14596b..86a7aae 100644 (file)
@@ -57,5 +57,5 @@ npm uninstall dtrace-provider --save-optional
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-uninstall &mdash; npm@2.9.0</p>
+<p id="footer">npm-uninstall &mdash; npm@2.10.1</p>
 
index b038c3e..7727645 100644 (file)
@@ -47,5 +47,5 @@ package again, a new version number must be used.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-unpublish &mdash; npm@2.9.0</p>
+<p id="footer">npm-unpublish &mdash; npm@2.10.1</p>
 
index d6d0648..7a090ee 100644 (file)
@@ -119,5 +119,5 @@ be <em>downgraded</em>.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-update &mdash; npm@2.9.0</p>
+<p id="footer">npm-update &mdash; npm@2.10.1</p>
 
index 0fc54b2..36f2c1d 100644 (file)
@@ -65,5 +65,5 @@ Enter passphrase:
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-version &mdash; npm@2.9.0</p>
+<p id="footer">npm-version &mdash; npm@2.10.1</p>
 
index 7e667a5..bb3104f 100644 (file)
@@ -82,5 +82,5 @@ the field name.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-view &mdash; npm@2.9.0</p>
+<p id="footer">npm-view &mdash; npm@2.10.1</p>
 
index 8557a3d..6a84ce4 100644 (file)
@@ -33,5 +33,5 @@
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-whoami &mdash; npm@2.9.0</p>
+<p id="footer">npm-whoami &mdash; npm@2.10.1</p>
 
index 4d0f8b5..fe8a3e8 100644 (file)
@@ -13,7 +13,7 @@
 <h2 id="synopsis">SYNOPSIS</h2>
 <pre><code>npm &lt;command&gt; [args]
 </code></pre><h2 id="version">VERSION</h2>
-<p>2.9.0</p>
+<p>2.10.1</p>
 <h2 id="description">DESCRIPTION</h2>
 <p>npm is the package manager for the Node JavaScript platform.  It puts
 modules in place so that node can find them, and manages dependency
@@ -110,7 +110,7 @@ easily by doing <code>npm view npm contributors</code>.</p>
 the issues list or ask on the mailing list.</p>
 <ul>
 <li><a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
-<li><a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x6e;&#112;&#109;&#45;&#x40;&#103;&#111;&#x6f;&#103;&#108;&#x65;&#103;&#114;&#111;&#x75;&#x70;&#115;&#x2e;&#x63;&#x6f;&#x6d;">&#x6e;&#112;&#109;&#45;&#x40;&#103;&#111;&#x6f;&#103;&#108;&#x65;&#103;&#114;&#111;&#x75;&#x70;&#115;&#x2e;&#x63;&#x6f;&#x6d;</a></li>
+<li><a href="&#x6d;&#97;&#x69;&#108;&#x74;&#x6f;&#58;&#110;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#108;&#x65;&#x67;&#114;&#111;&#117;&#x70;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#110;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#108;&#x65;&#x67;&#114;&#111;&#117;&#x70;&#115;&#x2e;&#99;&#x6f;&#x6d;</a></li>
 </ul>
 <h2 id="bugs">BUGS</h2>
 <p>When you find issues, please report them:</p>
@@ -118,7 +118,7 @@ the issues list or ask on the mailing list.</p>
 <li>web:
 <a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
 <li>email:
-<a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#111;&#x3a;&#110;&#112;&#109;&#45;&#64;&#x67;&#111;&#111;&#x67;&#108;&#101;&#103;&#x72;&#x6f;&#117;&#112;&#x73;&#46;&#x63;&#111;&#109;">&#110;&#112;&#109;&#45;&#64;&#x67;&#111;&#111;&#x67;&#108;&#101;&#103;&#x72;&#x6f;&#117;&#112;&#x73;&#46;&#x63;&#111;&#109;</a></li>
+<a href="&#x6d;&#x61;&#105;&#108;&#116;&#111;&#x3a;&#110;&#x70;&#109;&#x2d;&#64;&#x67;&#111;&#111;&#103;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;">&#110;&#x70;&#109;&#x2d;&#64;&#x67;&#111;&#111;&#103;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;</a></li>
 </ul>
 <p>Be sure to include <em>all</em> of the output from the npm command that didn&#39;t work
 as expected.  The <code>npm-debug.log</code> file is also helpful to provide.</p>
@@ -128,7 +128,7 @@ will no doubt tell you to put the output in a gist or email.</p>
 <p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
 <a href="https://github.com/isaacs/">isaacs</a> ::
 <a href="http://twitter.com/izs">@izs</a> ::
-<a href="&#x6d;&#x61;&#105;&#108;&#116;&#111;&#x3a;&#105;&#x40;&#x69;&#122;&#115;&#x2e;&#109;&#x65;">&#105;&#x40;&#x69;&#122;&#115;&#x2e;&#109;&#x65;</a></p>
+<a href="&#109;&#97;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#x69;&#64;&#105;&#x7a;&#115;&#46;&#109;&#101;">&#x69;&#64;&#105;&#x7a;&#115;&#46;&#109;&#101;</a></p>
 <h2 id="see-also">SEE ALSO</h2>
 <ul>
 <li><a href="../cli/npm-help.html"><a href="../cli/npm-help.html">npm-help(1)</a></a></li>
@@ -154,5 +154,5 @@ will no doubt tell you to put the output in a gist or email.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm &mdash; npm@2.9.0</p>
+<p id="footer">npm &mdash; npm@2.10.1</p>
 
index 481ac5a..3eac6ce 100644 (file)
@@ -184,5 +184,5 @@ cannot be found elsewhere.  See <code><a href="../files/package.json.html"><a hr
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-folders &mdash; npm@2.9.0</p>
+<p id="footer">npm-folders &mdash; npm@2.10.1</p>
 
index bdf40fd..2ddeedd 100644 (file)
@@ -184,5 +184,5 @@ cannot be found elsewhere.  See <code><a href="../files/package.json.html"><a hr
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-global &mdash; npm@2.9.0</p>
+<p id="footer">npm-global &mdash; npm@2.10.1</p>
 
index b0246f1..c99da5c 100644 (file)
@@ -21,14 +21,22 @@ Those are actually required, and your package won&#39;t install without
 them.  The name and version together form an identifier that is assumed
 to be completely unique.  Changes to the package should come along with
 changes to the version.</p>
-<p>The name is what your thing is called.  Some tips:</p>
+<p>The name is what your thing is called.</p>
+<p>Some rules:</p>
 <ul>
+<li>The name must be shorter than 214 characters. This includes the scope for
+scoped packages.</li>
+<li>The name can&#39;t start with a dot or an underscore.</li>
+<li>New packages must not have uppercase letters in the name.</li>
+<li>The name ends up being part of a URL, an argument on the command line, and a
+folder name. Therefore, the name can&#39;t contain any non-URL-safe characters.</li>
+</ul>
+<p>Some tips:</p>
+<ul>
+<li>Don&#39;t use the same name as a core Node module.</li>
 <li>Don&#39;t put &quot;js&quot; or &quot;node&quot; in the name.  It&#39;s assumed that it&#39;s js, since you&#39;re
 writing a package.json file, and you can specify the engine using the &quot;engines&quot;
 field.  (See below.)</li>
-<li>The name ends up being part of a URL, an argument on the command line, and a
-folder name. Any name with non-url-safe characters will be rejected.
-Also, it can&#39;t start with a dot or an underscore.</li>
 <li>The name will probably be passed as an argument to require(), so it should
 be something short, but also reasonably descriptive.</li>
 <li>You may want to check the npm registry to see if there&#39;s something by that name
@@ -72,16 +80,44 @@ you can specify the value for &quot;bugs&quot; as a simple string instead of an
 <h2 id="license">license</h2>
 <p>You should specify a license for your package so that people know how they are
 permitted to use it, and any restrictions you&#39;re placing on it.</p>
-<p>The simplest way, assuming you&#39;re using a common license such as BSD-3-Clause
-or MIT, is to just specify the standard SPDX ID of the license you&#39;re using,
-like this:</p>
+<p>If you&#39;re using a common license such as BSD-2-Clause or MIT, add a
+current SPDX license identifier for the license you&#39;re using, like this:</p>
 <pre><code>{ &quot;license&quot; : &quot;BSD-3-Clause&quot; }
 </code></pre><p>You can check <a href="https://spdx.org/licenses/">the full list of SPDX license IDs</a>.
 Ideally you should pick one that is
 <a href="http://opensource.org/licenses/alphabetical">OSI</a> approved.</p>
-<p>It&#39;s also a good idea to include a LICENSE file at the top level in
-your package.</p>
-<h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
+<p>If your package is licensed under multiple common licenses, use an <a href="http://npmjs.com/package/spdx">SPDX license
+expression syntax version 2.0 string</a>, like this:</p>
+<pre><code>{ &quot;license&quot; : &quot;(ISC OR GPL-3.0)&quot; }
+</code></pre><p>If you are using a license that hasn&#39;t been assigned an SPDX identifier, or if
+you are using a custom license, use the following valid SPDX expression:</p>
+<pre><code>{ &quot;license&quot; : &quot;LicenseRef-LICENSE&quot; }
+</code></pre><p>Then include a LICENSE file at the top level of the package.</p>
+<p>Some old packages used license objects or a &quot;licenses&quot; property containing an
+array of license objects:</p>
+<pre><code>// Not valid metadata
+{ &quot;license&quot; :
+  { &quot;type&quot; : &quot;ISC&quot;
+  , &quot;url&quot; : &quot;http://opensource.org/licenses/ISC&quot;
+  }
+}
+
+// Not valid metadata
+{ &quot;licenses&quot; :
+  [
+    { &quot;type&quot;: &quot;MIT&quot;
+    , &quot;url&quot;: &quot;http://www.opensource.org/licenses/mit-license.php&quot;
+    }
+  , { &quot;type&quot;: &quot;Apache-2.0&quot;
+    , &quot;url&quot;: &quot;http://opensource.org/licenses/apache2.0.php&quot;
+    }
+  ]
+}
+</code></pre><p>Those styles are now deprecated. Instead, use SPDX expressions, like this:</p>
+<pre><code>{ &quot;license&quot;: &quot;ISC&quot; }
+
+{ &quot;license&quot;: &quot;(MIT OR Apache-2.0)&quot; }
+</code></pre><h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
 <p>The &quot;author&quot; is one person.  &quot;contributors&quot; is an array of people.  A &quot;person&quot;
 is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &quot;email&quot;, like this:</p>
 <pre><code>{ &quot;name&quot; : &quot;Barney Rubble&quot;
@@ -502,5 +538,5 @@ ignored.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-json &mdash; npm@2.9.0</p>
+<p id="footer">npm-json &mdash; npm@2.10.1</p>
 
index e036a32..d113aed 100644 (file)
@@ -21,7 +21,7 @@ of the user and global npmrc files.</p>
 <ul>
 <li>per-project config file (/path/to/my/project/.npmrc)</li>
 <li>per-user config file (~/.npmrc)</li>
-<li>global config file ($PREFIX/npmrc)</li>
+<li>global config file ($PREFIX/etc/npmrc)</li>
 <li>npm builtin config file (/path/to/npm/npmrc)</li>
 </ul>
 <p>All npm config files are an ini-formatted list of <code>key = value</code>
@@ -77,5 +77,5 @@ manner.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npmrc &mdash; npm@2.9.0</p>
+<p id="footer">npmrc &mdash; npm@2.10.1</p>
 
index a0de09e..e914991 100644 (file)
@@ -21,14 +21,22 @@ Those are actually required, and your package won&#39;t install without
 them.  The name and version together form an identifier that is assumed
 to be completely unique.  Changes to the package should come along with
 changes to the version.</p>
-<p>The name is what your thing is called.  Some tips:</p>
+<p>The name is what your thing is called.</p>
+<p>Some rules:</p>
 <ul>
+<li>The name must be shorter than 214 characters. This includes the scope for
+scoped packages.</li>
+<li>The name can&#39;t start with a dot or an underscore.</li>
+<li>New packages must not have uppercase letters in the name.</li>
+<li>The name ends up being part of a URL, an argument on the command line, and a
+folder name. Therefore, the name can&#39;t contain any non-URL-safe characters.</li>
+</ul>
+<p>Some tips:</p>
+<ul>
+<li>Don&#39;t use the same name as a core Node module.</li>
 <li>Don&#39;t put &quot;js&quot; or &quot;node&quot; in the name.  It&#39;s assumed that it&#39;s js, since you&#39;re
 writing a package.json file, and you can specify the engine using the &quot;engines&quot;
 field.  (See below.)</li>
-<li>The name ends up being part of a URL, an argument on the command line, and a
-folder name. Any name with non-url-safe characters will be rejected.
-Also, it can&#39;t start with a dot or an underscore.</li>
 <li>The name will probably be passed as an argument to require(), so it should
 be something short, but also reasonably descriptive.</li>
 <li>You may want to check the npm registry to see if there&#39;s something by that name
@@ -72,16 +80,44 @@ you can specify the value for &quot;bugs&quot; as a simple string instead of an
 <h2 id="license">license</h2>
 <p>You should specify a license for your package so that people know how they are
 permitted to use it, and any restrictions you&#39;re placing on it.</p>
-<p>The simplest way, assuming you&#39;re using a common license such as BSD-3-Clause
-or MIT, is to just specify the standard SPDX ID of the license you&#39;re using,
-like this:</p>
+<p>If you&#39;re using a common license such as BSD-2-Clause or MIT, add a
+current SPDX license identifier for the license you&#39;re using, like this:</p>
 <pre><code>{ &quot;license&quot; : &quot;BSD-3-Clause&quot; }
 </code></pre><p>You can check <a href="https://spdx.org/licenses/">the full list of SPDX license IDs</a>.
 Ideally you should pick one that is
 <a href="http://opensource.org/licenses/alphabetical">OSI</a> approved.</p>
-<p>It&#39;s also a good idea to include a LICENSE file at the top level in
-your package.</p>
-<h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
+<p>If your package is licensed under multiple common licenses, use an <a href="http://npmjs.com/package/spdx">SPDX license
+expression syntax version 2.0 string</a>, like this:</p>
+<pre><code>{ &quot;license&quot; : &quot;(ISC OR GPL-3.0)&quot; }
+</code></pre><p>If you are using a license that hasn&#39;t been assigned an SPDX identifier, or if
+you are using a custom license, use the following valid SPDX expression:</p>
+<pre><code>{ &quot;license&quot; : &quot;LicenseRef-LICENSE&quot; }
+</code></pre><p>Then include a LICENSE file at the top level of the package.</p>
+<p>Some old packages used license objects or a &quot;licenses&quot; property containing an
+array of license objects:</p>
+<pre><code>// Not valid metadata
+{ &quot;license&quot; :
+  { &quot;type&quot; : &quot;ISC&quot;
+  , &quot;url&quot; : &quot;http://opensource.org/licenses/ISC&quot;
+  }
+}
+
+// Not valid metadata
+{ &quot;licenses&quot; :
+  [
+    { &quot;type&quot;: &quot;MIT&quot;
+    , &quot;url&quot;: &quot;http://www.opensource.org/licenses/mit-license.php&quot;
+    }
+  , { &quot;type&quot;: &quot;Apache-2.0&quot;
+    , &quot;url&quot;: &quot;http://opensource.org/licenses/apache2.0.php&quot;
+    }
+  ]
+}
+</code></pre><p>Those styles are now deprecated. Instead, use SPDX expressions, like this:</p>
+<pre><code>{ &quot;license&quot;: &quot;ISC&quot; }
+
+{ &quot;license&quot;: &quot;(MIT OR Apache-2.0)&quot; }
+</code></pre><h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
 <p>The &quot;author&quot; is one person.  &quot;contributors&quot; is an array of people.  A &quot;person&quot;
 is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &quot;email&quot;, like this:</p>
 <pre><code>{ &quot;name&quot; : &quot;Barney Rubble&quot;
@@ -502,5 +538,5 @@ ignored.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">package.json &mdash; npm@2.9.0</p>
+<p id="footer">package.json &mdash; npm@2.10.1</p>
 
index 92478fc..c62dd35 100644 (file)
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">index &mdash; npm@2.9.0</p>
+<p id="footer">index &mdash; npm@2.10.1</p>
 
index 018665f..7864690 100644 (file)
@@ -147,5 +147,5 @@ set to anything.&quot;</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-coding-style &mdash; npm@2.9.0</p>
+<p id="footer">npm-coding-style &mdash; npm@2.10.1</p>
 
index bbba033..086275a 100644 (file)
@@ -799,5 +799,5 @@ exit successfully.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-config &mdash; npm@2.9.0</p>
+<p id="footer">npm-config &mdash; npm@2.10.1</p>
 
index 9cbe948..a73ac25 100644 (file)
@@ -189,5 +189,5 @@ from a fresh checkout.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-developers &mdash; npm@2.9.0</p>
+<p id="footer">npm-developers &mdash; npm@2.10.1</p>
 
index d9c15d4..7a395ce 100644 (file)
@@ -13,7 +13,7 @@
 <h2 id="synopsis">SYNOPSIS</h2>
 <ol>
 <li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
-<li>Email the author, CC <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#x3a;&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#x6d;">&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#x6d;</a></li>
+<li>Email the author, CC <a href="&#x6d;&#97;&#x69;&#108;&#116;&#111;&#x3a;&#115;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;</a></li>
 <li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
 </ol>
 <p>Don&#39;t squat on package names.  Publish code or move out of the way.</p>
@@ -51,12 +51,12 @@ Joe&#39;s appropriate course of action in each case is the same.</p>
 owner (Bob).</li>
 <li>Joe emails Bob, explaining the situation <strong>as respectfully as
 possible</strong>, and what he would like to do with the module name.  He
-adds the npm support staff <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#111;&#58;&#115;&#117;&#x70;&#x70;&#111;&#114;&#x74;&#x40;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;">&#115;&#117;&#x70;&#x70;&#111;&#114;&#x74;&#x40;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;</a> to the CC list of
+adds the npm support staff <a href="&#109;&#x61;&#105;&#x6c;&#116;&#111;&#x3a;&#115;&#x75;&#112;&#112;&#111;&#x72;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#46;&#x63;&#111;&#109;">&#115;&#x75;&#112;&#112;&#111;&#x72;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#46;&#x63;&#111;&#109;</a> to the CC list of
 the email.  Mention in the email that Bob can run <code>npm owner add
 joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
 <li>After a reasonable amount of time, if Bob has not responded, or if
 Bob and Joe can&#39;t come to any sort of resolution, email support
-<a href="&#109;&#97;&#105;&#x6c;&#x74;&#111;&#58;&#x73;&#117;&#x70;&#112;&#111;&#114;&#116;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#111;&#114;&#116;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;</a> and we&#39;ll sort it out.  (&quot;Reasonable&quot; is
+<a href="&#x6d;&#x61;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#x73;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#109;</a> and we&#39;ll sort it out.  (&quot;Reasonable&quot; is
 usually at least 4 weeks, but extra time is allowed around common
 holidays.)</li>
 </ol>
@@ -112,5 +112,5 @@ things into it.</li>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-disputes &mdash; npm@2.9.0</p>
+<p id="footer">npm-disputes &mdash; npm@2.10.1</p>
 
index 883862f..3754a93 100644 (file)
@@ -236,7 +236,7 @@ that has a package.json in its root, or a git url.
 <p>To check if the registry is down, open up
 <a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser.  This will also tell
 you if you are just unable to access the internet for some reason.</p>
-<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#97;&#105;&#108;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#115;&#x75;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;</a>
+<p>If the registry IS down, let us know by emailing <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;</a>
 or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>.  If it&#39;s
 down for the world (and not just on your local network) then we&#39;re
 probably already being pinged about it.</p>
@@ -307,5 +307,5 @@ good folks at <a href="http://www.npmjs.com">npm, Inc.</a></p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-faq &mdash; npm@2.9.0</p>
+<p id="footer">npm-faq &mdash; npm@2.10.1</p>
 
index 1def555..196fdae 100644 (file)
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-index &mdash; npm@2.9.0</p>
+<p id="footer">npm-index &mdash; npm@2.10.1</p>
 
index 0e2cc63..9c87ab4 100644 (file)
@@ -32,9 +32,9 @@ similar) design doc to implement the APIs.</p>
 <p>If you set up continuous replication from the official CouchDB, and then
 set your internal CouchDB as the registry config, then you&#39;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
-<code>--registry</code> config for that command.</p>
+default will only publish internally. </p>
+<p>If you then want to publish a package for the whole world to see, you can
+simply override the <code>--registry</code> option for that <code>publish</code> command.</p>
 <h2 id="i-don-t-want-my-package-published-in-the-official-registry-it-s-private-">I don&#39;t want my package published in the official registry. It&#39;s private.</h2>
 <p>Set <code>&quot;private&quot;: true</code> in your package.json to prevent it from being
 published at all, or
@@ -70,5 +70,5 @@ effectively implement the entire CouchDB API anyway.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-registry &mdash; npm@2.9.0</p>
+<p id="footer">npm-registry &mdash; npm@2.10.1</p>
 
index 9eef0f8..cee6961 100644 (file)
@@ -91,5 +91,5 @@ that registry instead.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-scope &mdash; npm@2.9.0</p>
+<p id="footer">npm-scope &mdash; npm@2.10.1</p>
 
index d2ff8a4..526459e 100644 (file)
@@ -203,5 +203,5 @@ scripts is for compilation which must be done on the target architecture.</li>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">npm-scripts &mdash; npm@2.9.0</p>
+<p id="footer">npm-scripts &mdash; npm@2.10.1</p>
 
index c8d47ca..21ce3c5 100644 (file)
@@ -57,5 +57,5 @@ modules.  To track those down, you can do the following:</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">removing-npm &mdash; npm@2.9.0</p>
+<p id="footer">removing-npm &mdash; npm@2.10.1</p>
 
index e964525..ab65a6d 100644 (file)
@@ -282,5 +282,5 @@ range, use the <code>satisfies(version, range)</code> function.</p>
 <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
 <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
 </table>
-<p id="footer">semver &mdash; npm@2.9.0</p>
+<p id="footer">semver &mdash; npm@2.10.1</p>
 
index 8d3774d..303ba9a 100644 (file)
@@ -115,7 +115,7 @@ specific purpose, or lack of malice in any given npm package.</p>
 <p>If you have a complaint about a package in the public npm registry,
 and cannot <a href="https://docs.npmjs.com/misc/disputes">resolve it with the package
 owner</a>, please email
-<a href="&#x6d;&#97;&#x69;&#x6c;&#x74;&#x6f;&#58;&#115;&#117;&#x70;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#111;&#109;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#111;&#109;</a> and explain the situation.</p>
+<a href="&#109;&#97;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#x73;&#117;&#112;&#112;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#109;&#x6a;&#x73;&#46;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#112;&#x6f;&#114;&#x74;&#64;&#110;&#112;&#109;&#x6a;&#x73;&#46;&#99;&#x6f;&#x6d;</a> and explain the situation.</p>
 <p>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.</p>
diff --git a/deps/npm/html/partial/doc/api/npm-submodule.html b/deps/npm/html/partial/doc/api/npm-submodule.html
deleted file mode 100644 (file)
index 6698414..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<h1><a href="../api/npm-submodule.html">npm-submodule</a></h1> <p>Add a package as a git submodule</p>
-<h2 id="synopsis">SYNOPSIS</h2>
-<pre><code>npm.commands.submodule(packages, callback)
-</code></pre><h2 id="description">DESCRIPTION</h2>
-<p>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
-<code>node_modules/&lt;pkg name&gt;</code>.</p>
-<p>This is a convenience only.  From then on, it&#39;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 <code>.git</code> subfolder
-in it.</p>
-<p>This command also does not install missing dependencies, if the package
-does not include them in its git repository.  If <code>npm ls</code> reports that
-things are missing, you can either install, link, or submodule them yourself,
-or you can do <code>npm explore &lt;pkgname&gt; -- npm install</code> to install the
-dependencies into the submodule folder.</p>
-<h2 id="see-also">SEE ALSO</h2>
-<ul>
-<li>npm help json</li>
-<li>git help submodule</li>
-</ul>
-
index e01b00b..044a656 100644 (file)
@@ -12,7 +12,7 @@ npm.load([configObject, ]function (er, npm) {
   npm.commands.install([&quot;package&quot;], cb)
 })
 </code></pre><h2 id="version">VERSION</h2>
-<p>2.9.0</p>
+<p>2.10.1</p>
 <h2 id="description">DESCRIPTION</h2>
 <p>This is the API documentation for npm.
 To find documentation of the command line
index 51f2e32..11ba89b 100644 (file)
@@ -7,8 +7,10 @@ A folder containing a <code>package.json</code> file in its root.</li>
 </ul>
 <h2 id="description">DESCRIPTION</h2>
 <p>This is the plumbing command called by <code>npm link</code> and <code>npm install</code>.</p>
-<p>It should generally not be called directly.</p>
-<h2 id="see-also">SEE ALSO</h2>
+<p>It should generally be called during installation, but if you need to run it
+directly, run:</p>
+<pre><code>npm run-script build
+</code></pre><h2 id="see-also">SEE ALSO</h2>
 <ul>
 <li><a href="../cli/npm-install.html">npm-install(1)</a></li>
 <li><a href="../cli/npm-link.html">npm-link(1)</a></li>
index 9dc8578..1f6aef8 100644 (file)
@@ -120,50 +120,50 @@ fetch the package by name if it is not valid.
 <pre><code>    npm install sax@&quot;&gt;=0.1.0 &lt;0.2.0&quot;
     npm install @myorg/privatepackage@&quot;&gt;=0.1.0 &lt;0.2.0&quot;
 </code></pre></li>
-<li><p><code>npm install &lt;githubname&gt;/&lt;githubrepo&gt;</code>:</p>
+<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
+<p>  Install a package by cloning a git remote url.  The format of the git
+  url is:</p>
+<pre><code>    &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;[:&lt;port&gt;][:/]&lt;path&gt;[#&lt;commit-ish&gt;]
+</code></pre><p>  <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
+  <code>git+https</code>.  If no <code>&lt;commit-ish&gt;</code> is specified, then <code>master</code> is
+  used.</p>
+<p>  Examples:</p>
+<pre><code>    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
+</code></pre></li>
+<li><p><code>npm install &lt;githubname&gt;/&lt;githubrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
+</li>
+<li><p><code>npm install github:&lt;githubname&gt;/&lt;githubrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://github.com/githubname/githubrepo</code> by
   attempting to clone it using <code>git</code>.</p>
-<p>  Example:</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
+<p>  Examples:</p>
 <pre><code>    npm install mygithubuser/myproject
-</code></pre><p> To reference a package in a generic git repo (not on GitHub), see git remote
- urls below.</p>
-</li>
-<li><p><code>npm install github:&lt;githubname&gt;/&lt;githubrepo&gt;</code>:</p>
-<p>  The same as the above, but explicitly marked as a GitHub dependency.</p>
-<p>  Example:</p>
-<pre><code>    npm install github:npm/npm
+    npm install github:mygithubuser/myproject
 </code></pre></li>
-<li><p><code>npm install gist:[&lt;githubname&gt;/]&lt;gistID&gt;</code>:</p>
+<li><p><code>npm install gist:[&lt;githubname&gt;/]&lt;gistID&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://gist.github.com/gistID</code> by attempting to
   clone it using <code>git</code>. The GitHub username associated with the gist is
   optional and will not be saved in <code>package.json</code> if <code>--save</code> is used.</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
 <p>  Example:</p>
 <pre><code>    npm install gist:101a11beef
 </code></pre></li>
-<li><p><code>npm install bitbucket:&lt;bitbucketname&gt;/&lt;bitbucketrepo&gt;</code>:</p>
+<li><p><code>npm install bitbucket:&lt;bitbucketname&gt;/&lt;bitbucketrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://bitbucket.org/bitbucketname/bitbucketrepo</code>
   by attempting to clone it using <code>git</code>.</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
 <p>  Example:</p>
 <pre><code>    npm install bitbucket:mybitbucketuser/myproject
 </code></pre></li>
-<li><p><code>npm install gitlab:&lt;gitlabname&gt;/&lt;gitlabrepo&gt;</code>:</p>
+<li><p><code>npm install gitlab:&lt;gitlabname&gt;/&lt;gitlabrepo&gt;[#&lt;commit-ish&gt;]</code>:</p>
 <p>  Install the package at <code>https://gitlab.com/gitlabname/gitlabrepo</code>
   by attempting to clone it using <code>git</code>.</p>
+<p>  If you don&#39;t specify a <em>commit-ish</em> then <code>master</code> will be used.</p>
 <p>  Example:</p>
 <pre><code>    npm install gitlab:mygitlabuser/myproject
 </code></pre></li>
-<li><p><code>npm install &lt;git remote url&gt;</code>:</p>
-<p>  Install a package by cloning a git remote url.  The format of the git
-  url is:</p>
-<pre><code>    &lt;protocol&gt;://[&lt;user&gt;[:&lt;password&gt;]@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]
-</code></pre><p>  <code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
-  <code>git+https</code>.  If no <code>&lt;commit-ish&gt;</code> is specified, then <code>master</code> is
-  used.</p>
-<p>  Examples:</p>
-<pre><code>    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
-</code></pre></li>
 </ul>
 <p>You may combine multiple arguments, and even multiple types of arguments.
 For example:</p>
index 13d18f0..448aae4 100644 (file)
@@ -11,7 +11,7 @@ installed, as well as their dependencies, in a tree-structure.</p>
 limit the results to only the paths to the packages named.  Note that
 nested packages will <em>also</em> show the paths to the specified packages.
 For example, running <code>npm ls promzard</code> in npm&#39;s source tree will show:</p>
-<pre><code>npm@2.9.0 /path/to/npm
+<pre><code>npm@2.10.1 /path/to/npm
 â””─┬ init-package-json@0.0.4
   â””── promzard@0.1.5
 </code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
index 82bb81f..7857cf8 100644 (file)
@@ -4,9 +4,9 @@
 </code></pre><h2 id="description">DESCRIPTION</h2>
 <p>This command locks down the versions of a package&#39;s dependencies so
 that you can control exactly which versions of each dependency will be
-used when your package is installed. The &quot;package.json&quot; file is still
-required if you want to use &quot;npm install&quot;.</p>
-<p>By default, &quot;npm install&quot; recursively installs the target&#39;s
+used when your package is installed. The <code>package.json</code> file is still
+required if you want to use <code>npm install</code>.</p>
+<p>By default, <code>npm install</code> recursively installs the target&#39;s
 dependencies (as specified in package.json), choosing the latest
 available version that satisfies the dependency&#39;s semver pattern. In
 some situations, particularly when shipping software where each change
@@ -40,11 +40,11 @@ but that may be undesirable for other reasons.</p>
   &quot;version&quot;: &quot;0.0.1&quot;
 }
 </code></pre><p>If these are the only versions of A, B, and C available in the
-registry, then a normal &quot;npm install A&quot; will install:</p>
+registry, then a normal <code>npm install A</code> will install:</p>
 <pre><code>A@0.1.0
 `-- B@0.0.1
     `-- C@0.0.1
-</code></pre><p>However, if B@0.0.2 is published, then a fresh &quot;npm install A&quot; will
+</code></pre><p>However, if B@0.0.2 is published, then a fresh <code>npm install A</code> will
 install:</p>
 <pre><code>A@0.1.0
 `-- B@0.0.2
@@ -74,7 +74,7 @@ when B hasn&#39;t changed at all.</p>
   }
 }
 </code></pre><p>The shrinkwrap command has locked down the dependencies based on
-what&#39;s currently installed in node_modules.  When &quot;npm install&quot;
+what&#39;s currently installed in node_modules.  When <code>npm install</code>
 installs a package with a npm-shrinkwrap.json file in the package
 root, the shrinkwrap file (rather than package.json files) completely
 drives the installation of that package and all of its dependencies
@@ -84,41 +84,41 @@ dependencies and versions listed in A&#39;s, B&#39;s, and C&#39;s package.json
 files.</p>
 <h3 id="using-shrinkwrapped-packages">Using shrinkwrapped packages</h3>
 <p>Using a shrinkwrapped package is no different than using any other
-package: you can &quot;npm install&quot; it by hand, or add a dependency to your
-package.json file and &quot;npm install&quot; it.</p>
+package: you can <code>npm install</code> it by hand, or add a dependency to your
+package.json file and <code>npm install</code> it.</p>
 <h3 id="building-shrinkwrapped-packages">Building shrinkwrapped packages</h3>
 <p>To shrinkwrap an existing package:</p>
 <ol>
-<li>Run &quot;npm install&quot; in the package root to install the current
+<li>Run <code>npm install</code> in the package root to install the current
 versions of all dependencies.</li>
 <li>Validate that the package works as expected with these versions.</li>
-<li>Run &quot;npm shrinkwrap&quot;, add npm-shrinkwrap.json to git, and publish
+<li>Run <code>npm shrinkwrap</code>, add npm-shrinkwrap.json to git, and publish
 your package.</li>
 </ol>
 <p>To add or update a dependency in a shrinkwrapped package:</p>
 <ol>
-<li>Run &quot;npm install&quot; in the package root to install the current
+<li>Run <code>npm install</code> in the package root to install the current
 versions of all dependencies.</li>
-<li>Add or update dependencies. &quot;npm install&quot; each new or updated
+<li>Add or update dependencies. <code>npm install</code> each new or updated
 package individually and then update package.json.  Note that they
 must be explicitly named in order to be installed: running <code>npm
 install</code> with no arguments will merely reproduce the existing
 shrinkwrap.</li>
 <li>Validate that the package works as expected with the new
 dependencies.</li>
-<li>Run &quot;npm shrinkwrap&quot;, commit the new npm-shrinkwrap.json, and
+<li>Run <code>npm shrinkwrap</code>, commit the new npm-shrinkwrap.json, and
 publish your package.</li>
 </ol>
 <p>You can use <a href="../cli/npm-outdated.html">npm-outdated(1)</a> to view dependencies with newer versions
 available.</p>
 <h3 id="other-notes">Other Notes</h3>
 <p>A shrinkwrap file must be consistent with the package&#39;s package.json
-file. &quot;npm shrinkwrap&quot; will fail if required dependencies are not
+file. <code>npm shrinkwrap</code> will fail if required dependencies are not
 already installed, since that would result in a shrinkwrap that
 wouldn&#39;t actually work. Similarly, the command will fail if there are
 extraneous packages (not referenced by package.json), since that would
 indicate that package.json is not correct.</p>
-<p>Since &quot;npm shrinkwrap&quot; is intended to lock down your dependencies for
+<p>Since <code>npm shrinkwrap</code> is intended to lock down your dependencies for
 production use, <code>devDependencies</code> will not be included unless you
 explicitly set the <code>--dev</code> flag when you run <code>npm shrinkwrap</code>.  If
 installed <code>devDependencies</code> are excluded, then npm will print a
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 (file)
index 1e259e1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<h1><a href="../cli/npm-submodule.html">npm-submodule</a></h1> <p>Add a package as a git submodule</p>
-<h2 id="synopsis">SYNOPSIS</h2>
-<pre><code>npm submodule &lt;pkg&gt;
-</code></pre><h2 id="description">DESCRIPTION</h2>
-<p>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
-<code>node_modules/&lt;pkg name&gt;</code>.</p>
-<p>This is a convenience only.  From then on, it&#39;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 <code>.git</code> subfolder
-in it.</p>
-<p>This command also does not install missing dependencies, if the package
-does not include them in its git repository.  If <code>npm ls</code> reports that
-things are missing, you can either install, link, or submodule them yourself,
-or you can do <code>npm explore &lt;pkgname&gt; -- npm install</code> to install the
-dependencies into the submodule folder.</p>
-<h2 id="see-also">SEE ALSO</h2>
-<ul>
-<li><a href="../files/package.json.html">package.json(5)</a></li>
-<li>git help submodule</li>
-</ul>
-
index 1d547bf..da99841 100644 (file)
@@ -2,7 +2,7 @@
 <h2 id="synopsis">SYNOPSIS</h2>
 <pre><code>npm &lt;command&gt; [args]
 </code></pre><h2 id="version">VERSION</h2>
-<p>2.9.0</p>
+<p>2.10.1</p>
 <h2 id="description">DESCRIPTION</h2>
 <p>npm is the package manager for the Node JavaScript platform.  It puts
 modules in place so that node can find them, and manages dependency
@@ -99,7 +99,7 @@ easily by doing <code>npm view npm contributors</code>.</p>
 the issues list or ask on the mailing list.</p>
 <ul>
 <li><a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
-<li><a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x6e;&#112;&#109;&#45;&#x40;&#103;&#111;&#x6f;&#103;&#108;&#x65;&#103;&#114;&#111;&#x75;&#x70;&#115;&#x2e;&#x63;&#x6f;&#x6d;">&#x6e;&#112;&#109;&#45;&#x40;&#103;&#111;&#x6f;&#103;&#108;&#x65;&#103;&#114;&#111;&#x75;&#x70;&#115;&#x2e;&#x63;&#x6f;&#x6d;</a></li>
+<li><a href="&#x6d;&#97;&#x69;&#108;&#x74;&#x6f;&#58;&#110;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#108;&#x65;&#x67;&#114;&#111;&#117;&#x70;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#110;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#108;&#x65;&#x67;&#114;&#111;&#117;&#x70;&#115;&#x2e;&#99;&#x6f;&#x6d;</a></li>
 </ul>
 <h2 id="bugs">BUGS</h2>
 <p>When you find issues, please report them:</p>
@@ -107,7 +107,7 @@ the issues list or ask on the mailing list.</p>
 <li>web:
 <a href="http://github.com/npm/npm/issues">http://github.com/npm/npm/issues</a></li>
 <li>email:
-<a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#111;&#x3a;&#110;&#112;&#109;&#45;&#64;&#x67;&#111;&#111;&#x67;&#108;&#101;&#103;&#x72;&#x6f;&#117;&#112;&#x73;&#46;&#x63;&#111;&#109;">&#110;&#112;&#109;&#45;&#64;&#x67;&#111;&#111;&#x67;&#108;&#101;&#103;&#x72;&#x6f;&#117;&#112;&#x73;&#46;&#x63;&#111;&#109;</a></li>
+<a href="&#x6d;&#x61;&#105;&#108;&#116;&#111;&#x3a;&#110;&#x70;&#109;&#x2d;&#64;&#x67;&#111;&#111;&#103;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;">&#110;&#x70;&#109;&#x2d;&#64;&#x67;&#111;&#111;&#103;&#108;&#101;&#x67;&#114;&#x6f;&#x75;&#x70;&#115;&#46;&#x63;&#111;&#109;</a></li>
 </ul>
 <p>Be sure to include <em>all</em> of the output from the npm command that didn&#39;t work
 as expected.  The <code>npm-debug.log</code> file is also helpful to provide.</p>
@@ -117,7 +117,7 @@ will no doubt tell you to put the output in a gist or email.</p>
 <p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
 <a href="https://github.com/isaacs/">isaacs</a> ::
 <a href="http://twitter.com/izs">@izs</a> ::
-<a href="&#x6d;&#x61;&#105;&#108;&#116;&#111;&#x3a;&#105;&#x40;&#x69;&#122;&#115;&#x2e;&#109;&#x65;">&#105;&#x40;&#x69;&#122;&#115;&#x2e;&#109;&#x65;</a></p>
+<a href="&#109;&#97;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#x69;&#64;&#105;&#x7a;&#115;&#46;&#109;&#101;">&#x69;&#64;&#105;&#x7a;&#115;&#46;&#109;&#101;</a></p>
 <h2 id="see-also">SEE ALSO</h2>
 <ul>
 <li><a href="../cli/npm-help.html">npm-help(1)</a></li>
index ac4bfbc..055f8c4 100644 (file)
@@ -10,14 +10,22 @@ Those are actually required, and your package won&#39;t install without
 them.  The name and version together form an identifier that is assumed
 to be completely unique.  Changes to the package should come along with
 changes to the version.</p>
-<p>The name is what your thing is called.  Some tips:</p>
+<p>The name is what your thing is called.</p>
+<p>Some rules:</p>
 <ul>
+<li>The name must be shorter than 214 characters. This includes the scope for
+scoped packages.</li>
+<li>The name can&#39;t start with a dot or an underscore.</li>
+<li>New packages must not have uppercase letters in the name.</li>
+<li>The name ends up being part of a URL, an argument on the command line, and a
+folder name. Therefore, the name can&#39;t contain any non-URL-safe characters.</li>
+</ul>
+<p>Some tips:</p>
+<ul>
+<li>Don&#39;t use the same name as a core Node module.</li>
 <li>Don&#39;t put &quot;js&quot; or &quot;node&quot; in the name.  It&#39;s assumed that it&#39;s js, since you&#39;re
 writing a package.json file, and you can specify the engine using the &quot;engines&quot;
 field.  (See below.)</li>
-<li>The name ends up being part of a URL, an argument on the command line, and a
-folder name. Any name with non-url-safe characters will be rejected.
-Also, it can&#39;t start with a dot or an underscore.</li>
 <li>The name will probably be passed as an argument to require(), so it should
 be something short, but also reasonably descriptive.</li>
 <li>You may want to check the npm registry to see if there&#39;s something by that name
@@ -61,16 +69,44 @@ you can specify the value for &quot;bugs&quot; as a simple string instead of an
 <h2 id="license">license</h2>
 <p>You should specify a license for your package so that people know how they are
 permitted to use it, and any restrictions you&#39;re placing on it.</p>
-<p>The simplest way, assuming you&#39;re using a common license such as BSD-3-Clause
-or MIT, is to just specify the standard SPDX ID of the license you&#39;re using,
-like this:</p>
+<p>If you&#39;re using a common license such as BSD-2-Clause or MIT, add a
+current SPDX license identifier for the license you&#39;re using, like this:</p>
 <pre><code>{ &quot;license&quot; : &quot;BSD-3-Clause&quot; }
 </code></pre><p>You can check <a href="https://spdx.org/licenses/">the full list of SPDX license IDs</a>.
 Ideally you should pick one that is
 <a href="http://opensource.org/licenses/alphabetical">OSI</a> approved.</p>
-<p>It&#39;s also a good idea to include a LICENSE file at the top level in
-your package.</p>
-<h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
+<p>If your package is licensed under multiple common licenses, use an <a href="http://npmjs.com/package/spdx">SPDX license
+expression syntax version 2.0 string</a>, like this:</p>
+<pre><code>{ &quot;license&quot; : &quot;(ISC OR GPL-3.0)&quot; }
+</code></pre><p>If you are using a license that hasn&#39;t been assigned an SPDX identifier, or if
+you are using a custom license, use the following valid SPDX expression:</p>
+<pre><code>{ &quot;license&quot; : &quot;LicenseRef-LICENSE&quot; }
+</code></pre><p>Then include a LICENSE file at the top level of the package.</p>
+<p>Some old packages used license objects or a &quot;licenses&quot; property containing an
+array of license objects:</p>
+<pre><code>// Not valid metadata
+{ &quot;license&quot; :
+  { &quot;type&quot; : &quot;ISC&quot;
+  , &quot;url&quot; : &quot;http://opensource.org/licenses/ISC&quot;
+  }
+}
+
+// Not valid metadata
+{ &quot;licenses&quot; :
+  [
+    { &quot;type&quot;: &quot;MIT&quot;
+    , &quot;url&quot;: &quot;http://www.opensource.org/licenses/mit-license.php&quot;
+    }
+  , { &quot;type&quot;: &quot;Apache-2.0&quot;
+    , &quot;url&quot;: &quot;http://opensource.org/licenses/apache2.0.php&quot;
+    }
+  ]
+}
+</code></pre><p>Those styles are now deprecated. Instead, use SPDX expressions, like this:</p>
+<pre><code>{ &quot;license&quot;: &quot;ISC&quot; }
+
+{ &quot;license&quot;: &quot;(MIT OR Apache-2.0)&quot; }
+</code></pre><h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
 <p>The &quot;author&quot; is one person.  &quot;contributors&quot; is an array of people.  A &quot;person&quot;
 is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &quot;email&quot;, like this:</p>
 <pre><code>{ &quot;name&quot; : &quot;Barney Rubble&quot;
index 988920a..1dd7919 100644 (file)
@@ -10,7 +10,7 @@ of the user and global npmrc files.</p>
 <ul>
 <li>per-project config file (/path/to/my/project/.npmrc)</li>
 <li>per-user config file (~/.npmrc)</li>
-<li>global config file ($PREFIX/npmrc)</li>
+<li>global config file ($PREFIX/etc/npmrc)</li>
 <li>npm builtin config file (/path/to/npm/npmrc)</li>
 </ul>
 <p>All npm config files are an ini-formatted list of <code>key = value</code>
index ac4bfbc..055f8c4 100644 (file)
@@ -10,14 +10,22 @@ Those are actually required, and your package won&#39;t install without
 them.  The name and version together form an identifier that is assumed
 to be completely unique.  Changes to the package should come along with
 changes to the version.</p>
-<p>The name is what your thing is called.  Some tips:</p>
+<p>The name is what your thing is called.</p>
+<p>Some rules:</p>
 <ul>
+<li>The name must be shorter than 214 characters. This includes the scope for
+scoped packages.</li>
+<li>The name can&#39;t start with a dot or an underscore.</li>
+<li>New packages must not have uppercase letters in the name.</li>
+<li>The name ends up being part of a URL, an argument on the command line, and a
+folder name. Therefore, the name can&#39;t contain any non-URL-safe characters.</li>
+</ul>
+<p>Some tips:</p>
+<ul>
+<li>Don&#39;t use the same name as a core Node module.</li>
 <li>Don&#39;t put &quot;js&quot; or &quot;node&quot; in the name.  It&#39;s assumed that it&#39;s js, since you&#39;re
 writing a package.json file, and you can specify the engine using the &quot;engines&quot;
 field.  (See below.)</li>
-<li>The name ends up being part of a URL, an argument on the command line, and a
-folder name. Any name with non-url-safe characters will be rejected.
-Also, it can&#39;t start with a dot or an underscore.</li>
 <li>The name will probably be passed as an argument to require(), so it should
 be something short, but also reasonably descriptive.</li>
 <li>You may want to check the npm registry to see if there&#39;s something by that name
@@ -61,16 +69,44 @@ you can specify the value for &quot;bugs&quot; as a simple string instead of an
 <h2 id="license">license</h2>
 <p>You should specify a license for your package so that people know how they are
 permitted to use it, and any restrictions you&#39;re placing on it.</p>
-<p>The simplest way, assuming you&#39;re using a common license such as BSD-3-Clause
-or MIT, is to just specify the standard SPDX ID of the license you&#39;re using,
-like this:</p>
+<p>If you&#39;re using a common license such as BSD-2-Clause or MIT, add a
+current SPDX license identifier for the license you&#39;re using, like this:</p>
 <pre><code>{ &quot;license&quot; : &quot;BSD-3-Clause&quot; }
 </code></pre><p>You can check <a href="https://spdx.org/licenses/">the full list of SPDX license IDs</a>.
 Ideally you should pick one that is
 <a href="http://opensource.org/licenses/alphabetical">OSI</a> approved.</p>
-<p>It&#39;s also a good idea to include a LICENSE file at the top level in
-your package.</p>
-<h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
+<p>If your package is licensed under multiple common licenses, use an <a href="http://npmjs.com/package/spdx">SPDX license
+expression syntax version 2.0 string</a>, like this:</p>
+<pre><code>{ &quot;license&quot; : &quot;(ISC OR GPL-3.0)&quot; }
+</code></pre><p>If you are using a license that hasn&#39;t been assigned an SPDX identifier, or if
+you are using a custom license, use the following valid SPDX expression:</p>
+<pre><code>{ &quot;license&quot; : &quot;LicenseRef-LICENSE&quot; }
+</code></pre><p>Then include a LICENSE file at the top level of the package.</p>
+<p>Some old packages used license objects or a &quot;licenses&quot; property containing an
+array of license objects:</p>
+<pre><code>// Not valid metadata
+{ &quot;license&quot; :
+  { &quot;type&quot; : &quot;ISC&quot;
+  , &quot;url&quot; : &quot;http://opensource.org/licenses/ISC&quot;
+  }
+}
+
+// Not valid metadata
+{ &quot;licenses&quot; :
+  [
+    { &quot;type&quot;: &quot;MIT&quot;
+    , &quot;url&quot;: &quot;http://www.opensource.org/licenses/mit-license.php&quot;
+    }
+  , { &quot;type&quot;: &quot;Apache-2.0&quot;
+    , &quot;url&quot;: &quot;http://opensource.org/licenses/apache2.0.php&quot;
+    }
+  ]
+}
+</code></pre><p>Those styles are now deprecated. Instead, use SPDX expressions, like this:</p>
+<pre><code>{ &quot;license&quot;: &quot;ISC&quot; }
+
+{ &quot;license&quot;: &quot;(MIT OR Apache-2.0)&quot; }
+</code></pre><h2 id="people-fields-author-contributors">people fields: author, contributors</h2>
 <p>The &quot;author&quot; is one person.  &quot;contributors&quot; is an array of people.  A &quot;person&quot;
 is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &quot;email&quot;, like this:</p>
 <pre><code>{ &quot;name&quot; : &quot;Barney Rubble&quot;
index 517795e..ed9e224 100644 (file)
@@ -2,7 +2,7 @@
 <h2 id="synopsis">SYNOPSIS</h2>
 <ol>
 <li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
-<li>Email the author, CC <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#x3a;&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#x6d;">&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#x6d;</a></li>
+<li>Email the author, CC <a href="&#x6d;&#97;&#x69;&#108;&#116;&#111;&#x3a;&#115;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#x6e;&#112;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;</a></li>
 <li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
 </ol>
 <p>Don&#39;t squat on package names.  Publish code or move out of the way.</p>
@@ -40,12 +40,12 @@ Joe&#39;s appropriate course of action in each case is the same.</p>
 owner (Bob).</li>
 <li>Joe emails Bob, explaining the situation <strong>as respectfully as
 possible</strong>, and what he would like to do with the module name.  He
-adds the npm support staff <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#111;&#58;&#115;&#117;&#x70;&#x70;&#111;&#114;&#x74;&#x40;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;">&#115;&#117;&#x70;&#x70;&#111;&#114;&#x74;&#x40;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#99;&#x6f;&#109;</a> to the CC list of
+adds the npm support staff <a href="&#109;&#x61;&#105;&#x6c;&#116;&#111;&#x3a;&#115;&#x75;&#112;&#112;&#111;&#x72;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#46;&#x63;&#111;&#109;">&#115;&#x75;&#112;&#112;&#111;&#x72;&#x74;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#46;&#x63;&#111;&#109;</a> to the CC list of
 the email.  Mention in the email that Bob can run <code>npm owner add
 joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
 <li>After a reasonable amount of time, if Bob has not responded, or if
 Bob and Joe can&#39;t come to any sort of resolution, email support
-<a href="&#109;&#97;&#105;&#x6c;&#x74;&#111;&#58;&#x73;&#117;&#x70;&#112;&#111;&#114;&#116;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#111;&#114;&#116;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;</a> and we&#39;ll sort it out.  (&quot;Reasonable&quot; is
+<a href="&#x6d;&#x61;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#x73;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#109;</a> and we&#39;ll sort it out.  (&quot;Reasonable&quot; is
 usually at least 4 weeks, but extra time is allowed around common
 holidays.)</li>
 </ol>
index 8136427..5dedebd 100644 (file)
@@ -225,7 +225,7 @@ that has a package.json in its root, or a git url.
 <p>To check if the registry is down, open up
 <a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser.  This will also tell
 you if you are just unable to access the internet for some reason.</p>
-<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#97;&#105;&#108;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#115;&#x75;&#x70;&#112;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#x6d;</a>
+<p>If the registry IS down, let us know by emailing <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;</a>
 or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>.  If it&#39;s
 down for the world (and not just on your local network) then we&#39;re
 probably already being pinged about it.</p>
index 2a7c160..8dd80d4 100644 (file)
@@ -21,9 +21,9 @@ similar) design doc to implement the APIs.</p>
 <p>If you set up continuous replication from the official CouchDB, and then
 set your internal CouchDB as the registry config, then you&#39;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
-<code>--registry</code> config for that command.</p>
+default will only publish internally. </p>
+<p>If you then want to publish a package for the whole world to see, you can
+simply override the <code>--registry</code> option for that <code>publish</code> command.</p>
 <h2 id="i-don-t-want-my-package-published-in-the-official-registry-it-s-private-">I don&#39;t want my package published in the official registry. It&#39;s private.</h2>
 <p>Set <code>&quot;private&quot;: true</code> in your package.json to prevent it from being
 published at all, or
index a479a97..cf960a6 100644 (file)
@@ -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!"))
 }
index 719e887..5465112 100644 (file)
@@ -1,13 +1,14 @@
 module.exports = bin
 
 var npm = require("./npm.js")
+var osenv = require("osenv")
 
 bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)"
 
 function bin (args, silent, cb) {
   if (typeof cb !== "function") cb = silent, silent = false
   var b = npm.bin
-    , PATH = (process.env.PATH || "").split(":")
+    , PATH = osenv.path()
 
   if (!silent) console.log(b)
   process.nextTick(cb.bind(this, null, b))
index 07d5b7f..cd06aa2 100644 (file)
@@ -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)
   })
 }
 
index 3ec9c46..d4281a8 100644 (file)
@@ -115,7 +115,7 @@ function tryClone (from, combinedURL, silent, cb) {
 
   // ensure that similarly-named remotes don't collide
   var repoID = cloneURL.replace(/[^a-zA-Z0-9]+/g, '-') + '-' +
-    crypto.createHash('sha1').update(cloneURL).digest('hex').slice(0, 8)
+    crypto.createHash('sha1').update(combinedURL).digest('hex').slice(0, 8)
   var cachedRemote = path.join(remotes, repoID)
 
   cb = inflight(repoID, cb)
@@ -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
index 537658f..a90d4c2 100644 (file)
@@ -315,10 +315,20 @@ exports.types =
   , _exit : Boolean
   }
 
-function getLocalAddresses() {
-  Object.keys(os.networkInterfaces()).map(function (nic) {
-    return os.networkInterfaces()[nic].filter(function (addr) {
-      return addr.family === "IPv4"
+function getLocalAddresses () {
+  var interfaces
+  // #8094: some environments require elevated permissions to enumerate
+  // interfaces, and synchronously throw EPERM when run without
+  // elevated privileges
+  try {
+    interfaces = os.networkInterfaces()
+  } catch (e) {
+    interfaces = {}
+  }
+
+  return Object.keys(interfaces).map(function (nic) {
+    return interfaces[nic].filter(function (addr) {
+      return addr.family === 'IPv4'
     })
     .map(function (addr) {
       return addr.address
index cb1d571..942d27b 100644 (file)
@@ -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
     })
index d95cc15..4ab248a 100644 (file)
@@ -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"
+      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'
+  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
index 05166ee..c7877b9 100644 (file)
@@ -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) {
index bf72bf8..057af2b 100644 (file)
@@ -13,7 +13,6 @@ runScript.completion = function (opts, cb) {
 
   // see if there's already a package specified.
   var argv = opts.conf.argv.remain
-    , installedShallow = require("./utils/completion/installed-shallow.js")
 
   if (argv.length >= 4) return cb()
 
@@ -41,33 +40,11 @@ runScript.completion = function (opts, cb) {
     })
   }
 
-  // complete against the installed-shallow, and the pwd's scripts.
-  // but only packages that have scripts
-  var installed
-    , scripts
-  installedShallow(opts, function (d) {
-    return d.scripts
-  }, function (er, inst) {
-    installed = inst
-    next()
-  })
-
-  if (npm.config.get("global")) {
-    scripts = []
-    next()
-  }
-  else readJson(path.join(npm.localPrefix, "package.json"), function (er, d) {
+  readJson(path.join(npm.localPrefix, "package.json"), function (er, d) {
     if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
     d = d || {}
-    scripts = Object.keys(d.scripts || {})
-    next()
+    cb(null, Object.keys(d.scripts || {}))
   })
-
-  function next () {
-    if (!installed || !scripts) return
-
-    cb(null, scripts.concat(installed))
-  }
 }
 
 function runScript (args, cb) {
index d0cb3b0..23c8b1d 100644 (file)
@@ -18,7 +18,14 @@ A folder containing a \fBpackage\.json\fR file in its root\.
 .P
 This is the plumbing command called by \fBnpm link\fR and \fBnpm install\fR\|\.
 .P
-It should generally not be called directly\.
+It should generally be called during installation, but if you need to run it
+directly, run:
+.P
+.RS 2
+.nf
+npm run\-script build
+.fi
+.RE
 .SH SEE ALSO
 .RS 0
 .IP \(bu 2
index 12abe8f..5e9345c 100644 (file)
@@ -181,33 +181,48 @@ fetch the package by name if it is not valid\.
 .fi
 .RE
 .IP \(bu 2
-\fBnpm install <githubname>/<githubrepo>\fR:
-  Install the package at \fBhttps://github\.com/githubname/githubrepo\fR by
-  attempting to clone it using \fBgit\fR\|\.
-  Example:
+\fBnpm install <git remote url>\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
+    <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit\-ish>]
+.fi
+.RE
+  \fB<protocol>\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or
+  \fBgit+https\fR\|\.  If no \fB<commit\-ish>\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:<githubname>/<githubrepo>\fR:
-  The same as the above, but explicitly marked as a GitHub dependency\.
-  Example:
+\fBnpm install <githubname>/<githubrepo>[#<commit\-ish>]\fR:
+.IP \(bu 2
+\fBnpm install github:<githubname>/<githubrepo>[#<commit\-ish>]\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:[<githubname>/]<gistID>\fR:
+\fBnpm install gist:[<githubname>/]<gistID>[#<commit\-ish>]\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:<bitbucketname>/<bitbucketrepo>\fR:
+\fBnpm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit\-ish>]\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:<gitlabname>/<gitlabrepo>\fR:
+\fBnpm install gitlab:<gitlabname>/<gitlabrepo>[#<commit\-ish>]\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 <git remote url>\fR:
-  Install a package by cloning a git remote url\.  The format of the git
-  url is:
-.P
-.RS 2
-.nf
-    <protocol>://[<user>[:<password>]@]<hostname><separator><path>[#<commit\-ish>]
-.fi
-.RE
-  \fB<protocol>\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or
-  \fBgit+https\fR\|\.  If no \fB<commit\-ish>\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
index 4f896b2..32f13d8 100644 (file)
@@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show:
 .P
 .RS 2
 .nf
-npm@2.9.0 /path/to/npm
+npm@2.10.1 /path/to/npm
 â””─┬ init\-package\-json@0\.0\.4
   â””── promzard@0\.1\.5
 .fi
index 3c4538c..98440e0 100644 (file)
@@ -12,10 +12,10 @@ npm shrinkwrap
 .P
 This command locks down the versions of a package's dependencies so
 that you can control exactly which versions of each dependency will be
-used when your package is installed\. The "package\.json" file is still
-required if you want to use "npm install"\.
+used when your package is installed\. The \fBpackage\.json\fR file is still
+required if you want to use \fBnpm install\fR\|\.
 .P
-By default, "npm install" recursively installs the target's
+By default, \fBnpm install\fR recursively installs the target's
 dependencies (as specified in package\.json), choosing the latest
 available version that satisfies the dependency's semver pattern\. In
 some situations, particularly when shipping software where each change
@@ -68,7 +68,7 @@ and package C:
 .RE
 .P
 If these are the only versions of A, B, and C available in the
-registry, then a normal "npm install A" will install:
+registry, then a normal \fBnpm install A\fR will install:
 .P
 .RS 2
 .nf
@@ -78,7 +78,7 @@ A@0\.1\.0
 .fi
 .RE
 .P
-However, if B@0\.0\.2 is published, then a fresh "npm install A" will
+However, if B@0\.0\.2 is published, then a fresh \fBnpm install A\fR will
 install:
 .P
 .RS 2
@@ -127,7 +127,7 @@ This generates npm\-shrinkwrap\.json, which will look something like this:
 .RE
 .P
 The shrinkwrap command has locked down the dependencies based on
-what's currently installed in node_modules\.  When "npm install"
+what's currently installed in node_modules\.  When \fBnpm install\fR
 installs a package with a npm\-shrinkwrap\.json file in the package
 root, the shrinkwrap file (rather than package\.json files) completely
 drives the installation of that package and all of its dependencies
@@ -138,19 +138,19 @@ files\.
 .SS Using shrinkwrapped packages
 .P
 Using a shrinkwrapped package is no different than using any other
-package: you can "npm install" it by hand, or add a dependency to your
-package\.json file and "npm install" it\.
+package: you can \fBnpm install\fR it by hand, or add a dependency to your
+package\.json file and \fBnpm install\fR it\.
 .SS Building shrinkwrapped packages
 .P
 To shrinkwrap an existing package:
 .RS 0
 .IP 1. 3
-Run "npm install" in the package root to install the current
+Run \fBnpm install\fR in the package root to install the current
 versions of all dependencies\.
 .IP 2. 3
 Validate that the package works as expected with these versions\.
 .IP 3. 3
-Run "npm shrinkwrap", add npm\-shrinkwrap\.json to git, and publish
+Run \fBnpm shrinkwrap\fR, add npm\-shrinkwrap\.json to git, and publish
 your package\.
 
 .RE
@@ -158,10 +158,10 @@ your package\.
 To add or update a dependency in a shrinkwrapped package:
 .RS 0
 .IP 1. 3
-Run "npm install" in the package root to install the current
+Run \fBnpm install\fR in the package root to install the current
 versions of all dependencies\.
 .IP 2. 3
-Add or update dependencies\. "npm install" each new or updated
+Add or update dependencies\. \fBnpm install\fR each new or updated
 package individually and then update package\.json\.  Note that they
 must be explicitly named in order to be installed: running \fBnpm
 install\fR with no arguments will merely reproduce the existing
@@ -170,7 +170,7 @@ shrinkwrap\.
 Validate that the package works as expected with the new
 dependencies\.
 .IP 4. 3
-Run "npm shrinkwrap", commit the new npm\-shrinkwrap\.json, and
+Run \fBnpm shrinkwrap\fR, commit the new npm\-shrinkwrap\.json, and
 publish your package\.
 
 .RE
@@ -180,13 +180,13 @@ available\.
 .SS Other Notes
 .P
 A shrinkwrap file must be consistent with the package's package\.json
-file\. "npm shrinkwrap" will fail if required dependencies are not
+file\. \fBnpm shrinkwrap\fR will fail if required dependencies are not
 already installed, since that would result in a shrinkwrap that
 wouldn't actually work\. Similarly, the command will fail if there are
 extraneous packages (not referenced by package\.json), since that would
 indicate that package\.json is not correct\.
 .P
-Since "npm shrinkwrap" is intended to lock down your dependencies for
+Since \fBnpm shrinkwrap\fR is intended to lock down your dependencies for
 production use, \fBdevDependencies\fR will not be included unless you
 explicitly set the \fB\-\-dev\fR flag when you run \fBnpm shrinkwrap\fR\|\.  If
 installed \fBdevDependencies\fR are excluded, then npm will print a
diff --git a/deps/npm/man/man1/npm-submodule.1 b/deps/npm/man/man1/npm-submodule.1
deleted file mode 100644 (file)
index 7185333..0000000
+++ /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 <pkg>
-.
-.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/<pkg name>\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 <pkgname> \-\- 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
-
index 98991c7..9305fef 100644 (file)
@@ -10,7 +10,7 @@ npm <command> [args]
 .RE
 .SH VERSION
 .P
-2.9.0
+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 (file)
index 95739ce..0000000
+++ /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/<pkg name>\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 <pkgname> \-\- 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
-
index fd7d144..7fd9d79 100644 (file)
@@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) {
 .RE
 .SH VERSION
 .P
-2.9.0
+2.10.1
 .SH DESCRIPTION
 .P
 This is the API documentation for npm\.
index d6a3959..b0cb4e9 100644 (file)
@@ -16,17 +16,32 @@ them\.  The name and version together form an identifier that is assumed
 to be completely unique\.  Changes to the package should come along with
 changes to the version\.
 .P
-The name is what your thing is called\.  Some tips:
+The name is what your thing is called\.
+.P
+Some rules:
 .RS 0
 .IP \(bu 2
+The name must be shorter than 214 characters\. This includes the scope for
+scoped packages\.
+.IP \(bu 2
+The name can't start with a dot or an underscore\.
+.IP \(bu 2
+New packages must not have uppercase letters in the name\.
+.IP \(bu 2
+The name ends up being part of a URL, an argument on the command line, and a
+folder name\. Therefore, the name can't contain any non\-URL\-safe characters\.
+
+.RE
+.P
+Some tips:
+.RS 0
+.IP \(bu 2
+Don't use the same name as a core Node module\.
+.IP \(bu 2
 Don't put "js" or "node" in the name\.  It's assumed that it's js, since you're
 writing a package\.json file, and you can specify the engine using the "engines"
 field\.  (See below\.)
 .IP \(bu 2
-The name ends up being part of a URL, an argument on the command line, and a
-folder name\. Any name with non\-url\-safe characters will be rejected\.
-Also, it can't start with a dot or an underscore\.
-.IP \(bu 2
 The name will probably be passed as an argument to require(), so it should
 be something short, but also reasonably descriptive\.
 .IP \(bu 2
@@ -92,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
@@ -106,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"
index e670f56..eba9ab6 100644 (file)
@@ -19,7 +19,7 @@ per\-project config file (/path/to/my/project/\.npmrc)
 .IP \(bu 2
 per\-user config file (~/\.npmrc)
 .IP \(bu 2
-global config file ($PREFIX/npmrc)
+global config file ($PREFIX/etc/npmrc)
 .IP \(bu 2
 npm builtin config file (/path/to/npm/npmrc)
 
index d6a3959..b0cb4e9 100644 (file)
@@ -16,17 +16,32 @@ them\.  The name and version together form an identifier that is assumed
 to be completely unique\.  Changes to the package should come along with
 changes to the version\.
 .P
-The name is what your thing is called\.  Some tips:
+The name is what your thing is called\.
+.P
+Some rules:
 .RS 0
 .IP \(bu 2
+The name must be shorter than 214 characters\. This includes the scope for
+scoped packages\.
+.IP \(bu 2
+The name can't start with a dot or an underscore\.
+.IP \(bu 2
+New packages must not have uppercase letters in the name\.
+.IP \(bu 2
+The name ends up being part of a URL, an argument on the command line, and a
+folder name\. Therefore, the name can't contain any non\-URL\-safe characters\.
+
+.RE
+.P
+Some tips:
+.RS 0
+.IP \(bu 2
+Don't use the same name as a core Node module\.
+.IP \(bu 2
 Don't put "js" or "node" in the name\.  It's assumed that it's js, since you're
 writing a package\.json file, and you can specify the engine using the "engines"
 field\.  (See below\.)
 .IP \(bu 2
-The name ends up being part of a URL, an argument on the command line, and a
-folder name\. Any name with non\-url\-safe characters will be rejected\.
-Also, it can't start with a dot or an underscore\.
-.IP \(bu 2
 The name will probably be passed as an argument to require(), so it should
 be something short, but also reasonably descriptive\.
 .IP \(bu 2
@@ -92,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
@@ -106,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"
index c5c8448..075b85a 100644 (file)
@@ -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
index 2d26206..a092c82 100644 (file)
@@ -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"
index 0c44ae7..19129e3 100644 (file)
@@ -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.
index 983649b..fc59cfc 100644 (file)
@@ -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)
index 0bad122..c611dd5 100644 (file)
@@ -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)
index 3787ae3..19affbe 100644 (file)
@@ -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()
   })
 })
index d7816d2..f6f5109 100644 (file)
@@ -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')
 })
index c66d26f..c0eb3be 100644 (file)
@@ -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')
index 11ef0e2..94af1ae 100644 (file)
@@ -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
index a36f780..6245e6c 100644 (file)
@@ -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)
 }
index 346ac2b..820cdc8 100644 (file)
@@ -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)
 }
index 7073b88..aed9e4d 100644 (file)
@@ -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()
   }
 }
index 4720cd8..0757b28 100644 (file)
 
 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()
 }
index 5e9902a..4c803d8 100644 (file)
 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)
 }
index cd65c41..19f6a65 100644 (file)
@@ -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
index 7e7ab6c..a44dd39 100644 (file)
@@ -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
   }
 }
index 5c8f1e7..07a9abf 100644 (file)
@@ -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 () {
index a0ece34..4f431c9 100644 (file)
@@ -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])
   })
index b047663..a654462 100644 (file)
@@ -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)
index 0edb794..1d007ee 100644 (file)
@@ -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)
 }
-
index e89c173..e0456ba 100644 (file)
@@ -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
   }
 }
index 0700813..25a608d 100644 (file)
-
 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]'
 }
index 6b2de73..aa6bc1c 100644 (file)
@@ -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"
     "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"
 }
index fb42bcb..3937263 100644 (file)
@@ -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!"
 }
index e60f438..d2276e1 100644 (file)
@@ -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": {
     "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": [
     {
       "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"
 }
index 6d8d9e7..fc65f2e 100644 (file)
@@ -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 (file)
index 0000000..2180a8c
--- /dev/null
@@ -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 (file)
index 0000000..904f74b
--- /dev/null
@@ -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 valid = require('./'); -->
+
+```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 (file)
index 0000000..c8407a5
--- /dev/null
@@ -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 (file)
index 0000000..5229acd
--- /dev/null
@@ -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 (file)
index 0000000..05cd994
--- /dev/null
@@ -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
+var correct = require('./');
+-->
+
+```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 (file)
index 0000000..e3d291b
--- /dev/null
@@ -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 (file)
index 0000000..094712d
--- /dev/null
@@ -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 (file)
index 0000000..4aaad36
--- /dev/null
@@ -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!"
+}
index 97e7fc5..91a963b 100644 (file)
@@ -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"
   ]
 }
 ```
index fde5b7e..66a1d47 100644 (file)
@@ -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
index dd17dd8..65a4587 100644 (file)
@@ -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": {
     "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!"
 }
index 0a976dc..1a7dca5 100644 (file)
@@ -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
index a0acb61..4ac14cb 100644 (file)
@@ -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": {
   ],
   "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 (file)
index 0000000..87333fb
--- /dev/null
@@ -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))
+})
index 575b447..d66e7a2 100644 (file)
@@ -238,7 +238,6 @@ function isStale(self, hit) {
 function use (self, hit) {
   shiftLU(self, hit)
   hit.lu = self._mru ++
-  if (self._maxAge) hit.now = Date.now()
   self._lruList[hit.lu] = hit
 }
 
index f6c859c..1e8b1a7 100644 (file)
@@ -1,7 +1,7 @@
 {
   "name": "lru-cache",
   "description": "A cache object that deletes the least-recently-used items.",
-  "version": "2.6.1",
+  "version": "2.6.3",
   "author": {
     "name": "Isaac Z. Schlueter",
     "email": "i@izs.me"
     "type": "MIT",
     "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
   },
-  "gitHead": "ff3dfd40e437fa619f09610f45d1ac523bbf27c9",
+  "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.1",
-  "_shasum": "9933eff15453fae1d27096365143c724e85c6cbd",
-  "_from": "lru-cache@>=2.6.1 <2.7.0",
-  "_npmVersion": "2.8.1",
-  "_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": "9933eff15453fae1d27096365143c724e85c6cbd",
-    "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.1.tgz"
+    "shasum": "51ccd0b4fc0c843587d7a5709ce4d3b7629bedc5",
+    "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.6.3.tgz"
   },
   "maintainers": [
     {
@@ -52,5 +52,5 @@
     }
   ],
   "directories": {},
-  "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.1.tgz"
+  "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.3.tgz"
 }
diff --git a/deps/npm/node_modules/lru-cache/test/timeout.js b/deps/npm/node_modules/lru-cache/test/timeout.js
deleted file mode 100644 (file)
index 5dce62a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-var test = require("tap").test
-var LRU = require("../")
-
-var cache = LRU( {
-    max: 1,
-    maxAge: 500
-} );
-
-test('set the key', function (t) {
-  cache.set( "1234", 1 );
-  t.end()
-})
-
-for (var i = 0; i < 10; i ++) {
-  test('get after ' + i + '00ms', function (t) {
-    setTimeout(function () {
-      t.equal(cache.get('1234'), 1)
-      t.end()
-    }, 100)
-  })
-}
index cf58a3f..967b45c 100644 (file)
@@ -2,35 +2,36 @@
 module.exports = minimatch
 minimatch.Minimatch = Minimatch
 
-var isWindows = false
-if (typeof process !== 'undefined' && process.platform === 'win32')
-  isWindows = true
+var path = { sep: '/' }
+try {
+  path = require('path')
+} catch (er) {}
 
 var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
-  , expand = require("brace-expansion")
+var expand = require('brace-expansion')
 
-  // any single thing other than /
-  // don't need to escape / when using new RegExp()
-  , qmark = "[^/]"
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
 
-  // * => any number of characters
-  , star = qmark + "*?"
+// * => any number of characters
+var star = qmark + '*?'
 
-  // ** when dots are allowed.  Anything goes, except .. and .
-  // not (^ or / followed by one or two dots followed by $ or /),
-  // followed by anything, any number of times.
-  , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+// ** when dots are allowed.  Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
 
-  // not a ^ or / followed by a dot,
-  // followed by anything, any number of times.
-  , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
 
-  // characters that need to be escaped in RegExp.
-  , reSpecials = charSet("().*{}+?[]^$\\!")
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
 
 // "abc" -> { a:true, b:true, c:true }
 function charSet (s) {
-  return s.split("").reduce(function (set, c) {
+  return s.split('').reduce(function (set, c) {
     set[c] = true
     return set
   }, {})
@@ -81,21 +82,20 @@ Minimatch.defaults = function (def) {
   return minimatch.defaults(def).Minimatch
 }
 
-
 function minimatch (p, pattern, options) {
-  if (typeof pattern !== "string") {
-    throw new TypeError("glob pattern string required")
+  if (typeof pattern !== 'string') {
+    throw new TypeError('glob pattern string required')
   }
 
   if (!options) options = {}
 
   // shortcut: comments match nothing.
-  if (!options.nocomment && pattern.charAt(0) === "#") {
+  if (!options.nocomment && pattern.charAt(0) === '#') {
     return false
   }
 
   // "" only matches ""
-  if (pattern.trim() === "") return p === ""
+  if (pattern.trim() === '') return p === ''
 
   return new Minimatch(pattern, options).match(p)
 }
@@ -105,16 +105,17 @@ function Minimatch (pattern, options) {
     return new Minimatch(pattern, options)
   }
 
-  if (typeof pattern !== "string") {
-    throw new TypeError("glob pattern string required")
+  if (typeof pattern !== 'string') {
+    throw new TypeError('glob pattern string required')
   }
 
   if (!options) options = {}
   pattern = pattern.trim()
 
   // windows support: need to use /, not \
-  if (isWindows)
-    pattern = pattern.split("\\").join("/")
+  if (path.sep !== '/') {
+    pattern = pattern.split(path.sep).join('/')
+  }
 
   this.options = options
   this.set = []
@@ -128,7 +129,7 @@ function Minimatch (pattern, options) {
   this.make()
 }
 
-Minimatch.prototype.debug = function() {}
+Minimatch.prototype.debug = function () {}
 
 Minimatch.prototype.make = make
 function make () {
@@ -139,7 +140,7 @@ function make () {
   var options = this.options
 
   // empty patterns and comments match nothing.
-  if (!options.nocomment && pattern.charAt(0) === "#") {
+  if (!options.nocomment && pattern.charAt(0) === '#') {
     this.comment = true
     return
   }
@@ -178,7 +179,7 @@ function make () {
 
   // filter out everything that didn't compile properly.
   set = set.filter(function (s) {
-    return -1 === s.indexOf(false)
+    return s.indexOf(false) === -1
   })
 
   this.debug(this.pattern, set)
@@ -189,17 +190,17 @@ function make () {
 Minimatch.prototype.parseNegate = parseNegate
 function parseNegate () {
   var pattern = this.pattern
-    , negate = false
-    , options = this.options
-    , negateOffset = 0
+  var negate = false
+  var options = this.options
+  var negateOffset = 0
 
   if (options.nonegate) return
 
-  for ( var i = 0, l = pattern.length
-      ; i < l && pattern.charAt(i) === "!"
-      ; i ++) {
+  for (var i = 0, l = pattern.length
+    ; i < l && pattern.charAt(i) === '!'
+    ; i++) {
     negate = !negate
-    negateOffset ++
+    negateOffset++
   }
 
   if (negateOffset) this.pattern = pattern.substr(negateOffset)
@@ -224,21 +225,22 @@ Minimatch.prototype.braceExpand = braceExpand
 
 function braceExpand (pattern, options) {
   if (!options) {
-    if (this instanceof Minimatch)
+    if (this instanceof Minimatch) {
       options = this.options
-    else
+    } else {
       options = {}
+    }
   }
 
-  pattern = typeof pattern === "undefined"
+  pattern = typeof pattern === 'undefined'
     ? this.pattern : pattern
 
-  if (typeof pattern === "undefined") {
-    throw new Error("undefined pattern")
+  if (typeof pattern === 'undefined') {
+    throw new Error('undefined pattern')
   }
 
   if (options.nobrace ||
-      !pattern.match(/\{.*\}/)) {
+    !pattern.match(/\{.*\}/)) {
     // shortcut. no need to expand.
     return [pattern]
   }
@@ -263,87 +265,86 @@ function parse (pattern, isSub) {
   var options = this.options
 
   // shortcuts
-  if (!options.noglobstar && pattern === "**") return GLOBSTAR
-  if (pattern === "") return ""
-
-  var re = ""
-    , hasMagic = !!options.nocase
-    , escaping = false
-    // ? => one single character
-    , patternListStack = []
-    , plType
-    , stateChar
-    , inClass = false
-    , reClassStart = -1
-    , classStart = -1
-    // . and .. never match anything that doesn't start with .,
-    // even when options.dot is set.
-    , patternStart = pattern.charAt(0) === "." ? "" // anything
-      // not (start or / followed by . or .. followed by / or end)
-      : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
-      : "(?!\\.)"
-    , self = this
+  if (!options.noglobstar && pattern === '**') return GLOBSTAR
+  if (pattern === '') return ''
+
+  var re = ''
+  var hasMagic = !!options.nocase
+  var escaping = false
+  // ? => one single character
+  var patternListStack = []
+  var plType
+  var stateChar
+  var inClass = false
+  var reClassStart = -1
+  var classStart = -1
+  // . and .. never match anything that doesn't start with .,
+  // even when options.dot is set.
+  var patternStart = pattern.charAt(0) === '.' ? '' // anything
+  // not (start or / followed by . or .. followed by / or end)
+  : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+  : '(?!\\.)'
+  var self = this
 
   function clearStateChar () {
     if (stateChar) {
       // we had some state-tracking character
       // that wasn't consumed by this pass.
       switch (stateChar) {
-        case "*":
+        case '*':
           re += star
           hasMagic = true
-          break
-        case "?":
+        break
+        case '?':
           re += qmark
           hasMagic = true
-          break
+        break
         default:
-          re += "\\"+stateChar
-          break
+          re += '\\' + stateChar
+        break
       }
       self.debug('clearStateChar %j %j', stateChar, re)
       stateChar = false
     }
   }
 
-  for ( var i = 0, len = pattern.length, c
-      ; (i < len) && (c = pattern.charAt(i))
-      ; i ++ ) {
-
-    this.debug("%s\t%s %s %j", pattern, i, re, c)
+  for (var i = 0, len = pattern.length, c
+    ; (i < len) && (c = pattern.charAt(i))
+    ; i++) {
+    this.debug('%s\t%s %s %j', pattern, i, re, c)
 
     // skip over any that are escaped.
     if (escaping && reSpecials[c]) {
-      re += "\\" + c
+      re += '\\' + c
       escaping = false
       continue
     }
 
-    SWITCH: switch (c) {
-      case "/":
+    switch (c) {
+      case '/':
         // completely not allowed, even escaped.
         // Should already be path-split by now.
         return false
 
-      case "\\":
+      case '\\':
         clearStateChar()
         escaping = true
-        continue
+      continue
 
       // the various stateChar values
       // for the "extglob" stuff.
-      case "?":
-      case "*":
-      case "+":
-      case "@":
-      case "!":
-        this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+      case '?':
+      case '*':
+      case '+':
+      case '@':
+      case '!':
+        this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
 
         // all of those are literals inside a class, except that
         // the glob [!a] means [^a] in regexp
         if (inClass) {
           this.debug('  in class')
-          if (c === "!" && i === classStart + 1) c = "^"
+          if (c === '!' && i === classStart + 1) c = '^'
           re += c
           continue
         }
@@ -358,70 +359,70 @@ function parse (pattern, isSub) {
         // just clear the statechar *now*, rather than even diving into
         // the patternList stuff.
         if (options.noext) clearStateChar()
-        continue
+      continue
 
-      case "(":
+      case '(':
         if (inClass) {
-          re += "("
+          re += '('
           continue
         }
 
         if (!stateChar) {
-          re += "\\("
+          re += '\\('
           continue
         }
 
         plType = stateChar
-        patternListStack.push({ type: plType
-                              , start: i - 1
-                              , reStart: re.length })
+        patternListStack.push({ type: plType, start: i - 1, reStart: re.length })
         // negation is (?:(?!js)[^/]*)
-        re += stateChar === "!" ? "(?:(?!" : "(?:"
+        re += stateChar === '!' ? '(?:(?!' : '(?:'
         this.debug('plType %j %j', stateChar, re)
         stateChar = false
-        continue
+      continue
 
-      case ")":
+      case ')':
         if (inClass || !patternListStack.length) {
-          re += "\\)"
+          re += '\\)'
           continue
         }
 
         clearStateChar()
         hasMagic = true
-        re += ")"
+        re += ')'
         plType = patternListStack.pop().type
         // negation is (?:(?!js)[^/]*)
         // The others are (?:<pattern>)<type>
         switch (plType) {
-          case "!":
-            re += "[^/]*?)"
+          case '!':
+            re += '[^/]*?)'
             break
-          case "?":
-          case "+":
-          case "*": re += plType
-          case "@": break // the default anyway
+          case '?':
+          case '+':
+          case '*':
+            re += plType
+            break
+          case '@': break // the default anyway
         }
-        continue
+      continue
 
-      case "|":
+      case '|':
         if (inClass || !patternListStack.length || escaping) {
-          re += "\\|"
+          re += '\\|'
           escaping = false
           continue
         }
 
         clearStateChar()
-        re += "|"
-        continue
+        re += '|'
+      continue
 
       // these are mostly the same in regexp and glob
-      case "[":
+      case '[':
         // swallow any state-tracking char before the [
         clearStateChar()
 
         if (inClass) {
-          re += "\\" + c
+          re += '\\' + c
           continue
         }
 
@@ -429,15 +430,15 @@ function parse (pattern, isSub) {
         classStart = i
         reClassStart = re.length
         re += c
-        continue
+      continue
 
-      case "]":
+      case ']':
         //  a right bracket shall lose its special
         //  meaning and represent itself in
         //  a bracket expression if it occurs
         //  first in the list.  -- POSIX.2 2.8.3.2
         if (i === classStart + 1 || !inClass) {
-          re += "\\" + c
+          re += '\\' + c
           escaping = false
           continue
         }
@@ -454,11 +455,11 @@ function parse (pattern, isSub) {
           // to do safely.  For now, this is safe and works.
           var cs = pattern.substring(classStart + 1, i)
           try {
-            new RegExp('[' + cs + ']')
+            RegExp('[' + cs + ']')
           } catch (er) {
             // not a valid class!
             var sp = this.parse(cs, SUBPARSE)
-            re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]'
+            re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
             hasMagic = hasMagic || sp[1]
             inClass = false
             continue
@@ -469,7 +470,7 @@ function parse (pattern, isSub) {
         hasMagic = true
         inClass = false
         re += c
-        continue
+      continue
 
       default:
         // swallow any state char that wasn't consumed
@@ -479,8 +480,8 @@ function parse (pattern, isSub) {
           // no need
           escaping = false
         } else if (reSpecials[c]
-                   && !(c === "^" && inClass)) {
-          re += "\\"
+          && !(c === '^' && inClass)) {
+          re += '\\'
         }
 
         re += c
@@ -488,7 +489,6 @@ function parse (pattern, isSub) {
     } // switch
   } // for
 
-
   // handle the case where we left a class open.
   // "[abc" is valid, equivalent to "\[abc"
   if (inClass) {
@@ -496,9 +496,9 @@ function parse (pattern, isSub) {
     // this is a huge pita.  We now have to re-walk
     // the contents of the would-be class to re-translate
     // any characters that were passed through as-is
-    var cs = pattern.substr(classStart + 1)
-      , sp = this.parse(cs, SUBPARSE)
-    re = re.substr(0, reClassStart) + "\\[" + sp[0]
+    cs = pattern.substr(classStart + 1)
+    sp = this.parse(cs, SUBPARSE)
+    re = re.substr(0, reClassStart) + '\\[' + sp[0]
     hasMagic = hasMagic || sp[1]
   }
 
@@ -508,14 +508,13 @@ function parse (pattern, isSub) {
   // and escape any | chars that were passed through as-is for the regexp.
   // Go through and escape them, taking care not to double-escape any
   // | chars that were already escaped.
-  var pl
-  while (pl = patternListStack.pop()) {
+  for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
     var tail = re.slice(pl.reStart + 3)
     // maybe some even number of \, then maybe 1 \, followed by a |
     tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
       if (!$2) {
         // the | isn't already escaped, so escape it.
-        $2 = "\\"
+        $2 = '\\'
       }
 
       // need to escape all those slashes *again*, without escaping the
@@ -524,46 +523,44 @@ function parse (pattern, isSub) {
       // it exactly after itself.  That's why this trick works.
       //
       // I am sorry that you have to see this.
-      return $1 + $1 + $2 + "|"
+      return $1 + $1 + $2 + '|'
     })
 
-    this.debug("tail=%j\n   %s", tail, tail)
-    var t = pl.type === "*" ? star
-          : pl.type === "?" ? qmark
-          : "\\" + pl.type
+    this.debug('tail=%j\n   %s', tail, tail)
+    var t = pl.type === '*' ? star
+      : pl.type === '?' ? qmark
+      : '\\' + pl.type
 
     hasMagic = true
-    re = re.slice(0, pl.reStart)
-       + t + "\\("
-       + tail
+    re = re.slice(0, pl.reStart) + t + '\\(' + tail
   }
 
   // handle trailing things that only matter at the very end.
   clearStateChar()
   if (escaping) {
     // trailing \\
-    re += "\\\\"
+    re += '\\\\'
   }
 
   // only need to apply the nodot start if the re starts with
   // something that could conceivably capture a dot
   var addPatternStart = false
   switch (re.charAt(0)) {
-    case ".":
-    case "[":
-    case "(": addPatternStart = true
+    case '.':
+    case '[':
+    case '(': addPatternStart = true
   }
 
   // if the re is not "" at this point, then we need to make sure
   // it doesn't match against an empty path part.
   // Otherwise a/* will match a/, which it should not.
-  if (re !== "" && hasMagic) re = "(?=.)" + re
+  if (re !== '' && hasMagic) re = '(?=.)' + re
 
   if (addPatternStart) re = patternStart + re
 
   // parsing just a piece of a larger pattern.
   if (isSub === SUBPARSE) {
-    return [ re, hasMagic ]
+    return [re, hasMagic]
   }
 
   // skip the regexp for non-magical patterns
@@ -573,8 +570,8 @@ function parse (pattern, isSub) {
     return globUnescape(pattern)
   }
 
-  var flags = options.nocase ? "i" : ""
-    , regExp = new RegExp("^" + re + "$", flags)
+  var flags = options.nocase ? 'i' : ''
+  var regExp = new RegExp('^' + re + '$', flags)
 
   regExp._glob = pattern
   regExp._src = re
@@ -598,34 +595,38 @@ function makeRe () {
   // when you just want to work with a regex.
   var set = this.set
 
-  if (!set.length) return this.regexp = false
+  if (!set.length) {
+    this.regexp = false
+    return this.regexp
+  }
   var options = this.options
 
   var twoStar = options.noglobstar ? star
-      : options.dot ? twoStarDot
-      : twoStarNoDot
-    , flags = options.nocase ? "i" : ""
+    : options.dot ? twoStarDot
+    : twoStarNoDot
+  var flags = options.nocase ? 'i' : ''
 
   var re = set.map(function (pattern) {
     return pattern.map(function (p) {
       return (p === GLOBSTAR) ? twoStar
-           : (typeof p === "string") ? regExpEscape(p)
-           : p._src
-    }).join("\\\/")
-  }).join("|")
+      : (typeof p === 'string') ? regExpEscape(p)
+      : p._src
+    }).join('\\\/')
+  }).join('|')
 
   // must match entire pattern
   // ending in a * or ** will make it less strict.
-  re = "^(?:" + re + ")$"
+  re = '^(?:' + re + ')$'
 
   // can match anything, as long as it's not this.
-  if (this.negate) re = "^(?!" + re + ").*$"
+  if (this.negate) re = '^(?!' + re + ').*$'
 
   try {
-    return this.regexp = new RegExp(re, flags)
+    this.regexp = new RegExp(re, flags)
   } catch (ex) {
-    return this.regexp = false
+    this.regexp = false
   }
+  return this.regexp
 }
 
 minimatch.match = function (list, pattern, options) {
@@ -642,23 +643,24 @@ minimatch.match = function (list, pattern, options) {
 
 Minimatch.prototype.match = match
 function match (f, partial) {
-  this.debug("match", f, this.pattern)
+  this.debug('match', f, this.pattern)
   // short-circuit in the case of busted things.
   // comments, etc.
   if (this.comment) return false
-  if (this.empty) return f === ""
+  if (this.empty) return f === ''
 
-  if (f === "/" && partial) return true
+  if (f === '/' && partial) return true
 
   var options = this.options
 
   // windows: need to use /, not \
-  if (isWindows)
-    f = f.split("\\").join("/")
+  if (path.sep !== '/') {
+    f = f.split(path.sep).join('/')
+  }
 
   // treat the test path as a set of pathparts.
   f = f.split(slashSplit)
-  this.debug(this.pattern, "split", f)
+  this.debug(this.pattern, 'split', f)
 
   // just ONE of the pattern sets in this.set needs to match
   // in order for it to be valid.  If negating, then just one
@@ -666,17 +668,19 @@ function match (f, partial) {
   // Either way, return on the first hit.
 
   var set = this.set
-  this.debug(this.pattern, "set", set)
+  this.debug(this.pattern, 'set', set)
 
   // Find the basename of the path by looking for the last non-empty segment
-  var filename;
-  for (var i = f.length - 1; i >= 0; i--) {
+  var filename
+  var i
+  for (i = f.length - 1; i >= 0; i--) {
     filename = f[i]
     if (filename) break
   }
 
-  for (var i = 0, l = set.length; i < l; i ++) {
-    var pattern = set[i], file = f
+  for (i = 0; i < set.length; i++) {
+    var pattern = set[i]
+    var file = f
     if (options.matchBase && pattern.length === 1) {
       file = [filename]
     }
@@ -701,23 +705,20 @@ function match (f, partial) {
 Minimatch.prototype.matchOne = function (file, pattern, partial) {
   var options = this.options
 
-  this.debug("matchOne",
-              { "this": this
-              , file: file
-              , pattern: pattern })
+  this.debug('matchOne',
+    { 'this': this, file: file, pattern: pattern })
 
-  this.debug("matchOne", file.length, pattern.length)
+  this.debug('matchOne', file.length, pattern.length)
 
-  for ( var fi = 0
-          , pi = 0
-          , fl = file.length
-          , pl = pattern.length
+  for (var fi = 0,
+      pi = 0,
+      fl = file.length,
+      pl = pattern.length
       ; (fi < fl) && (pi < pl)
-      ; fi ++, pi ++ ) {
-
-    this.debug("matchOne loop")
+      ; fi++, pi++) {
+    this.debug('matchOne loop')
     var p = pattern[pi]
-      , f = file[fi]
+    var f = file[fi]
 
     this.debug(pattern, p, f)
 
@@ -751,7 +752,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
       //       - matchOne(z/c, c) -> no
       //       - matchOne(c, c) yes, hit
       var fr = fi
-        , pr = pi + 1
+      var pr = pi + 1
       if (pr === pl) {
         this.debug('** at the end')
         // a ** at the end will just swallow the rest.
@@ -760,19 +761,18 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
         // options.dot is set.
         // . and .. are *never* matched by **, for explosively
         // exponential reasons.
-        for ( ; fi < fl; fi ++) {
-          if (file[fi] === "." || file[fi] === ".." ||
-              (!options.dot && file[fi].charAt(0) === ".")) return false
+        for (; fi < fl; fi++) {
+          if (file[fi] === '.' || file[fi] === '..' ||
+            (!options.dot && file[fi].charAt(0) === '.')) return false
         }
         return true
       }
 
       // ok, let's see if we can swallow whatever we can.
-      WHILE: while (fr < fl) {
+      while (fr < fl) {
         var swallowee = file[fr]
 
-        this.debug('\nglobstar while',
-                    file, fr, pattern, pr, swallowee)
+        this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
 
         // XXX remove this slice.  Just pass the start index.
         if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
@@ -782,23 +782,24 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
         } else {
           // can't swallow "." or ".." ever.
           // can only swallow ".foo" when explicitly asked.
-          if (swallowee === "." || swallowee === ".." ||
-              (!options.dot && swallowee.charAt(0) === ".")) {
-            this.debug("dot detected!", file, fr, pattern, pr)
-            break WHILE
+          if (swallowee === '.' || swallowee === '..' ||
+            (!options.dot && swallowee.charAt(0) === '.')) {
+            this.debug('dot detected!', file, fr, pattern, pr)
+            break
           }
 
           // ** swallows a segment, and continue.
           this.debug('globstar swallow a segment, and continue')
-          fr ++
+          fr++
         }
       }
+
       // no match was found.
       // However, in partial mode, we can't say this is necessarily over.
       // If there's more *pattern* left, then
       if (partial) {
         // ran out of file
-        this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
+        this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
         if (fr === fl) return true
       }
       return false
@@ -808,16 +809,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
     // non-magic patterns just have to match exactly
     // patterns with magic have been turned into regexps.
     var hit
-    if (typeof p === "string") {
+    if (typeof p === 'string') {
       if (options.nocase) {
         hit = f.toLowerCase() === p.toLowerCase()
       } else {
         hit = f === p
       }
-      this.debug("string match", p, f, hit)
+      this.debug('string match', p, f, hit)
     } else {
       hit = f.match(p)
-      this.debug("pattern match", p, f, hit)
+      this.debug('pattern match', p, f, hit)
     }
 
     if (!hit) return false
@@ -849,26 +850,24 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
     // this is only acceptable if we're on the very last
     // empty segment of a file with a trailing slash.
     // a/* should match a/b/
-    var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+    var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
     return emptyFileEnd
   }
 
   // should be unreachable.
-  throw new Error("wtf?")
+  throw new Error('wtf?')
 }
 
-
 // replace stuff like \* with *
 function globUnescape (s) {
-  return s.replace(/\\(.)/g, "$1")
+  return s.replace(/\\(.)/g, '$1')
 }
 
-
 function regExpEscape (s) {
-  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
 }
 
-},{"brace-expansion":2}],2:[function(require,module,exports){
+},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){
 var concatMap = require('concat-map');
 var balanced = require('balanced-match');
 
index 2bfdf62..5e13d6d 100644 (file)
@@ -1,35 +1,36 @@
 module.exports = minimatch
 minimatch.Minimatch = Minimatch
 
-var isWindows = false
-if (typeof process !== 'undefined' && process.platform === 'win32')
-  isWindows = true
+var path = { sep: '/' }
+try {
+  path = require('path')
+} catch (er) {}
 
 var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
-  , expand = require("brace-expansion")
+var expand = require('brace-expansion')
 
-  // any single thing other than /
-  // don't need to escape / when using new RegExp()
-  , qmark = "[^/]"
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
 
-  // * => any number of characters
-  , star = qmark + "*?"
+// * => any number of characters
+var star = qmark + '*?'
 
-  // ** when dots are allowed.  Anything goes, except .. and .
-  // not (^ or / followed by one or two dots followed by $ or /),
-  // followed by anything, any number of times.
-  , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+// ** when dots are allowed.  Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
 
-  // not a ^ or / followed by a dot,
-  // followed by anything, any number of times.
-  , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
 
-  // characters that need to be escaped in RegExp.
-  , reSpecials = charSet("().*{}+?[]^$\\!")
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
 
 // "abc" -> { a:true, b:true, c:true }
 function charSet (s) {
-  return s.split("").reduce(function (set, c) {
+  return s.split('').reduce(function (set, c) {
     set[c] = true
     return set
   }, {})
@@ -80,21 +81,20 @@ Minimatch.defaults = function (def) {
   return minimatch.defaults(def).Minimatch
 }
 
-
 function minimatch (p, pattern, options) {
-  if (typeof pattern !== "string") {
-    throw new TypeError("glob pattern string required")
+  if (typeof pattern !== 'string') {
+    throw new TypeError('glob pattern string required')
   }
 
   if (!options) options = {}
 
   // shortcut: comments match nothing.
-  if (!options.nocomment && pattern.charAt(0) === "#") {
+  if (!options.nocomment && pattern.charAt(0) === '#') {
     return false
   }
 
   // "" only matches ""
-  if (pattern.trim() === "") return p === ""
+  if (pattern.trim() === '') return p === ''
 
   return new Minimatch(pattern, options).match(p)
 }
@@ -104,16 +104,17 @@ function Minimatch (pattern, options) {
     return new Minimatch(pattern, options)
   }
 
-  if (typeof pattern !== "string") {
-    throw new TypeError("glob pattern string required")
+  if (typeof pattern !== 'string') {
+    throw new TypeError('glob pattern string required')
   }
 
   if (!options) options = {}
   pattern = pattern.trim()
 
   // windows support: need to use /, not \
-  if (isWindows)
-    pattern = pattern.split("\\").join("/")
+  if (path.sep !== '/') {
+    pattern = pattern.split(path.sep).join('/')
+  }
 
   this.options = options
   this.set = []
@@ -127,7 +128,7 @@ function Minimatch (pattern, options) {
   this.make()
 }
 
-Minimatch.prototype.debug = function() {}
+Minimatch.prototype.debug = function () {}
 
 Minimatch.prototype.make = make
 function make () {
@@ -138,7 +139,7 @@ function make () {
   var options = this.options
 
   // empty patterns and comments match nothing.
-  if (!options.nocomment && pattern.charAt(0) === "#") {
+  if (!options.nocomment && pattern.charAt(0) === '#') {
     this.comment = true
     return
   }
@@ -177,7 +178,7 @@ function make () {
 
   // filter out everything that didn't compile properly.
   set = set.filter(function (s) {
-    return -1 === s.indexOf(false)
+    return s.indexOf(false) === -1
   })
 
   this.debug(this.pattern, set)
@@ -188,17 +189,17 @@ function make () {
 Minimatch.prototype.parseNegate = parseNegate
 function parseNegate () {
   var pattern = this.pattern
-    , negate = false
-    , options = this.options
-    , negateOffset = 0
+  var negate = false
+  var options = this.options
+  var negateOffset = 0
 
   if (options.nonegate) return
 
-  for ( var i = 0, l = pattern.length
-      ; i < l && pattern.charAt(i) === "!"
-      ; i ++) {
+  for (var i = 0, l = pattern.length
+    ; i < l && pattern.charAt(i) === '!'
+    ; i++) {
     negate = !negate
-    negateOffset ++
+    negateOffset++
   }
 
   if (negateOffset) this.pattern = pattern.substr(negateOffset)
@@ -223,21 +224,22 @@ Minimatch.prototype.braceExpand = braceExpand
 
 function braceExpand (pattern, options) {
   if (!options) {
-    if (this instanceof Minimatch)
+    if (this instanceof Minimatch) {
       options = this.options
-    else
+    } else {
       options = {}
+    }
   }
 
-  pattern = typeof pattern === "undefined"
+  pattern = typeof pattern === 'undefined'
     ? this.pattern : pattern
 
-  if (typeof pattern === "undefined") {
-    throw new Error("undefined pattern")
+  if (typeof pattern === 'undefined') {
+    throw new Error('undefined pattern')
   }
 
   if (options.nobrace ||
-      !pattern.match(/\{.*\}/)) {
+    !pattern.match(/\{.*\}/)) {
     // shortcut. no need to expand.
     return [pattern]
   }
@@ -262,87 +264,86 @@ function parse (pattern, isSub) {
   var options = this.options
 
   // shortcuts
-  if (!options.noglobstar && pattern === "**") return GLOBSTAR
-  if (pattern === "") return ""
-
-  var re = ""
-    , hasMagic = !!options.nocase
-    , escaping = false
-    // ? => one single character
-    , patternListStack = []
-    , plType
-    , stateChar
-    , inClass = false
-    , reClassStart = -1
-    , classStart = -1
-    // . and .. never match anything that doesn't start with .,
-    // even when options.dot is set.
-    , patternStart = pattern.charAt(0) === "." ? "" // anything
-      // not (start or / followed by . or .. followed by / or end)
-      : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
-      : "(?!\\.)"
-    , self = this
+  if (!options.noglobstar && pattern === '**') return GLOBSTAR
+  if (pattern === '') return ''
+
+  var re = ''
+  var hasMagic = !!options.nocase
+  var escaping = false
+  // ? => one single character
+  var patternListStack = []
+  var plType
+  var stateChar
+  var inClass = false
+  var reClassStart = -1
+  var classStart = -1
+  // . and .. never match anything that doesn't start with .,
+  // even when options.dot is set.
+  var patternStart = pattern.charAt(0) === '.' ? '' // anything
+  // not (start or / followed by . or .. followed by / or end)
+  : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+  : '(?!\\.)'
+  var self = this
 
   function clearStateChar () {
     if (stateChar) {
       // we had some state-tracking character
       // that wasn't consumed by this pass.
       switch (stateChar) {
-        case "*":
+        case '*':
           re += star
           hasMagic = true
-          break
-        case "?":
+        break
+        case '?':
           re += qmark
           hasMagic = true
-          break
+        break
         default:
-          re += "\\"+stateChar
-          break
+          re += '\\' + stateChar
+        break
       }
       self.debug('clearStateChar %j %j', stateChar, re)
       stateChar = false
     }
   }
 
-  for ( var i = 0, len = pattern.length, c
-      ; (i < len) && (c = pattern.charAt(i))
-      ; i ++ ) {
-
-    this.debug("%s\t%s %s %j", pattern, i, re, c)
+  for (var i = 0, len = pattern.length, c
+    ; (i < len) && (c = pattern.charAt(i))
+    ; i++) {
+    this.debug('%s\t%s %s %j', pattern, i, re, c)
 
     // skip over any that are escaped.
     if (escaping && reSpecials[c]) {
-      re += "\\" + c
+      re += '\\' + c
       escaping = false
       continue
     }
 
-    SWITCH: switch (c) {
-      case "/":
+    switch (c) {
+      case '/':
         // completely not allowed, even escaped.
         // Should already be path-split by now.
         return false
 
-      case "\\":
+      case '\\':
         clearStateChar()
         escaping = true
-        continue
+      continue
 
       // the various stateChar values
       // for the "extglob" stuff.
-      case "?":
-      case "*":
-      case "+":
-      case "@":
-      case "!":
-        this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+      case '?':
+      case '*':
+      case '+':
+      case '@':
+      case '!':
+        this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
 
         // all of those are literals inside a class, except that
         // the glob [!a] means [^a] in regexp
         if (inClass) {
           this.debug('  in class')
-          if (c === "!" && i === classStart + 1) c = "^"
+          if (c === '!' && i === classStart + 1) c = '^'
           re += c
           continue
         }
@@ -357,70 +358,70 @@ function parse (pattern, isSub) {
         // just clear the statechar *now*, rather than even diving into
         // the patternList stuff.
         if (options.noext) clearStateChar()
-        continue
+      continue
 
-      case "(":
+      case '(':
         if (inClass) {
-          re += "("
+          re += '('
           continue
         }
 
         if (!stateChar) {
-          re += "\\("
+          re += '\\('
           continue
         }
 
         plType = stateChar
-        patternListStack.push({ type: plType
-                              , start: i - 1
-                              , reStart: re.length })
+        patternListStack.push({ type: plType, start: i - 1, reStart: re.length })
         // negation is (?:(?!js)[^/]*)
-        re += stateChar === "!" ? "(?:(?!" : "(?:"
+        re += stateChar === '!' ? '(?:(?!' : '(?:'
         this.debug('plType %j %j', stateChar, re)
         stateChar = false
-        continue
+      continue
 
-      case ")":
+      case ')':
         if (inClass || !patternListStack.length) {
-          re += "\\)"
+          re += '\\)'
           continue
         }
 
         clearStateChar()
         hasMagic = true
-        re += ")"
+        re += ')'
         plType = patternListStack.pop().type
         // negation is (?:(?!js)[^/]*)
         // The others are (?:<pattern>)<type>
         switch (plType) {
-          case "!":
-            re += "[^/]*?)"
+          case '!':
+            re += '[^/]*?)'
             break
-          case "?":
-          case "+":
-          case "*": re += plType
-          case "@": break // the default anyway
+          case '?':
+          case '+':
+          case '*':
+            re += plType
+            break
+          case '@': break // the default anyway
         }
-        continue
+      continue
 
-      case "|":
+      case '|':
         if (inClass || !patternListStack.length || escaping) {
-          re += "\\|"
+          re += '\\|'
           escaping = false
           continue
         }
 
         clearStateChar()
-        re += "|"
-        continue
+        re += '|'
+      continue
 
       // these are mostly the same in regexp and glob
-      case "[":
+      case '[':
         // swallow any state-tracking char before the [
         clearStateChar()
 
         if (inClass) {
-          re += "\\" + c
+          re += '\\' + c
           continue
         }
 
@@ -428,15 +429,15 @@ function parse (pattern, isSub) {
         classStart = i
         reClassStart = re.length
         re += c
-        continue
+      continue
 
-      case "]":
+      case ']':
         //  a right bracket shall lose its special
         //  meaning and represent itself in
         //  a bracket expression if it occurs
         //  first in the list.  -- POSIX.2 2.8.3.2
         if (i === classStart + 1 || !inClass) {
-          re += "\\" + c
+          re += '\\' + c
           escaping = false
           continue
         }
@@ -453,11 +454,11 @@ function parse (pattern, isSub) {
           // to do safely.  For now, this is safe and works.
           var cs = pattern.substring(classStart + 1, i)
           try {
-            new RegExp('[' + cs + ']')
+            RegExp('[' + cs + ']')
           } catch (er) {
             // not a valid class!
             var sp = this.parse(cs, SUBPARSE)
-            re = re.substr(0, reClassStart) + "\\[" + sp[0] + '\\]'
+            re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
             hasMagic = hasMagic || sp[1]
             inClass = false
             continue
@@ -468,7 +469,7 @@ function parse (pattern, isSub) {
         hasMagic = true
         inClass = false
         re += c
-        continue
+      continue
 
       default:
         // swallow any state char that wasn't consumed
@@ -478,8 +479,8 @@ function parse (pattern, isSub) {
           // no need
           escaping = false
         } else if (reSpecials[c]
-                   && !(c === "^" && inClass)) {
-          re += "\\"
+          && !(c === '^' && inClass)) {
+          re += '\\'
         }
 
         re += c
@@ -487,7 +488,6 @@ function parse (pattern, isSub) {
     } // switch
   } // for
 
-
   // handle the case where we left a class open.
   // "[abc" is valid, equivalent to "\[abc"
   if (inClass) {
@@ -495,9 +495,9 @@ function parse (pattern, isSub) {
     // this is a huge pita.  We now have to re-walk
     // the contents of the would-be class to re-translate
     // any characters that were passed through as-is
-    var cs = pattern.substr(classStart + 1)
-      , sp = this.parse(cs, SUBPARSE)
-    re = re.substr(0, reClassStart) + "\\[" + sp[0]
+    cs = pattern.substr(classStart + 1)
+    sp = this.parse(cs, SUBPARSE)
+    re = re.substr(0, reClassStart) + '\\[' + sp[0]
     hasMagic = hasMagic || sp[1]
   }
 
@@ -507,14 +507,13 @@ function parse (pattern, isSub) {
   // and escape any | chars that were passed through as-is for the regexp.
   // Go through and escape them, taking care not to double-escape any
   // | chars that were already escaped.
-  var pl
-  while (pl = patternListStack.pop()) {
+  for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
     var tail = re.slice(pl.reStart + 3)
     // maybe some even number of \, then maybe 1 \, followed by a |
     tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
       if (!$2) {
         // the | isn't already escaped, so escape it.
-        $2 = "\\"
+        $2 = '\\'
       }
 
       // need to escape all those slashes *again*, without escaping the
@@ -523,46 +522,44 @@ function parse (pattern, isSub) {
       // it exactly after itself.  That's why this trick works.
       //
       // I am sorry that you have to see this.
-      return $1 + $1 + $2 + "|"
+      return $1 + $1 + $2 + '|'
     })
 
-    this.debug("tail=%j\n   %s", tail, tail)
-    var t = pl.type === "*" ? star
-          : pl.type === "?" ? qmark
-          : "\\" + pl.type
+    this.debug('tail=%j\n   %s', tail, tail)
+    var t = pl.type === '*' ? star
+      : pl.type === '?' ? qmark
+      : '\\' + pl.type
 
     hasMagic = true
-    re = re.slice(0, pl.reStart)
-       + t + "\\("
-       + tail
+    re = re.slice(0, pl.reStart) + t + '\\(' + tail
   }
 
   // handle trailing things that only matter at the very end.
   clearStateChar()
   if (escaping) {
     // trailing \\
-    re += "\\\\"
+    re += '\\\\'
   }
 
   // only need to apply the nodot start if the re starts with
   // something that could conceivably capture a dot
   var addPatternStart = false
   switch (re.charAt(0)) {
-    case ".":
-    case "[":
-    case "(": addPatternStart = true
+    case '.':
+    case '[':
+    case '(': addPatternStart = true
   }
 
   // if the re is not "" at this point, then we need to make sure
   // it doesn't match against an empty path part.
   // Otherwise a/* will match a/, which it should not.
-  if (re !== "" && hasMagic) re = "(?=.)" + re
+  if (re !== '' && hasMagic) re = '(?=.)' + re
 
   if (addPatternStart) re = patternStart + re
 
   // parsing just a piece of a larger pattern.
   if (isSub === SUBPARSE) {
-    return [ re, hasMagic ]
+    return [re, hasMagic]
   }
 
   // skip the regexp for non-magical patterns
@@ -572,8 +569,8 @@ function parse (pattern, isSub) {
     return globUnescape(pattern)
   }
 
-  var flags = options.nocase ? "i" : ""
-    , regExp = new RegExp("^" + re + "$", flags)
+  var flags = options.nocase ? 'i' : ''
+  var regExp = new RegExp('^' + re + '$', flags)
 
   regExp._glob = pattern
   regExp._src = re
@@ -597,34 +594,38 @@ function makeRe () {
   // when you just want to work with a regex.
   var set = this.set
 
-  if (!set.length) return this.regexp = false
+  if (!set.length) {
+    this.regexp = false
+    return this.regexp
+  }
   var options = this.options
 
   var twoStar = options.noglobstar ? star
-      : options.dot ? twoStarDot
-      : twoStarNoDot
-    , flags = options.nocase ? "i" : ""
+    : options.dot ? twoStarDot
+    : twoStarNoDot
+  var flags = options.nocase ? 'i' : ''
 
   var re = set.map(function (pattern) {
     return pattern.map(function (p) {
       return (p === GLOBSTAR) ? twoStar
-           : (typeof p === "string") ? regExpEscape(p)
-           : p._src
-    }).join("\\\/")
-  }).join("|")
+      : (typeof p === 'string') ? regExpEscape(p)
+      : p._src
+    }).join('\\\/')
+  }).join('|')
 
   // must match entire pattern
   // ending in a * or ** will make it less strict.
-  re = "^(?:" + re + ")$"
+  re = '^(?:' + re + ')$'
 
   // can match anything, as long as it's not this.
-  if (this.negate) re = "^(?!" + re + ").*$"
+  if (this.negate) re = '^(?!' + re + ').*$'
 
   try {
-    return this.regexp = new RegExp(re, flags)
+    this.regexp = new RegExp(re, flags)
   } catch (ex) {
-    return this.regexp = false
+    this.regexp = false
   }
+  return this.regexp
 }
 
 minimatch.match = function (list, pattern, options) {
@@ -641,23 +642,24 @@ minimatch.match = function (list, pattern, options) {
 
 Minimatch.prototype.match = match
 function match (f, partial) {
-  this.debug("match", f, this.pattern)
+  this.debug('match', f, this.pattern)
   // short-circuit in the case of busted things.
   // comments, etc.
   if (this.comment) return false
-  if (this.empty) return f === ""
+  if (this.empty) return f === ''
 
-  if (f === "/" && partial) return true
+  if (f === '/' && partial) return true
 
   var options = this.options
 
   // windows: need to use /, not \
-  if (isWindows)
-    f = f.split("\\").join("/")
+  if (path.sep !== '/') {
+    f = f.split(path.sep).join('/')
+  }
 
   // treat the test path as a set of pathparts.
   f = f.split(slashSplit)
-  this.debug(this.pattern, "split", f)
+  this.debug(this.pattern, 'split', f)
 
   // just ONE of the pattern sets in this.set needs to match
   // in order for it to be valid.  If negating, then just one
@@ -665,17 +667,19 @@ function match (f, partial) {
   // Either way, return on the first hit.
 
   var set = this.set
-  this.debug(this.pattern, "set", set)
+  this.debug(this.pattern, 'set', set)
 
   // Find the basename of the path by looking for the last non-empty segment
-  var filename;
-  for (var i = f.length - 1; i >= 0; i--) {
+  var filename
+  var i
+  for (i = f.length - 1; i >= 0; i--) {
     filename = f[i]
     if (filename) break
   }
 
-  for (var i = 0, l = set.length; i < l; i ++) {
-    var pattern = set[i], file = f
+  for (i = 0; i < set.length; i++) {
+    var pattern = set[i]
+    var file = f
     if (options.matchBase && pattern.length === 1) {
       file = [filename]
     }
@@ -700,23 +704,20 @@ function match (f, partial) {
 Minimatch.prototype.matchOne = function (file, pattern, partial) {
   var options = this.options
 
-  this.debug("matchOne",
-              { "this": this
-              , file: file
-              , pattern: pattern })
+  this.debug('matchOne',
+    { 'this': this, file: file, pattern: pattern })
 
-  this.debug("matchOne", file.length, pattern.length)
+  this.debug('matchOne', file.length, pattern.length)
 
-  for ( var fi = 0
-          , pi = 0
-          , fl = file.length
-          , pl = pattern.length
+  for (var fi = 0,
+      pi = 0,
+      fl = file.length,
+      pl = pattern.length
       ; (fi < fl) && (pi < pl)
-      ; fi ++, pi ++ ) {
-
-    this.debug("matchOne loop")
+      ; fi++, pi++) {
+    this.debug('matchOne loop')
     var p = pattern[pi]
-      , f = file[fi]
+    var f = file[fi]
 
     this.debug(pattern, p, f)
 
@@ -750,7 +751,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
       //       - matchOne(z/c, c) -> no
       //       - matchOne(c, c) yes, hit
       var fr = fi
-        , pr = pi + 1
+      var pr = pi + 1
       if (pr === pl) {
         this.debug('** at the end')
         // a ** at the end will just swallow the rest.
@@ -759,19 +760,18 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
         // options.dot is set.
         // . and .. are *never* matched by **, for explosively
         // exponential reasons.
-        for ( ; fi < fl; fi ++) {
-          if (file[fi] === "." || file[fi] === ".." ||
-              (!options.dot && file[fi].charAt(0) === ".")) return false
+        for (; fi < fl; fi++) {
+          if (file[fi] === '.' || file[fi] === '..' ||
+            (!options.dot && file[fi].charAt(0) === '.')) return false
         }
         return true
       }
 
       // ok, let's see if we can swallow whatever we can.
-      WHILE: while (fr < fl) {
+      while (fr < fl) {
         var swallowee = file[fr]
 
-        this.debug('\nglobstar while',
-                    file, fr, pattern, pr, swallowee)
+        this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
 
         // XXX remove this slice.  Just pass the start index.
         if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
@@ -781,23 +781,24 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
         } else {
           // can't swallow "." or ".." ever.
           // can only swallow ".foo" when explicitly asked.
-          if (swallowee === "." || swallowee === ".." ||
-              (!options.dot && swallowee.charAt(0) === ".")) {
-            this.debug("dot detected!", file, fr, pattern, pr)
-            break WHILE
+          if (swallowee === '.' || swallowee === '..' ||
+            (!options.dot && swallowee.charAt(0) === '.')) {
+            this.debug('dot detected!', file, fr, pattern, pr)
+            break
           }
 
           // ** swallows a segment, and continue.
           this.debug('globstar swallow a segment, and continue')
-          fr ++
+          fr++
         }
       }
+
       // no match was found.
       // However, in partial mode, we can't say this is necessarily over.
       // If there's more *pattern* left, then
       if (partial) {
         // ran out of file
-        this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
+        this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
         if (fr === fl) return true
       }
       return false
@@ -807,16 +808,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
     // non-magic patterns just have to match exactly
     // patterns with magic have been turned into regexps.
     var hit
-    if (typeof p === "string") {
+    if (typeof p === 'string') {
       if (options.nocase) {
         hit = f.toLowerCase() === p.toLowerCase()
       } else {
         hit = f === p
       }
-      this.debug("string match", p, f, hit)
+      this.debug('string match', p, f, hit)
     } else {
       hit = f.match(p)
-      this.debug("pattern match", p, f, hit)
+      this.debug('pattern match', p, f, hit)
     }
 
     if (!hit) return false
@@ -848,21 +849,19 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
     // this is only acceptable if we're on the very last
     // empty segment of a file with a trailing slash.
     // a/* should match a/b/
-    var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+    var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
     return emptyFileEnd
   }
 
   // should be unreachable.
-  throw new Error("wtf?")
+  throw new Error('wtf?')
 }
 
-
 // replace stuff like \* with *
 function globUnescape (s) {
-  return s.replace(/\\(.)/g, "$1")
+  return s.replace(/\\(.)/g, '$1')
 }
 
-
 function regExpEscape (s) {
-  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
 }
index 4d37a83..0b23c28 100644 (file)
@@ -6,13 +6,14 @@
   },
   "name": "minimatch",
   "description": "a glob matcher in javascript",
-  "version": "2.0.4",
+  "version": "2.0.7",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/minimatch.git"
   },
   "main": "minimatch.js",
   "scripts": {
+    "pretest": "standard minimatch.js test/*.js",
     "test": "tap test/*.js",
     "prepublish": "browserify -o browser.js -e minimatch.js --bare"
   },
@@ -24,6 +25,7 @@
   },
   "devDependencies": {
     "browserify": "^9.0.3",
+    "standard": "^3.7.2",
     "tap": ""
   },
   "license": {
     "minimatch.js",
     "browser.js"
   ],
-  "gitHead": "c75d17c23df3b6050338ee654a58490255b36ebc",
+  "gitHead": "4bd6dc22c248c7ea07cc49d63181fe6f6aafae9c",
   "bugs": {
     "url": "https://github.com/isaacs/minimatch/issues"
   },
   "homepage": "https://github.com/isaacs/minimatch",
-  "_id": "minimatch@2.0.4",
-  "_shasum": "83bea115803e7a097a78022427287edb762fafed",
-  "_from": "minimatch@>=2.0.4 <2.1.0",
-  "_npmVersion": "2.7.1",
-  "_nodeVersion": "1.4.2",
+  "_id": "minimatch@2.0.7",
+  "_shasum": "d23652ab10e663e7d914602e920e21f9f66492be",
+  "_from": "minimatch@>=2.0.7 <2.1.0",
+  "_npmVersion": "2.7.6",
+  "_nodeVersion": "1.7.1",
   "_npmUser": {
     "name": "isaacs",
-    "email": "i@izs.me"
+    "email": "isaacs@npmjs.com"
+  },
+  "dist": {
+    "shasum": "d23652ab10e663e7d914602e920e21f9f66492be",
+    "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.7.tgz"
   },
   "maintainers": [
     {
       "email": "i@izs.me"
     }
   ],
-  "dist": {
-    "shasum": "83bea115803e7a097a78022427287edb762fafed",
-    "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.4.tgz"
-  },
-  "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.4.tgz",
+  "directories": {},
+  "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.7.tgz",
   "readme": "ERROR: No README data found!"
 }
diff --git a/deps/npm/node_modules/mkdirp/.npmignore b/deps/npm/node_modules/mkdirp/.npmignore
deleted file mode 100644 (file)
index 9303c34..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/
-npm-debug.log
\ No newline at end of file
index c693a93..74c57bf 100644 (file)
@@ -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
index a1742b2..6ce241b 100644 (file)
@@ -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;
 
index 09e9ec4..7cd80f4 100644 (file)
@@ -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"
 }
index adb67f6..2441103 100644 (file)
@@ -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"
     "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"
 }
index 520dcb8..6a404b9 100644 (file)
@@ -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) {
index 0eb7099..2433b9a 100644 (file)
@@ -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();
index 3b624dd..eaa8921 100644 (file)
@@ -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');
             })
         })
index f1fbeca..97186b6 100644 (file)
@@ -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');
             });
         });
index 224b506..6c370aa 100644 (file)
@@ -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');
         });
     });
index 2c97590..fbce44b 100644 (file)
@@ -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();
     });
index 327e54b..398229f 100644 (file)
@@ -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) {
index 7c295f4..b0b9e18 100644 (file)
@@ -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();
                 });
             })
         });
index d1f175c..4ddb342 100644 (file)
@@ -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');
             })
         })
index 97ad7a2..9e7d079 100644 (file)
@@ -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
index 88fa432..8c8dc93 100644 (file)
@@ -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');
         });
     });
index 82c393a..2033c63 100644 (file)
@@ -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');
             });
         })
index e537fbe..11a7614 100644 (file)
@@ -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');
         });
     });
index 1fe142f..0b81fab 100644 (file)
@@ -1,9 +1,7 @@
 {
   'target_defaults': {
     'type': 'loadable_module',
-    'win_delay_load_hook': 'true',
     'product_prefix': '',
-
     'include_dirs': [
       '<(node_root_dir)/src',
       '<(node_root_dir)/deps/uv/include',
         'product_extension': 'node',
         'defines': [ 'BUILDING_NODE_EXTENSION' ],
       }],
-
       ['_type=="static_library"', {
         # set to `1` to *disable* the -T thin archive 'ld' flag.
         # older linkers don't support this flag.
         'standalone_static_library': '<(standalone_static_library)'
       }],
-
-      ['_win_delay_load_hook=="true"', {
-        # If the addon specifies `'win_delay_load_hook': 'true'` in its
-        # binding.gyp, link a delay-load hook into the DLL. This hook ensures
-        # that the addon will work regardless of whether the node/iojs binary
-        # is named node.exe, iojs.exe, or something else.
-        'conditions': [
-          [ 'OS=="win"', {
-            'sources': [
-              'src/win_delay_load_hook.c',
-            ],
-            'msvs_settings': {
-              'VCLinkerTool': {
-                'DelayLoadDLLs': [ 'iojs.exe', 'node.exe' ],
-                # Don't print a linker warning when no imports from either .exe
-                # are used.
-                'AdditionalOptions': [ '/ignore:4199' ],
-              },
-            },
-          }],
-        ],
-      }],
     ],
 
     'conditions': [
@@ -67,7 +42,7 @@
           '-luuid.lib',
           '-lodbc32.lib',
           '-lDelayImp.lib',
-          '-l"<(node_root_dir)/$(ConfigurationName)/iojs.lib"'
+          '-l"<(node_root_dir)/$(ConfigurationName)/node.lib"'
         ],
         # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
         # needs to have dll-interface to be used by clients of class 'node::ObjectWrap'
index f9722ae..df24aaf 100644 (file)
@@ -173,7 +173,7 @@ function build (gyp, argv, callback) {
   }
 
   /**
-   * Copies the iojs.lib file for the current target architecture into the
+   * Copies the node.lib file for the current target architecture into the
    * current proper dev dir location.
    */
 
@@ -181,15 +181,15 @@ function build (gyp, argv, callback) {
     if (!win || !copyDevLib) return doBuild()
 
     var buildDir = path.resolve(nodeDir, buildType)
-      , archNodeLibPath = path.resolve(nodeDir, arch, 'iojs.lib')
-      , buildNodeLibPath = path.resolve(buildDir, 'iojs.lib')
+      , archNodeLibPath = path.resolve(nodeDir, arch, 'node.lib')
+      , buildNodeLibPath = path.resolve(buildDir, 'node.lib')
 
     mkdirp(buildDir, function (err, isNew) {
       if (err) return callback(err)
       log.verbose('"' + buildType + '" dir needed to be created?', isNew)
       var rs = fs.createReadStream(archNodeLibPath)
         , ws = fs.createWriteStream(buildNodeLibPath)
-      log.verbose('copying "iojs.lib" for ' + arch, buildNodeLibPath)
+      log.verbose('copying "node.lib" for ' + arch, buildNodeLibPath)
       rs.pipe(ws)
       rs.on('error', callback)
       ws.on('error', callback)
index f9176b3..6f72e6a 100644 (file)
@@ -39,7 +39,7 @@ function install (gyp, argv, callback) {
     }
   }
 
-  var distUrl = gyp.opts['dist-url'] || gyp.opts.disturl || 'https://iojs.org/dist'
+  var distUrl = gyp.opts['dist-url'] || gyp.opts.disturl || 'http://nodejs.org/dist'
 
 
   // Determine which node dev files version we are installing
@@ -185,7 +185,7 @@ function install (gyp, argv, callback) {
 
       // now download the node tarball
       var tarPath = gyp.opts['tarball']
-      var tarballUrl = tarPath ? tarPath : distUrl + '/v' + version + '/iojs-v' + version + '.tar.gz'
+      var tarballUrl = tarPath ? tarPath : distUrl + '/v' + version + '/node-v' + version + '.tar.gz'
         , badDownload = false
         , extractCount = 0
         , gunzip = zlib.createGunzip()
@@ -267,7 +267,7 @@ function install (gyp, argv, callback) {
         var async = 0
 
         if (win) {
-          // need to download iojs.lib
+          // need to download node.lib
           async++
           downloadNodeLib(deref)
         }
@@ -343,36 +343,36 @@ function install (gyp, argv, callback) {
       }
 
       function downloadNodeLib (done) {
-        log.verbose('on Windows; need to download `iojs.lib`...')
+        log.verbose('on Windows; need to download `node.lib`...')
         var dir32 = path.resolve(devDir, 'ia32')
           , dir64 = path.resolve(devDir, 'x64')
-          , nodeLibPath32 = path.resolve(dir32, 'iojs.lib')
-          , nodeLibPath64 = path.resolve(dir64, 'iojs.lib')
-          , nodeLibUrl32 = distUrl + '/v' + version + '/win-x86/iojs.lib'
-          , nodeLibUrl64 = distUrl + '/v' + version + '/win-x64/iojs.lib'
+          , nodeLibPath32 = path.resolve(dir32, 'node.lib')
+          , nodeLibPath64 = path.resolve(dir64, 'node.lib')
+          , nodeLibUrl32 = distUrl + '/v' + version + '/node.lib'
+          , nodeLibUrl64 = distUrl + '/v' + version + '/x64/node.lib'
 
-        log.verbose('32-bit iojs.lib dir', dir32)
-        log.verbose('64-bit iojs.lib dir', dir64)
-        log.verbose('`iojs.lib` 32-bit url', nodeLibUrl32)
-        log.verbose('`iojs.lib` 64-bit url', nodeLibUrl64)
+        log.verbose('32-bit node.lib dir', dir32)
+        log.verbose('64-bit node.lib dir', dir64)
+        log.verbose('`node.lib` 32-bit url', nodeLibUrl32)
+        log.verbose('`node.lib` 64-bit url', nodeLibUrl64)
 
         var async = 2
         mkdir(dir32, function (err) {
           if (err) return done(err)
-          log.verbose('streaming 32-bit iojs.lib to:', nodeLibPath32)
+          log.verbose('streaming 32-bit node.lib to:', nodeLibPath32)
 
           var req = download(nodeLibUrl32)
           if (!req) return
           req.on('error', done)
           req.on('response', function (res) {
             if (res.statusCode !== 200) {
-              done(new Error(res.statusCode + ' status code downloading 32-bit iojs.lib'))
+              done(new Error(res.statusCode + ' status code downloading 32-bit node.lib'))
               return
             }
 
             getContentSha(res, function (_, checksum) {
-              contentShasums['win-x86/iojs.lib'] = checksum
-              log.verbose('content checksum', 'win-x86/iojs.lib', checksum)
+              contentShasums['node.lib'] = checksum
+              log.verbose('content checksum', 'node.lib', checksum)
             })
 
             var ws = fs.createWriteStream(nodeLibPath32)
@@ -385,20 +385,20 @@ function install (gyp, argv, callback) {
         })
         mkdir(dir64, function (err) {
           if (err) return done(err)
-          log.verbose('streaming 64-bit iojs.lib to:', nodeLibPath64)
+          log.verbose('streaming 64-bit node.lib to:', nodeLibPath64)
 
           var req = download(nodeLibUrl64)
           if (!req) return
           req.on('error', done)
           req.on('response', function (res) {
             if (res.statusCode !== 200) {
-              done(new Error(res.statusCode + ' status code downloading 64-bit iojs.lib'))
+              done(new Error(res.statusCode + ' status code downloading 64-bit node.lib'))
               return
             }
 
             getContentSha(res, function (_, checksum) {
-              contentShasums['win-x64/iojs.lib'] = checksum
-              log.verbose('content checksum', 'win-x64/iojs.lib', checksum)
+              contentShasums['x64/node.lib'] = checksum
+              log.verbose('content checksum', 'x64/node.lib', checksum)
             })
 
             var ws = fs.createWriteStream(nodeLibPath64)
diff --git a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c
deleted file mode 100644 (file)
index f397cfa..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * When this file is linked to a DLL, it sets up a delay-load hook that
- * intervenes when the DLL is trying to load 'node.exe' or 'iojs.exe'
- * dynamically. Instead of trying to locate the .exe file it'll just return
- * a handle to the process image.
- *
- * This allows compiled addons to work when node.exe or iojs.exe is renamed.
- */
-
-#ifdef _MSC_VER
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#include <delayimp.h>
-#include <string.h>
-
-static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
-  HMODULE m;
-  if (event != dliNotePreLoadLibrary)
-    return NULL;
-
-  if (_stricmp(info->szDll, "iojs.exe") != 0 &&
-      _stricmp(info->szDll, "node.exe") != 0)
-    return NULL;
-
-  m = GetModuleHandle(NULL);
-  return (FARPROC) m;
-}
-
-PfnDliHook __pfnDliNotifyHook2 = load_exe_hook;
-
-#endif
index 4b15912..0b9d7b5 100644 (file)
@@ -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.
index 59cd05f..e8f917d 100644 (file)
@@ -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) {
index 7e6beef..c43a926 100644 (file)
@@ -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) { 
index 1877fe5..3bfce72 100644 (file)
   ,"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."
 }
index 8f4aead..5dbc3af 100644 (file)
@@ -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",
       "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"
 }
index f4a2b96..7d0dae1 100644 (file)
@@ -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
+}
index 96b2544..3dce3c0 100644 (file)
@@ -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()
 });
 
index dfa2b90..0cd3eb4 100644 (file)
@@ -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"
index 0c44ae7..19129e3 100644 (file)
@@ -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.
index eb8a421..c85f12e 100644 (file)
@@ -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",
     "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": [
     {
       "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 (file)
index 8538b41..0000000
+++ /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 (file)
index c8ef3ca..0000000
+++ /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 (file)
index 77887b5..0000000
+++ /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 (file)
index c8ef3ca..0000000
+++ /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 (file)
index 997b3f7..0000000
+++ /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 (file)
index 4c1c8d4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "node": true,
-  "asi": true,
-  "laxcomma": true
-}
index 9f836e9..7b28e73 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "rimraf",
-  "version": "2.3.2",
+  "version": "2.3.3",
   "main": "rimraf.js",
   "description": "A deep deletion module for node (like `rm -rf`)",
   "author": {
     "LICENSE",
     "README.md"
   ],
-  "gitHead": "9d5ab4a8b6986ec909af04f6d91315e98f5893e8",
+  "gitHead": "ad4efe8102a72c77bf2b13165ecc2229a9a68955",
   "bugs": {
     "url": "https://github.com/isaacs/rimraf/issues"
   },
   "homepage": "https://github.com/isaacs/rimraf",
-  "_id": "rimraf@2.3.2",
-  "_shasum": "7304bd9275c401b89103b106b3531c1ef0c02fe9",
-  "_from": "rimraf@>=2.3.2 <2.4.0",
-  "_npmVersion": "2.7.0",
-  "_nodeVersion": "1.4.2",
+  "_id": "rimraf@2.3.3",
+  "_shasum": "d0073d8b3010611e8f3ad377b08e9a3c18b98f06",
+  "_from": "rimraf@>=2.3.3 <2.4.0",
+  "_npmVersion": "2.7.6",
+  "_nodeVersion": "1.7.1",
   "_npmUser": {
     "name": "isaacs",
-    "email": "i@izs.me"
+    "email": "isaacs@npmjs.com"
+  },
+  "dist": {
+    "shasum": "d0073d8b3010611e8f3ad377b08e9a3c18b98f06",
+    "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.3.3.tgz"
   },
   "maintainers": [
     {
       "email": "i@izs.me"
     }
   ],
-  "dist": {
-    "shasum": "7304bd9275c401b89103b106b3531c1ef0c02fe9",
-    "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.3.2.tgz"
-  },
   "directories": {},
-  "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.3.2.tgz",
-  "readme": "ERROR: No README data found!"
+  "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.3.3.tgz"
 }
index c189d54..8d420d2 100644 (file)
@@ -42,13 +42,14 @@ function rimraf (p, options, cb) {
     cb = options
     options = {}
   }
-  assert(p)
-  assert(options)
-  assert(typeof cb === 'function')
 
-  defaults(options)
+  assert(p, 'rimraf: missing path')
+  assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+  assert(options, 'rimraf: missing options')
+  assert.equal(typeof options, 'object', 'rimraf: options should be object')
+  assert.equal(typeof cb, 'function', 'rimraf: callback function required')
 
-  if (!cb) throw new Error("No callback passed to rimraf()")
+  defaults(options)
 
   var busyTries = 0
   var errState = null
@@ -254,8 +255,9 @@ function rimrafSync (p, options) {
   options = options || {}
   defaults(options)
 
-  assert(p)
-  assert(options)
+  assert(p, 'rimraf: missing path')
+  assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+  assert(options, 'rimraf: missing options')
 
   var results
 
index 0c44ae7..19129e3 100644 (file)
@@ -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.
index 7617ef8..fa73f2a 100644 (file)
@@ -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"
   "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 (file)
index 0000000..2180a8c
--- /dev/null
@@ -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 (file)
index 0000000..4bf07fe
--- /dev/null
@@ -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
+
+<!--js
+  // The fenced code blocks below are run as tests with `jsmd`.
+  // The following `require` call brings the module.
+  // Use `require ('spdx')` in your own code.
+  var spdx = require('./');
+  var package = require('./package.json');
+-->
+
+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 (file)
index 0000000..68a49da
--- /dev/null
@@ -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 <http://unlicense.org/>
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 (executable)
index 0000000..c96e56b
--- /dev/null
@@ -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 (file)
index 0000000..7ba2618
--- /dev/null
@@ -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 (file)
index 0000000..c04844d
--- /dev/null
@@ -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 (file)
index 0000000..9c31ddb
--- /dev/null
@@ -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 (file)
index 0000000..d588a1a
--- /dev/null
@@ -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 (file)
index 0000000..3806093
--- /dev/null
@@ -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 (file)
index 0000000..a3fc260
--- /dev/null
@@ -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 (file)
index 0000000..ab0a4f6
--- /dev/null
@@ -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 (file)
index 74489e2..0000000
+++ /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 (file)
index 0000000..019b7e4
--- /dev/null
@@ -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.
index 5483bf3..f160d0b 100644 (file)
@@ -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"
     "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"
 }
index ff1eb53..d557152 100644 (file)
@@ -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 (file)
index 0000000..904ab07
--- /dev/null
@@ -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 (file)
index 0000000..2347828
--- /dev/null
@@ -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 (file)
index 0000000..9df4d5c
--- /dev/null
@@ -0,0 +1,26 @@
+/*!
+ * is-absolute <https://github.com/jonschlinkert/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 (file)
index 0000000..b576e8d
--- /dev/null
@@ -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 (file)
index 0000000..5d7a2a2
--- /dev/null
@@ -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 (file)
index 0000000..ffc760a
--- /dev/null
@@ -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 (file)
index 0000000..d582081
--- /dev/null
@@ -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 (file)
index 0000000..4f954b8
--- /dev/null
@@ -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!"
+}
index d2b7b16..8cffb79 100644 (file)
@@ -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"
     "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": [
     {
       "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 (file)
index 0000000..189ca6d
--- /dev/null
@@ -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()
+})
index 2a45417..13fc26d 100644 (file)
@@ -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)
 }
index 6d0c9bc..2082ed8 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "version": "2.9.0",
+  "version": "2.10.1",
   "name": "npm",
   "description": "a package manager for JavaScript",
   "keywords": [
@@ -19,7 +19,6 @@
     "url": "https://github.com/npm/npm"
   },
   "bugs": {
-    "email": "npm-@googlegroups.com",
     "url": "http://github.com/npm/npm/issues"
   },
   "directories": {
     "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.1",
-    "minimatch": "~2.0.4",
-    "mkdirp": "~0.5.0",
+    "lru-cache": "~2.6.3",
+    "minimatch": "~2.0.7",
+    "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",
     "realize-package-specifier": "~3.0.0",
     "request": "~2.55.0",
     "retry": "~0.6.1",
-    "rimraf": "~2.3.2",
-    "semver": "~4.3.3",
+    "rimraf": "~2.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"
   },
     "sha",
     "slide",
     "sorted-object",
+    "spdx",
     "strip-ansi",
     "tar",
     "text-table",
     "write-file-atomic"
   ],
   "devDependencies": {
+    "deep-equal": "~1.0.0",
     "marked": "~0.3.3",
     "marked-man": "~0.1.4",
-    "nock": "~1.6.0",
+    "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",
index 7268fcb..824d492 100644 (file)
@@ -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/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz b/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz
new file mode 100644 (file)
index 0000000..fb27e17
Binary files /dev/null and b/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz differ
diff --git a/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz b/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz
new file mode 100644 (file)
index 0000000..0ea851f
Binary files /dev/null and b/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz differ
diff --git a/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz b/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz
new file mode 100644 (file)
index 0000000..8e1abc6
Binary files /dev/null and b/deps/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz differ
diff --git a/deps/npm/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz b/deps/npm/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz
new file mode 100644 (file)
index 0000000..7a4b9e8
Binary files /dev/null and b/deps/npm/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz differ
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 (file)
index 0000000..681fff0
--- /dev/null
@@ -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 (file)
index 0000000..9e05f48
--- /dev/null
@@ -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()
+    })
+  })
+})
index aa97b1a..5ac1d61 100644 (file)
@@ -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)
index 0e0d539..c9c9dd4 100644 (file)
@@ -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)
index b2a7be9..673be4c 100644 (file)
@@ -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)
index 94951e9..f298235 100644 (file)
@@ -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)
index 269d0ca..e33d09c 100644 (file)
@@ -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
new file mode 100644 (file)
index 0000000..ee4e1ff
--- /dev/null
@@ -0,0 +1,17 @@
+var path = require("path")
+var test = require("tap").test
+var common = require("../common-tap.js")
+var opts = { cwd: __dirname }
+var binDir = "../../node_modules/.bin"
+var fixture = path.resolve(__dirname, binDir)
+
+test('npm bin', function (t) {
+  common.npm(["bin"], opts, function (err, code, stdout, stderr) {
+    t.ifError(err, "bin ran without issue")
+    t.notOk(stderr, "should have no stderr")
+    t.equal(code, 0, "exit ok")
+    var res = path.resolve(stdout)
+    t.equal(res, fixture + "\n")
+    t.end()
+  })
+})
index 75acd2b..d92551e 100644 (file)
@@ -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",
index 938aa62..bff0522 100644 (file)
@@ -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)
 
index 46f0db2..fe26929 100644 (file)
@@ -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)
+  })
+}
index 5e0c1b7..3da27a8 100644 (file)
@@ -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
       }
index dacf405..a093e1f 100644 (file)
@@ -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()
 
index 7284d3e..35f46cc 100644 (file)
@@ -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)
index ff1524b..d69b62e 100644 (file)
@@ -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")
index 92938b3..cbb256d 100644 (file)
@@ -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)
index 6a703f0..5e915a7 100644 (file)
@@ -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
new file mode 100644 (file)
index 0000000..6bbfe78
--- /dev/null
@@ -0,0 +1,212 @@
+var execFile = require('child_process').execFile
+var path = require('path')
+var zlib = require('zlib')
+
+var asyncMap = require('slide').asyncMap
+var deepEqual = require('deep-equal')
+var fs = require('graceful-fs')
+var mkdirp = require('mkdirp')
+var once = require('once')
+var requireInject = require('require-inject')
+var rimraf = require('rimraf')
+var tar = require('tar')
+var test = require('tap').test
+var tmpdir = require('osenv').tmpdir
+var which = require('which')
+
+var wd = path.resolve(tmpdir(), 'git-races')
+var fixtures = path.resolve(__dirname, '../fixtures')
+var testcase = 'github-com-BryanDonovan-npm-git-test'
+var testcase_git = path.resolve(wd, testcase + '.git')
+var testcase_path = path.resolve(wd, testcase)
+var testcase_tgz = path.resolve(fixtures, testcase + '.git.tar.gz')
+
+var testtarballs = []
+var testrepos = {}
+var testurls = {}
+
+/*
+This test is specifically for #7202, where the bug was if you tried installing multiple git urls that
+pointed at the same repo but had different comittishes, you'd sometimes get the wrong version.
+The test cases, provided by @BryanDonovan, have a dependency tree like this:
+
+  top
+    bar#4.0.0
+      buzz#3.0.0
+      foo#3.0.0
+    buzz#3.0.0
+    foo#4.0.0
+      buzz#2.0.0
+
+But what would happen is that buzz#2.0.0 would end up installed under bar#4.0.0.
+
+bar#4.0.0 shouldn't have gotten its own copy if buzz, and if it did, it shouldn've been buzz#3.0.0
+*/
+
+;['bar', 'foo', 'buzz'].forEach(function (name) {
+  var mockurl = 'ssh://git@github.com/BryanDonovan/dummy-npm-' + name + '.git'
+  var realrepo = path.resolve(wd, 'github-com-BryanDonovan-dummy-npm-' + name + '.git')
+  var tgz = path.resolve(fixtures, 'github-com-BryanDonovan-dummy-npm-' + name + '.git.tar.gz')
+
+  testrepos[mockurl] = realrepo
+  testtarballs.push(tgz)
+})
+
+function cleanup () {
+  process.chdir(tmpdir())
+  rimraf.sync(wd)
+}
+
+var npm = requireInject.installGlobally('../../lib/npm.js', {
+  'child_process': {
+    'execFile': function (cmd, args, options, cb) {
+      // If it's a clone we swap any requests for any of the urls we're mocking
+      // with the path to the bare repo
+      if (args[0] === 'clone') {
+        var m2 = args.length - 2
+        var m1 = args.length - 1
+        if (testrepos[args[m2]]) {
+          testurls[args[m1]] = args[m2]
+          args[m2] = testrepos[args[m2]]
+        }
+        execFile(cmd, args, options, cb)
+      // here, we intercept npm validating the remote origin url on one of the
+      // clones we've done previously and return the original url that was requested
+      } else if (args[0] === 'config' && args[1] === '--get' && args[2] === 'remote.origin.url') {
+        process.nextTick(function () {
+          cb(null, testurls[options.cwd], '')
+        })
+      } else {
+        execFile(cmd, args, options, cb)
+      }
+    }
+  }
+})
+
+function extract (tarball, target, cb) {
+  cb = once(cb)
+  fs.createReadStream(tarball).on('error', function (er) { cb(er) })
+    .pipe(zlib.createGunzip()).on('error', function (er) { cb(er) })
+    .pipe(tar.Extract({path: target})).on('error', function (er) { cb(er) })
+    .on('end', function () {
+      cb()
+    })
+}
+
+// Copied from lib/utils/git, because we need to use
+// it before calling npm.load and lib/utils/git uses npm.js
+// which doesn't allow that. =( =(
+
+function prefixGitArgs () {
+  return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : []
+}
+
+var gitcmd
+
+function execGit (args, options, cb) {
+  var fullArgs = prefixGitArgs().concat(args || [])
+  return execFile(gitcmd, fullArgs, options, cb)
+}
+
+function gitWhichAndExec (args, options, cb) {
+  if (gitcmd) return execGit(args, options, cb)
+
+  which('git', function (err, pathtogit) {
+    if (err) {
+      err.code = 'ENOGIT'
+      return cb(err)
+    }
+    gitcmd = pathtogit
+
+    execGit(args, options, cb)
+  })
+}
+
+function andClone (gitdir, repodir, cb) {
+  return function (er) {
+    if (er) return cb(er)
+    gitWhichAndExec(['clone', gitdir, repodir], {}, cb)
+  }
+}
+
+function setup (cb) {
+  cleanup()
+  mkdirp.sync(wd)
+
+  extract(testcase_tgz, wd, andClone(testcase_git, testcase_path, andExtractPackages))
+
+  function andExtractPackages (er) {
+    if (er) return cb(er)
+    asyncMap(testtarballs, function (tgz, done) {
+      extract(tgz, wd, done)
+    }, andChdir)
+  }
+  function andChdir (er) {
+    if (er) return cb(er)
+    process.chdir(testcase_path)
+    andLoadNpm()
+  }
+  function andLoadNpm () {
+    var opts = {
+      cache: path.resolve(wd, 'cache')
+    }
+    npm.load(opts, cb)
+  }
+}
+
+// there are two (sic) valid trees that can result we don't care which one we
+// get in npm@2
+var oneTree = [
+  'npm-git-test@1.0.0', [
+    ['dummy-npm-bar@4.0.0', [
+      ['dummy-npm-foo@3.0.0', []]
+    ]],
+    ['dummy-npm-buzz@3.0.0', []],
+    ['dummy-npm-foo@4.0.0', [
+      ['dummy-npm-buzz@2.0.0', []]
+    ]]
+  ]
+]
+var otherTree = [
+  'npm-git-test@1.0.0', [
+    ['dummy-npm-bar@4.0.0', [
+      ['dummy-npm-buzz@3.0.0', []],
+      ['dummy-npm-foo@3.0.0', []]
+    ]],
+    ['dummy-npm-buzz@3.0.0', []],
+    ['dummy-npm-foo@4.0.0', [
+      ['dummy-npm-buzz@2.0.0', []]
+    ]]
+  ]
+]
+
+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(3)
+  t.comment('test for https://github.com/npm/npm/issues/7202')
+  npm.commands.install([], function (er) {
+    t.ifError(er, 'installed OK')
+    npm.commands.ls([], true, function (er, result) {
+      t.ifError(er, 'ls OK')
+      var simplified = toSimple(result)
+      t.ok(
+        deepEqual(simplified, oneTree) || deepEqual(simplified, otherTree),
+        'install tree is correct'
+      )
+    })
+  })
+})
index bd1f311..5326474 100644 (file)
@@ -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)
 }
index 531509e..9ec8a84 100644 (file)
@@ -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)
index 70879d8..ebba5d8 100644 (file)
@@ -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)
index 6562e35..ea47e82 100644 (file)
@@ -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)
index 5bbc127..3b5ae4d 100644 (file)
@@ -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)
index 15613d7..b6900b4 100644 (file)
@@ -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()
     })
   })
 })
index 929c4fc..4b21f96 100644 (file)
@@ -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)
+}
index 04f1349..f9b8af4 100644 (file)
@@ -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)
index 0696988..882d7d9 100644 (file)
@@ -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)
index 7d630f8..b256b8e 100644 (file)
@@ -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')
index 16a3a11..08322ee 100644 (file)
@@ -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')
index 9e537a9..fd6dd4a 100644 (file)
@@ -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({
index 20e7bbe..060d9b6 100644 (file)
@@ -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) {
index 60c9d3c..8dfe574 100644 (file)
@@ -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'))
 })
index b4d1f3a..d24a24d 100644 (file)
@@ -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')
index d9514e4..ffbde65 100644 (file)
@@ -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)
index e4d4180..58550ec 100644 (file)
@@ -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')
 
index 0586269..fe4244c 100644 (file)
@@ -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)