aboutsummaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-05-04 15:12:47 -0700
committerisaacs <i@izs.me>2012-05-04 15:12:47 -0700
commit01d146c29f318fb3dce485e49c2541f53dc4a952 (patch)
treec659dc29764875d840e8cf6d9c194fac513a91c5 /deps
parent1de43149bbb8c42b80cef4c25509390f3b4000cc (diff)
parent992e3464b8997210ea7f40f03f0386f8dd4f4f86 (diff)
downloadandroid-node-v8-01d146c29f318fb3dce485e49c2541f53dc4a952.tar.gz
android-node-v8-01d146c29f318fb3dce485e49c2541f53dc4a952.tar.bz2
android-node-v8-01d146c29f318fb3dce485e49c2541f53dc4a952.zip
Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
Conflicts: ChangeLog Makefile deps/npm/AUTHORS deps/npm/html/api/bin.html deps/npm/html/api/bugs.html deps/npm/html/api/commands.html deps/npm/html/api/config.html deps/npm/html/api/deprecate.html deps/npm/html/api/docs.html deps/npm/html/api/edit.html deps/npm/html/api/explore.html deps/npm/html/api/help-search.html deps/npm/html/api/init.html deps/npm/html/api/install.html deps/npm/html/api/link.html deps/npm/html/api/load.html deps/npm/html/api/ls.html deps/npm/html/api/npm.html deps/npm/html/api/outdated.html deps/npm/html/api/owner.html deps/npm/html/api/pack.html deps/npm/html/api/prefix.html deps/npm/html/api/prune.html deps/npm/html/api/publish.html deps/npm/html/api/rebuild.html deps/npm/html/api/restart.html deps/npm/html/api/root.html deps/npm/html/api/run-script.html deps/npm/html/api/search.html deps/npm/html/api/shrinkwrap.html deps/npm/html/api/start.html deps/npm/html/api/stop.html deps/npm/html/api/submodule.html deps/npm/html/api/tag.html deps/npm/html/api/test.html deps/npm/html/api/uninstall.html deps/npm/html/api/unpublish.html deps/npm/html/api/update.html deps/npm/html/api/version.html deps/npm/html/api/view.html deps/npm/html/api/whoami.html deps/npm/html/doc/README.html deps/npm/html/doc/adduser.html deps/npm/html/doc/bin.html deps/npm/html/doc/bugs.html deps/npm/html/doc/build.html deps/npm/html/doc/bundle.html deps/npm/html/doc/cache.html deps/npm/html/doc/changelog.html deps/npm/html/doc/coding-style.html deps/npm/html/doc/completion.html deps/npm/html/doc/config.html deps/npm/html/doc/deprecate.html deps/npm/html/doc/developers.html deps/npm/html/doc/disputes.html deps/npm/html/doc/docs.html deps/npm/html/doc/edit.html deps/npm/html/doc/explore.html deps/npm/html/doc/faq.html deps/npm/html/doc/folders.html deps/npm/html/doc/help-search.html deps/npm/html/doc/help.html deps/npm/html/doc/index.html deps/npm/html/doc/init.html deps/npm/html/doc/install.html deps/npm/html/doc/json.html deps/npm/html/doc/link.html deps/npm/html/doc/list.html deps/npm/html/doc/npm.html deps/npm/html/doc/outdated.html deps/npm/html/doc/owner.html deps/npm/html/doc/pack.html deps/npm/html/doc/prefix.html deps/npm/html/doc/prune.html deps/npm/html/doc/publish.html deps/npm/html/doc/rebuild.html deps/npm/html/doc/registry.html deps/npm/html/doc/removing-npm.html deps/npm/html/doc/restart.html deps/npm/html/doc/root.html deps/npm/html/doc/run-script.html deps/npm/html/doc/scripts.html deps/npm/html/doc/search.html deps/npm/html/doc/semver.html deps/npm/html/doc/shrinkwrap.html deps/npm/html/doc/star.html deps/npm/html/doc/start.html deps/npm/html/doc/stop.html deps/npm/html/doc/submodule.html deps/npm/html/doc/tag.html deps/npm/html/doc/test.html deps/npm/html/doc/uninstall.html deps/npm/html/doc/unpublish.html deps/npm/html/doc/update.html deps/npm/html/doc/version.html deps/npm/html/doc/view.html deps/npm/html/doc/whoami.html deps/npm/man/man1/npm.1 deps/npm/man/man3/npm.3 deps/npm/package.json doc/api/url.markdown lib/http.js src/node_version.h test/simple/test-fs-sync-fd-leak.js
Diffstat (limited to 'deps')
-rw-r--r--deps/npm/.npmignore4
-rw-r--r--deps/npm/AUTHORS13
-rw-r--r--deps/npm/LICENSE18
-rw-r--r--deps/npm/Makefile2
-rwxr-xr-xdeps/npm/bin/npm-cli.js7
-rwxr-xr-xdeps/npm/bin/npm-get-uid-gid.js16
-rw-r--r--deps/npm/bin/npm.cmd8
-rw-r--r--deps/npm/doc/api/ls.md6
-rw-r--r--deps/npm/doc/cli/changelog.md44
-rw-r--r--deps/npm/doc/cli/coding-style.md4
-rw-r--r--deps/npm/doc/cli/config.md72
-rw-r--r--deps/npm/doc/cli/developers.md11
-rw-r--r--deps/npm/doc/cli/index.md8
-rw-r--r--deps/npm/doc/cli/install.md130
-rw-r--r--deps/npm/doc/cli/json.md47
-rw-r--r--deps/npm/doc/cli/list.md7
-rw-r--r--deps/npm/doc/cli/scripts.md14
-rw-r--r--deps/npm/html/api/bin.html2
-rw-r--r--deps/npm/html/api/bugs.html2
-rw-r--r--deps/npm/html/api/commands.html2
-rw-r--r--deps/npm/html/api/config.html2
-rw-r--r--deps/npm/html/api/deprecate.html2
-rw-r--r--deps/npm/html/api/docs.html2
-rw-r--r--deps/npm/html/api/edit.html2
-rw-r--r--deps/npm/html/api/explore.html2
-rw-r--r--deps/npm/html/api/help-search.html2
-rw-r--r--deps/npm/html/api/init.html2
-rw-r--r--deps/npm/html/api/install.html2
-rw-r--r--deps/npm/html/api/link.html2
-rw-r--r--deps/npm/html/api/load.html2
-rw-r--r--deps/npm/html/api/ls.html8
-rw-r--r--deps/npm/html/api/npm.html4
-rw-r--r--deps/npm/html/api/outdated.html2
-rw-r--r--deps/npm/html/api/owner.html2
-rw-r--r--deps/npm/html/api/pack.html2
-rw-r--r--deps/npm/html/api/prefix.html2
-rw-r--r--deps/npm/html/api/prune.html2
-rw-r--r--deps/npm/html/api/publish.html2
-rw-r--r--deps/npm/html/api/rebuild.html2
-rw-r--r--deps/npm/html/api/restart.html2
-rw-r--r--deps/npm/html/api/root.html2
-rw-r--r--deps/npm/html/api/run-script.html2
-rw-r--r--deps/npm/html/api/search.html2
-rw-r--r--deps/npm/html/api/shrinkwrap.html2
-rw-r--r--deps/npm/html/api/start.html2
-rw-r--r--deps/npm/html/api/stop.html2
-rw-r--r--deps/npm/html/api/submodule.html2
-rw-r--r--deps/npm/html/api/tag.html2
-rw-r--r--deps/npm/html/api/test.html2
-rw-r--r--deps/npm/html/api/uninstall.html2
-rw-r--r--deps/npm/html/api/unpublish.html2
-rw-r--r--deps/npm/html/api/update.html2
-rw-r--r--deps/npm/html/api/version.html2
-rw-r--r--deps/npm/html/api/view.html2
-rw-r--r--deps/npm/html/api/whoami.html2
-rw-r--r--deps/npm/html/doc/README.html2
-rw-r--r--deps/npm/html/doc/adduser.html2
-rw-r--r--deps/npm/html/doc/bin.html2
-rw-r--r--deps/npm/html/doc/bugs.html2
-rw-r--r--deps/npm/html/doc/build.html2
-rw-r--r--deps/npm/html/doc/bundle.html2
-rw-r--r--deps/npm/html/doc/cache.html2
-rw-r--r--deps/npm/html/doc/changelog.html33
-rw-r--r--deps/npm/html/doc/coding-style.html4
-rw-r--r--deps/npm/html/doc/completion.html2
-rw-r--r--deps/npm/html/doc/config.html67
-rw-r--r--deps/npm/html/doc/deprecate.html2
-rw-r--r--deps/npm/html/doc/developers.html14
-rw-r--r--deps/npm/html/doc/disputes.html2
-rw-r--r--deps/npm/html/doc/docs.html2
-rw-r--r--deps/npm/html/doc/edit.html2
-rw-r--r--deps/npm/html/doc/explore.html2
-rw-r--r--deps/npm/html/doc/faq.html2
-rw-r--r--deps/npm/html/doc/folders.html2
-rw-r--r--deps/npm/html/doc/help-search.html2
-rw-r--r--deps/npm/html/doc/help.html2
-rw-r--r--deps/npm/html/doc/index.html10
-rw-r--r--deps/npm/html/doc/init.html2
-rw-r--r--deps/npm/html/doc/install.html49
-rw-r--r--deps/npm/html/doc/json.html48
-rw-r--r--deps/npm/html/doc/link.html2
-rw-r--r--deps/npm/html/doc/list.html8
-rw-r--r--deps/npm/html/doc/npm.html4
-rw-r--r--deps/npm/html/doc/outdated.html2
-rw-r--r--deps/npm/html/doc/owner.html2
-rw-r--r--deps/npm/html/doc/pack.html2
-rw-r--r--deps/npm/html/doc/prefix.html2
-rw-r--r--deps/npm/html/doc/prune.html2
-rw-r--r--deps/npm/html/doc/publish.html2
-rw-r--r--deps/npm/html/doc/rebuild.html2
-rw-r--r--deps/npm/html/doc/registry.html2
-rw-r--r--deps/npm/html/doc/removing-npm.html2
-rw-r--r--deps/npm/html/doc/restart.html2
-rw-r--r--deps/npm/html/doc/root.html2
-rw-r--r--deps/npm/html/doc/run-script.html2
-rw-r--r--deps/npm/html/doc/scripts.html15
-rw-r--r--deps/npm/html/doc/search.html2
-rw-r--r--deps/npm/html/doc/semver.html2
-rw-r--r--deps/npm/html/doc/shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/star.html2
-rw-r--r--deps/npm/html/doc/start.html2
-rw-r--r--deps/npm/html/doc/stop.html2
-rw-r--r--deps/npm/html/doc/submodule.html2
-rw-r--r--deps/npm/html/doc/tag.html2
-rw-r--r--deps/npm/html/doc/test.html2
-rw-r--r--deps/npm/html/doc/uninstall.html2
-rw-r--r--deps/npm/html/doc/unpublish.html2
-rw-r--r--deps/npm/html/doc/update.html2
-rw-r--r--deps/npm/html/doc/version.html2
-rw-r--r--deps/npm/html/doc/view.html2
-rw-r--r--deps/npm/html/doc/whoami.html2
-rw-r--r--deps/npm/html/index.html15
-rw-r--r--deps/npm/lib/bugs.js2
-rw-r--r--deps/npm/lib/cache.js125
-rw-r--r--deps/npm/lib/config.js7
-rw-r--r--deps/npm/lib/docs.js2
-rw-r--r--deps/npm/lib/init.js12
-rw-r--r--deps/npm/lib/install.js524
-rw-r--r--deps/npm/lib/link.js4
-rw-r--r--deps/npm/lib/ls.js280
-rw-r--r--deps/npm/lib/npm.js54
-rw-r--r--deps/npm/lib/outdated.js4
-rw-r--r--deps/npm/lib/rebuild.js3
-rw-r--r--deps/npm/lib/search.js3
-rw-r--r--deps/npm/lib/set.js1
-rw-r--r--deps/npm/lib/unbuild.js20
-rw-r--r--deps/npm/lib/uninstall.js7
-rw-r--r--deps/npm/lib/utils/cmd-shim.js8
-rw-r--r--deps/npm/lib/utils/completion/file-completion.js2
-rw-r--r--deps/npm/lib/utils/config-defs.js17
-rw-r--r--deps/npm/lib/utils/error-handler.js11
-rw-r--r--deps/npm/lib/utils/excludes.js157
-rw-r--r--deps/npm/lib/utils/fetch.js9
-rw-r--r--deps/npm/lib/utils/find-prefix.js5
-rw-r--r--deps/npm/lib/utils/get-agent.js62
-rw-r--r--deps/npm/lib/utils/get.js6
-rw-r--r--deps/npm/lib/utils/ini.js10
-rw-r--r--deps/npm/lib/utils/lifecycle.js39
-rw-r--r--deps/npm/lib/utils/link.js6
-rw-r--r--deps/npm/lib/utils/mkdir-p.js191
-rw-r--r--deps/npm/lib/utils/npm-registry-client/get.js12
-rw-r--r--deps/npm/lib/utils/npm-registry-client/request.js5
-rw-r--r--deps/npm/lib/utils/output.js1
-rw-r--r--deps/npm/lib/utils/read-installed.js15
-rw-r--r--deps/npm/lib/utils/read-json.js101
-rw-r--r--deps/npm/lib/utils/set.js25
-rw-r--r--deps/npm/lib/utils/tar.js628
-rw-r--r--deps/npm/lib/utils/uid-number.js55
-rw-r--r--deps/npm/lib/version.js2
-rw-r--r--deps/npm/lib/view.js5
-rw-r--r--deps/npm/man/man1/README.12
-rw-r--r--deps/npm/man/man1/adduser.12
-rw-r--r--deps/npm/man/man1/bin.12
-rw-r--r--deps/npm/man/man1/bugs.12
-rw-r--r--deps/npm/man/man1/build.12
-rw-r--r--deps/npm/man/man1/bundle.12
-rw-r--r--deps/npm/man/man1/cache.12
-rw-r--r--deps/npm/man/man1/changelog.184
-rw-r--r--deps/npm/man/man1/coding-style.16
-rw-r--r--deps/npm/man/man1/completion.12
-rw-r--r--deps/npm/man/man1/config.1126
-rw-r--r--deps/npm/man/man1/deprecate.12
-rw-r--r--deps/npm/man/man1/developers.124
-rw-r--r--deps/npm/man/man1/disputes.12
-rw-r--r--deps/npm/man/man1/docs.12
-rw-r--r--deps/npm/man/man1/edit.12
-rw-r--r--deps/npm/man/man1/explore.12
-rw-r--r--deps/npm/man/man1/faq.12
-rw-r--r--deps/npm/man/man1/folders.12
-rw-r--r--deps/npm/man/man1/help-search.12
-rw-r--r--deps/npm/man/man1/help.12
-rw-r--r--deps/npm/man/man1/index.18
-rw-r--r--deps/npm/man/man1/init.12
-rw-r--r--deps/npm/man/man1/install.199
-rw-r--r--deps/npm/man/man1/json.187
-rw-r--r--deps/npm/man/man1/link.12
-rw-r--r--deps/npm/man/man1/list.115
-rw-r--r--deps/npm/man/man1/npm.14
-rw-r--r--deps/npm/man/man1/outdated.12
-rw-r--r--deps/npm/man/man1/owner.12
-rw-r--r--deps/npm/man/man1/pack.12
-rw-r--r--deps/npm/man/man1/prefix.12
-rw-r--r--deps/npm/man/man1/prune.12
-rw-r--r--deps/npm/man/man1/publish.12
-rw-r--r--deps/npm/man/man1/rebuild.12
-rw-r--r--deps/npm/man/man1/registry.12
-rw-r--r--deps/npm/man/man1/removing-npm.12
-rw-r--r--deps/npm/man/man1/restart.12
-rw-r--r--deps/npm/man/man1/root.12
-rw-r--r--deps/npm/man/man1/run-script.12
-rw-r--r--deps/npm/man/man1/scripts.122
-rw-r--r--deps/npm/man/man1/search.12
-rw-r--r--deps/npm/man/man1/semver.12
-rw-r--r--deps/npm/man/man1/star.12
-rw-r--r--deps/npm/man/man1/start.12
-rw-r--r--deps/npm/man/man1/stop.12
-rw-r--r--deps/npm/man/man1/submodule.12
-rw-r--r--deps/npm/man/man1/tag.12
-rw-r--r--deps/npm/man/man1/test.12
-rw-r--r--deps/npm/man/man1/uninstall.12
-rw-r--r--deps/npm/man/man1/unpublish.12
-rw-r--r--deps/npm/man/man1/update.12
-rw-r--r--deps/npm/man/man1/version.12
-rw-r--r--deps/npm/man/man1/view.12
-rw-r--r--deps/npm/man/man1/whoami.12
-rw-r--r--deps/npm/man/man3/bin.32
-rw-r--r--deps/npm/man/man3/bugs.32
-rw-r--r--deps/npm/man/man3/commands.32
-rw-r--r--deps/npm/man/man3/config.32
-rw-r--r--deps/npm/man/man3/deprecate.32
-rw-r--r--deps/npm/man/man3/docs.32
-rw-r--r--deps/npm/man/man3/edit.32
-rw-r--r--deps/npm/man/man3/explore.32
-rw-r--r--deps/npm/man/man3/help-search.32
-rw-r--r--deps/npm/man/man3/init.32
-rw-r--r--deps/npm/man/man3/install.32
-rw-r--r--deps/npm/man/man3/link.32
-rw-r--r--deps/npm/man/man3/load.32
-rw-r--r--deps/npm/man/man3/ls.39
-rw-r--r--deps/npm/man/man3/npm.34
-rw-r--r--deps/npm/man/man3/outdated.32
-rw-r--r--deps/npm/man/man3/owner.32
-rw-r--r--deps/npm/man/man3/pack.32
-rw-r--r--deps/npm/man/man3/prefix.32
-rw-r--r--deps/npm/man/man3/prune.32
-rw-r--r--deps/npm/man/man3/publish.32
-rw-r--r--deps/npm/man/man3/rebuild.32
-rw-r--r--deps/npm/man/man3/restart.32
-rw-r--r--deps/npm/man/man3/root.32
-rw-r--r--deps/npm/man/man3/run-script.32
-rw-r--r--deps/npm/man/man3/search.32
-rw-r--r--deps/npm/man/man3/start.32
-rw-r--r--deps/npm/man/man3/stop.32
-rw-r--r--deps/npm/man/man3/submodule.32
-rw-r--r--deps/npm/man/man3/tag.32
-rw-r--r--deps/npm/man/man3/test.32
-rw-r--r--deps/npm/man/man3/uninstall.32
-rw-r--r--deps/npm/man/man3/unpublish.32
-rw-r--r--deps/npm/man/man3/update.32
-rw-r--r--deps/npm/man/man3/version.32
-rw-r--r--deps/npm/man/man3/view.32
-rw-r--r--deps/npm/man/man3/whoami.32
-rw-r--r--deps/npm/node_modules/block-stream/package.json4
-rw-r--r--deps/npm/node_modules/fast-list/.npmignore1
-rw-r--r--deps/npm/node_modules/fast-list/.travis.yml4
-rw-r--r--deps/npm/node_modules/fast-list/README.md116
-rw-r--r--deps/npm/node_modules/fast-list/fast-list.js144
-rw-r--r--deps/npm/node_modules/fast-list/package.json20
-rw-r--r--deps/npm/node_modules/fstream/.npmignore4
-rw-r--r--deps/npm/node_modules/fstream/lib/abstract.js5
-rw-r--r--deps/npm/node_modules/fstream/lib/dir-reader.js111
-rw-r--r--deps/npm/node_modules/fstream/lib/dir-writer.js8
-rw-r--r--deps/npm/node_modules/fstream/lib/link-writer.js1
-rw-r--r--deps/npm/node_modules/fstream/lib/proxy-reader.js4
-rw-r--r--deps/npm/node_modules/fstream/lib/reader.js31
-rw-r--r--deps/npm/node_modules/fstream/lib/writer.js218
-rw-r--r--deps/npm/node_modules/fstream/package.json30
-rw-r--r--deps/npm/node_modules/graceful-fs/graceful-fs.js67
-rw-r--r--deps/npm/node_modules/graceful-fs/package.json25
-rw-r--r--deps/npm/node_modules/inherits/LICENSE30
-rw-r--r--deps/npm/node_modules/inherits/package.json52
-rw-r--r--deps/npm/node_modules/minimatch/README.md14
-rw-r--r--deps/npm/node_modules/minimatch/minimatch.js67
-rw-r--r--deps/npm/node_modules/minimatch/package.json29
-rw-r--r--deps/npm/node_modules/mkdirp/README.markdown37
-rw-r--r--deps/npm/node_modules/mkdirp/index.js67
-rw-r--r--deps/npm/node_modules/mkdirp/package.json63
-rw-r--r--deps/npm/node_modules/read/lib/read.js16
-rw-r--r--deps/npm/node_modules/read/package.json18
-rw-r--r--deps/npm/node_modules/request/README.md4
-rw-r--r--deps/npm/node_modules/request/forever.js21
-rw-r--r--deps/npm/node_modules/request/main.js947
-rw-r--r--deps/npm/node_modules/request/mimetypes.js10
-rw-r--r--deps/npm/node_modules/request/oauth.js2
-rw-r--r--deps/npm/node_modules/request/package.json58
-rw-r--r--deps/npm/node_modules/request/vendor/cookie/index.js25
-rw-r--r--deps/npm/node_modules/rimraf/AUTHORS1
-rw-r--r--deps/npm/node_modules/rimraf/README.md13
-rw-r--r--deps/npm/node_modules/rimraf/fiber.js86
-rw-r--r--deps/npm/node_modules/rimraf/package.json3
-rw-r--r--deps/npm/node_modules/rimraf/rimraf.js106
-rw-r--r--deps/npm/node_modules/tar/lib/extract.js14
-rw-r--r--deps/npm/node_modules/tar/package.json24
-rw-r--r--deps/npm/node_modules/which/package.json25
-rw-r--r--deps/npm/node_modules/which/which.js71
-rw-r--r--deps/npm/package.json26
-rwxr-xr-xdeps/npm/scripts/index-build.js1
-rw-r--r--deps/npm/test/packages/npm-test-env-reader/package.json18
-rwxr-xr-xdeps/npm/test/packages/npm-test-env-reader/test.sh3
-rw-r--r--deps/npm/test/packages/npm-test-files/package.json3
-rw-r--r--deps/npm/test/packages/npm-test-optional-deps/package.json4
-rw-r--r--deps/uv/src/unix/error.c1
-rw-r--r--deps/uv/src/win/error.c16
-rw-r--r--deps/v8/test/mjsunit/regexp-capture-3.js30
294 files changed, 2860 insertions, 3760 deletions
diff --git a/deps/npm/.npmignore b/deps/npm/.npmignore
index 5ddef35600..6ab186883a 100644
--- a/deps/npm/.npmignore
+++ b/deps/npm/.npmignore
@@ -11,7 +11,3 @@ npm-debug.log
./npmrc
.gitignore
release/
-
-# don't ignore .npmignore files
-# these are used in some tests.
-!.npmignore
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 8bd425c58d..c977af8c48 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -51,16 +51,3 @@ Stephen Sugden <glurgle@gmail.com>
Gautham Pai <buzypi@gmail.com>
David Trejo <david.daniel.trejo@gmail.com>
Paul Vorbach <paul@vorb.de>
-George Ornbo <george@shapeshed.com>
-Tim Oxley <secoif@gmail.com>
-Tyler Green <tyler.green2@gmail.com>
-atomizer <danila.gerasimov@gmail.com>
-Rod Vagg <rod@vagg.org>
-Christian Howe <coderarity@gmail.com>
-Andrew Lunny <alunny@gmail.com>
-Henrik Hodne <dvyjones@binaryhex.com>
-Adam Blackburn <regality@gmail.com>
-Kris Windham <kriswindham@gmail.com>
-Jens Grunert <jens.grunert@gmail.com>
-Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
-Dalmais Maxence <github@maxired.fr>
diff --git a/deps/npm/LICENSE b/deps/npm/LICENSE
index c94425929d..71ca385bdf 100644
--- a/deps/npm/LICENSE
+++ b/deps/npm/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2009-2012, Isaac Z. Schlueter (the "Original Author")
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter (the "Author")
All rights reserved.
MIT +no-false-attribs License
@@ -20,9 +20,9 @@ by the recipients as they would use the unmodified Software,
containing modifications that substantially alter, remove, or
disable functionality of the Software, outside of the documented
configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
+modified such that the Author's bug reporting email addresses and
+urls are either replaced with the contact information of the
+parties responsible for the changes, or removed entirely.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
@@ -36,7 +36,7 @@ OTHER DEALINGS IN THE SOFTWARE.
Except where noted, this license applies to any and all software
programs and associated documentation files created by the
-Original Author, when distributed with the Software.
+Author, when distributed with the Software.
"Node.js" and "node" trademark Joyent, Inc. npm is not officially
part of the Node.js project, and is neither owned by nor
@@ -49,11 +49,13 @@ and are not covered by this license.
"npm Logo" created by Mathias Pettersson and Brian Hammond,
used with permission.
+This program includes a BSDTar/LibArchive version 2.8.3-1 binary,
+originally distributed as part of the MinGW suite, compiled for
+Win32, according to the terms of the BSD license.
+See deps/basic-bsdtar-2.8.3-1-ming32-bin/basic-bsdtar.LICENSE.
+
This program uses "node-uuid", Copyright (c) 2010 Robert Kieffer,
according to the terms of the MIT license.
This program uses "request", Copyright (c) 2011 Mikeal Rogers,
according to the terms of the Apache license.
-
-This program uses "mkdirp", Copyright (c) 2010 James Halliday,
-according to the terms of the MIT/X11 license.
diff --git a/deps/npm/Makefile b/deps/npm/Makefile
index 19efd815c9..415a1b3d68 100644
--- a/deps/npm/Makefile
+++ b/deps/npm/Makefile
@@ -123,7 +123,7 @@ doc-publish: doc
rsync -vazu --stats --no-implied-dirs --delete html/api/ npmjs.org:/var/www/npmjs.org/public/api
zip-publish: release
- scp release/* npmjs.org:/var/www/npmjs.org/public/dist/
+ scp release/*.zip npmjs.org:/var/www/npmjs.org/public/dist/
release:
@bash scripts/release.sh
diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js
index f29437093e..e0b9f20bb8 100755
--- a/deps/npm/bin/npm-cli.js
+++ b/deps/npm/bin/npm-cli.js
@@ -49,13 +49,6 @@ if (conf.version) {
return
}
-if (conf.versions) {
- var v = process.versions
- v.npm = npm.version
- console.log(v)
- return
-}
-
log.info("npm@"+npm.version, "using")
log.info("node@"+process.version, "using")
diff --git a/deps/npm/bin/npm-get-uid-gid.js b/deps/npm/bin/npm-get-uid-gid.js
new file mode 100755
index 0000000000..390e0f2fc9
--- /dev/null
+++ b/deps/npm/bin/npm-get-uid-gid.js
@@ -0,0 +1,16 @@
+var argv = process.argv.slice(2)
+ , user = argv[0] || process.getuid()
+ , group = argv[1] || process.getgid()
+
+if (!isNaN(user)) user = +user
+if (!isNaN(group)) group = +group
+
+console.error([user, group])
+
+try {
+ process.setgid(group)
+ process.setuid(user)
+ console.log(JSON.stringify({uid:+process.getuid(), gid:+process.getgid()}))
+} catch (ex) {
+ console.log(JSON.stringify({error:ex.message,errno:ex.errno}))
+}
diff --git a/deps/npm/bin/npm.cmd b/deps/npm/bin/npm.cmd
index 7720e20529..bac9e5f1c4 100644
--- a/deps/npm/bin/npm.cmd
+++ b/deps/npm/bin/npm.cmd
@@ -1,6 +1,6 @@
:: Created by npm, please don't edit manually.
-@IF EXIST "%~dp0\node.exe" (
- "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
+@IF EXIST "%~dp0"\"node.exe" (
+ "%~dp0"\"node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
) ELSE (
- node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
-)
+ node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
+) \ No newline at end of file
diff --git a/deps/npm/doc/api/ls.md b/deps/npm/doc/api/ls.md
index ed890ff146..a6c0a13821 100644
--- a/deps/npm/doc/api/ls.md
+++ b/deps/npm/doc/api/ls.md
@@ -21,12 +21,6 @@ It will print out extraneous, missing, and invalid packages.
If the silent parameter is set to true, nothing will be output to the screen,
but the data will still be returned.
-Callback is provided an error if one occurred, the full data about which
-packages are installed and which dependencies they will receive, and a
-"lite" data object which just shows which versions are installed where.
-Note that the full data object is a circular structure, so care must be
-taken if it is serialized to JSON.
-
## CONFIGURATION
### long
diff --git a/deps/npm/doc/cli/changelog.md b/deps/npm/doc/cli/changelog.md
index 64feeacda8..0115405ca0 100644
--- a/deps/npm/doc/cli/changelog.md
+++ b/deps/npm/doc/cli/changelog.md
@@ -3,50 +3,6 @@ npm-changelog(1) -- Changes
## HISTORY
-### 1.1.3, 1.1.4
-
-* Update request to support HTTPS-over-HTTP proxy tunneling
-* Throw on undefined envs in config settings
-* Update which to 1.0.5
-* Fix windows UNC busyloop in findPrefix
-* Bundle nested bundleDependencies properly
-* Alias adduser to add-user
-* Doc updates (Christian Howe, Henrik Hodne, Andrew Lunny)
-* ignore logfd/outfd streams in makeEnv() (Rod Vagg)
-* shrinkwrap: Behave properly with url-installed deps
-* install: Support --save with url install targets
-* Support installing naked tars or single-file modules from urls etc.
-* init: Don't add engines section
-* Don't run make clean on rebuild
-* Added missing unicode replacement (atomizer)
-
-### 1.1.2
-
-Dave Pacheco (2):
- add "npm shrinkwrap"
-
-Martin Cooper (1):
- Fix #1753 Make a copy of the cached objects we'll modify.
-
-Tim Oxley (1):
- correctly remove readme from default npm view command.
-
-Tyler Green (1):
- fix #2187 set terminal columns to Infinity if 0
-
-isaacs (19):
- update minimatch
- update request
- Experimental: single-file modules
- Fix #2172 Don't remove global mans uninstalling local pkgs
- Add --versions flag to show the version of node as well
- Support --json flag for ls output
- update request to 2.9.151
-
-### 1.1
-* Replace system tar dependency with a JS tar
-* Continue to refine
-
### 1.0
* Greatly simplified folder structure
* Install locally (bundle by default)
diff --git a/deps/npm/doc/cli/coding-style.md b/deps/npm/doc/cli/coding-style.md
index 42ac1d785f..5315c575c1 100644
--- a/deps/npm/doc/cli/coding-style.md
+++ b/deps/npm/doc/cli/coding-style.md
@@ -59,8 +59,8 @@ Don't use them except in four situations:
* `for (;;)` loops. They're actually required.
* null loops like: `while (something) ;` (But you'd better have a good
reason for doing that.)
-* `case "foo": doSomething(); break`
-* In front of a leading `(` or `[` at the start of the line.
+* case "foo": doSomething(); break
+* In front of a leading ( or [ at the start of the line.
This prevents the expression from being interpreted
as a function call or property access, respectively.
diff --git a/deps/npm/doc/cli/config.md b/deps/npm/doc/cli/config.md
index 3fd9cb8269..2c6ca26c02 100644
--- a/deps/npm/doc/cli/config.md
+++ b/deps/npm/doc/cli/config.md
@@ -115,8 +115,6 @@ The following shorthands are parsed on the command-line:
* `-l`: `--long`
* `-desc`: `--description`
* `-S`: `--save`
-* `-D`: `--save-dev`
-* `-O`: `--save-optional`
* `-y`: `--yes`
* `-n`: `--yes false`
* `ll` and `la` commands: `ls --long`
@@ -220,28 +218,6 @@ See also the `strict-ssl` config.
The location of npm's cache directory. See `npm-cache(1)`
-### cache-max
-
-* Default: Infinity
-* Type: Number
-
-The maximum time (in seconds) to keep items in the registry cache before
-re-checking against the registry.
-
-Note that no purging is done unless the `npm cache clean` command is
-explicitly used, and that only GET requests use the cache.
-
-### cache-min
-
-* Default: 0
-* Type: Number
-
-The minimum time (in seconds) to keep items in the registry cache before
-re-checking against the registry.
-
-Note that no purging is done unless the `npm cache clean` command is
-explicitly used, and that only GET requests use the cache.
-
### color
* Default: true on Posix, false on Windows
@@ -360,13 +336,6 @@ user.
A proxy to use for outgoing https requests.
-### user-agent
-
-* Default: npm/{npm.version} node/{process.version}
-* Type: String
-
-Sets a User-Agent to the request header
-
### ignore
* Default: ""
@@ -384,7 +353,7 @@ The value `npm init` should use by default for the package version.
### init.author.name
-* Default: ""
+* Default: "0.0.0"
* Type: String
The value `npm init` should use by default for the package author's name.
@@ -403,17 +372,6 @@ The value `npm init` should use by default for the package author's email.
The value `npm init` should use by default for the package author's homepage.
-### json
-
-* Default: false
-* Type: Boolean
-
-Whether or not to output JSON data, rather than the normal output.
-
-This feature is currently experimental, and the output data structures
-for many commands is either not implemented in JSON yet, or subject to
-change. Only the output from `npm ls --json` is currently valid.
-
### link
* Default: false
@@ -586,24 +544,6 @@ Save installed packages to a package.json file as dependencies.
Only works if there is already a package.json file present.
-### save-dev
-
-* Default: false
-* Type: Boolean
-
-Save installed packages to a package.json file as devDependencies.
-
-Only works if there is already a package.json file present.
-
-### save-optional
-
-* Default: false
-* Type: Boolean
-
-Save installed packages to a package.json file as optionalDependencies.
-
-Only works if there is already a package.json file present.
-
### searchopts
* Default: ""
@@ -742,16 +682,6 @@ If true, output the npm version and exit successfully.
Only relevant when specified explicitly on the command line.
-### versions
-
-* Default: false
-* Type: boolean
-
-If true, output the npm version as well as node's `process.versions`
-hash, and exit successfully.
-
-Only relevant when specified explicitly on the command line.
-
### viewer
* Default: "man" on Posix, "browser" on Windows
diff --git a/deps/npm/doc/cli/developers.md b/deps/npm/doc/cli/developers.md
index 7ab905bfa0..9123f35a33 100644
--- a/deps/npm/doc/cli/developers.md
+++ b/deps/npm/doc/cli/developers.md
@@ -27,23 +27,12 @@ A package is:
* d) a `<name>@<version>` that is published on the registry with (c)
* e) a `<name>@<tag>` that points to (d)
* f) a `<name>` that has a "latest" tag satisfying (e)
-* g) a `git` url that, when cloned, results in (a).
Even if you never publish your package, you can still get a lot of
benefits of using npm if you just want to write a node program (a), and
perhaps if you also want to be able to easily install it elsewhere
after packing it up into a tarball (b).
-Git urls can be of the form:
-
- git://github.com/user/project.git#commit-ish
- git+ssh://user@hostname:project.git#commit-ish
- git+http://user@hostname/project/blah.git#commit-ish
- git+https://user@hostname/project/blah.git#commit-ish
-
-The `commit-ish` can be any tag, sha, or branch which can be supplied as
-an argument to `git checkout`. The default is `master`.
-
## The package.json File
You need to have a `package.json` file in the root of your project to do
diff --git a/deps/npm/doc/cli/index.md b/deps/npm/doc/cli/index.md
index ee88f3d8f3..5a9b99be19 100644
--- a/deps/npm/doc/cli/index.md
+++ b/deps/npm/doc/cli/index.md
@@ -170,10 +170,6 @@ npm-index(1) -- Index of all npm documentation
The semantic versioner for npm
-## npm-shrinkwrap(1)
-
- Lock down dependency versions
-
## npm-star(1)
Mark your favorite packages
@@ -327,10 +323,6 @@ npm-index(1) -- Index of all npm documentation
Search for packages
-## npm-shrinkwrap(3)
-
- programmatically generate package shrinkwrap file
-
## npm-start(3)
Start a package
diff --git a/deps/npm/doc/cli/install.md b/deps/npm/doc/cli/install.md
index cfa95e7229..22eb8234e7 100644
--- a/deps/npm/doc/cli/install.md
+++ b/deps/npm/doc/cli/install.md
@@ -7,17 +7,14 @@ npm-install(1) -- Install a package
npm install <tarball file>
npm install <tarball url>
npm install <folder>
- npm install <name> [--save|--save-dev|--save-optional]
+ npm install <name>
npm install <name>@<tag>
npm install <name>@<version>
npm install <name>@<version range>
- npm install <name>@<version range>
## DESCRIPTION
-This command installs a package, and any packages that it depends on. If the
-package has a shrinkwrap file, the installation of dependencies will be driven
-by that. See npm-shrinkwrap(1).
+This command installs a package, and any packages that it depends on.
A `package` is:
@@ -36,116 +33,88 @@ after packing it up into a tarball (b).
* `npm install` (in package directory, no arguments):
+ Install the dependencies in the local node_modules folder.
- Install the dependencies in the local node_modules folder.
-
- In global mode (ie, with `-g` or `--global` appended to the command),
- it installs the current package context (ie, the current working
- directory) as a global package.
-
+ In global mode (ie, with `-g` or `--global` appended to the command),
+ it installs the current package context (ie, the current working
+ directory) as a global package.
* `npm install <folder>`:
-
- Install a package that is sitting in a folder on the filesystem.
+ Install a package that is sitting in a folder on the filesystem.
* `npm install <tarball file>`:
+ Install a package that is sitting on the filesystem. Note: if you just want
+ to link a dev directory into your npm root, you can do this more easily by
+ using `npm link`.
- Install a package that is sitting on the filesystem. Note: if you just want
- to link a dev directory into your npm root, you can do this more easily by
- using `npm link`.
-
- Example:
+ Example:
- npm install ./package.tgz
+ npm install ./package.tgz
* `npm install <tarball url>`:
+ Fetch the tarball url, and then install it. In order to distinguish between
+ this and other options, the argument must start with "http://" or "https://"
- Fetch the tarball url, and then install it. In order to distinguish between
- this and other options, the argument must start with "http://" or "https://"
-
- Example:
-
- npm install https://github.com/indexzero/forever/tarball/v0.5.6
-
-* `npm install <name> [--save|--save-dev|--save-optional]`:
-
- Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
- `npm-config(1)`.)
+ Example:
- In most cases, this will install the latest version
- of the module published on npm.
+ npm install https://github.com/indexzero/forever/tarball/v0.5.6
- Example:
+* `npm install <name>`:
+ Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
+ `npm-config(1)`)
- npm install sax
+ Example:
- `npm install` takes 3 exclusive, optional flags which save or update
- the package version in your main package.json:
+ npm install sax
- * `--save`: Package will appear in your `dependencies`.
-
- * `--save-dev`: Package will appear in your `devDependencies`.
-
- * `--save-optional`: Package will appear in your `optionalDependencies`.
-
- Examples:
-
- npm install sax --save
- npm install node-tap --save-dev
- npm install dtrace-provider --save-optional
-
-
- **Note**: If there is a file or folder named `<name>` in the current
- working directory, then it will try to install that, and only try to
- fetch the package by name if it is not valid.
+ **Note**: If there is a file or folder named `<name>` in the current
+ working directory, then it will try to install that, and only try to
+ fetch the package by name if it is not valid.
* `npm install <name>@<tag>`:
+ Install the version of the package that is referenced by the specified tag.
+ If the tag does not exist in the registry data for that package, then this
+ will fail.
- Install the version of the package that is referenced by the specified tag.
- If the tag does not exist in the registry data for that package, then this
- will fail.
-
- Example:
+ Example:
- npm install sax@latest
+ npm install sax@latest
* `npm install <name>@<version>`:
+ Install the specified version of the package. This will fail if the version
+ has not been published to the registry.
- Install the specified version of the package. This will fail if the version
- has not been published to the registry.
+ Example:
- Example:
-
- npm install sax@0.1.1
+ npm install sax@0.1.1
* `npm install <name>@<version range>`:
+ Install a version of the package matching the specified version range. This
+ will follow the same rules for resolving dependencies described in `npm-json(1)`.
- Install a version of the package matching the specified version range. This
- will follow the same rules for resolving dependencies described in `npm-json(1)`.
-
- Note that most version ranges must be put in quotes so that your shell will
- treat it as a single argument.
+ Note that most version ranges must be put in quotes so that your shell will
+ treat it as a single argument.
- Example:
+ Example:
- npm install sax@">=0.1.0 <0.2.0"
+ npm install sax@">=0.1.0 <0.2.0"
* `npm install <git remote url>`:
- Install a package by cloning a git remote url. The format of the git
- url is:
+ Install a package by cloning a git remote url. The format of the git
+ url is:
- <protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
+ <protocol>://[<user>@]<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.
+ `<protocol>` is one of `git`, `git+ssh`, `git+http`, or
+ `git+https`. If no `<commit-ish>` is specified, then `master` is
+ used.
- Examples:
+ Examples:
- git+ssh://git@github.com:isaacs/npm.git#v1.0.27
- git+https://isaacs@github.com/isaacs/npm.git
- git://github.com/isaacs/npm.git#v1.0.27
+ git+ssh://git@github.com:isaacs/npm.git#v1.0.27
+ git+https://isaacs@github.com/isaacs/npm.git
+ git://github.com/isaacs/npm.git#v1.0.27
You may combine multiple arguments, and even multiple types of arguments.
For example:
@@ -230,4 +199,3 @@ affects a real use-case, it will be investigated.
* npm-folders(1)
* npm-tag(1)
* npm-rm(1)
-* npm-shrinkwrap(1)
diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md
index ddd500e3b1..5f6e7ef621 100644
--- a/deps/npm/doc/cli/json.md
+++ b/deps/npm/doc/cli/json.md
@@ -332,7 +332,6 @@ is a semver compatible version identifier.
* `""` (just an empty string) Same as `*`
* `version1 - version2` Same as `>=version1 <=version2`.
* `range1 || range2` Passes if either range1 or range2 are satisfied.
-* `git...` See 'Git URLs as Dependencies' below
For example, these are all valid:
@@ -388,18 +387,6 @@ of a version range.
This tarball will be downloaded and installed locally to your package at
install time.
-### Git URLs as Dependencies
-
-Git urls can be of the form:
-
- git://github.com/user/project.git#commit-ish
- git+ssh://user@hostname:project.git#commit-ish
- git+http://user@hostname/project/blah.git#commit-ish
- git+https://user@hostname/project/blah.git#commit-ish
-
-The `commit-ish` can be any tag, sha, or branch which can be supplied as
-an argument to `git checkout`. The default is `master`.
-
## devDependencies
If someone is planning on downloading and using your module in their
@@ -428,7 +415,7 @@ node that your stuff works on:
{ "engines" : { "node" : ">=0.1.27 <0.1.30" } }
And, like with dependencies, if you don't specify the version (or if you
-specify "\*" as the version), then any version of node will do.
+specify "*" as the version), then any version of node will do.
If you specify an "engines" field, then npm will require that "node" be
somewhere on that list. If "engines" is omitted, then npm will just assume
@@ -439,36 +426,6 @@ are capable of properly installing your program. For example:
{ "engines" : { "npm" : "~1.0.20" } }
-## os
-
-You can specify which operating systems your
-module will run on:
-
- "os" : [ "darwin", "linux" ]
-
-You can also blacklist instead of whitelist operating systems,
-just prepend the blacklisted os with a '!':
-
- "os" : [ "!win32" ]
-
-The host operating system is determined by `process.platform`
-
-It is allowed to both blacklist, and whitelist, although there isn't any
-good reason to do this.
-
-## cpu
-
-If your code only runs on certain cpu architectures,
-you can specify which ones.
-
- "cpu" : [ "x64", "ia32" ]
-
-Like the `os` option, you can also blacklist architectures:
-
- "cpu" : [ "!arm", "!mips" ]
-
-The host architecture is determined by `process.arch`
-
## preferGlobal
If your package is primarily a command-line application that should be
@@ -485,7 +442,7 @@ to publish it.
This is a way to prevent accidental publication of private repositories.
If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
+to a speciic registry (for example, an internal registry),
then use the `publishConfig` hash described below
to override the `registry` config param at publish-time.
diff --git a/deps/npm/doc/cli/list.md b/deps/npm/doc/cli/list.md
index 93d86cd838..596349a815 100644
--- a/deps/npm/doc/cli/list.md
+++ b/deps/npm/doc/cli/list.md
@@ -22,13 +22,6 @@ When run as `ll` or `la`, it shows extended information by default.
## CONFIGURATION
-### json
-
-* Default: false
-* Type: Boolean
-
-Show information in JSON format.
-
### long
* Default: false
diff --git a/deps/npm/doc/cli/scripts.md b/deps/npm/doc/cli/scripts.md
index 3d33a83919..64b3ec41a0 100644
--- a/deps/npm/doc/cli/scripts.md
+++ b/deps/npm/doc/cli/scripts.md
@@ -62,20 +62,6 @@ Package scripts run in an environment where many pieces of information are
made available regarding the setup of npm and the current state of the
process.
-
-### path
-
-If you depend on modules that define executable scripts, like test suites,
-then those executables will be added to the `PATH` for executing the scripts.
-So, if your package.json has this:
-
- { "name" : "foo"
- , "dependencies" : { "bar" : "0.1.x" }
- , "scripts": { "start" : "bar ./test" } }
-
-then you could run `npm start` to execute the `bar` script, which is exported
-into the `node_modules/.bin` directory on `npm install`.
-
### package.json vars
The package.json fields are tacked onto the `npm_package_` prefix. So, for
diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html
index bec86d5fc7..c4392671df 100644
--- a/deps/npm/html/api/bin.html
+++ b/deps/npm/html/api/bin.html
@@ -19,7 +19,7 @@
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">bin &mdash; npm@1.1.18</p>
+<p id="footer">bin &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/bugs.html b/deps/npm/html/api/bugs.html
index 3dfdec74a1..df2aaf6c30 100644
--- a/deps/npm/html/api/bugs.html
+++ b/deps/npm/html/api/bugs.html
@@ -25,7 +25,7 @@ optional version number.</p>
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">bugs &mdash; npm@1.1.18</p>
+<p id="footer">bugs &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/commands.html b/deps/npm/html/api/commands.html
index 6f051c6cd3..cfdc5f1f50 100644
--- a/deps/npm/html/api/commands.html
+++ b/deps/npm/html/api/commands.html
@@ -28,7 +28,7 @@ usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">commands &mdash; npm@1.1.18</p>
+<p id="footer">commands &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/config.html b/deps/npm/html/api/config.html
index 024e1a22ba..f7431f9afe 100644
--- a/deps/npm/html/api/config.html
+++ b/deps/npm/html/api/config.html
@@ -33,7 +33,7 @@ functions instead.</p>
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">config &mdash; npm@1.1.18</p>
+<p id="footer">config &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/deprecate.html b/deps/npm/html/api/deprecate.html
index 7af3243b04..b68d13449e 100644
--- a/deps/npm/html/api/deprecate.html
+++ b/deps/npm/html/api/deprecate.html
@@ -30,7 +30,7 @@ install the package.</p></li></ul>
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate &mdash; npm@1.1.18</p>
+<p id="footer">deprecate &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/docs.html b/deps/npm/html/api/docs.html
index 7961070891..00913e5f36 100644
--- a/deps/npm/html/api/docs.html
+++ b/deps/npm/html/api/docs.html
@@ -25,7 +25,7 @@ optional version number.</p>
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">docs &mdash; npm@1.1.18</p>
+<p id="footer">docs &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/edit.html b/deps/npm/html/api/edit.html
index e013b14fe7..fbf2ff1cba 100644
--- a/deps/npm/html/api/edit.html
+++ b/deps/npm/html/api/edit.html
@@ -30,7 +30,7 @@ to open. The package can optionally have a version number attached.</p>
<p>Since this command opens an editor in a new process, be careful about where
and how this is used.</p>
</div>
-<p id="footer">edit &mdash; npm@1.1.18</p>
+<p id="footer">edit &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/explore.html b/deps/npm/html/api/explore.html
index f241b0e0da..29fe1f2059 100644
--- a/deps/npm/html/api/explore.html
+++ b/deps/npm/html/api/explore.html
@@ -24,7 +24,7 @@ sure to use <code>npm rebuild &lt;pkg&gt;</code> if you make any changes.</p>
<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
</div>
-<p id="footer">explore &mdash; npm@1.1.18</p>
+<p id="footer">explore &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/help-search.html b/deps/npm/html/api/help-search.html
index 7c58bd3061..d784c426f2 100644
--- a/deps/npm/html/api/help-search.html
+++ b/deps/npm/html/api/help-search.html
@@ -32,7 +32,7 @@ Name of the file that matched</li></ul>
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
-<p id="footer">help-search &mdash; npm@1.1.18</p>
+<p id="footer">help-search &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/init.html b/deps/npm/html/api/init.html
index 4e039b6a2d..1a45b58daf 100644
--- a/deps/npm/html/api/init.html
+++ b/deps/npm/html/api/init.html
@@ -35,7 +35,7 @@ then go ahead and use this programmatically.</p>
<p><a href="../doc/json.html">json(1)</a></p>
</div>
-<p id="footer">init &mdash; npm@1.1.18</p>
+<p id="footer">init &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/install.html b/deps/npm/html/api/install.html
index 6bcc25abee..41d51b37c0 100644
--- a/deps/npm/html/api/install.html
+++ b/deps/npm/html/api/install.html
@@ -25,7 +25,7 @@ the name of a package to be installed.</p>
<p>Finally, 'callback' is a function that will be called when all packages have been
installed or when an error has been encountered.</p>
</div>
-<p id="footer">install &mdash; npm@1.1.18</p>
+<p id="footer">install &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/link.html b/deps/npm/html/api/link.html
index 4c57a873a1..eb1151c17a 100644
--- a/deps/npm/html/api/link.html
+++ b/deps/npm/html/api/link.html
@@ -39,7 +39,7 @@ npm.commands.link('redis', cb) # link-install the package</code></pre>
<p>Now, any changes to the redis package will be reflected in
the package in the current working directory</p>
</div>
-<p id="footer">link &mdash; npm@1.1.18</p>
+<p id="footer">link &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/load.html b/deps/npm/html/api/load.html
index efa09a8b92..f134cfcb50 100644
--- a/deps/npm/html/api/load.html
+++ b/deps/npm/html/api/load.html
@@ -32,7 +32,7 @@ config object.</p>
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
-<p id="footer">load &mdash; npm@1.1.18</p>
+<p id="footer">load &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/ls.html b/deps/npm/html/api/ls.html
index 53b72eaad0..d68d94579d 100644
--- a/deps/npm/html/api/ls.html
+++ b/deps/npm/html/api/ls.html
@@ -28,12 +28,6 @@ like with any other command, such as <code>global</code> to list global packages
<p>If the silent parameter is set to true, nothing will be output to the screen,
but the data will still be returned.</p>
-<p>Callback is provided an error if one occurred, the full data about which
-packages are installed and which dependencies they will receive, and a
-"lite" data object which just shows which versions are installed where.
-Note that the full data object is a circular structure, so care must be
-taken if it is serialized to JSON.</p>
-
<h2 id="CONFIGURATION">CONFIGURATION</h2>
<h3 id="long">long</h3>
@@ -59,7 +53,7 @@ project.</p>
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
-<p id="footer">ls &mdash; npm@1.1.18</p>
+<p id="footer">ls &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/npm.html b/deps/npm/html/api/npm.html
index 9c9e4e5029..f01571b28b 100644
--- a/deps/npm/html/api/npm.html
+++ b/deps/npm/html/api/npm.html
@@ -24,7 +24,7 @@ npm.load(configObject, function (er, npm) {
<h2 id="VERSION">VERSION</h2>
-<p>1.1.18</p>
+<p>1.1.0-2</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
@@ -91,7 +91,7 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p>
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
</div>
-<p id="footer">npm &mdash; npm@1.1.18</p>
+<p id="footer">npm &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/outdated.html b/deps/npm/html/api/outdated.html
index 906641fb85..f145e17d9b 100644
--- a/deps/npm/html/api/outdated.html
+++ b/deps/npm/html/api/outdated.html
@@ -19,7 +19,7 @@ currently outdated.</p>
<p>If the 'packages' parameter is left out, npm will check all packages.</p>
</div>
-<p id="footer">outdated &mdash; npm@1.1.18</p>
+<p id="footer">outdated &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/owner.html b/deps/npm/html/api/owner.html
index 25646e9ebc..7829e5b098 100644
--- a/deps/npm/html/api/owner.html
+++ b/deps/npm/html/api/owner.html
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">owner &mdash; npm@1.1.18</p>
+<p id="footer">owner &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/pack.html b/deps/npm/html/api/pack.html
index a8519f873f..cc6cd870ad 100644
--- a/deps/npm/html/api/pack.html
+++ b/deps/npm/html/api/pack.html
@@ -25,7 +25,7 @@ overwritten the second time.</p>
<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
-<p id="footer">pack &mdash; npm@1.1.18</p>
+<p id="footer">pack &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/prefix.html b/deps/npm/html/api/prefix.html
index e62fad4e15..52c5c8d55a 100644
--- a/deps/npm/html/api/prefix.html
+++ b/deps/npm/html/api/prefix.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">prefix &mdash; npm@1.1.18</p>
+<p id="footer">prefix &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/prune.html b/deps/npm/html/api/prune.html
index e2f4cd9992..e40426942a 100644
--- a/deps/npm/html/api/prune.html
+++ b/deps/npm/html/api/prune.html
@@ -23,7 +23,7 @@
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
</div>
-<p id="footer">prune &mdash; npm@1.1.18</p>
+<p id="footer">prune &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/publish.html b/deps/npm/html/api/publish.html
index 4fd1e0bc3b..7e80a2cc1f 100644
--- a/deps/npm/html/api/publish.html
+++ b/deps/npm/html/api/publish.html
@@ -32,7 +32,7 @@ the registry. Overwrites when the "force" environment variable is set.</p>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
</div>
-<p id="footer">publish &mdash; npm@1.1.18</p>
+<p id="footer">publish &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/rebuild.html b/deps/npm/html/api/rebuild.html
index 2c91060a2a..271c85cf4b 100644
--- a/deps/npm/html/api/rebuild.html
+++ b/deps/npm/html/api/rebuild.html
@@ -22,7 +22,7 @@ the new binary. If no 'packages' parameter is specify, every package will be reb
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">rebuild &mdash; npm@1.1.18</p>
+<p id="footer">rebuild &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/restart.html b/deps/npm/html/api/restart.html
index e75d6e8944..bbff37d955 100644
--- a/deps/npm/html/api/restart.html
+++ b/deps/npm/html/api/restart.html
@@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p>
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">restart &mdash; npm@1.1.18</p>
+<p id="footer">restart &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/root.html b/deps/npm/html/api/root.html
index f9068f3c6a..fe1e0ddd24 100644
--- a/deps/npm/html/api/root.html
+++ b/deps/npm/html/api/root.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">root &mdash; npm@1.1.18</p>
+<p id="footer">root &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/run-script.html b/deps/npm/html/api/run-script.html
index 5828e2c458..6fc2ed3b91 100644
--- a/deps/npm/html/api/run-script.html
+++ b/deps/npm/html/api/run-script.html
@@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p>
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">run-script &mdash; npm@1.1.18</p>
+<p id="footer">run-script &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/search.html b/deps/npm/html/api/search.html
index dc429dd583..dace13e2e0 100644
--- a/deps/npm/html/api/search.html
+++ b/deps/npm/html/api/search.html
@@ -32,7 +32,7 @@ excluded term (the "searchexclude" config). The search is case insensitive
and doesn't try to read your mind (it doesn't do any verb tense matching or the
like).</p>
</div>
-<p id="footer">search &mdash; npm@1.1.18</p>
+<p id="footer">search &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/shrinkwrap.html b/deps/npm/html/api/shrinkwrap.html
index 8022f043a6..fb9d91fc4c 100644
--- a/deps/npm/html/api/shrinkwrap.html
+++ b/deps/npm/html/api/shrinkwrap.html
@@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.</p>
<p>Finally, 'callback' is a function that will be called when the shrinkwrap has
been saved.</p>
</div>
-<p id="footer">shrinkwrap &mdash; npm@1.1.18</p>
+<p id="footer">shrinkwrap &mdash; npm@1.1.16</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/start.html b/deps/npm/html/api/start.html
index 8d126d2b57..28f6eb34fb 100644
--- a/deps/npm/html/api/start.html
+++ b/deps/npm/html/api/start.html
@@ -19,7 +19,7 @@
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">start &mdash; npm@1.1.18</p>
+<p id="footer">start &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/stop.html b/deps/npm/html/api/stop.html
index 0f5ae3f4c5..d6fd91ce88 100644
--- a/deps/npm/html/api/stop.html
+++ b/deps/npm/html/api/stop.html
@@ -19,7 +19,7 @@
<p>npm can run stop on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">stop &mdash; npm@1.1.18</p>
+<p id="footer">stop &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/submodule.html b/deps/npm/html/api/submodule.html
index eb314cb438..a9fed04a54 100644
--- a/deps/npm/html/api/submodule.html
+++ b/deps/npm/html/api/submodule.html
@@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule &mdash; npm@1.1.18</p>
+<p id="footer">submodule &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/tag.html b/deps/npm/html/api/tag.html
index b095e836da..c94f459de2 100644
--- a/deps/npm/html/api/tag.html
+++ b/deps/npm/html/api/tag.html
@@ -29,7 +29,7 @@ parameter is missing or falsey (empty), the default froom the config will be
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
</div>
-<p id="footer">tag &mdash; npm@1.1.18</p>
+<p id="footer">tag &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/test.html b/deps/npm/html/api/test.html
index 8ecf6512d8..d72d7cdf1c 100644
--- a/deps/npm/html/api/test.html
+++ b/deps/npm/html/api/test.html
@@ -22,7 +22,7 @@ true.</p>
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">test &mdash; npm@1.1.18</p>
+<p id="footer">test &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/uninstall.html b/deps/npm/html/api/uninstall.html
index ff023b68b3..1b86afc012 100644
--- a/deps/npm/html/api/uninstall.html
+++ b/deps/npm/html/api/uninstall.html
@@ -22,7 +22,7 @@ the name of a package to be uninstalled.</p>
<p>Finally, 'callback' is a function that will be called when all packages have been
uninstalled or when an error has been encountered.</p>
</div>
-<p id="footer">uninstall &mdash; npm@1.1.18</p>
+<p id="footer">uninstall &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/unpublish.html b/deps/npm/html/api/unpublish.html
index 1aef1c3710..d5afd9a87f 100644
--- a/deps/npm/html/api/unpublish.html
+++ b/deps/npm/html/api/unpublish.html
@@ -26,7 +26,7 @@ is what is meant.</p>
<p>If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.</p>
</div>
-<p id="footer">unpublish &mdash; npm@1.1.18</p>
+<p id="footer">unpublish &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/update.html b/deps/npm/html/api/update.html
index 0f4490553e..a9db9fa58a 100644
--- a/deps/npm/html/api/update.html
+++ b/deps/npm/html/api/update.html
@@ -18,7 +18,7 @@
<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
</div>
-<p id="footer">update &mdash; npm@1.1.18</p>
+<p id="footer">update &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/version.html b/deps/npm/html/api/version.html
index 84e5618c7b..4c4e906a21 100644
--- a/deps/npm/html/api/version.html
+++ b/deps/npm/html/api/version.html
@@ -24,7 +24,7 @@ fail if the repo is not clean.</p>
parameter. The difference, however, is this function will fail if it does
not have exactly one element. The only element should be a version number.</p>
</div>
-<p id="footer">version &mdash; npm@1.1.18</p>
+<p id="footer">version &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/view.html b/deps/npm/html/api/view.html
index 78350def11..d25d2db419 100644
--- a/deps/npm/html/api/view.html
+++ b/deps/npm/html/api/view.html
@@ -99,7 +99,7 @@ the field name.</p>
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">view &mdash; npm@1.1.18</p>
+<p id="footer">view &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/api/whoami.html b/deps/npm/html/api/whoami.html
index de061a7588..85b3134952 100644
--- a/deps/npm/html/api/whoami.html
+++ b/deps/npm/html/api/whoami.html
@@ -21,7 +21,7 @@
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">whoami &mdash; npm@1.1.18</p>
+<p id="footer">whoami &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index 610356a714..b353238bfc 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -267,7 +267,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.18</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/adduser.html b/deps/npm/html/doc/adduser.html
index d39098d8b7..9757f703e6 100644
--- a/deps/npm/html/doc/adduser.html
+++ b/deps/npm/html/doc/adduser.html
@@ -39,7 +39,7 @@ authorize on a new machine.</p>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
</div>
-<p id="footer">adduser &mdash; npm@1.1.18</p>
+<p id="footer">adduser &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/bin.html b/deps/npm/html/doc/bin.html
index a3f6d9e6dc..582493e575 100644
--- a/deps/npm/html/doc/bin.html
+++ b/deps/npm/html/doc/bin.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">bin &mdash; npm@1.1.18</p>
+<p id="footer">bin &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/bugs.html b/deps/npm/html/doc/bugs.html
index 0802ecf387..4653330968 100644
--- a/deps/npm/html/doc/bugs.html
+++ b/deps/npm/html/doc/bugs.html
@@ -36,7 +36,7 @@ config param.</p>
<ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">bugs &mdash; npm@1.1.18</p>
+<p id="footer">bugs &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/build.html b/deps/npm/html/doc/build.html
index 7b06b5c2ef..d0709fb51d 100644
--- a/deps/npm/html/doc/build.html
+++ b/deps/npm/html/doc/build.html
@@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul>
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">build &mdash; npm@1.1.18</p>
+<p id="footer">build &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/bundle.html b/deps/npm/html/doc/bundle.html
index 8103455f47..b449b49154 100644
--- a/deps/npm/html/doc/bundle.html
+++ b/deps/npm/html/doc/bundle.html
@@ -20,7 +20,7 @@ install packages into the local space.</p>
<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">bundle &mdash; npm@1.1.18</p>
+<p id="footer">bundle &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/cache.html b/deps/npm/html/doc/cache.html
index fee53f14fa..92fbf64670 100644
--- a/deps/npm/html/doc/cache.html
+++ b/deps/npm/html/doc/cache.html
@@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p>
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
</div>
-<p id="footer">cache &mdash; npm@1.1.18</p>
+<p id="footer">cache &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/changelog.html b/deps/npm/html/doc/changelog.html
index 8d8df24f58..514b76258f 100644
--- a/deps/npm/html/doc/changelog.html
+++ b/deps/npm/html/doc/changelog.html
@@ -10,37 +10,6 @@
<h2 id="HISTORY">HISTORY</h2>
-<h3 id="1-1-3-1-1-4">1.1.3, 1.1.4</h3>
-
-<ul><li>Update request to support HTTPS-over-HTTP proxy tunneling</li><li>Throw on undefined envs in config settings</li><li>Update which to 1.0.5</li><li>Fix windows UNC busyloop in findPrefix</li><li>Bundle nested bundleDependencies properly</li><li>Alias adduser to add-user</li><li>Doc updates (Christian Howe, Henrik Hodne, Andrew Lunny)</li><li>ignore logfd/outfd streams in makeEnv() (Rod Vagg)</li><li>shrinkwrap: Behave properly with url-installed deps</li><li>install: Support --save with url install targets</li><li>Support installing naked tars or single-file modules from urls etc.</li><li>init: Don't add engines section</li><li>Don't run make clean on rebuild</li><li>Added missing unicode replacement (atomizer)</li></ul>
-
-<h3 id="1-1-2">1.1.2</h3>
-
-<p>Dave Pacheco (2):
- add "npm shrinkwrap"</p>
-
-<p>Martin Cooper (1):
- Fix #1753 Make a copy of the cached objects we'll modify.</p>
-
-<p>Tim Oxley (1):
- correctly remove readme from default npm view command.</p>
-
-<p>Tyler Green (1):
- fix #2187 set terminal columns to Infinity if 0</p>
-
-<p>isaacs (19):
- update minimatch
- update request
- Experimental: single-file modules
- Fix #2172 Don't remove global mans uninstalling local pkgs
- Add --versions flag to show the version of node as well
- Support --json flag for ls output
- update request to 2.9.151</p>
-
-<h3 id="1-1">1.1</h3>
-
-<ul><li>Replace system tar dependency with a JS tar</li><li>Continue to refine</li></ul>
-
<h3 id="1-0">1.0</h3>
<ul><li>Greatly simplified folder structure </li><li>Install locally (bundle by default) </li><li>Drastic rearchitecture</li></ul>
@@ -65,7 +34,7 @@
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
</div>
-<p id="footer">changelog &mdash; npm@1.1.18</p>
+<p id="footer">changelog &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/coding-style.html b/deps/npm/html/doc/coding-style.html
index ec6c9f1ee3..1d05ff507f 100644
--- a/deps/npm/html/doc/coding-style.html
+++ b/deps/npm/html/doc/coding-style.html
@@ -64,7 +64,7 @@ while (foo) {
<p>Don't use them except in four situations:</p>
<ul><li><code>for (;;)</code> loops. They're actually required.</li><li>null loops like: <code>while (something) ;</code> (But you'd better have a good
-reason for doing that.)</li><li><code>case "foo": doSomething(); break</code></li><li>In front of a leading <code>(</code> or <code>[</code> at the start of the line.
+reason for doing that.)</li><li>case "foo": doSomething(); break</li><li>In front of a leading ( or [ at the start of the line.
This prevents the expression from being interpreted
as a function call or property access, respectively.</li></ul>
@@ -191,7 +191,7 @@ set to anything."</p>
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">coding-style &mdash; npm@1.1.18</p>
+<p id="footer">coding-style &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/completion.html b/deps/npm/html/doc/completion.html
index 5964d57183..386a2760ae 100644
--- a/deps/npm/html/doc/completion.html
+++ b/deps/npm/html/doc/completion.html
@@ -33,7 +33,7 @@ completions based on the arguments.</p>
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">completion &mdash; npm@1.1.18</p>
+<p id="footer">completion &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/config.html b/deps/npm/html/doc/config.html
index ae2b8adb32..c950154f24 100644
--- a/deps/npm/html/doc/config.html
+++ b/deps/npm/html/doc/config.html
@@ -105,7 +105,7 @@ global config.</p>
<p>The following shorthands are parsed on the command-line:</p>
-<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-D</code>: <code>--save-dev</code></li><li><code>-O</code>: <code>--save-optional</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
+<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
<p>If the specified configuration param resolves unambiguously to a known
configuration parameter, then it is expanded to that configuration
@@ -200,26 +200,6 @@ to trust only that specific signing authority.</p>
<p>The location of npm's cache directory. See <code><a href="../doc/cache.html">cache(1)</a></code></p>
-<h3 id="cache-max">cache-max</h3>
-
-<ul><li>Default: Infinity</li><li>Type: Number</li></ul>
-
-<p>The maximum time (in seconds) to keep items in the registry cache before
-re-checking against the registry.</p>
-
-<p>Note that no purging is done unless the <code>npm cache clean</code> command is
-explicitly used, and that only GET requests use the cache.</p>
-
-<h3 id="cache-min">cache-min</h3>
-
-<ul><li>Default: 0</li><li>Type: Number</li></ul>
-
-<p>The minimum time (in seconds) to keep items in the registry cache before
-re-checking against the registry.</p>
-
-<p>Note that no purging is done unless the <code>npm cache clean</code> command is
-explicitly used, and that only GET requests use the cache.</p>
-
<h3 id="color">color</h3>
<ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>"always"</code></li></ul>
@@ -320,12 +300,6 @@ user.</p>
<p>A proxy to use for outgoing https requests.</p>
-<h3 id="user-agent">user-agent</h3>
-
-<ul><li>Default: npm/{npm.version} node/{process.version}</li><li>Type: String</li></ul>
-
-<p>Sets a User-Agent to the request header</p>
-
<h3 id="ignore">ignore</h3>
<ul><li>Default: ""</li><li>Type: string</li></ul>
@@ -341,7 +315,7 @@ from packages when building tarballs.</p>
<h3 id="init-author-name">init.author.name</h3>
-<ul><li>Default: ""</li><li>Type: String</li></ul>
+<ul><li>Default: "0.0.0"</li><li>Type: String</li></ul>
<p>The value <code>npm init</code> should use by default for the package author's name.</p>
@@ -357,16 +331,6 @@ from packages when building tarballs.</p>
<p>The value <code>npm init</code> should use by default for the package author's homepage.</p>
-<h3 id="json">json</h3>
-
-<ul><li>Default: false</li><li>Type: Boolean</li></ul>
-
-<p>Whether or not to output JSON data, rather than the normal output.</p>
-
-<p>This feature is currently experimental, and the output data structures
-for many commands is either not implemented in JSON yet, or subject to
-change. Only the output from <code>npm ls --json</code> is currently valid.</p>
-
<h3 id="link">link</h3>
<ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@ -516,22 +480,6 @@ this as true.</p>
<p>Only works if there is already a package.json file present.</p>
-<h3 id="save-dev">save-dev</h3>
-
-<ul><li>Default: false</li><li>Type: Boolean</li></ul>
-
-<p>Save installed packages to a package.json file as devDependencies.</p>
-
-<p>Only works if there is already a package.json file present.</p>
-
-<h3 id="save-optional">save-optional</h3>
-
-<ul><li>Default: false</li><li>Type: Boolean</li></ul>
-
-<p>Save installed packages to a package.json file as optionalDependencies.</p>
-
-<p>Only works if there is already a package.json file present.</p>
-
<h3 id="searchopts">searchopts</h3>
<ul><li>Default: ""</li><li>Type: String</li></ul>
@@ -653,15 +601,6 @@ this value. Thus, the defaults are <code>0755</code> and <code>0644</code> resp
<p>Only relevant when specified explicitly on the command line.</p>
-<h3 id="versions">versions</h3>
-
-<ul><li>Default: false</li><li>Type: boolean</li></ul>
-
-<p>If true, output the npm version as well as node's <code>process.versions</code>
-hash, and exit successfully.</p>
-
-<p>Only relevant when specified explicitly on the command line.</p>
-
<h3 id="viewer">viewer</h3>
<ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul>
@@ -684,7 +623,7 @@ then answer "no" to any prompt.</p>
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">config &mdash; npm@1.1.18</p>
+<p id="footer">config &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/deprecate.html b/deps/npm/html/doc/deprecate.html
index 74b053ce84..43f07a490f 100644
--- a/deps/npm/html/doc/deprecate.html
+++ b/deps/npm/html/doc/deprecate.html
@@ -29,7 +29,7 @@ something like this:</p>
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate &mdash; npm@1.1.18</p>
+<p id="footer">deprecate &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/developers.html b/deps/npm/html/doc/developers.html
index c4765ff9d0..ba3189bb60 100644
--- a/deps/npm/html/doc/developers.html
+++ b/deps/npm/html/doc/developers.html
@@ -28,23 +28,13 @@ topic, or <code>npm help thing</code> to see the same information.</p>
<p>A package is:</p>
-<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code>&lt;name&gt;@&lt;version&gt;</code> that is published on the registry with (c)</li><li>e) a <code>&lt;name&gt;@&lt;tag&gt;</code> that points to (d)</li><li>f) a <code>&lt;name&gt;</code> that has a "latest" tag satisfying (e)</li><li>g) a <code>git</code> url that, when cloned, results in (a).</li></ul>
+<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code>&lt;name&gt;@&lt;version&gt;</code> that is published on the registry with (c)</li><li>e) a <code>&lt;name&gt;@&lt;tag&gt;</code> that points to (d)</li><li>f) a <code>&lt;name&gt;</code> that has a "latest" tag satisfying (e)</li></ul>
<p>Even if you never publish your package, you can still get a lot of
benefits of using npm if you just want to write a node program (a), and
perhaps if you also want to be able to easily install it elsewhere
after packing it up into a tarball (b).</p>
-<p>Git urls can be of the form:</p>
-
-<pre><code>git://github.com/user/project.git#commit-ish
-git+ssh://user@hostname:project.git#commit-ish
-git+http://user@hostname/project/blah.git#commit-ish
-git+https://user@hostname/project/blah.git#commit-ish</code></pre>
-
-<p>The <code>commit-ish</code> can be any tag, sha, or branch which can be supplied as
-an argument to <code>git checkout</code>. The default is <code>master</code>.</p>
-
<h2 id="The-package-json-File">The package.json File</h2>
<p>You need to have a <code>package.json</code> file in the root of your project to do
@@ -160,7 +150,7 @@ from a fresh checkout.</p>
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">developers &mdash; npm@1.1.18</p>
+<p id="footer">developers &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/disputes.html b/deps/npm/html/doc/disputes.html
index 68a626be65..074fa001e2 100644
--- a/deps/npm/html/doc/disputes.html
+++ b/deps/npm/html/doc/disputes.html
@@ -80,7 +80,7 @@ license statement)</li><li>Illegal content.</li></ol>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">disputes &mdash; npm@1.1.18</p>
+<p id="footer">disputes &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/docs.html b/deps/npm/html/doc/docs.html
index 6ebcb41873..aad9a402c1 100644
--- a/deps/npm/html/doc/docs.html
+++ b/deps/npm/html/doc/docs.html
@@ -37,7 +37,7 @@ config param.</p>
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">docs &mdash; npm@1.1.18</p>
+<p id="footer">docs &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/edit.html b/deps/npm/html/doc/edit.html
index 8c9cc7587d..0a5371e16f 100644
--- a/deps/npm/html/doc/edit.html
+++ b/deps/npm/html/doc/edit.html
@@ -37,7 +37,7 @@ or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul>
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">edit &mdash; npm@1.1.18</p>
+<p id="footer">edit &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/explore.html b/deps/npm/html/doc/explore.html
index a44d335ec9..6c29e11235 100644
--- a/deps/npm/html/doc/explore.html
+++ b/deps/npm/html/doc/explore.html
@@ -40,7 +40,7 @@ Windows</li><li>Type: path</li></ul>
<ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">explore &mdash; npm@1.1.18</p>
+<p id="footer">explore &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/faq.html b/deps/npm/html/doc/faq.html
index aa8fa17a7f..d4853ac42f 100644
--- a/deps/npm/html/doc/faq.html
+++ b/deps/npm/html/doc/faq.html
@@ -241,7 +241,7 @@ We'll have someone kick it or something.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">faq &mdash; npm@1.1.18</p>
+<p id="footer">faq &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/folders.html b/deps/npm/html/doc/folders.html
index b670abf5ec..987c5b8a86 100644
--- a/deps/npm/html/doc/folders.html
+++ b/deps/npm/html/doc/folders.html
@@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../doc/json.html">json(1)</a></co
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">folders &mdash; npm@1.1.18</p>
+<p id="footer">folders &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/help-search.html b/deps/npm/html/doc/help-search.html
index 2dfa34071f..92e8f2e545 100644
--- a/deps/npm/html/doc/help-search.html
+++ b/deps/npm/html/doc/help-search.html
@@ -38,7 +38,7 @@ where the terms were found in the documentation.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
</div>
-<p id="footer">help-search &mdash; npm@1.1.18</p>
+<p id="footer">help-search &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/help.html b/deps/npm/html/doc/help.html
index e01dd04721..576df1b25e 100644
--- a/deps/npm/html/doc/help.html
+++ b/deps/npm/html/doc/help.html
@@ -36,7 +36,7 @@ matches are equivalent to specifying a topic name.</p>
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">help &mdash; npm@1.1.18</p>
+<p id="footer">help &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index 5109af4736..cd527bb2ae 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -178,10 +178,6 @@
<p> The semantic versioner for npm</p>
-<h2 id="npm-shrinkwrap-1"><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></h2>
-
-<p> Lock down dependency versions</p>
-
<h2 id="npm-star-1"><a href="../doc/star.html">star(1)</a></h2>
<p> Mark your favorite packages</p>
@@ -336,10 +332,6 @@
<p> Search for packages</p>
-<h2 id="npm-shrinkwrap-3"><a href="../api/shrinkwrap.html">shrinkwrap(3)</a></h2>
-
-<p> programmatically generate package shrinkwrap file</p>
-
<h2 id="npm-start-3"><a href="../api/start.html">start(3)</a></h2>
<p> Start a package</p>
@@ -384,7 +376,7 @@
<p> Display npm username</p>
</div>
-<p id="footer">index &mdash; npm@1.1.18</p>
+<p id="footer">index &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/init.html b/deps/npm/html/doc/init.html
index afa20aad36..fb895e7e61 100644
--- a/deps/npm/html/doc/init.html
+++ b/deps/npm/html/doc/init.html
@@ -29,7 +29,7 @@ without a really good reason to do so.</p>
<ul><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
</div>
-<p id="footer">init &mdash; npm@1.1.18</p>
+<p id="footer">init &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/install.html b/deps/npm/html/doc/install.html
index e9ac77dec7..f059df5080 100644
--- a/deps/npm/html/doc/install.html
+++ b/deps/npm/html/doc/install.html
@@ -14,17 +14,14 @@
npm install &lt;tarball file&gt;
npm install &lt;tarball url&gt;
npm install &lt;folder&gt;
-npm install &lt;name&gt; [--save|--save-dev|--save-optional]
+npm install &lt;name&gt;
npm install &lt;name&gt;@&lt;tag&gt;
npm install &lt;name&gt;@&lt;version&gt;
-npm install &lt;name&gt;@&lt;version range&gt;
npm install &lt;name&gt;@&lt;version range&gt;</code></pre>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
-<p>This command installs a package, and any packages that it depends on. If the
-package has a shrinkwrap file, the installation of dependencies will be driven
-by that. See <a href="../doc/shrinkwrap.html">shrinkwrap(1)</a>.</p>
+<p>This command installs a package, and any packages that it depends on.</p>
<p>A <code>package</code> is:</p>
@@ -35,29 +32,33 @@ benefits of using npm if you just want to write a node program (a), and
perhaps if you also want to be able to easily install it elsewhere
after packing it up into a tarball (b).</p>
-<ul><li><p><code>npm install</code> (in package directory, no arguments):</p><p>Install the dependencies in the local node_modules folder.</p><p>In global mode (ie, with <code>-g</code> or <code>--global</code> appended to the command),
+<ul><li><p><code>npm install</code> (in package directory, no arguments):
+Install the dependencies in the local node_modules folder.</p><p>In global mode (ie, with <code>-g</code> or <code>--global</code> appended to the command),
it installs the current package context (ie, the current working
-directory) as a global package.</p></li><li><p><code>npm install &lt;folder&gt;</code>:</p><p>Install a package that is sitting in a folder on the filesystem.</p></li><li><p><code>npm install &lt;tarball file&gt;</code>:</p><p>Install a package that is sitting on the filesystem. Note: if you just want
+directory) as a global package.</p></li><li><p><code>npm install &lt;folder&gt;</code>:
+Install a package that is sitting in a folder on the filesystem.</p></li><li><p><code>npm install &lt;tarball file&gt;</code>:
+Install a package that is sitting on the filesystem. Note: if you just want
to link a dev directory into your npm root, you can do this more easily by
-using <code>npm link</code>.</p><p>Example:</p><pre><code> npm install ./package.tgz</code></pre></li><li><p><code>npm install &lt;tarball url&gt;</code>:</p><p>Fetch the tarball url, and then install it. In order to distinguish between
-this and other options, the argument must start with "http://" or "https://"</p><p>Example:</p><pre><code> npm install https://github.com/indexzero/forever/tarball/v0.5.6</code></pre></li><li><p><code>npm install &lt;name&gt; [--save|--save-dev|--save-optional]</code>:</p><p>Do a <code>&lt;name&gt;@&lt;tag&gt;</code> install, where <code>&lt;tag&gt;</code> is the "tag" config. (See
-<code><a href="../doc/config.html">config(1)</a></code>.)</p><p>In most cases, this will install the latest version
-of the module published on npm.</p><p>Example:</p><p> npm install sax</p><p><code>npm install</code> takes 3 exclusive, optional flags which save or update
-the package version in your main package.json:</p><ul><li><p><code>--save</code>: Package will appear in your <code>dependencies</code>.</p></li><li><p><code>--save-dev</code>: Package will appear in your <code>devDependencies</code>.</p></li><li><p><code>--save-optional</code>: Package will appear in your <code>optionalDependencies</code>.</p><p>Examples:</p><p> npm install sax --save
- npm install node-tap --save-dev
- npm install dtrace-provider --save-optional</p><p><strong>Note</strong>: If there is a file or folder named <code>&lt;name&gt;</code> in the current
+using <code>npm link</code>.</p><p>Example:</p><pre><code>npm install ./package.tgz</code></pre></li><li><p><code>npm install &lt;tarball url&gt;</code>:
+Fetch the tarball url, and then install it. In order to distinguish between
+this and other options, the argument must start with "http://" or "https://"</p><p>Example:</p><pre><code>npm install https://github.com/indexzero/forever/tarball/v0.5.6</code></pre></li><li><p><code>npm install &lt;name&gt;</code>:
+Do a <code>&lt;name&gt;@&lt;tag&gt;</code> install, where <code>&lt;tag&gt;</code> is the "tag" config. (See
+<code><a href="../doc/config.html">config(1)</a></code>)</p><p>Example:</p><pre><code>npm install sax</code></pre><p><strong>Note</strong>: If there is a file or folder named <code>&lt;name&gt;</code> in the current
working directory, then it will try to install that, and only try to
-fetch the package by name if it is not valid.</p></li></ul></li><li><p><code>npm install &lt;name&gt;@&lt;tag&gt;</code>:</p><p>Install the version of the package that is referenced by the specified tag.
+fetch the package by name if it is not valid.</p></li><li><p><code>npm install &lt;name&gt;@&lt;tag&gt;</code>:
+Install the version of the package that is referenced by the specified tag.
If the tag does not exist in the registry data for that package, then this
-will fail.</p><p>Example:</p><pre><code> npm install sax@latest</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version&gt;</code>:</p><p>Install the specified version of the package. This will fail if the version
-has not been published to the registry.</p><p>Example:</p><pre><code> npm install sax@0.1.1</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version range&gt;</code>:</p><p>Install a version of the package matching the specified version range. This
+will fail.</p><p>Example:</p><pre><code>npm install sax@latest</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version&gt;</code>:
+Install the specified version of the package. This will fail if the version
+has not been published to the registry.</p><p>Example:</p><pre><code>npm install sax@0.1.1</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version range&gt;</code>:
+Install a version of the package matching the specified version range. This
will follow the same rules for resolving dependencies described in <code><a href="../doc/json.html">json(1)</a></code>.</p><p>Note that most version ranges must be put in quotes so that your shell will
-treat it as a single argument.</p><p>Example:</p><p> npm install sax@"&gt;=0.1.0 &lt;0.2.0"</p></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><p> &lt;protocol&gt;://[&lt;user&gt;@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]</p><p><code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
+treat it as a single argument.</p><p>Example:</p><pre><code>npm install sax@"&gt;=0.1.0 &lt;0.2.0"</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;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:isaacs/npm.git#v1.0.27
- git+https://isaacs@github.com/isaacs/npm.git
- git://github.com/isaacs/npm.git#v1.0.27</code></pre></li></ul>
+used.</p><p>Examples:</p><pre><code>git+ssh://git@github.com:isaacs/npm.git#v1.0.27
+git+https://isaacs@github.com/isaacs/npm.git
+git://github.com/isaacs/npm.git#v1.0.27</code></pre></li></ul>
<p>You may combine multiple arguments, and even multiple types of arguments.
For example:</p>
@@ -131,9 +132,9 @@ affects a real use-case, it will be investigated.</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
-<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
+<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">install &mdash; npm@1.1.18</p>
+<p id="footer">install &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/json.html b/deps/npm/html/doc/json.html
index 686992b0cc..54e29f8b73 100644
--- a/deps/npm/html/doc/json.html
+++ b/deps/npm/html/doc/json.html
@@ -311,7 +311,7 @@ space-separated descriptors, OR a range like "fromVersion - toVersion"</p>
<p>Version range descriptors may be any of the following styles, where "version"
is a semver compatible version identifier.</p>
-<ul><li><code>version</code> Must match <code>version</code> exactly</li><li><code>=version</code> Same as just <code>version</code></li><li><code>&gt;version</code> Must be greater than <code>version</code></li><li><code>&gt;=version</code> etc</li><li><code>&lt;version</code></li><li><code>&lt;=version</code></li><li><code>~version</code> See 'Tilde Version Ranges' below</li><li><code>1.2.x</code> See 'X Version Ranges' below</li><li><code>http://...</code> See 'URLs as Dependencies' below</li><li><code>*</code> Matches any version</li><li><code>""</code> (just an empty string) Same as <code>*</code></li><li><code>version1 - version2</code> Same as <code>&gt;=version1 &lt;=version2</code>.</li><li><code>range1 || range2</code> Passes if either range1 or range2 are satisfied.</li><li><code>git...</code> See 'Git URLs as Dependencies' below</li></ul>
+<ul><li><code>version</code> Must match <code>version</code> exactly</li><li><code>=version</code> Same as just <code>version</code></li><li><code>&gt;version</code> Must be greater than <code>version</code></li><li><code>&gt;=version</code> etc</li><li><code>&lt;version</code></li><li><code>&lt;=version</code></li><li><code>~version</code> See 'Tilde Version Ranges' below</li><li><code>1.2.x</code> See 'X Version Ranges' below</li><li><code>http://...</code> See 'URLs as Dependencies' below</li><li><code>*</code> Matches any version</li><li><code>""</code> (just an empty string) Same as <code>*</code></li><li><code>version1 - version2</code> Same as <code>&gt;=version1 &lt;=version2</code>.</li><li><code>range1 || range2</code> Passes if either range1 or range2 are satisfied.</li></ul>
<p>For example, these are all valid:</p>
@@ -360,18 +360,6 @@ of a version range.</p>
<p>This tarball will be downloaded and installed locally to your package at
install time.</p>
-<h3 id="Git-URLs-as-Dependencies">Git URLs as Dependencies</h3>
-
-<p>Git urls can be of the form:</p>
-
-<pre><code>git://github.com/user/project.git#commit-ish
-git+ssh://user@hostname:project.git#commit-ish
-git+http://user@hostname/project/blah.git#commit-ish
-git+https://user@hostname/project/blah.git#commit-ish</code></pre>
-
-<p>The <code>commit-ish</code> can be any tag, sha, or branch which can be supplied as
-an argument to <code>git checkout</code>. The default is <code>master</code>.</p>
-
<h2 id="devDependencies">devDependencies</h2>
<p>If someone is planning on downloading and using your module in their
@@ -411,36 +399,6 @@ are capable of properly installing your program. For example:</p>
<pre><code>{ "engines" : { "npm" : "~1.0.20" } }</code></pre>
-<h2 id="os">os</h2>
-
-<p>You can specify which operating systems your
-module will run on:</p>
-
-<pre><code>"os" : [ "darwin", "linux" ]</code></pre>
-
-<p>You can also blacklist instead of whitelist operating systems,
-just prepend the blacklisted os with a '!':</p>
-
-<pre><code>"os" : [ "!win32" ]</code></pre>
-
-<p>The host operating system is determined by <code>process.platform</code></p>
-
-<p>It is allowed to both blacklist, and whitelist, although there isn't any
-good reason to do this.</p>
-
-<h2 id="cpu">cpu</h2>
-
-<p>If your code only runs on certain cpu architectures,
-you can specify which ones.</p>
-
-<pre><code>"cpu" : [ "x64", "ia32" ]</code></pre>
-
-<p>Like the <code>os</code> option, you can also blacklist architectures:</p>
-
-<pre><code>"cpu" : [ "!arm", "!mips" ]</code></pre>
-
-<p>The host architecture is determined by <code>process.arch</code></p>
-
<h2 id="preferGlobal">preferGlobal</h2>
<p>If your package is primarily a command-line application that should be
@@ -457,7 +415,7 @@ to publish it.</p>
<p>This is a way to prevent accidental publication of private repositories.
If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
+to a speciic registry (for example, an internal registry),
then use the <code>publishConfig</code> hash described below
to override the <code>registry</code> config param at publish-time.</p>
@@ -478,7 +436,7 @@ overridden.</p>
<ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">json &mdash; npm@1.1.18</p>
+<p id="footer">json &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/link.html b/deps/npm/html/doc/link.html
index 10791fe94f..95cdbdd846 100644
--- a/deps/npm/html/doc/link.html
+++ b/deps/npm/html/doc/link.html
@@ -58,7 +58,7 @@ installation target into your project's <code>node_modules</code> folder.</p>
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">link &mdash; npm@1.1.18</p>
+<p id="footer">link &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/list.html b/deps/npm/html/doc/list.html
index 74862a6d4e..4d25dd7033 100644
--- a/deps/npm/html/doc/list.html
+++ b/deps/npm/html/doc/list.html
@@ -29,12 +29,6 @@ like with any other command, such as <code>-g</code> to list global packages.</p
<h2 id="CONFIGURATION">CONFIGURATION</h2>
-<h3 id="json">json</h3>
-
-<ul><li>Default: false</li><li>Type: Boolean</li></ul>
-
-<p>Show information in JSON format.</p>
-
<h3 id="long">long</h3>
<ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@ -58,7 +52,7 @@ project.</p>
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
</div>
-<p id="footer">list &mdash; npm@1.1.18</p>
+<p id="footer">list &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/npm.html b/deps/npm/html/doc/npm.html
index 1ec20192c5..ba12b6edab 100644
--- a/deps/npm/html/doc/npm.html
+++ b/deps/npm/html/doc/npm.html
@@ -14,7 +14,7 @@
<h2 id="VERSION">VERSION</h2>
-<p>1.1.18</p>
+<p>1.1.0-2</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
@@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm &mdash; npm@1.1.18</p>
+<p id="footer">npm &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/outdated.html b/deps/npm/html/doc/outdated.html
index e7940fd8e2..63f6017441 100644
--- a/deps/npm/html/doc/outdated.html
+++ b/deps/npm/html/doc/outdated.html
@@ -21,7 +21,7 @@ packages are currently outdated.</p>
<ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">outdated &mdash; npm@1.1.18</p>
+<p id="footer">outdated &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/owner.html b/deps/npm/html/doc/owner.html
index 1265d51713..828307eeec 100644
--- a/deps/npm/html/doc/owner.html
+++ b/deps/npm/html/doc/owner.html
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">owner &mdash; npm@1.1.18</p>
+<p id="footer">owner &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/pack.html b/deps/npm/html/doc/pack.html
index d49f2b4588..6d77e17f9a 100644
--- a/deps/npm/html/doc/pack.html
+++ b/deps/npm/html/doc/pack.html
@@ -29,7 +29,7 @@ overwritten the second time.</p>
<ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">pack &mdash; npm@1.1.18</p>
+<p id="footer">pack &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/prefix.html b/deps/npm/html/doc/prefix.html
index 91df87a228..eca0805abe 100644
--- a/deps/npm/html/doc/prefix.html
+++ b/deps/npm/html/doc/prefix.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">prefix &mdash; npm@1.1.18</p>
+<p id="footer">prefix &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/prune.html b/deps/npm/html/doc/prune.html
index c8ae0c632c..fc2e919c7e 100644
--- a/deps/npm/html/doc/prune.html
+++ b/deps/npm/html/doc/prune.html
@@ -25,7 +25,7 @@ package's dependencies list.</p>
<ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">prune &mdash; npm@1.1.18</p>
+<p id="footer">prune &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/publish.html b/deps/npm/html/doc/publish.html
index 523d195d84..46662fad0e 100644
--- a/deps/npm/html/doc/publish.html
+++ b/deps/npm/html/doc/publish.html
@@ -29,7 +29,7 @@ the registry. Overwrites when the "--force" flag is set.</p>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
</div>
-<p id="footer">publish &mdash; npm@1.1.18</p>
+<p id="footer">publish &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/rebuild.html b/deps/npm/html/doc/rebuild.html
index 206ac82a4d..fea67ea0c6 100644
--- a/deps/npm/html/doc/rebuild.html
+++ b/deps/npm/html/doc/rebuild.html
@@ -25,7 +25,7 @@ the new binary.</p>
<ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">rebuild &mdash; npm@1.1.18</p>
+<p id="footer">rebuild &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/registry.html b/deps/npm/html/doc/registry.html
index 9748847c52..ed4455513a 100644
--- a/deps/npm/html/doc/registry.html
+++ b/deps/npm/html/doc/registry.html
@@ -97,7 +97,7 @@ ask for help on the <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">registry &mdash; npm@1.1.18</p>
+<p id="footer">registry &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/removing-npm.html b/deps/npm/html/doc/removing-npm.html
index 0e8bfabddc..06109b0378 100644
--- a/deps/npm/html/doc/removing-npm.html
+++ b/deps/npm/html/doc/removing-npm.html
@@ -58,7 +58,7 @@ modules. To track those down, you can do the following:</p>
<ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm &mdash; npm@1.1.18</p>
+<p id="footer">removing-npm &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/restart.html b/deps/npm/html/doc/restart.html
index 44f987fe65..07fe2c36a3 100644
--- a/deps/npm/html/doc/restart.html
+++ b/deps/npm/html/doc/restart.html
@@ -24,7 +24,7 @@ the "start" script.</p>
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">restart &mdash; npm@1.1.18</p>
+<p id="footer">restart &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/root.html b/deps/npm/html/doc/root.html
index 3cca20a70b..fb5bb965ed 100644
--- a/deps/npm/html/doc/root.html
+++ b/deps/npm/html/doc/root.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">root &mdash; npm@1.1.18</p>
+<p id="footer">root &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/run-script.html b/deps/npm/html/doc/run-script.html
index 14ce47ed0b..f9706a79d1 100644
--- a/deps/npm/html/doc/run-script.html
+++ b/deps/npm/html/doc/run-script.html
@@ -23,7 +23,7 @@ called directly, as well.</p>
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">run-script &mdash; npm@1.1.18</p>
+<p id="footer">run-script &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/scripts.html b/deps/npm/html/doc/scripts.html
index 11d75e10a0..16b3026d29 100644
--- a/deps/npm/html/doc/scripts.html
+++ b/deps/npm/html/doc/scripts.html
@@ -52,19 +52,6 @@ privileges.</p>
made available regarding the setup of npm and the current state of the
process.</p>
-<h3 id="path">path</h3>
-
-<p>If you depend on modules that define executable scripts, like test suites,
-then those executables will be added to the <code>PATH</code> for executing the scripts.
-So, if your package.json has this:</p>
-
-<pre><code>{ "name" : "foo"
-, "dependencies" : { "bar" : "0.1.x" }
-, "scripts": { "start" : "bar ./test" } }</code></pre>
-
-<p>then you could run <code>npm start</code> to execute the <code>bar</code> script, which is exported
-into the <code>node_modules/.bin</code> directory on <code>npm install</code>.</p>
-
<h3 id="package-json-vars">package.json vars</h3>
<p>The package.json fields are tacked onto the <code>npm_package_</code> prefix. So, for
@@ -177,7 +164,7 @@ will sudo the npm command in question.</li></ul>
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">scripts &mdash; npm@1.1.18</p>
+<p id="footer">scripts &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/search.html b/deps/npm/html/doc/search.html
index 67f3b6ec44..dc451277db 100644
--- a/deps/npm/html/doc/search.html
+++ b/deps/npm/html/doc/search.html
@@ -24,7 +24,7 @@ expression characters must be escaped or quoted in most shells.)</p>
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
</div>
-<p id="footer">search &mdash; npm@1.1.18</p>
+<p id="footer">search &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/semver.html b/deps/npm/html/doc/semver.html
index 583f9b13e5..7ca3e4d6f7 100644
--- a/deps/npm/html/doc/semver.html
+++ b/deps/npm/html/doc/semver.html
@@ -104,7 +104,7 @@ that satisfies the range, or null if none of them do.</li></ul>
<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">semver &mdash; npm@1.1.18</p>
+<p id="footer">semver &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/shrinkwrap.html b/deps/npm/html/doc/shrinkwrap.html
index ba6335d818..a146e22563 100644
--- a/deps/npm/html/doc/shrinkwrap.html
+++ b/deps/npm/html/doc/shrinkwrap.html
@@ -169,7 +169,7 @@ versions.</p>
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">shrinkwrap &mdash; npm@1.1.18</p>
+<p id="footer">shrinkwrap &mdash; npm@1.1.16</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/star.html b/deps/npm/html/doc/star.html
index a662e11808..fac1ab74b5 100644
--- a/deps/npm/html/doc/star.html
+++ b/deps/npm/html/doc/star.html
@@ -26,7 +26,7 @@ a vaguely positive way to show that you care.</p>
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">star &mdash; npm@1.1.18</p>
+<p id="footer">star &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/start.html b/deps/npm/html/doc/start.html
index 92613baeab..f9c7fe8077 100644
--- a/deps/npm/html/doc/start.html
+++ b/deps/npm/html/doc/start.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">start &mdash; npm@1.1.18</p>
+<p id="footer">start &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/stop.html b/deps/npm/html/doc/stop.html
index 05e6101309..a954d8a922 100644
--- a/deps/npm/html/doc/stop.html
+++ b/deps/npm/html/doc/stop.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
</div>
-<p id="footer">stop &mdash; npm@1.1.18</p>
+<p id="footer">stop &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/submodule.html b/deps/npm/html/doc/submodule.html
index 3207241858..0b4206e735 100644
--- a/deps/npm/html/doc/submodule.html
+++ b/deps/npm/html/doc/submodule.html
@@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule &mdash; npm@1.1.18</p>
+<p id="footer">submodule &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/tag.html b/deps/npm/html/doc/tag.html
index 3b299e2b56..9976dc5c8c 100644
--- a/deps/npm/html/doc/tag.html
+++ b/deps/npm/html/doc/tag.html
@@ -21,7 +21,7 @@
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">tag &mdash; npm@1.1.18</p>
+<p id="footer">tag &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/test.html b/deps/npm/html/doc/test.html
index 2cc4f3dbdc..9209e40e0e 100644
--- a/deps/npm/html/doc/test.html
+++ b/deps/npm/html/doc/test.html
@@ -23,7 +23,7 @@ true.</p>
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">test &mdash; npm@1.1.18</p>
+<p id="footer">test &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/uninstall.html b/deps/npm/html/doc/uninstall.html
index 2223c0ca4a..867e6af43a 100644
--- a/deps/npm/html/doc/uninstall.html
+++ b/deps/npm/html/doc/uninstall.html
@@ -22,7 +22,7 @@ on its behalf.</p>
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">uninstall &mdash; npm@1.1.18</p>
+<p id="footer">uninstall &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/unpublish.html b/deps/npm/html/doc/unpublish.html
index bfae9b8397..51fa5811e5 100644
--- a/deps/npm/html/doc/unpublish.html
+++ b/deps/npm/html/doc/unpublish.html
@@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p>
<ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">unpublish &mdash; npm@1.1.18</p>
+<p id="footer">unpublish &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/update.html b/deps/npm/html/doc/update.html
index 98c2e9cd00..e41dbfb11b 100644
--- a/deps/npm/html/doc/update.html
+++ b/deps/npm/html/doc/update.html
@@ -23,7 +23,7 @@
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">update &mdash; npm@1.1.18</p>
+<p id="footer">update &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/version.html b/deps/npm/html/doc/version.html
index dbf5b105ff..63d93a3d94 100644
--- a/deps/npm/html/doc/version.html
+++ b/deps/npm/html/doc/version.html
@@ -31,7 +31,7 @@ will use it as a commit message when creating a version commit.</p>
<ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
</div>
-<p id="footer">version &mdash; npm@1.1.18</p>
+<p id="footer">version &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/view.html b/deps/npm/html/doc/view.html
index 0d12ecf4b0..fe97f2e5d7 100644
--- a/deps/npm/html/doc/view.html
+++ b/deps/npm/html/doc/view.html
@@ -88,7 +88,7 @@ the field name.</p>
<ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
</div>
-<p id="footer">view &mdash; npm@1.1.18</p>
+<p id="footer">view &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/doc/whoami.html b/deps/npm/html/doc/whoami.html
index e835c716c2..b4b2a9bb98 100644
--- a/deps/npm/html/doc/whoami.html
+++ b/deps/npm/html/doc/whoami.html
@@ -20,7 +20,7 @@
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">whoami &mdash; npm@1.1.18</p>
+<p id="footer">whoami &mdash; npm@1.1.0-2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
diff --git a/deps/npm/html/index.html b/deps/npm/html/index.html
index 4a97cd3e7a..9ccf28e57c 100644
--- a/deps/npm/html/index.html
+++ b/deps/npm/html/index.html
@@ -59,14 +59,11 @@ code { background:#fff ; outline: 1px solid #ccc; padding:0 2px; }
<p>npm is a package manager for <a href="http://nodejs.org/">node</a>. You can use it to install
and publish your node programs. It manages dependencies and does other cool stuff.</p>
-<h2>Easy Zero Line Install</h2>
+<h2>One Line Install</h2>
-<p><a href="http://nodejs.org/#download">Install Node.js</a> <br>
-(npm comes with it.)</p>
+<code>curl http://npmjs.org/install.sh | sh</code>
-<p>Because a one-line install is one too many.</p>
-
-<h2>Fancy Install</h2>
+<h2>More Than One Line Install</h2>
<ol>
<li><a href="https://github.com/isaacs/npm">Get the code.</a>
@@ -74,12 +71,6 @@ code { background:#fff ; outline: 1px solid #ccc; padding:0 2px; }
says to do.
</ol>
-<p>There's a pretty thorough install script at
-<a href="http://npmjs.org/install.sh">http://npmjs.org/install.sh</a></p>
-
-<p>For maximum security, make sure to thorougly inspect every
-program that you run on your computer!</p>
-
<h2>Other Cool Stuff</h2>
<ul>
diff --git a/deps/npm/lib/bugs.js b/deps/npm/lib/bugs.js
index 7982746cfb..a3a017cc02 100644
--- a/deps/npm/lib/bugs.js
+++ b/deps/npm/lib/bugs.js
@@ -28,7 +28,7 @@ function bugs (args, cb) {
}
if (repo) {
if (Array.isArray(repo)) repo = repo.shift()
- if (repo.hasOwnProperty("url")) repo = repo.url
+ if (repo.url) repo = repo.url
log.verbose(repo, "repository")
if (repo && repo.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) {
return open(repo.replace(/^git(@|:\/\/)/, "http://")
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index b62e82dd14..3dc1fb3a0a 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -3,10 +3,11 @@
/*
adding a folder:
1. tar into tmp/random/package.tgz
-2. untar into tmp/random/contents/package, stripping one dir piece
-3. tar tmp/random/contents/package to cache/n/v/package.tgz
-4. untar cache/n/v/package.tgz into cache/n/v/package
-5. rm tmp/random
+2. untar into tmp/random/contents/{blah}
+3. rename {blah} to "package"
+4. tar tmp/random/contents/package to cache/n/v/package.tgz
+5. untar cache/n/v/package.tgz into cache/n/v/package
+6. rm tmp/random
Adding a url:
1. fetch to tmp/random/package.tgz
@@ -31,7 +32,7 @@ exports.read = read
exports.clean = clean
exports.unpack = unpack
-var mkdir = require("mkdirp")
+var mkdir = require("./utils/mkdir-p.js")
, exec = require("./utils/exec.js")
, fetch = require("./utils/fetch.js")
, npm = require("./npm.js")
@@ -49,7 +50,6 @@ var mkdir = require("mkdirp")
, tar = require("./utils/tar.js")
, fileCompletion = require("./utils/completion/file-completion.js")
, url = require("url")
- , chownr = require("chownr")
cache.usage = "npm cache add <tarball file>"
+ "\nnpm cache add <folder>"
@@ -95,10 +95,12 @@ function cache (args, cb) {
// if the pkg and ver are in the cache, then
// just do a readJson and return.
// if they're not, then fetch them from the registry.
+var cacheSeen = {}
function read (name, ver, forceBypass, cb) {
if (typeof cb !== "function") cb = forceBypass, forceBypass = true
var jsonFile = path.join(npm.cache, name, ver, "package", "package.json")
function c (er, data) {
+ if (!er) cacheSeen[data._id] = data
if (data) deprCheck(data)
return cb(er, data)
}
@@ -108,6 +110,10 @@ function read (name, ver, forceBypass, cb) {
return addNamed(name, ver, c)
}
+ if (name+"@"+ver in cacheSeen) {
+ return cb(null, cacheSeen[name+"@"+ver])
+ }
+
readJson(jsonFile, function (er, data) {
if (er) return addNamed(name, ver, c)
deprCheck(data)
@@ -120,13 +126,9 @@ function ls (args, cb) {
output = output || require("./utils/output.js")
args = args.join("/").split("@").join("/")
if (args.substr(-1) === "/") args = args.substr(0, args.length - 1)
- var prefix = npm.config.get("cache")
- if (0 === prefix.indexOf(process.env.HOME)) {
- prefix = "~" + prefix.substr(process.env.HOME.length)
- }
ls_(args, npm.config.get("depth"), function(er, files) {
output.write(files.map(function (f) {
- return path.join(prefix, f)
+ return path.join("~/.npm", f)
}).join("\n").trim(), function (er) {
return cb(er, files)
})
@@ -210,7 +212,7 @@ function add (args, cb) {
// see if the spec is a url
// otherwise, treat as name@version
- var p = url.parse(spec) || {}
+ var p = url.parse(spec.replace(/^git\+/, "git")) || {}
log.verbose(p, "parsed url")
// it could be that we got name@http://blah
@@ -228,11 +230,11 @@ function add (args, cb) {
case "https:":
return addRemoteTarball(spec, null, name, cb)
case "git:":
- case "git+http:":
- case "git+https:":
- case "git+rsync:":
- case "git+ftp:":
- case "git+ssh:":
+ case "githttp:":
+ case "githttps:":
+ case "gitrsync:":
+ case "gitftp:":
+ case "gitssh:":
//p.protocol = p.protocol.replace(/^git([^:])/, "$1")
return addRemoteGit(spec, p, name, cb)
default:
@@ -634,7 +636,7 @@ function getCacheStat (cb) {
}
function makeCacheDir (cb) {
- if (!process.getuid) return mkdir(npm.cache, cb)
+ if (!process.getuid) return mkdir(npm.cache, npm.modes.exec, cb)
var uid = +process.getuid()
, gid = +process.getgid()
@@ -645,28 +647,18 @@ function makeCacheDir (cb) {
}
if (uid !== 0 || !process.env.HOME) {
cacheStat = {uid: uid, gid: gid}
- return mkdir(npm.cache, afterMkdir)
+ return mkdir(npm.cache, npm.modes.exec, uid, gid, function (er) {
+ return cb(er, cacheStat)
+ })
}
-
fs.stat(process.env.HOME, function (er, st) {
if (er) return log.er(cb, "homeless?")(er)
cacheStat = st
log.silly([st.uid, st.gid], "uid, gid for cache dir")
- return mkdir(npm.cache, afterMkdir)
- })
-
- function afterMkdir (er, made) {
- if (er || !cacheStat || isNaN(cacheStat.uid) || isNaN(cacheStat.gid)) {
- return cb(er, cacheStat)
- }
-
- if (!made) return cb(er, cacheStat)
-
- // ensure that the ownership is correct.
- chownr(made, cacheStat.uid, cacheStat.gid, function (er) {
+ return mkdir(npm.cache, npm.modes.exec, st.uid, st.gid, function (er) {
return cb(er, cacheStat)
})
- }
+ })
}
@@ -744,20 +736,9 @@ function addLocalDirectory (p, name, cb) {
, tgz = placeDirect ? placed : tmptgz
, doFancyCrap = p.indexOf(npm.tmp) !== 0
&& p.indexOf(npm.cache) !== 0
- getCacheStat(function (er, cs) {
- mkdir(path.dirname(tgz), function (er, made) {
- if (er) return cb(er)
- tar.pack(tgz, p, data, doFancyCrap, function (er) {
- if (er) return log.er(cb,"couldn't pack "+p+ " to "+tgz)(er)
-
- if (er || !cs || isNaN(cs.uid) || isNaN(cs.gid)) return cb()
-
- chownr(made || tgz, cs.uid, cs.gid, function (er) {
- if (er) return cb(er)
- addLocalTarball(tgz, name, cb)
- })
- })
- })
+ tar.pack(tgz, p, data, doFancyCrap, function (er) {
+ if (er) return log.er(cb,"couldn't pack "+p+ " to "+tgz)(er)
+ addLocalTarball(tgz, name, cb)
})
})
}
@@ -766,15 +747,36 @@ function addTmpTarball (tgz, name, cb) {
if (!cb) cb = name, name = ""
getCacheStat(function (er, cs) {
if (er) return cb(er)
- var contents = path.dirname(tgz)
- tar.unpack( tgz, path.resolve(contents, "package")
- , null, null
- , cs.uid, cs.gid
- , function (er) {
- if (er) {
- return cb(er)
+ return addTmpTarball_(tgz, name, cs.uid, cs.gid, cb)
+ })
+}
+
+function addTmpTarball_ (tgz, name, uid, gid, cb) {
+ var contents = path.resolve(path.dirname(tgz)) // , "contents")
+ tar.unpack( tgz, path.resolve(contents, "package")
+ , null, null
+ , uid, gid
+ , function (er) {
+ if (er) return log.er(cb, "couldn't unpack "+tgz+" to "+contents)(er)
+ fs.readdir(contents, function (er, folder) {
+ if (er) return log.er(cb, "couldn't readdir "+contents)(er)
+ log.verbose(folder, "tarball contents")
+ if (folder.length > 1) {
+ folder = folder.filter(function (f) {
+ return !f.match(/^\.|^tmp\.tgz$/)
+ })
+ }
+ if (folder.length > 1) {
+ log.warn(folder.slice(1).join("\n")
+ ,"extra junk in folder, ignoring")
}
- addLocalDirectory(path.resolve(contents, "package"), name, cb)
+ if (!folder.length) return cb(new Error("Empty package tarball"))
+ folder = path.join(contents, folder[0])
+ var newName = path.join(contents, "package")
+ fs.rename(folder, newName, function (er) {
+ if (er) return log.er(cb, "couldn't rename "+folder+" to package")(er)
+ addLocalDirectory(newName, name, cb)
+ })
})
})
}
@@ -790,14 +792,11 @@ function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
log.error("Could not read data for "+pkg+"@"+ver)
return cb(er)
}
- npm.commands.unbuild([unpackTarget], function (er) {
- if (er) return cb(er)
- tar.unpack( path.join(npm.cache, pkg, ver, "package.tgz")
- , unpackTarget
- , dMode, fMode
- , uid, gid
- , cb )
- })
+ tar.unpack( path.join(npm.cache, pkg, ver, "package.tgz")
+ , unpackTarget
+ , dMode, fMode
+ , uid, gid
+ , cb )
})
}
diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js
index a69c30ea69..6781679f1d 100644
--- a/deps/npm/lib/config.js
+++ b/deps/npm/lib/config.js
@@ -2,12 +2,10 @@
module.exports = config
config.usage = "npm config set <key> <value>"
- + "\nnpm config get [<key>]"
+ + "\nnpm config get <key>"
+ "\nnpm config delete <key>"
+ "\nnpm config list"
+ "\nnpm config edit"
- + "\nnpm set <key> <value>"
- + "\nnpm get [<key>]"
var ini = require("./utils/ini.js")
, log = require("./utils/log.js")
@@ -115,9 +113,6 @@ function del (key, cb) {
}
function set (key, val, cb) {
- if (key === undefined) {
- return unknown("", cb)
- }
if (val === undefined) {
if (key.indexOf("=") !== -1) {
var k = key.split("=")
diff --git a/deps/npm/lib/docs.js b/deps/npm/lib/docs.js
index 8af4c1bb66..de9f71c654 100644
--- a/deps/npm/lib/docs.js
+++ b/deps/npm/lib/docs.js
@@ -25,7 +25,7 @@ function docs (args, cb) {
if (homepage) return open(homepage, cb)
if (repo) {
if (Array.isArray(repo)) repo = repo.shift()
- if (repo.hasOwnProperty("url")) repo = repo.url
+ if (repo.url) repo = repo.url
log.verbose(repo, "repository")
if (repo) {
return open(repo.replace(/^git(@|:\/\/)/, 'http://')
diff --git a/deps/npm/lib/init.js b/deps/npm/lib/init.js
index 7cd7da8e27..2ddb3e86fc 100644
--- a/deps/npm/lib/init.js
+++ b/deps/npm/lib/init.js
@@ -99,10 +99,7 @@ function init_ (data, folder, cb) {
, function (er, r) {
if (er) return cb(er)
if (r !== "none") {
- data.repository = (data.repository || {})
- data.repository.url = r
- } else {
- delete data.repository
+ data.repository = (data.repository || {}).url = r
}
cb()
}
@@ -149,6 +146,13 @@ function init_ (data, folder, cb) {
(data.scripts = data.scripts || {}).test = t
}
)
+ ( read
+ , [ { prompt: "What versions of node does it run on? "
+ , default: data.engines && data.engines.node || (eng) } ]
+ , function (nodever) {
+ (data.engines = data.engines || {}).node = nodever
+ }
+ )
(cleanupPaths, [data, folder])
(function (cb) {
try { data = readJson.processJson(data) }
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index 5873ca968e..1fb6dc30c0 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/lib/install.js
@@ -1,15 +1,14 @@
+
// npm install <pkg> <pkg> <pkg>
//
// See doc/install.md for more description
-// Managing contexts...
-// there's a lot of state associated with an "install" operation, including
-// packages that are already installed, parent packages, current shrinkwrap, and
-// so on. We maintain this state in a "context" object that gets passed around.
-// every time we dive into a deeper node_modules folder, the "family" list that
-// gets passed along uses the previous "family" list as its __proto__. Any
-// "resolved precise dependency" things that aren't already on this object get
-// added, and then that's passed to the next generation of installation.
+// Managing "family" lists...
+// every time we dive into a deeper node_modules folder, the "family"
+// list that gets passed along uses the previous "family" list as
+// it's __proto__. Any "resolved precise dependency" things that aren't
+// already on this object get added, and then that's passed to the next
+// generation of installation.
module.exports = install
@@ -21,9 +20,7 @@ install.usage = "npm install <tarball file>"
+ "\nnpm install <pkg>@<version>"
+ "\nnpm install <pkg>@<version range>"
+ "\n\nCan specify one or more: npm install ./foo.tgz bar@stable /some/folder"
- + "\nIf no argument is supplied and ./npm-shrinkwrap.json is "
- + "\npresent, installs dependencies specified in the shrinkwrap."
- + "\nOtherwise, installs dependencies from ./package.json."
+ + "\nInstalls dependencies in ./package.json if no argument supplied"
install.completion = function (opts, cb) {
// install can complete to a folder with a package.json, or any package.
@@ -67,9 +64,8 @@ var npm = require("./npm.js")
, relativize = require("./utils/relativize.js")
, output
, url = require("url")
- , mkdir = require("mkdirp")
+ , mkdir = require("./utils/mkdir-p.js")
, lifecycle = require("./utils/lifecycle.js")
- , archy = require("archy")
function install (args, cb_) {
@@ -79,15 +75,12 @@ function install (args, cb_) {
output = output || require("./utils/output.js")
var tree = treeify(installed)
- , pretty = prettify(tree, installed).trim()
-
- if (pretty) output.write(pretty, afterWrite)
- else afterWrite()
+ , pretty = prettify(tree, installed)
- function afterWrite (er) {
+ output.write(pretty, function (er) {
if (er) return cb_(er)
save(where, installed, tree, pretty, cb_)
- }
+ })
}
// the /path/to/node_modules/..
@@ -107,116 +100,39 @@ function install (args, cb_) {
})
}
- mkdir(where, function (er, made) {
+ mkdir(where, function (er) {
if (er) return cb(er)
// install dependencies locally by default,
// or install current folder globally
if (!args.length) {
if (npm.config.get("global")) args = ["."]
- else return readDependencies( null
- , where
- , { dev: !npm.config.get("production") }
- , function (er, data) {
+ else return readJson( path.resolve(where, "package.json")
+ , { dev: !npm.config.get("production") }
+ , function (er, data) {
if (er) return log.er(cb, "Couldn't read dependencies.")(er)
var deps = Object.keys(data.dependencies || {})
log.verbose([where, deps], "where, deps")
- var context = { family: {}
- , ancestors: {}
- , explicit: false
- , parent: data
- , wrap: null }
- context.family[data.name] = context.ancestors[data.name] = data.version
+ var family = {}
+ , ancestors = {}
+ family[data.name] = ancestors[data.name] = data.version
installManyTop(deps.map(function (dep) {
var target = data.dependencies[dep]
, parsed = url.parse(target.replace(/^git\+/, "git"))
target = dep + "@" + target
return target
- }), where, context, cb)
+ }), where, family, ancestors, false, data, cb)
})
}
// initial "family" is the name:version of the root, if it's got
- // a package.json file.
+ // a pacakge.json file.
readJson(path.resolve(where, "package.json"), function (er, data) {
if (er) data = null
- var context = { family: {}
- , ancestors: {}
- , explicit: true
- , parent: data
- , wrap: null }
- if (data) {
- context.family[data.name] = context.ancestors[data.name] = data.version
- }
+ var family = {}
+ , ancestors = {}
+ if (data) family[data.name] = ancestors[data.name] = data.version
var fn = npm.config.get("global") ? installMany : installManyTop
- fn(args, where, context, cb)
- })
- })
-}
-
-// reads dependencies for the package at "where". There are several cases,
-// depending on our current state and the package's configuration:
-//
-// 1. If "context" is specified, then we examine the context to see if there's a
-// shrinkwrap there. In that case, dependencies are read from the shrinkwrap.
-// 2. Otherwise, if an npm-shrinkwrap.json file is present, dependencies are
-// read from there.
-// 3. Otherwise, dependencies come from package.json.
-//
-// Regardless of which case we fall into, "cb" is invoked with a first argument
-// describing the full package (as though readJson had been used) but with
-// "dependencies" read as described above. The second argument to "cb" is the
-// shrinkwrap to use in processing this package's dependencies, which may be
-// "wrap" (in case 1) or a new shrinkwrap (in case 2).
-function readDependencies (context, where, opts, cb) {
- var wrap = context ? context.wrap : null
-
- readJson( path.resolve(where, "package.json")
- , opts
- , function (er, data) {
- if (er) return cb(er)
-
- if (wrap) {
- log.verbose([where, wrap], "readDependencies: using existing wrap")
- var rv = {}
- Object.keys(data).forEach(function (key) {
- rv[key] = data[key]
- })
- rv.dependencies = {}
- Object.keys(wrap).forEach(function (key) {
- log.verbose([key, wrap[key]], "from wrap")
- var w = wrap[key]
- rv.dependencies[key] = w.from || w.version
- })
- log.verbose([rv.dependencies], "readDependencies: returned deps")
- return cb(null, rv, wrap)
- }
-
- var wrapfile = path.resolve(where, "npm-shrinkwrap.json")
-
- fs.readFile(wrapfile, "utf8", function (er, wrapjson) {
- if (er) {
- log.verbose("readDependencies: using package.json deps")
- return cb(null, data, null)
- }
-
- try {
- var newwrap = JSON.parse(wrapjson)
- } catch (ex) {
- return cb(ex)
- }
-
- log.info(wrapfile, "using shrinkwrap file")
- var rv = {}
- Object.keys(data).forEach(function (key) {
- rv[key] = data[key]
- })
- rv.dependencies = {}
- Object.keys(newwrap.dependencies || {}).forEach(function (key) {
- var w = newwrap.dependencies[key]
- rv.dependencies[key] = w.from || w.version
- })
- log.verbose([rv.dependencies], "readDependencies: returned deps")
- return cb(null, rv, newwrap.dependencies)
+ fn(args, where, family, ancestors, true, data, cb)
})
})
}
@@ -225,28 +141,17 @@ function readDependencies (context, where, opts, cb) {
// as dependencies to a package.json file.
// This is experimental.
function save (where, installed, tree, pretty, cb) {
- if (!npm.config.get("save") &&
- !npm.config.get("save-dev") &&
- !npm.config.get("save-optional") ||
- npm.config.get("global")) {
+ if (!npm.config.get("save") || npm.config.get("global")) {
return cb(null, installed, tree, pretty)
}
-
// each item in the tree is a top-level thing that should be saved
// to the package.json file.
// The relevant tree shape is { <folder>: {what:<pkg>} }
var saveTarget = path.resolve(where, "package.json")
, things = Object.keys(tree).map(function (k) {
- // if "what" was a url, then save that instead.
- var t = tree[k]
- , u = url.parse(t.from)
- , w = t.what.split("@")
- if (u && u.protocol) w[1] = t.from
- return w
+ return tree[k].what.split("@")
}).reduce(function (set, k) {
- var rangeDescriptor = semver.valid(k[1]) &&
- semver.gte(k[1], "0.1.0")
- ? "~" : ""
+ var rangeDescriptor = semver.gte(k[1], "0.1.0") ? "~" : ""
set[k[0]] = rangeDescriptor + k[1]
return set
}, {})
@@ -260,18 +165,13 @@ function save (where, installed, tree, pretty, cb) {
} catch (ex) {
er = ex
}
- if (er) {
- return cb(null, installed, tree, pretty)
+ if (er) return cb(null, installed, tree, pretty)
- }
-
- var deps = npm.config.get("save-optional") ? "optionalDependencies"
- : npm.config.get("save-dev") ? "devDependencies"
- : "dependencies"
+ var deps = npm.config.get("dev") ? "devDependencies" : "dependencies"
+ deps = data[deps] = data[deps] || {}
- data[deps] = data[deps] || {}
Object.keys(things).forEach(function (t) {
- data[deps][t] = things[t]
+ deps[t] = things[t]
})
data = JSON.stringify(data, null, 2) + "\n"
fs.writeFile(saveTarget, data, function (er) {
@@ -284,48 +184,26 @@ function save (where, installed, tree, pretty, cb) {
// Outputting *all* the installed modules is a bit confusing,
// because the length of the path does not make it clear
// that the submodules are not immediately require()able.
-// TODO: Show the complete tree, ls-style, but only if --long is provided
+// TODO: Show the complete tree, ls-style.
function prettify (tree, installed) {
- if (npm.config.get("json")) {
- function red (set, kv) {
- set[kv[0]] = kv[1]
- return set
- }
-
- tree = Object.keys(tree).map(function (p) {
- if (!tree[p]) return null
- var what = tree[p].what.split("@")
- , name = what.shift()
- , version = what.join("@")
- , o = { name: name, version: version, from: tree[p].from }
- o.dependencies = tree[p].children.map(function P (dep) {
- var what = dep.what.split("@")
- , name = what.shift()
- , version = what.join("@")
- , o = { version: version, from: dep.from }
- o.dependencies = dep.children.map(P).reduce(red, {})
- return [name, o]
- }).reduce(red, {})
- return o
- })
-
- return JSON.stringify(tree, null, 2)
- }
if (npm.config.get("parseable")) return parseable(installed)
-
return Object.keys(tree).map(function (p) {
- return archy({ label: tree[p].what + " " + p
- , nodes: (tree[p].children || []).map(function P (c) {
- if (npm.config.get("long")) {
- return { label: c.what, nodes: c.children.map(P) }
- }
- var g = c.children.map(function (g) {
- return g.what
- }).join(", ")
- if (g) g = " (" + g + ")"
- return c.what + g
- })
- })
+ p = tree[p]
+ var c = ""
+ if (p.children && p.children.length) {
+ pref = "\n"
+ var l = p.children.pop()
+ c = p.children.map(function (c) {
+ var gc = c.children && c.children.length
+ ? " (" + c.children.map(function (gc) {
+ return gc.what
+ }).join(" ") + ")"
+ : ""
+ return "\n├── " + c.what + gc
+ }).join("") + "\n└── " + l.what
+ }
+ return [p.what, p.where, c].join(" ")
+
}).join("\n")
}
@@ -348,13 +226,11 @@ function treeify (installed) {
, parent = r[2]
, where = r[1]
, what = r[0]
- , from = r[4]
l[where] = { parentDir: parentDir
, parent: parent
, children: []
, where: where
- , what: what
- , from: from }
+ , what: what }
return l
}, {})
@@ -376,9 +252,10 @@ function treeify (installed) {
// just like installMany, but also add the existing packages in
// where/node_modules to the family object.
-function installManyTop (what, where, context, cb_) {
+function installManyTop (what, where, family, ancestors, explicit, parent, cb_) {
+
function cb (er, d) {
- if (context.explicit || er) return cb_(er, d)
+ if (explicit || er) return cb_(er, d)
// since this wasn't an explicit install, let's build the top
// folder, so that `npm install` also runs the lifecycle scripts.
npm.commands.build([where], false, true, function (er) {
@@ -386,7 +263,7 @@ function installManyTop (what, where, context, cb_) {
})
}
- if (context.explicit) return next()
+ if (explicit) return next()
readJson(path.join(where, "package.json"), function (er, data) {
if (er) return next(er)
@@ -395,20 +272,21 @@ function installManyTop (what, where, context, cb_) {
function next (er) {
if (er) return cb(er)
- installManyTop_(what, where, context, cb)
+ installManyTop_(what, where, family, ancestors, explicit, parent, cb)
}
}
-function installManyTop_ (what, where, context, cb) {
+function installManyTop_ (what, where, family, ancestors, explicit, parent, cb) {
var nm = path.resolve(where, "node_modules")
- , names = context.explicit
+ , names = explicit
? what.map(function (w) { return w.split(/@/).shift() })
: []
fs.readdir(nm, function (er, pkgs) {
- if (er) return installMany(what, where, context, cb)
+ if (er) return installMany(what, where, family, ancestors, explicit, parent, cb)
pkgs = pkgs.filter(function (p) {
return !p.match(/^[\._-]/)
+ && (!explicit || names.indexOf(p) === -1)
})
asyncMap(pkgs.map(function (p) {
return path.resolve(nm, p, "package.json")
@@ -421,44 +299,36 @@ function installManyTop_ (what, where, context, cb) {
// add all the existing packages to the family list.
// however, do not add to the ancestors list.
packages.forEach(function (p) {
- context.family[p[0]] = p[1]
+ family[p[0]] = p[1]
})
- return installMany(what, where, context, cb)
+ return installMany(what, where, family, ancestors, explicit, parent, cb)
})
})
}
-function installMany (what, where, context, cb) {
- // readDependencies takes care of figuring out whether the list of
- // dependencies we'll iterate below comes from an existing shrinkwrap from a
- // parent level, a new shrinkwrap at this level, or package.json at this
- // level, as well as which shrinkwrap (if any) our dependencies should use.
- readDependencies(context, where, {}, function (er, data, wrap) {
+function installMany (what, where, family, ancestors, explicit, parent, cb) {
+ // 'npm install foo' should install the version of foo
+ // that satisfies the dep in the current folder.
+ // This will typically return immediately, since we already read
+ // this file family, and it'll be cached.
+ readJson(path.resolve(where, "package.json"), function (er, data) {
if (er) data = {}
+ d = data.dependencies || {}
var parent = data
- var d = data.dependencies || {}
-
- // if we're explicitly installing "what" into "where", then the shrinkwrap
- // for "where" doesn't apply. This would be the case if someone were adding
- // a new package to a shrinkwrapped package. (data.dependencies will not be
- // used here except to indicate what packages are already present, so
- // there's no harm in using that.)
- if (context.explicit) wrap = null
-
// what is a list of things.
// resolve each one.
asyncMap( what
- , targetResolver(where, context, d)
+ , targetResolver(where, family, ancestors, explicit, d, parent)
, function (er, targets) {
if (er) return cb(er)
// each target will be a data object corresponding
// to a package, folder, or whatever that is in the cache now.
- var newPrev = Object.create(context.family)
- , newAnc = Object.create(context.ancestors)
+ var newPrev = Object.create(family)
+ , newAnc = Object.create(ancestors)
newAnc[data.name] = data.version
targets.forEach(function (t) {
@@ -469,41 +339,25 @@ function installMany (what, where, context, cb) {
log.info(t._id, "into "+where)
})
asyncMap(targets, function (target, cb) {
- log.info(target._id, "installOne")
- var newWrap = wrap ? wrap[target.name].dependencies || {} : null
- var newContext = { family: newPrev
- , ancestors: newAnc
- , parent: parent
- , explicit: false
- , wrap: newWrap }
- installOne(target, where, newContext, cb)
+ log(target._id, "installOne")
+ installOne(target, where, newPrev, newAnc, parent, cb)
}, cb)
})
})
}
-function targetResolver (where, context, deps) {
- var alreadyInstalledManually = context.explicit ? [] : null
+function targetResolver (where, family, ancestors, explicit, deps, parent) {
+ var alreadyInstalledManually = explicit ? [] : null
, nm = path.resolve(where, "node_modules")
- , parent = context.parent
- , wrap = context.wrap
- if (!context.explicit) fs.readdir(nm, function (er, inst) {
+ if (!explicit) fs.readdir(nm, function (er, inst) {
if (er) return alreadyInstalledManually = []
asyncMap(inst, function (pkg, cb) {
readJson(path.resolve(nm, pkg, "package.json"), function (er, d) {
- // error means it's not a package, most likely.
if (er) return cb(null, [])
-
- // if it's a bundled dep, then assume that anything there is valid.
- // otherwise, make sure that it's a semver match with what we want.
- var bd = parent.bundleDependencies
- if (bd && bd.indexOf(d.name) !== -1 ||
- semver.satisfies(d.version, deps[d.name] || "*")) {
+ if (semver.satisfies(d.version, deps[d.name] || "*")) {
return cb(null, d.name)
}
-
- // something is there, but it's not satisfactory. Clobber it.
return cb(null, [])
})
}, function (er, inst) {
@@ -517,7 +371,6 @@ function targetResolver (where, context, deps) {
if (!alreadyInstalledManually) return setTimeout(function () {
resolver(what, cb)
}, to++)
-
// now we know what's been installed here manually,
// or tampered with in some way that npm doesn't want to overwrite.
if (alreadyInstalledManually.indexOf(what.split("@").shift()) !== -1) {
@@ -525,56 +378,23 @@ function targetResolver (where, context, deps) {
return cb(null, [])
}
- // check for a version installed higher in the tree.
- // If installing from a shrinkwrap, it must match exactly.
- if (context.family[what]) {
- if (wrap && wrap[what].version === context.family[what]) {
- log.verbose(what, "using existing (matches shrinkwrap)")
- return cb(null, [])
- }
- }
-
- // if it's identical to its parent, then it's probably someone
- // doing `npm install foo` inside of the foo project. Print
- // a warning, and skip it.
- if (parent && parent.name === what && !npm.config.get("force")) {
- log.warn("Refusing to install "+what+" as a dependency of itself"
- ,"install")
+ if (family[what] && semver.satisfies(family[what], deps[what] || "")) {
return cb(null, [])
}
- if (wrap) {
- name = what.split(/@/).shift()
- if (wrap[name]) {
- var wrapTarget = wrap[name].from || wrap[name].version
- log.verbose("resolving "+what+" to "+wrapTarget, "shrinkwrap")
- what = name + "@" + wrapTarget
- } else {
- log.verbose("skipping "+what+" (not in shrinkwrap)", "shrinkwrap")
- }
- } else if (deps[what]) {
+ if (deps[what]) {
what = what + "@" + deps[what]
}
cache.add(what, function (er, data) {
if (er && parent && parent.optionalDependencies &&
- parent.optionalDependencies.hasOwnProperty(what.split("@")[0])) {
+ parent.optionalDependencies.hasOwnProperty(what.split("@").shift())) {
log.warn(what, "optional dependency failed, continuing")
- log.verbose([what, er], "optional dependency failed, continuing")
return cb(null, [])
}
-
- if (!er &&
- data &&
- !context.explicit &&
- context.family[data.name] === data.version &&
- !npm.config.get("force")) {
- log.info(data.name + "@" + data.version, "already installed")
+ if (!er && data && family[data.name] === data.version) {
return cb(null, [])
}
-
- if (data) data._from = what
-
return cb(er, data)
})
}
@@ -582,33 +402,20 @@ function targetResolver (where, context, deps) {
// we've already decided to install this. if anything's in the way,
// then uninstall it first.
-function installOne (target, where, context, cb) {
+function installOne (target, where, family, ancestors, parent, cb) {
// the --link flag makes this a "link" command if it's at the
// the top level.
if (where === npm.prefix && npm.config.get("link")
&& !npm.config.get("global")) {
- return localLink(target, where, context, cb)
+ return localLink(target, where, family, ancestors, parent, cb)
}
- installOne_(target, where, context, function (er, installedWhat) {
-
- // check if this one is optional to its parent.
- if (er && context.parent && context.parent.optionalDependencies &&
- context.parent.optionalDependencies.hasOwnProperty(target.name)) {
- log.warn(target._id, "optional dependency failed, continuing")
- log.verbose([target._id, er], "optional dependency failed, continuing")
- er = null
- }
-
- cb(er, installedWhat)
- })
-
+ installOne_(target, where, family, ancestors, parent, cb)
}
-function localLink (target, where, context, cb) {
+function localLink (target, where, family, ancestors, parent, cb) {
log.verbose(target._id, "try to link")
var jsonFile = path.resolve( npm.dir, target.name
, "package.json" )
- , parent = context.parent
readJson(jsonFile, function (er, data) {
if (er || data._id === target._id) {
@@ -630,7 +437,7 @@ function localLink (target, where, context, cb) {
} else {
log.verbose(target._id, "install locally (no link)")
- installOne_(target, where, context, cb)
+ installOne_(target, where, family, ancestors, parent, cb)
}
})
}
@@ -651,25 +458,23 @@ function resultList (target, where, parentId) {
return [ target._id
, targetFolder
, prettyWhere && parentId
- , parentId && prettyWhere
- , target._from ]
+ , parentId && prettyWhere ]
}
-function installOne_ (target, where, context, cb) {
+function installOne_ (target, where, family, ancestors, parent, cb) {
var nm = path.resolve(where, "node_modules")
, targetFolder = path.resolve(nm, target.name)
, prettyWhere = relativize(where, process.cwd() + "/x")
- , parent = context.parent
if (prettyWhere === ".") prettyWhere = null
chain
( [ [checkEngine, target]
- , [checkPlatform, target]
- , [checkCycle, target, context.ancestors]
+ , [checkCycle, target, ancestors]
, [checkGit, targetFolder]
- , [write, target, targetFolder, context] ]
+ , [write, target, targetFolder, family, ancestors] ]
, function (er, d) {
+ log.verbose(target._id, "installOne cb")
if (er) return cb(er)
d.push(resultList(target, where, parent && parent._id))
cb(er, d)
@@ -694,58 +499,6 @@ function checkEngine (target, cb) {
return cb()
}
-function checkPlatform (target, cb) {
- var platform = process.platform
- , arch = process.arch
- , osOk = true
- , cpuOk = true
- , force = npm.config.get("force")
-
- if (force) {
- return cb()
- }
-
- if (target.os) {
- osOk = checkList(platform, target.os)
- }
- if (target.cpu) {
- cpuOk = checkList(arch, target.cpu)
- }
- if (!osOk || !cpuOk) {
- var er = new Error("Unsupported")
- er.errno = npm.EBADPLATFORM
- er.os = target.os || ['any']
- er.cpu = target.cpu || ['any']
- er.pkgid = target._id
- return cb(er)
- }
- return cb()
-}
-
-function checkList (value, list) {
- var tmp
- , match = false
- , blc = 0
- if (typeof list === "string") {
- list = [list]
- }
- if (list.length === 1 && list[0] === "any") {
- return true;
- }
- for (var i = 0; i < list.length; ++i) {
- tmp = list[i]
- if (tmp[0] === '!') {
- tmp = tmp.slice(1)
- if (tmp === value) {
- return false;
- }
- ++blc
- } else {
- match = match || tmp === value
- }
- }
- return match || blc === list.length
-}
function checkCycle (target, ancestors, cb) {
// there are some very rare and pathological edge-cases where
@@ -760,16 +513,8 @@ function checkCycle (target, ancestors, cb) {
// A more correct, but more complex, solution would be to symlink
// the deeper thing into the new location.
// Will do that if anyone whines about this irl.
- //
- // Note: `npm install foo` inside of the `foo` package will abort
- // earlier if `--force` is not set. However, if it IS set, then
- // we need to still fail here, but just skip the first level. Of
- // course, it'll still fail eventually if it's a true cycle, and
- // leave things in an undefined state, but that's what is to be
- // expected when `--force` is used. That is why getPrototypeOf
- // is used *twice* here: to skip the first level of repetition.
-
- var p = Object.getPrototypeOf(Object.getPrototypeOf(ancestors))
+
+ var p = Object.getPrototypeOf(ancestors)
, name = target.name
, version = target.version
while (p && p !== Object.prototype && p[name] !== version) {
@@ -811,17 +556,16 @@ function checkGit_ (folder, cb) {
})
}
-function write (target, targetFolder, context, cb_) {
+function write (target, targetFolder, family, ancestors, cb_) {
var up = npm.config.get("unsafe-perm")
, user = up ? null : npm.config.get("user")
, group = up ? null : npm.config.get("group")
- , family = context.family
function cb (er, data) {
// cache.unpack returns the data object, and all we care about
// is the list of installed packages from that last thing.
if (!er) return cb_(er, data)
-
+ log.error(target._id,"error installing")
if (false === npm.config.get("rollback")) return cb_(er)
npm.commands.unbuild([targetFolder], function (er2) {
if (er2) log.error(er2, "error rolling back "+target._id)
@@ -829,67 +573,33 @@ function write (target, targetFolder, context, cb_) {
})
}
- var bundled = []
-
chain
- ( [ [ cache.unpack, target.name, target.version, targetFolder
+ ( [ [ npm.commands.unbuild, [targetFolder] ]
+ , [ cache.unpack, target.name, target.version, targetFolder
, null, null, user, group ]
- , [ fs, "writeFile"
- , path.resolve(targetFolder, "package.json")
- , JSON.stringify(target, null, 2) + "\n" ]
- , [ lifecycle, target, "preinstall", targetFolder ]
- , function (cb) {
- if (!target.bundleDependencies) return cb()
-
- var bd = path.resolve(targetFolder, "node_modules")
- fs.readdir(bd, function (er, b) {
- // nothing bundled, maybe
- if (er) return cb()
- bundled = b || []
- cb()
- })
- } ]
+ , [ lifecycle, target, "preinstall", targetFolder ] ]
// nest the chain so that we can throw away the results returned
// up until this point, since we really don't care about it.
- , function X (er) {
+ , function (er) {
if (er) return cb(er)
-
- // before continuing to installing dependencies, check for a shrinkwrap.
- readDependencies(context, targetFolder, {}, function (er, data, wrap) {
- var deps = Object.keys(data.dependencies || {})
-
- // don't install bundleDependencies, unless they're missing.
- if (data.bundleDependencies) {
- deps = deps.filter(function (d) {
- return data.bundleDependencies.indexOf(d) === -1 ||
- bundled.indexOf(d) === -1
- })
- }
-
- var newcontext = { family: family
- , ancestors: context.ancestors
- , parent: target
- , explicit: false
- , wrap: wrap }
- installMany(deps.filter(function (d) {
- // prefer to not install things that are satisfied by
- // something in the "family" list, unless we're installing
- // from a shrinkwrap.
- return wrap || !semver.satisfies(family[d], data.dependencies[d])
- }).map(function (d) {
- var t = data.dependencies[d]
- , parsed = url.parse(t.replace(/^git\+/, "git"))
- t = d + "@" + t
- return t
- }), targetFolder, newcontext, function (er, d) {
- log.verbose(targetFolder, "about to build")
- if (er) return cb(er)
- npm.commands.build( [targetFolder]
- , npm.config.get("global")
- , true
- , function (er) { return cb(er, d) })
- })
+ var deps = Object.keys(target.dependencies || {})
+ installMany(deps.filter(function (d) {
+ // prefer to not install things that are satisfied by
+ // something in the "family" list.
+ return !semver.satisfies(family[d], target.dependencies[d])
+ }).map(function (d) {
+ var t = target.dependencies[d]
+ , parsed = url.parse(t.replace(/^git\+/, "git"))
+ t = d + "@" + t
+ return t
+ }), targetFolder, family, ancestors, false, target, function (er, d) {
+ log.verbose(targetFolder, "about to build")
+ if (er) return cb(er)
+ npm.commands.build( [targetFolder]
+ , npm.config.get("global")
+ , true
+ , function (er) { return cb(er, d) })
})
- })
+ } )
}
diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js
index 3049884cab..fea6606666 100644
--- a/deps/npm/lib/link.js
+++ b/deps/npm/lib/link.js
@@ -141,7 +141,6 @@ function resultPrinter (pkg, src, dest, rp, cb) {
var where = relativize(dest, path.resolve(process.cwd(),"x"))
rp = (rp || "").trim()
src = (src || "").trim()
- // XXX If --json is set, then look up the data from the package.json
if (npm.config.get("parseable")) {
return parseableOutput(dest, rp || src, cb)
}
@@ -151,9 +150,6 @@ function resultPrinter (pkg, src, dest, rp, cb) {
}
function parseableOutput (dest, rp, cb) {
- // XXX this should match ls --parseable and install --parseable
- // look up the data from package.json, format it the same way.
- //
// link is always effectively "long", since it doesn't help much to
// *just* print the target folder.
// However, we don't actually ever read the version number, so
diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js
index 276530c354..33336cf63e 100644
--- a/deps/npm/lib/ls.js
+++ b/deps/npm/lib/ls.js
@@ -13,7 +13,6 @@ var npm = require("./npm.js")
, log = require("./utils/log.js")
, relativize = require("./utils/relativize.js")
, path = require("path")
- , archy = require("archy")
ls.usage = "npm ls"
@@ -27,102 +26,13 @@ function ls (args, silent, cb) {
var dir = path.resolve(npm.dir, "..")
readInstalled(dir, function (er, data) {
- var lite = getLite(bfsify(data))
- if (er || silent) return cb(er, data, lite)
-
+ if (er || silent) return cb(er, data)
var long = npm.config.get("long")
- , json = npm.config.get("json")
- , out
- if (json) {
- var seen = []
- var d = long ? bfsify(data) : lite
- // the raw data can be circular
- out = JSON.stringify(d, function (k, o) {
- if (typeof o === "object") {
- if (-1 !== seen.indexOf(o)) return "[Circular]"
- seen.push(o)
- }
- return o
- }, 2)
- } else if (npm.config.get("parseable")) {
- out = makeParseable(bfsify(data), long, dir)
- } else if (data) {
- out = makeArchy(bfsify(data), long, dir)
- }
- output.write(out, function (er) { cb(er, data, lite) })
+ var out = makePretty(bfsify(data), long, dir).join("\n")
+ output.write(out, function (er) { cb(er, data) })
})
}
-function alphasort (a, b) {
- a = a.toLowerCase()
- b = b.toLowerCase()
- return a > b ? 1
- : a < b ? -1 : 0
-}
-
-function getLite (data, noname) {
- var lite = {}
- , maxDepth = npm.config.get("depth")
- , url = require("url")
-
- if (!noname && data.name) lite.name = data.name
- if (data.version) lite.version = data.version
- if (data.extraneous) {
- lite.extraneous = true
- lite.problems = lite.problems || []
- lite.problems.push( "extraneous: "
- + data.name + "@" + data.version
- + " " + (data.path || "") )
- }
-
- if (data._from) {
- var from = data._from
- if (from.indexOf(data.name + "@") === 0) {
- from = from.substr(data.name.length + 1)
- }
- var u = url.parse(from)
- if (u.protocol) lite.from = from
- }
-
- if (data.invalid) {
- lite.invalid = true
- lite.problems = lite.problems || []
- lite.problems.push( "invalid: "
- + data.name + "@" + data.version
- + " " + (data.path || "") )
- }
-
- if (data.dependencies) {
- var deps = Object.keys(data.dependencies)
- if (deps.length) lite.dependencies = deps.map(function (d) {
- var dep = data.dependencies[d]
- if (typeof dep === "string") {
- lite.problems = lite.problems || []
- var p
- if (data.depth >= maxDepth) {
- p = "max depth reached: "
- } else {
- p = "missing: "
- }
- p += d + "@" + dep
- + ", required by "
- + data.name + "@" + data.version
- lite.problems.push(p)
- return [d, { required: dep, missing: true }]
- }
- return [d, getLite(dep, true)]
- }).reduce(function (deps, d) {
- if (d[1].problems) {
- lite.problems = lite.problems || []
- lite.problems.push.apply(lite.problems, d[1].problems)
- }
- deps[d[0]] = d[1]
- return deps
- }, {})
- }
- return lite
-}
-
function bfsify (root, current, queue, seen) {
// walk over the data, and turn it from this:
// +-- a
@@ -135,7 +45,7 @@ function bfsify (root, current, queue, seen) {
// which looks nicer
current = current || root
queue = queue || []
- seen = seen || [root]
+ seen = seen || []
var deps = current.dependencies = current.dependencies || {}
Object.keys(deps).forEach(function (d) {
var dep = deps[d]
@@ -157,110 +67,59 @@ function bfsify (root, current, queue, seen) {
}
-function makeArchy (data, long, dir) {
- var out = makeArchy_(data, long, dir, 0)
- return archy(out, "", { unicode: npm.config.get("unicode") })
-}
-
-function makeArchy_ (data, long, dir, depth, parent, d) {
- if (typeof data === "string") {
- if (depth < npm.config.get("depth")) {
- // just missing
- var p = parent.link || parent.path
- log.warn("Unmet dependency in "+p, d+" "+data)
- data = "\033[31;40mUNMET DEPENDENCY\033[0m " + d + " " + data
- } else {
- data = d+"@'"+ data +"' (max depth reached)"
- }
- return data
- }
-
- var out = {}
- // the top level is a bit special.
- out.label = data._id ? data._id + " " : ""
- if (data.link) out.label += "-> " + data.link
-
- if (data.invalid) {
- if (data.realName !== data.name) out.label += " ("+data.realName+")"
- out.label += " \033[31;40minvalid\033[0m"
- }
-
- if (data.extraneous && data.path !== dir) {
- out.label += " \033[32;40mextraneous\033[0m"
- }
-
- if (long) {
- if (dir === data.path) out.label += "\n" + dir
- out.label += "\n" + getExtras(data, dir)
- } else if (dir === data.path) {
- out.label += dir
- }
-
- // now all the children.
- out.nodes = Object.keys(data.dependencies || {})
- .sort(alphasort).map(function (d) {
- return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d)
- })
-
- if (out.nodes.length === 0 && data.path === dir) {
- out.nodes = ["(empty)"]
- }
-
- return out
-}
-
-function getExtras (data, dir) {
- var extras = []
- , rel = relativize(data.path || "", dir)
- , url = require("url")
-
- if (data.description) extras.push(data.description)
- if (data.repository) extras.push(data.repository.url)
- if (data.homepage) extras.push(data.homepage)
- if (data._from) {
- var from = data._from
- if (from.indexOf(data.name + "@") === 0) {
- from = from.substr(data.name.length + 1)
+function makePretty (data, long, dir, prefix, list) {
+ var top = !list
+ list = list || []
+ prefix = prefix || ""
+ list.push(format(data, long, prefix, dir))
+ var deps = data.dependencies || {}
+ , childPref = prefix.split("├─").join("│ ")
+ .split("└─").join(" ")
+ , depList = Object.keys(deps)
+ , depLast = depList.length - 1
+ , maxDepth = npm.config.get("depth")
+ Object.keys(deps).sort(function (a, b) {
+ return a > b ? 1 : -1
+ }).forEach(function (d, i) {
+ var depData = deps[d]
+ if (typeof depData === "string") {
+ if (data.depth < maxDepth) {
+ var p = data.link || data.path
+ log.warn("Unmet dependency in "+p, d+" "+deps[d])
+ depData = npm.config.get("parseable")
+ ? ( npm.config.get("long")
+ ? path.resolve(data.path, "node_modules", d)
+ + ":"+d+"@"+JSON.stringify(depData)+":INVALID:MISSING"
+ : "" )
+ : "─ \033[31;40mUNMET DEPENDENCY\033[0m "+d+" "+depData
+ } else {
+ if (npm.config.get("parseable")) {
+ depData = path.resolve(data.path, "node_modules", d)
+ + (npm.config.get("long")
+ ? ":" + d + "@" + JSON.stringify(depData)
+ + ":" // no realpath resolved
+ + ":MAXDEPTH"
+ : "")
+ } else {
+ depData = "─ "+d+"@'"+depData +"' (max depth reached)"
+ }
+ }
}
- var u = url.parse(from)
- if (u.protocol) extras.push(from)
+ var c = i === depLast ? "└─" : "├─"
+ makePretty(depData, long, dir, childPref + c, list)
+ })
+ if (top && list.length === 1 && !data._id) {
+ if (!npm.config.get("parseable")) {
+ list.push("(empty)")
+ } else if (npm.config.get("long")) list[0] += ":EMPTY"
}
- return extras.join("\n")
-}
-
-
-function makeParseable (data, long, dir, depth, parent, d) {
- depth = depth || 0
-
- return [ makeParseable_(data, long, dir, depth, parent, d) ]
- .concat(Object.keys(data.dependencies || {})
- .sort(alphasort).map(function (d) {
- return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d)
- }))
- .join("\n")
+ return list.filter(function (l) { return l && l.trim() })
}
-function makeParseable_ (data, long, dir, depth, parent, d) {
+function ugly (data) {
if (typeof data === "string") {
- if (data.depth < npm.config.get("depth")) {
- var p = parent.link || parent.path
- log.warn("Unmet dependency in "+p, d+" "+data)
- data = npm.config.get("long")
- ? path.resolve(parent.path, "node_modules", d)
- + ":"+d+"@"+JSON.stringify(data)+":INVALID:MISSING"
- : ""
- } else {
- data = path.resolve(data.path, "node_modules", d)
- + (npm.config.get("long")
- ? ":" + d + "@" + JSON.stringify(data)
- + ":" // no realpath resolved
- + ":MAXDEPTH"
- : "")
- }
-
return data
}
-
if (!npm.config.get("long")) return data.path
return data.path
@@ -269,3 +128,42 @@ function makeParseable_ (data, long, dir, depth, parent, d) {
+ (data.extraneous ? ":EXTRANEOUS" : "")
+ (data.invalid ? ":INVALID" : "")
}
+
+function format (data, long, prefix, dir) {
+ if (npm.config.get("parseable")) return ugly(data)
+ if (typeof data === "string") {
+ return prefix + data
+ }
+// console.log([data.path, dir], "relativize")
+ var depLen = Object.keys(data.dependencies).length
+ , space = prefix.split("├─").join("│ ")
+ .split("└─").join(" ")
+ + (depLen ? "" : " ")
+ , rel = relativize(data.path || "", dir)
+ , l = prefix
+ + (rel === "." ? "" : depLen ? "┬ " : "─ ")
+ + (data._id ? data._id + " " : "")
+ + (data.link ? "-> " + data.link : "") + ""
+ + (rel === "." && !(long && data._id) ? dir : "")
+ if (data.invalid) {
+ if (data.realName !== data.name) l += " ("+data.realName+")"
+ l += " \033[31;40minvalid\033[0m"
+ }
+ if (data.extraneous && rel !== ".") {
+ l += " \033[32;40mextraneous\033[0m"
+ }
+ if (!long || !data._id) return l
+ var extras = []
+ if (rel !== ".") extras.push(rel)
+ else extras.push(dir)
+ if (data.description) extras.push(data.description)
+ if (data.repository) extras.push(data.repository.url)
+ if (data.homepage) extras.push(data.homepage)
+ extras = extras.filter(function (e) { return e })
+ var lastExtra = !depLen && extras.length - 1
+ l += extras.map(function (e, i) {
+ var indent = !depLen ? " " : "│ "
+ return "\n" + space + indent + e
+ }).join("")
+ return l
+}
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 2db21e34de..de68393d39 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -17,6 +17,8 @@ require("path").SPLIT_CHAR = process.platform === "win32" ? "\\" : "/"
var EventEmitter = require("events").EventEmitter
, npm = module.exports = new EventEmitter
, config = require("./config.js")
+ , set = require("./utils/set.js")
+ , get = require("./utils/get.js")
, ini = require("./utils/ini.js")
, log = require("./utils/log.js")
, fs = require("graceful-fs")
@@ -25,28 +27,11 @@ var EventEmitter = require("events").EventEmitter
, which = require("which")
, semver = require("semver")
, findPrefix = require("./utils/find-prefix.js")
- , getUid = require("uid-number")
- , mkdirp = require("mkdirp")
+ , getUid = require("./utils/uid-number.js")
+ , mkdir = require("./utils/mkdir-p.js")
, slide = require("slide")
, chain = slide.chain
-// /usr/local is often a read-only fs, which is not
-// well handled by node or mkdirp. Just double-check
-// in the case of errors when making the prefix dirs.
-function mkdir (p, cb) {
- mkdirp(p, function (er, made) {
- // it could be that we couldn't create it, because it
- // already exists, and is on a read-only fs.
- if (er) {
- return fs.stat(p, function (er2, st) {
- if (er2 || !st.isDirectory()) return cb(er)
- return cb(null, made)
- })
- }
- return cb(er, made)
- })
-}
-
npm.commands = {}
npm.ELIFECYCLE = {}
npm.E404 = {}
@@ -55,7 +40,30 @@ npm.EJSONPARSE = {}
npm.EISGIT = {}
npm.ECYCLE = {}
npm.ENOTSUP = {}
-npm.EBADPLATFORM = {}
+
+// HACK for windows
+if (process.platform === "win32") {
+ // stub in unavailable methods from process and fs binding
+ if (!process.getuid) process.getuid = function() {}
+ if (!process.getgid) process.getgid = function() {}
+ var fsBinding = process.binding("fs")
+ if (!fsBinding.chown) fsBinding.chown = function() {
+ var cb = arguments[arguments.length - 1]
+ if (typeof cb == "function") cb()
+ }
+
+ // patch rename/renameSync, but this should really be fixed in node
+ var _fsRename = fs.rename
+ , _fsPathPatch
+ _fsPathPatch = function(p) {
+ return p && p.replace(/\\/g, "/") || p;
+ }
+ fs.rename = function(p1, p2) {
+ arguments[0] = _fsPathPatch(p1)
+ arguments[1] = _fsPathPatch(p2)
+ return _fsRename.apply(fs, arguments);
+ }
+}
try {
// startup, ok to do this synchronously
@@ -104,7 +112,6 @@ var commandCache = {}
, "unstar": "star" // same function
, "apihelp" : "help"
, "login": "adduser"
- , "add-user": "adduser"
}
, aliasNames = Object.keys(aliases)
@@ -131,7 +138,6 @@ var commandCache = {}
, "unpublish"
, "owner"
, "deprecate"
- , "shrinkwrap"
, "help"
, "help-search"
@@ -303,7 +309,7 @@ function loadPrefix (npm, conf, cb) {
})
// the prefix MUST exist, or else nothing works.
if (!npm.config.get("global")) {
- mkdir(p, next)
+ mkdir(p, npm.modes.exec, null, null, true, next)
} else {
next(er)
}
@@ -316,7 +322,7 @@ function loadPrefix (npm, conf, cb) {
, enumerable : true
})
// the prefix MUST exist, or else nothing works.
- mkdir(gp, next)
+ mkdir(gp, npm.modes.exec, null, null, true, next)
})
var i = 2
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index e883abd359..496dfbd426 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -48,10 +48,6 @@ function makePretty (p) {
, dir = path.resolve(p[0], "node_modules", dep)
, has = p[2]
, want = p[3]
-
- // XXX add --json support
- // Should match (more or less) the output of ls --json
-
if (parseable) {
var str = dir
if (npm.config.get("long")) {
diff --git a/deps/npm/lib/rebuild.js b/deps/npm/lib/rebuild.js
index 0e1d56a1de..fc5f96825d 100644
--- a/deps/npm/lib/rebuild.js
+++ b/deps/npm/lib/rebuild.js
@@ -31,6 +31,7 @@ function rebuild (args, cb) {
function cleanBuild (folders, set, cb) {
// https://github.com/isaacs/npm/issues/1872
+ // If there's a makefile, try 'make clean'
// If there's a wscript, try 'node-waf clean'
// But don't die on either of those if they fail.
// Just a best-effort kind of deal.
@@ -40,6 +41,8 @@ function cleanBuild (folders, set, cb) {
if (er) return cb(er)
if (files.indexOf("wscript") !== -1) {
exec("node-waf", ["clean"], null, false, f, thenBuild)
+ } else if (files.indexOf("Makefile") !== -1) {
+ exec("make", ["clean"], null, false, f, thenBuild)
} else thenBuild()
})
function thenBuild (er) {
diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js
index 213390eb08..92f4319f58 100644
--- a/deps/npm/lib/search.js
+++ b/deps/npm/lib/search.js
@@ -137,8 +137,7 @@ function prettify (data, args) {
, stdout = process.stdout
, cols = !tty.isatty(stdout.fd) ? Infinity
: stdout._handle ? stdout._handle.getWindowSize()[0]
- : process.stdout.getWindowSize()[0]
- cols = (cols == 0) ? Infinity : cols
+ : tty.getWindowSize()[1]
} catch (ex) { cols = Infinity }
// name, desc, author, keywords
diff --git a/deps/npm/lib/set.js b/deps/npm/lib/set.js
index c83602ec1f..d821095157 100644
--- a/deps/npm/lib/set.js
+++ b/deps/npm/lib/set.js
@@ -8,6 +8,5 @@ var npm = require("./npm.js")
set.completion = npm.commands.config.completion
function set (args, cb) {
- if (!args.length) return cb(set.usage)
npm.commands.config(["set"].concat(args), cb)
}
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index 771eddf7db..f4bd008a66 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -3,7 +3,6 @@ unbuild.usage = "npm unbuild <folder>\n(this is plumbing)"
var readJson = require("./utils/read-json.js")
, rm = require("rimraf")
- , gentlyRm = require("./utils/gently-rm.js")
, npm = require("./npm.js")
, path = require("path")
, fs = require("graceful-fs")
@@ -57,20 +56,15 @@ function rmBins (pkg, folder, parent, top, cb) {
if (process.platform === "win32") {
rm(path.resolve(binRoot, b) + ".cmd", cb)
} else {
- gentlyRm( path.resolve(binRoot, b)
- , !npm.config.get("force") && folder
- , cb )
+ rm( path.resolve(binRoot, b)
+ , { gently: !npm.config.get("force") && folder }
+ , cb )
}
}, cb)
}
function rmMans (pkg, folder, parent, top, cb) {
- if (!pkg.man
- || !top
- || process.platform === "win32"
- || !npm.config.get("global")) {
- return cb()
- }
+ if (!pkg.man || !top || process.platform === "win32") return cb()
var manRoot = path.resolve(npm.config.get("prefix"), "share", "man")
asyncMap(pkg.man, function (man, cb) {
var parseMan = man.match(/(.*)\.([0-9]+)(\.gz)?$/)
@@ -84,8 +78,8 @@ function rmMans (pkg, folder, parent, top, cb) {
: pkg.name + "-" + bn)
+ "." + sxn + gz
)
- gentlyRm( manDest
- , !npm.config.get("force") && folder
- , cb )
+ rm( manDest
+ , { gently: !npm.config.get("force") && folder }
+ , cb )
}, cb)
}
diff --git a/deps/npm/lib/uninstall.js b/deps/npm/lib/uninstall.js
index 655e5eb968..1b43607d6d 100644
--- a/deps/npm/lib/uninstall.js
+++ b/deps/npm/lib/uninstall.js
@@ -40,12 +40,7 @@ function uninstall (args, cb) {
function uninstall_ (args, nm, cb) {
asyncMap(args, function (arg, cb) {
- // uninstall .. should not delete /usr/local/lib/node_modules/..
- var p = path.join(path.resolve(nm), path.join("/", arg))
- if (path.resolve(p) === nm) {
- log.warn(arg, "uninstall: invalid argument")
- return cb(null, [])
- }
+ var p = path.resolve(nm, arg)
fs.lstat(p, function (er) {
if (er) {
log.warn(arg, "Not installed in "+nm)
diff --git a/deps/npm/lib/utils/cmd-shim.js b/deps/npm/lib/utils/cmd-shim.js
index e24da36f6d..a7892e8ee3 100644
--- a/deps/npm/lib/utils/cmd-shim.js
+++ b/deps/npm/lib/utils/cmd-shim.js
@@ -14,7 +14,7 @@ cmdShim.ifExists = cmdShimIfExists
var fs = require("graceful-fs")
, chain = require("slide").chain
- , mkdir = require("mkdirp")
+ , mkdir = require("./mkdir-p.js")
, rm = require("rimraf")
, log = require("./log.js")
, path = require("path")
@@ -73,16 +73,16 @@ function writeShim_ (from, to, prog, args, cb) {
target = ""
shTarget = ""
} else {
- longProg = "\"%~dp0\\" + prog + ".exe\""
+ longProg = "\"%~dp0\"\\\"" + prog + ".exe\""
shLongProg = "\"`dirname \"$0\"`/" + prog + "\""
target = "\"%~dp0\\" + target + "\""
shTarget = "\"`dirname \"$0\"`/" + shTarget + "\""
}
- // @IF EXIST "%~dp0\node.exe" (
+ // @IF EXIST "%~dp0"\"node.exe" (
// "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
// ) ELSE (
- // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
+ // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
// )
var cmd
if (longProg) {
diff --git a/deps/npm/lib/utils/completion/file-completion.js b/deps/npm/lib/utils/completion/file-completion.js
index c1c241d682..427efefb44 100644
--- a/deps/npm/lib/utils/completion/file-completion.js
+++ b/deps/npm/lib/utils/completion/file-completion.js
@@ -1,7 +1,7 @@
module.exports = fileCompletion
var find = require("../find.js")
- , mkdir = require("mkdirp")
+ , mkdir = require("../mkdir-p.js")
, path = require("path")
function fileCompletion (root, req, depth, cb) {
diff --git a/deps/npm/lib/utils/config-defs.js b/deps/npm/lib/utils/config-defs.js
index 18b47ecdb7..d368c49726 100644
--- a/deps/npm/lib/utils/config-defs.js
+++ b/deps/npm/lib/utils/config-defs.js
@@ -9,7 +9,6 @@ var path = require("path")
, os = require("os")
, nopt = require("nopt")
, log = require("./log.js")
- , npm = require("../npm.js")
function Octal () {}
function validateOctal (data, k, val) {
@@ -140,8 +139,6 @@ Object.defineProperty(exports, "defaults", {get: function () {
, cache : process.platform === "win32"
? path.resolve(process.env.APPDATA || home || temp, "npm-cache")
: path.resolve( home || temp, ".npm")
- , "cache-max": Infinity
- , "cache-min": 0
, color : process.platform !== "win32" || winColor
, coverage: false
@@ -164,7 +161,6 @@ Object.defineProperty(exports, "defaults", {get: function () {
, "init.author.name" : ""
, "init.author.email" : ""
, "init.author.url" : ""
- , json: false
, link: false
, logfd : 2
, loglevel : "http"
@@ -184,13 +180,10 @@ Object.defineProperty(exports, "defaults", {get: function () {
, proxy : process.env.HTTP_PROXY || process.env.http_proxy || null
, "https-proxy" : process.env.HTTPS_PROXY || process.env.https_proxy ||
process.env.HTTP_PROXY || process.env.http_proxy || null
- , "user-agent" : "npm/" + npm.version + " node/" + process.version
, "rebuild-bundle" : true
, registry : "http" + (httpsOk ? "s" : "") + "://registry.npmjs.org/"
, rollback : true
, save : false
- , "save-dev" : false
- , "save-optional" : false
, searchopts: ""
, searchexclude: null
, searchsort: "name"
@@ -213,7 +206,6 @@ Object.defineProperty(exports, "defaults", {get: function () {
, userignorefile : path.resolve(home, ".npmignore")
, umask: 022
, version : false
- , versions : false
, viewer: process.platform === "win32" ? "browser" : "man"
, yes: null
@@ -228,8 +220,6 @@ exports.types =
, browser : String
, ca: [null, String]
, cache : path
- , "cache-max": Number
- , "cache-min": Number
, color : ["always", Boolean]
, coverage: Boolean
, depth : Number
@@ -243,13 +233,11 @@ exports.types =
, globalignorefile: path
, group : [Number, String]
, "https-proxy" : [null, url]
- , "user-agent" : String
, ignore : String
, "init.version" : [null, semver]
, "init.author.name" : String
, "init.author.email" : String
, "init.author.url" : ["", url]
- , json: Boolean
, link: Boolean
, logfd : [Number, Stream]
, loglevel : ["silent","win","error","warn","http","info","verbose","silly"]
@@ -271,8 +259,6 @@ exports.types =
, registry : [null, url]
, rollback : Boolean
, save : Boolean
- , "save-dev" : Boolean
- , "save-optional" : Boolean
, searchopts : String
, searchexclude: [null, String]
, searchsort: [ "name", "-name"
@@ -293,7 +279,6 @@ exports.types =
, userignorefile : path
, umask: Octal
, version : Boolean
- , versions : Boolean
, viewer: String
, yes: [false, null, Boolean]
, _exit : Boolean
@@ -328,8 +313,6 @@ exports.shorthands =
, porcelain : ["--parseable"]
, g : ["--global"]
, S : ["--save"]
- , D : ["--save-dev"]
- , O : ["--save-optional"]
, y : ["--yes"]
, n : ["--no-yes"]
}
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 0cdc03faca..22d26d8d6c 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -159,17 +159,6 @@ function errorHandler (er) {
].join("\n"))
break
- case npm.EBADPLATFORM:
- er.code = "EBADPLATFORM"
- log.error([er.message
- ,"Not compatible with your operating system or architecture: "+er.pkgid
- ,"Valid OS: "+er.os.join(",")
- ,"Valid Arch: "+er.cpu.join(",")
- ,"Actual OS: "+process.platform
- ,"Actual Arch: "+process.arch
- ].join("\n"))
- break
-
case "EEXIST":
case constants.EEXIST:
log.error([er.message
diff --git a/deps/npm/lib/utils/excludes.js b/deps/npm/lib/utils/excludes.js
new file mode 100644
index 0000000000..75fe41c057
--- /dev/null
+++ b/deps/npm/lib/utils/excludes.js
@@ -0,0 +1,157 @@
+// build up a set of exclude lists in order of precedence:
+// [ ["!foo", "bar"]
+// , ["foo", "!bar"] ]
+// being *included* will override a previous exclusion,
+// and being excluded will override a previous inclusion.
+//
+// Each time the tar file-list generator thingie enters a new directory,
+// it calls "addIgnoreFile(dir, list, cb)". If an ignore file is found,
+// then it is added to the list and the cb() is called with an
+// child of the original list, so that we don't have
+// to worry about popping it off at the right time, since other
+// directories will continue to use the original parent list.
+//
+// If no ignore file is found, then the original list is returned.
+//
+// To start off with, ~/.{npm,git}ignore is added, as is
+// prefix/{npm,git}ignore, effectively treated as if they were in the
+// base package directory.
+
+exports.addIgnoreFile = addIgnoreFile
+exports.readIgnoreFile = readIgnoreFile
+exports.parseIgnoreFile = parseIgnoreFile
+exports.test = test
+exports.filter = filter
+
+var path = require("path")
+ , fs = require("graceful-fs")
+ , minimatch = require("minimatch")
+ , relativize = require("./relativize.js")
+ , log = require("./log.js")
+
+// todo: memoize
+
+// read an ignore file, or fall back to the
+// "gitBase" file in the same directory.
+function readIgnoreFile (file, gitBase, cb) {
+ //log.warn(file, "ignoreFile")
+ if (!file) return cb(null, "")
+ fs.readFile(file, function (er, data) {
+ if (!er || !gitBase) return cb(null, data || "")
+ var gitFile = path.resolve(path.dirname(file), gitBase)
+ fs.readFile(gitFile, function (er, data) {
+ return cb(null, data || "")
+ })
+ })
+}
+
+// read a file, and then return the list of patterns
+function parseIgnoreFile (file, gitBase, dir, cb) {
+ readIgnoreFile(file, gitBase, function (er, data) {
+ data = data ? data.toString("utf8") : ""
+
+ data = data.split(/[\r\n]+/).map(function (p) {
+ return p.trim()
+ }).filter(function (p) {
+ return p.length && p.charAt(0) !== "#"
+ })
+ data.dir = dir
+ return cb(er, data)
+ })
+}
+
+// add an ignore file to an existing list which can
+// then be passed to the test() function. If the ignore
+// file doesn't exist, then the list is unmodified. If
+// it is, then a concat-child of the original is returned,
+// so that this is suitable for walking a directory tree.
+function addIgnoreFile (file, gitBase, list, dir, cb) {
+ if (typeof cb !== "function") cb = dir, dir = path.dirname(file)
+ if (typeof cb !== "function") cb = list, list = []
+ parseIgnoreFile(file, gitBase, dir, function (er, data) {
+ if (!er && data) {
+ // package.json "files" array trumps everything
+ // Make sure it's always last.
+ if (list.length && list[list.length-1].packageFiles) {
+ list = list.concat([data, list.pop()])
+ } else {
+ list = list.concat([data])
+ }
+ }
+ cb(er, list)
+ })
+}
+
+
+// no IO
+// loop through the lists created in the functions above, and test to
+// see if a file should be included or not, given those exclude lists.
+function test (file, excludeList) {
+ if (path.basename(file) === "package.json") return true
+ // log.warn(file, "test file")
+ // log.warn(excludeList, "test list")
+ var incRe = /^\!(\!\!)*/
+ , excluded = false
+ for (var i = 0, l = excludeList.length; i < l; i ++) {
+ var excludes = excludeList[i]
+ , dir = excludes.dir
+
+ // chop the filename down to be relative to excludeDir
+ var rf = relativize(file, dir, true)
+ rf = rf.replace(/^\.?\//, "")
+ if (file.slice(-1) === "/") rf += "/"
+
+ // log.warn([file, rf], "rf")
+
+ for (var ii = 0, ll = excludes.length; ii < ll; ii ++) {
+ var ex = excludes[ii].replace(/^(!*)\//, "$1")
+ , inc = !!ex.match(incRe)
+
+ // log.warn([ex, rf], "ex, rf")
+ // excluding/including a dir excludes/includes all the files in it.
+ if (ex.slice(-1) === "/") ex += "**"
+
+ // if this is not an inclusion attempt, and someone else
+ // excluded it, then just continue, because there's nothing
+ // that can be done here to change the exclusion.
+ if (!inc && excluded) continue
+
+ // if it's an inclusion attempt, and the file has not been
+ // excluded, then skip it, because there's no need to try again.
+ if (inc && !excluded) continue
+
+ // if it matches the pattern, then it should be excluded.
+ excluded = !!minimatch(rf, ex, { matchBase: true })
+ // log.error([rf, ex, excluded], "rf, ex, excluded")
+
+ // if you include foo, then it also includes foo/bar.js
+ if (inc && excluded && ex.slice(-3) !== "/**") {
+ excluded = minimatch(rf, ex + "/**", { matchBase: true })
+ // log.warn([rf, ex + "/**", inc, excluded], "dir without /")
+ }
+
+ // if you exclude foo, then it also excludes foo/bar.js
+ if (!inc
+ && excluded
+ && ex.slice(-3) !== "/**"
+ && rf.slice(-1) === "/"
+ && excludes.indexOf(ex + "/**") === -1) {
+ // log.warn(ex + "/**", "adding dir-matching exclude pattern")
+ excludes.splice(ii, 1, ex, ex + "/**")
+ ll ++
+ }
+ }
+ // log.warn([rf, excluded, excludes], "rf, excluded, excludes")
+ }
+ // true if it *should* be included
+ // log.warn([file, excludeList, excluded], "file, excluded")
+ return !excluded
+}
+
+// returns a function suitable for Array#filter
+function filter (dir, list) { return function (file) {
+ file = file.trim()
+ var testFile = path.resolve(dir, file)
+ if (file.slice(-1) === "/") testFile += "/"
+ return file && test(testFile, list)
+}}
diff --git a/deps/npm/lib/utils/fetch.js b/deps/npm/lib/utils/fetch.js
index bc1c095cdf..ba1e567b1f 100644
--- a/deps/npm/lib/utils/fetch.js
+++ b/deps/npm/lib/utils/fetch.js
@@ -8,16 +8,16 @@ var request = require("request")
, url = require("url")
, log = require("./log.js")
, path = require("path")
- , mkdir = require("mkdirp")
- , chownr = require("chownr")
+ , mkdir = require("./mkdir-p.js")
, regHost
+ , getAgent = require("./get-agent.js")
module.exports = fetch
function fetch (remote, local, headers, cb) {
if (typeof cb !== "function") cb = headers, headers = {}
log.verbose(local, "fetch to")
- mkdir(path.dirname(local), function (er, made) {
+ mkdir(path.dirname(local), function (er) {
if (er) return cb(er)
fetch_(remote, local, headers, cb)
})
@@ -57,9 +57,8 @@ function makeRequest (remote, fstr, headers) {
request({ url: remote
, proxy: proxy
+ , agent: getAgent(remote)
, strictSSL: npm.config.get("strict-ssl")
- , ca: remote.host === regHost ? npm.config.get("ca") : undefined
- , headers: { "user-agent": npm.config.get("user-agent") }
, onResponse: onResponse }).pipe(fstr)
function onResponse (er, res) {
if (er) return fstr.emit("error", er)
diff --git a/deps/npm/lib/utils/find-prefix.js b/deps/npm/lib/utils/find-prefix.js
index bc2c9598db..320456c7ea 100644
--- a/deps/npm/lib/utils/find-prefix.js
+++ b/deps/npm/lib/utils/find-prefix.js
@@ -45,9 +45,6 @@ function findPrefix_ (p, original, cb) {
return cb(null, p)
}
- var d = path.dirname(p)
- if (d === p) return cb(null, original)
-
- return findPrefix_(d, original, cb)
+ return findPrefix_(path.dirname(p), original, cb)
})
}
diff --git a/deps/npm/lib/utils/get-agent.js b/deps/npm/lib/utils/get-agent.js
new file mode 100644
index 0000000000..4bc074f29b
--- /dev/null
+++ b/deps/npm/lib/utils/get-agent.js
@@ -0,0 +1,62 @@
+// get an http/https agent
+// This is necessary for the custom CA certs in http2,
+// especially while juggling multiple different registries.
+//
+// When using http2, the agent key is just the CA setting,
+// since it can manage socket pooling across different host:port
+// options. When using the older implementation, the
+// key is ca:host:port combination.
+
+module.exports = getAgent
+
+var npm = require("../npm.js")
+ , url = require("url")
+ , agents = {}
+ , isHttp2 = !!require("http").globalAgent
+ , registry = url.parse(npm.config.get("registry") || "")
+ , regCA = npm.config.get("ca")
+
+function getAgent (remote) {
+ // If not doing https, then there's no CA cert to manage.
+ // on http2, this will use the default global agent.
+ // on http1, this is undefined, so it'll spawn based on
+ // host:port if necessary.
+ if (remote.protocol !== "https:") {
+ return require("http").globalAgent
+ }
+
+ if (typeof remote === "string") {
+ remote = url.parse(remote)
+ }
+
+ var ca
+ // if this is the registry, then use the configuration ca.
+ // otherwise, just use the built-in CAs that node has.
+ // todo: multi-registry support.
+ if (remote.hostname === registry.hostname
+ && remote.port === registry.port) {
+ ca = regCA
+ }
+
+ // no CA, just use the default agent.
+ if (!ca) {
+ return require("https").globalAgent
+ }
+
+ var hostname = remote.hostname
+ , port = remote.port
+ , key = agentKey(hostname, port, ca)
+
+ return agents[key] = agents[key] || getAgent_(hostname, port, ca)
+}
+
+function getAgent_ (hostname, port, ca) {
+ var Agent = require("https").Agent
+ return new Agent({ host: hostname
+ , port: port
+ , ca: ca })
+}
+
+function agentKey (hostname, port, ca) {
+ return JSON.stringify(isHttp2 ? ca : [hostname, port, ca])
+}
diff --git a/deps/npm/lib/utils/get.js b/deps/npm/lib/utils/get.js
new file mode 100644
index 0000000000..3c5e4f099b
--- /dev/null
+++ b/deps/npm/lib/utils/get.js
@@ -0,0 +1,6 @@
+
+module.exports = get
+function get (obj, key) {
+ for (var i in obj) if (i.toLowerCase() === key.toLowerCase()) return obj[i]
+ return undefined
+}
diff --git a/deps/npm/lib/utils/ini.js b/deps/npm/lib/utils/ini.js
index b033b6a04d..48d4f99edf 100644
--- a/deps/npm/lib/utils/ini.js
+++ b/deps/npm/lib/utils/ini.js
@@ -323,14 +323,8 @@ function envReplace (f) {
if (typeof f !== "string" || !f) return f
// replace any ${ENV} values with the appropriate environ.
- var envExpr = /(\\*)\$\{([^}]+)\}/g
- return f.replace(envExpr, function (orig, esc, name, i, s) {
- esc = esc.length && esc.length % 2
- if (esc) return orig
- if (undefined === process.env[name]) {
- throw new Error("Failed to replace env in config: "+orig)
- }
- return process.env[name]
+ return f.replace(/\$\{([^}]+)\}/g, function (orig, name, i, s) {
+ return process.env[name] || orig
})
}
diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js
index 92b086e699..970157349a 100644
--- a/deps/npm/lib/utils/lifecycle.js
+++ b/deps/npm/lib/utils/lifecycle.js
@@ -11,17 +11,6 @@ var log = require("./log.js")
, chain = require("slide").chain
, constants = require("constants")
, output = require("./output.js")
- , PATH = "PATH"
-
-// windows calls it's path "Path" usually, but this is not guaranteed.
-if (process.platform === "win32") {
- PATH = "Path"
- Object.keys(process.env).forEach(function (e) {
- if (e.match(/^PATH$/i)) {
- PATH = e
- }
- })
-}
function lifecycle (pkg, stage, wd, unsafe, failOk, cb) {
if (typeof cb !== "function") cb = failOk, failOk = false
@@ -65,21 +54,16 @@ function checkForLink (pkg, cb) {
}
function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) {
- var pathArr = []
+ var PATH = []
, p = wd.split("node_modules")
, acc = path.resolve(p.shift())
p.forEach(function (pp) {
- pathArr.unshift(path.join(acc, "node_modules", ".bin"))
+ PATH.unshift(path.join(acc, "node_modules", ".bin"))
acc = path.join(acc, "node_modules", pp)
})
- pathArr.unshift(path.join(acc, "node_modules", ".bin"))
-
- // we also unshift the bundled node-gyp-bin folder so that
- // the bundled one will be used for installing things.
- pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin"))
-
- if (env[PATH]) pathArr.push(env[PATH])
- env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":")
+ PATH.unshift(path.join(acc, "node_modules", ".bin"))
+ if (env.PATH) PATH.push(env.PATH)
+ env.PATH = PATH.join(process.platform === "win32" ? ";" : ":")
var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage)
@@ -129,7 +113,7 @@ function runPackageLifecycle (pkg, env, wd, unsafe, cb) {
, cmd = env.npm_lifecycle_script
, sh = "sh"
, shFlag = "-c"
-
+
if (process.platform === "win32") {
sh = "cmd"
shFlag = "/c"
@@ -137,12 +121,9 @@ function runPackageLifecycle (pkg, env, wd, unsafe, cb) {
log.verbose(unsafe, "unsafe-perm in lifecycle")
- var note = "\n> " + pkg._id + " " + stage + " " + wd
- + "\n> " + cmd + "\n"
-
- output.write(note, function (er) {
+ output.write("\n> "+pkg._id+" " + stage+" "+wd+"\n> "+cmd+"\n", function (er) {
if (er) return cb(er)
-
+
exec( sh, [shFlag, cmd], env, true, wd
, user, group
, function (er, code, stdout, stderr) {
@@ -252,10 +233,6 @@ function makeEnv (data, prefix, env) {
return
}
var value = ini.get(i)
- if (/^(log|out)fd$/.test(i) && typeof value === "object") {
- // not an fd, a stream
- return
- }
if (!value) value = ""
else if (typeof value !== "string") value = JSON.stringify(value)
diff --git a/deps/npm/lib/utils/link.js b/deps/npm/lib/utils/link.js
index 7fa80d5e12..9be1221f0a 100644
--- a/deps/npm/lib/utils/link.js
+++ b/deps/npm/lib/utils/link.js
@@ -4,8 +4,8 @@ link.ifExists = linkIfExists
var fs = require("graceful-fs")
, chain = require("slide").chain
- , mkdir = require("mkdirp")
- , rm = require("./gently-rm.js")
+ , mkdir = require("./mkdir-p.js")
+ , rm = require("rimraf")
, log = require("./log.js")
, path = require("path")
, relativize = require("./relativize.js")
@@ -23,7 +23,7 @@ function link (from, to, gently, cb) {
if (npm.config.get("force")) gently = false
chain
( [ [fs, "stat", from]
- , [rm, to, gently]
+ , [rm, to, { gently: gently }]
, [mkdir, path.dirname(to)]
, [fs, "symlink", relativize(from, to), to] ]
, cb)
diff --git a/deps/npm/lib/utils/mkdir-p.js b/deps/npm/lib/utils/mkdir-p.js
new file mode 100644
index 0000000000..cc2b465fb6
--- /dev/null
+++ b/deps/npm/lib/utils/mkdir-p.js
@@ -0,0 +1,191 @@
+
+var log = require("./log.js")
+ , fs = require("graceful-fs")
+ , path = require("path")
+ , npm = require("../npm.js")
+ , exec = require("./exec.js")
+ , uidNumber = require("./uid-number.js")
+ , umask = process.umask()
+ , umaskOrig = umask
+ , addedUmaskExit = false
+ , mkdirCache = {}
+
+module.exports = mkdir
+function mkdir (ensure, mode, uid, gid, noChmod, cb_) {
+ if (typeof cb_ !== "function") cb_ = noChmod, noChmod = null
+ if (typeof cb_ !== "function") cb_ = gid, gid = null
+ if (typeof cb_ !== "function") cb_ = uid, uid = null
+ if (typeof cb_ !== "function") cb_ = mode, mode = npm.modes.exec
+
+ if (mode & umask) {
+ log.verbose(mode.toString(8), "umasking from "+umask.toString(8))
+ process.umask(umask = 0)
+ if (!addedUmaskExit) {
+ addedUmaskExit = true
+ process.on("exit", function () { process.umask(umask = umaskOrig) })
+ }
+ }
+
+ ensure = path.resolve(ensure).replace(/\/+$/, '')
+
+ // mkdir("/") should not do anything, since that always exists.
+ if (!ensure
+ || ( process.platform === "win32"
+ && ensure.match(/^[a-zA-Z]:(\\|\/)?$/))) {
+ return cb_()
+ }
+
+ if (mkdirCache.hasOwnProperty(ensure)) {
+ return mkdirCache[ensure].push(cb_)
+ }
+ mkdirCache[ensure] = [cb_]
+
+ function cb (er) {
+ var cbs = mkdirCache[ensure]
+ delete mkdirCache[ensure]
+ cbs.forEach(function (c) { c(er) })
+ }
+
+ if (uid === null && gid === null) {
+ return mkdir_(ensure, mode, uid, gid, noChmod, cb)
+ }
+
+ uidNumber(uid, gid, function (er, uid, gid) {
+ if (er) return cb(er)
+ mkdir_(ensure, mode, uid, gid, noChmod, cb)
+ })
+}
+
+function mkdir_ (ensure, mode, uid, gid, noChmod, cb) {
+ // if it's already a dir, then just check the bits and owner.
+ fs.stat(ensure, function (er, s) {
+ if (s && s.isDirectory()) {
+ // check mode, uid, and gid.
+ if ((noChmod || (s.mode & mode) === mode)
+ && (typeof uid !== "number" || s.uid === uid)
+ && (typeof gid !== "number" || s.gid === gid)) return cb()
+ return done(ensure, mode, uid, gid, noChmod, cb)
+ }
+ return walkDirs(ensure, mode, uid, gid, noChmod, cb)
+ })
+}
+
+function done (ensure, mode, uid, gid, noChmod, cb) {
+ // now the directory has been created.
+ // chown it to the desired uid/gid
+ // Don't chown the npm.root dir, though, in case we're
+ // in unsafe-perm mode.
+ log.verbose("done: "+ensure+" "+mode.toString(8), "mkdir")
+
+ // only chmod if noChmod isn't set.
+ var d = done_(ensure, mode, uid, gid, cb)
+ if (noChmod) return d()
+ fs.chmod(ensure, mode, d)
+}
+
+function done_ (ensure, mode, uid, gid, cb) {
+ return function (er) {
+ if (er
+ || ensure === npm.dir
+ || typeof uid !== "number"
+ || typeof gid !== "number"
+ || npm.config.get("unsafe-perm")) return cb(er)
+ uid = Math.floor(uid)
+ gid = Math.floor(gid)
+ fs.chown(ensure, uid, gid, cb)
+ }
+}
+
+var pathSplit = process.platform === "win32" ? /\/|\\/ : "/"
+function walkDirs (ensure, mode, uid, gid, noChmod, cb) {
+ var dirs = ensure.split(pathSplit)
+ , walker = []
+ , foundUID = null
+ , foundGID = null
+
+ // gobble the "/" or C: first
+ walker.push(dirs.shift())
+
+ // The loop that goes through and stats each dir.
+ ;(function S (d) {
+ // no more directory steps left.
+ if (d === undefined) {
+ // do the chown stuff
+ return done(ensure, mode, uid, gid, noChmod, cb)
+ }
+
+ // get the absolute dir for the next piece being stat'd
+ walker.push(d)
+ var dir = walker.join(path.SPLIT_CHAR)
+
+ // stat callback lambda
+ fs.stat(dir, function STATCB (er, s) {
+ if (er) {
+ // the stat failed - directory does not exist.
+
+ log.verbose(er.message, "mkdir (expected) error")
+
+ // use the same uid/gid as the nearest parent, if not set.
+ if (foundUID !== null) uid = foundUID
+ if (foundGID !== null) gid = foundGID
+
+ // make the directory
+ fs.mkdir(dir, mode, function MKDIRCB (er) {
+ // since stat and mkdir are done as two separate syscalls,
+ // operating on a path rather than a file descriptor, it's
+ // possible that the directory didn't exist when we did
+ // the stat, but then *did* exist when we go to to the mkdir.
+ // If we didn't care about uid/gid, we could just mkdir
+ // repeatedly, failing on any error other than "EEXIST".
+ if (er && er.message.indexOf("EEXIST") === 0) {
+ return fs.stat(dir, STATCB)
+ }
+
+ // any other kind of error is not saveable.
+ if (er) return cb(er)
+
+ // at this point, we've just created a new directory successfully.
+
+ // if we care about permissions
+ if (!npm.config.get("unsafe-perm") // care about permissions
+ // specified a uid and gid
+ && uid !== null
+ && gid !== null ) {
+ // set the proper ownership
+ return fs.chown(dir, uid, gid, function (er) {
+ if (er) return cb(er)
+ // attack the next portion of the path.
+ S(dirs.shift())
+ })
+ } else {
+ // either we don't care about ownership, or it's already right.
+ S(dirs.shift())
+ }
+ }) // mkdir
+
+ } else {
+ // the stat succeeded.
+ if (s.isDirectory()) {
+ // if it's a directory, that's good.
+ // if the uid and gid aren't already set, then try to preserve
+ // the ownership on up the tree. Things in ~ remain owned by
+ // the user, things in / remain owned by root, etc.
+ if (uid === null && typeof s.uid === "number") foundUID = s.uid
+ if (gid === null && typeof s.gid === "number") foundGID = s.gid
+
+ // move onto next portion of path
+ S(dirs.shift())
+
+ } else {
+ // the stat succeeded, but it's not a directory
+ log.verbose(dir, "mkdir exists")
+ log.silly(s, "stat("+dir+")")
+ log.verbose(s.isDirectory(), "isDirectory()")
+ cb(new Error("Failed to mkdir "+dir+": File exists"))
+ }// if (isDirectory) else
+ } // if (stat failed) else
+ }) // stat
+
+ // start the S function with the first item in the list of directories.
+ })(dirs.shift())
+}
diff --git a/deps/npm/lib/utils/npm-registry-client/get.js b/deps/npm/lib/utils/npm-registry-client/get.js
index e0902f0276..ae05ac1fc3 100644
--- a/deps/npm/lib/utils/npm-registry-client/get.js
+++ b/deps/npm/lib/utils/npm-registry-client/get.js
@@ -6,9 +6,8 @@ var GET = require("./request.js").GET
, npm = require("../../npm.js")
, path = require("path")
, log = require("../log.js")
- , mkdir = require("mkdirp")
+ , mkdir = require("../mkdir-p.js")
, cacheStat = null
- , chownr = require("chownr")
function get (project, version, timeout, nofollow, staleOk, cb) {
if (typeof cb !== "function") cb = staleOk, staleOk = false
@@ -20,9 +19,6 @@ function get (project, version, timeout, nofollow, staleOk, cb) {
throw new Error("No callback provided to registry.get")
}
- timeout = Math.min(timeout, npm.config.get("cache-max"))
- timeout = Math.max(timeout, npm.config.get("cache-min"))
-
if ( process.env.COMP_CWORD !== undefined
&& process.env.COMP_LINE !== undefined
&& process.env.COMP_POINT !== undefined
@@ -140,7 +136,7 @@ function get_ (uri, timeout, cache, stat, data, nofollow, staleOk, cb) {
data = remoteData
if (!data) {
- er = er || new Error("failed to fetch from registry: " + uri)
+ er = new Error("failed to fetch from registry: " + uri)
}
if (er) return cb(er, data, raw, response)
@@ -174,13 +170,13 @@ function saveToCache (cache, data, saved) {
}
function saveToCache_ (cache, data, uid, gid, saved) {
- mkdir(path.dirname(cache), function (er, made) {
+ mkdir(path.dirname(cache), npm.modes.exec, uid, gid, function (er) {
if (er) return saved()
fs.writeFile(cache, JSON.stringify(data), function (er) {
if (er || uid === null || gid === null) {
return saved()
}
- chownr(made || cache, uid, gid, saved)
+ fs.chown(cache, uid, gid, saved)
})
})
}
diff --git a/deps/npm/lib/utils/npm-registry-client/request.js b/deps/npm/lib/utils/npm-registry-client/request.js
index d5122629dd..d98135e49e 100644
--- a/deps/npm/lib/utils/npm-registry-client/request.js
+++ b/deps/npm/lib/utils/npm-registry-client/request.js
@@ -16,6 +16,7 @@ var npm = require("../../npm.js")
, stream = require("stream")
, Stream = stream.Stream
, request = require("request")
+ , getAgent = require("../get-agent.js")
function regRequest (method, where, what, etag, nofollow, cb_) {
if (typeof cb_ !== "function") cb_ = nofollow, nofollow = false
@@ -84,7 +85,7 @@ function regRequest (method, where, what, etag, nofollow, cb_) {
function makeRequest (method, remote, where, what, etag, nofollow, cb) {
var opts = { url: remote
, method: method
- , ca: npm.config.get("ca")
+ , agent: getAgent(remote)
, strictSSL: npm.config.get("strict-ssl") }
, headers = opts.headers = {}
if (etag) {
@@ -94,8 +95,6 @@ function makeRequest (method, remote, where, what, etag, nofollow, cb) {
headers.accept = "application/json"
- headers["user-agent"] = npm.config.get("user-agent")
-
opts.proxy = npm.config.get( remote.protocol === "https:"
? "https-proxy" : "proxy" )
diff --git a/deps/npm/lib/utils/output.js b/deps/npm/lib/utils/output.js
index b705153ad5..00da9f69f7 100644
--- a/deps/npm/lib/utils/output.js
+++ b/deps/npm/lib/utils/output.js
@@ -58,7 +58,6 @@ function write (args, stream, lf, cb) {
if (!npm.config.get("unicode")) {
arg = arg.replace(/â””/g, "`")
.replace(/─/g, "-")
- .replace(/│/g, "|")
.replace(/├/g, "+")
.replace(/┬/g, "-")
}
diff --git a/deps/npm/lib/utils/read-installed.js b/deps/npm/lib/utils/read-installed.js
index ff220943d6..6c0ece25bc 100644
--- a/deps/npm/lib/utils/read-installed.js
+++ b/deps/npm/lib/utils/read-installed.js
@@ -94,7 +94,6 @@ var npm = require("../npm.js")
, semver = require("semver")
, readJson = require("./read-json.js")
, log = require("./log.js")
- , url = require("url")
module.exports = readInstalled
@@ -126,8 +125,7 @@ function readInstalled_ (folder, parent, name, reqver, depth, maxDepth, cb) {
})
readJson(path.resolve(folder, "package.json"), function (er, data) {
- obj = copy(data)
-
+ obj = data
if (!parent) {
obj = obj || true
er = null
@@ -255,8 +253,6 @@ function findUnmet (obj) {
continue
}
if ( typeof deps[d] === "string"
- // url deps presumed innocent.
- && !url.parse(deps[d]).protocol
&& !semver.satisfies(found.version, deps[d])) {
// the bad thing will happen
log.warn(obj.path + " requires "+d+"@'"+deps[d]
@@ -273,15 +269,6 @@ function findUnmet (obj) {
return obj
}
-function copy (obj) {
- if (!obj || typeof obj !== 'object') return obj
- if (Array.isArray(obj)) return obj.map(copy)
-
- var o = {}
- for (var i in obj) o[i] = copy(obj[i])
- return o
-}
-
if (module === require.main) {
var util = require("util")
console.error("testing")
diff --git a/deps/npm/lib/utils/read-json.js b/deps/npm/lib/utils/read-json.js
index d1bba10f58..388d6727eb 100644
--- a/deps/npm/lib/utils/read-json.js
+++ b/deps/npm/lib/utils/read-json.js
@@ -34,33 +34,8 @@ function readJson (jsonFile, opts, cb) {
var wscript = null
, contributors = null
, serverjs = null
- , gypfile = null
- if (opts.gypfile !== null && opts.gypfile !== undefined) {
- gypfile = opts.gypfile
- next()
- } else {
- var pkgdir = path.dirname(jsonFile)
-
- function hasGyp (has) {
- gypfile = opts.gypfile = has
- next()
- }
-
- fs.readdir(pkgdir, function (er, gf) {
- // this would be weird.
- if (er) return hasGyp(false)
-
- // see if there are any *.gyp files in there.
- gf = gf.filter(function (f) {
- return f.match(/\.gyp$/)
- })
- gf = gf[0]
- return hasGyp(!!gf)
- })
- }
-
- if (opts.wscript !== null && opts.wscript !== undefined) {
+ if (opts.wscript != null) {
wscript = opts.wscript
next()
} else fs.readFile( path.join(path.dirname(jsonFile), "wscript")
@@ -72,7 +47,7 @@ function readJson (jsonFile, opts, cb) {
next()
})
- if (opts.contributors !== null && opts.contributors !== undefined) {
+ if (opts.contributors != null) {
contributors = opts.contributors
next()
} else fs.readFile( path.join(path.dirname(jsonFile), "AUTHORS")
@@ -89,7 +64,7 @@ function readJson (jsonFile, opts, cb) {
next()
})
- if (opts.serverjs !== null && opts.serverjs !== undefined) {
+ if (opts.serverjs != null) {
serverjs = opts.serverjs
next()
} else fs.stat( path.join(path.dirname(jsonFile), "server.js")
@@ -101,55 +76,22 @@ function readJson (jsonFile, opts, cb) {
})
function next () {
- if (wscript === null ||
- contributors === null ||
- gypfile === null ||
- serverjs === null) {
+ if (wscript === null
+ || contributors === null
+ || serverjs === null) {
return
}
- // XXX this api here is insane. being internal is no excuse.
- // please refactor.
- var thenLoad = processJson(opts, function (er, data) {
+ fs.readFile(jsonFile, processJson(opts, function (er, data) {
if (er) return cb(er)
var doLoad = !(jsonFile.indexOf(npm.cache) === 0 &&
path.basename(path.dirname(jsonFile)) !== "package")
if (!doLoad) return cb(er, data)
loadPackageDefaults(data, path.dirname(jsonFile), cb)
- })
-
- fs.readFile(jsonFile, function (er, data) {
- if (er && er.code === "ENOENT") {
- // single-file module, maybe?
- // check index.js for a /**package { ... } **/ section.
- var indexFile = path.resolve(path.dirname(jsonFile), "index.js")
- return fs.readFile(indexFile, function (er2, data) {
- // if this doesn't work, then die with the original error.
- if (er2) return cb(er)
- data = parseIndex(data)
- if (!data) return cb(er)
- thenLoad(null, data)
- })
- }
- thenLoad(er, data)
- })
+ }))
}
}
-// sync. no io.
-// /**package { "name": "foo", "version": "1.2.3", ... } **/
-function parseIndex (data) {
- data = data.toString()
- data = data.split(/^\/\*\*package(?:\s|$)/m)
- if (data.length < 2) return null
- data = data[1]
- data = data.split(/\*\*\/$/m)
- if (data.length < 2) return null
- data = data[0]
- data = data.replace(/^\s*\*/mg, "")
- return data
-}
-
function processJson (opts, cb) {
if (typeof cb !== "function") cb = opts, opts = {}
if (typeof cb !== "function") {
@@ -171,8 +113,8 @@ function processJson (opts, cb) {
}
function processJsonString (opts, cb) { return function (er, jsonString) {
- if (er) return cb(er, jsonString)
jsonString += ""
+ if (er) return cb(er, jsonString)
var json
try {
json = JSON.parse(jsonString)
@@ -246,12 +188,11 @@ function typoWarn (json) {
}
if (typeof json.bugs === "object") {
- // just go ahead and correct these.
Object.keys(bugsTypos).forEach(function (d) {
if (json.bugs.hasOwnProperty(d)) {
- json.bugs[ bugsTypos[d] ] = json.bugs[d]
- delete json.bugs[d]
- }
+ log.warn( "package.json: bugs['" + d + "'] should probably be "
+ + "bugs['" + bugsTypos[d] + "']", json._id)
+ }
})
}
@@ -359,15 +300,6 @@ function processObject (opts, cb) { return function (er, json) {
var scripts = json.scripts || {}
- // if it has a bindings.gyp, then build with node-gyp
- if (opts.gypfile && !json.prebuilt) {
- log.verbose([json.prebuilt, opts], "has bindings.gyp")
- if (!scripts.install && !scripts.preinstall) {
- scripts.install = "node-gyp rebuild"
- json.scripts = scripts
- }
- }
-
// if it has a wscript, then build it.
if (opts.wscript && !json.prebuilt) {
log.verbose([json.prebuilt, opts], "has wscript")
@@ -447,9 +379,11 @@ function processObject (opts, cb) { return function (er, json) {
if (opts.dev
|| npm.config.get("dev")
|| npm.config.get("npat")) {
+ // log.warn(json._id, "Adding devdeps")
Object.keys(json.devDependencies || {}).forEach(function (d) {
json.dependencies[d] = json.devDependencies[d]
})
+ // log.warn(json.dependencies, "Added devdeps")
}
typoWarn(json)
@@ -475,6 +409,13 @@ function processObject (opts, cb) { return function (er, json) {
var depObjectifyWarn = {}
function depObjectify (deps, d, id) {
+ if ((!deps || typeof deps !== "object" || Array.isArray(deps))
+ && !depObjectifyWarn[id+d]) {
+ log.warn( d + " field should be hash of <name>:<version-range> pairs"
+ , id )
+ depObjectifyWarn[id + d] = true
+ }
+
if (!deps) return {}
if (typeof deps === "string") {
deps = deps.trim().split(/[\n\r\s\t ,]+/)
diff --git a/deps/npm/lib/utils/set.js b/deps/npm/lib/utils/set.js
new file mode 100644
index 0000000000..4d9241aab7
--- /dev/null
+++ b/deps/npm/lib/utils/set.js
@@ -0,0 +1,25 @@
+
+module.exports = set
+var get = require("./get.js")
+ , processJson = require("./read-json.js").processJson
+function set (obj, key, val) {
+ for (var i in obj) {
+ if (i.toLowerCase() === key.toLowerCase()) return obj[i] = val
+ }
+ obj[key] = val
+ if (!val) return
+ // if it's a package set, then assign all the versions.
+ if (val.versions) return Object.keys(val.versions).forEach(function (v) {
+ if (typeof val.versions[v] !== "object") return
+ set(obj, key+"@"+v, val.versions[v])
+ })
+ // Note that this doesn't put the dist-tags there, only updates the versions
+ if (key === val.name+"@"+val.version) {
+ processJson(val)
+ var reg = get(obj, val.name) || {}
+ reg.name = reg._id = val.name
+ set(obj, val.name, reg)
+ reg.versions = get(reg, "versions") || {}
+ if (!get(reg.versions, val.version)) set(reg.versions, val.version, val)
+ }
+}
diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js
index 415eb7f9e2..f315bbf961 100644
--- a/deps/npm/lib/utils/tar.js
+++ b/deps/npm/lib/utils/tar.js
@@ -1,39 +1,115 @@
+// XXX lib/cache.js and this file need to be rewritten.
+
// commands for packing and unpacking tarballs
// this file is used by lib/cache.js
var npm = require("../npm.js")
, fs = require("graceful-fs")
+ , exec = require("./exec.js")
+ , find = require("./find.js")
+ , mkdir = require("./mkdir-p.js")
+ , asyncMap = require("slide").asyncMap
, path = require("path")
, log = require("./log.js")
- , uidNumber = require("uid-number")
+ , uidNumber = require("./uid-number.js")
, rm = require("rimraf")
, readJson = require("./read-json.js")
, relativize = require("./relativize.js")
, cache = require("../cache.js")
+ , excludes = require("./excludes.js")
, myUid = process.getuid && process.getuid()
, myGid = process.getgid && process.getgid()
, tar = require("tar")
, zlib = require("zlib")
, fstream = require("fstream")
- , Packer = require("fstream-npm")
-
-if (process.env.SUDO_UID && myUid === 0) {
- if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID
- if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID
-}
exports.pack = pack
exports.unpack = unpack
+exports.makeList = makeList
function pack (targetTarball, folder, pkg, dfc, cb) {
- log.verbose([targetTarball, folder], "tar.pack")
if (typeof cb !== "function") cb = dfc, dfc = true
+ folder = path.resolve(folder)
+
+ log.verbose(folder, "pack")
+
+ if (typeof pkg === "function") {
+ cb = pkg, pkg = null
+ return readJson(path.resolve(folder, "package.json"), function (er, pkg) {
+ if (er) return log.er(cb, "Couldn't find package.json in "+folder)(er)
+ pack(targetTarball, folder, pkg, dfc, cb)
+ })
+ }
+ log.verbose(folder+" "+targetTarball, "pack")
+ var parent = path.dirname(folder)
+ , addFolder = path.basename(folder)
+
+ var confEx = npm.config.get("ignore")
+ log.silly(folder, "makeList")
+ makeList(folder, pkg, dfc, function (er, files, cleanup) {
+ if (er) return cb(er)
+ // log.silly(files, "files")
+ return packFiles(targetTarball, parent, files, pkg, function (er) {
+ if (!cleanup || !cleanup.length) return cb(er)
+ // try to be a good citizen, even/especially in the event of failure.
+ cleanupResolveLinkDep(cleanup, function (er2) {
+ if (er || er2) {
+ if (er) log(er, "packing tarball")
+ if (er2) log(er2, "while cleaning up resolved deps")
+ }
+ return cb(er || er2)
+ })
+ })
+ })
+}
+
+function packFiles (targetTarball, parent, files, pkg, cb_) {
+
+ var p
+
+ files = files.map(function (f) {
+ p = f.split(/\/|\\/)[0]
+ return path.resolve(parent, f)
+ })
+
+ parent = path.resolve(parent, p)
+
+ var called = false
+ function cb (er) {
+ if (called) return
+ called = true
+ cb_(er)
+ }
log.verbose(targetTarball, "tarball")
- log.verbose(folder, "folder")
- new Packer({ path: folder, type: "Directory", isDirectory: true })
- .on("error", log.er(cb, "error reading "+folder))
+ log.verbose(parent, "parent")
+ fstream.Reader({ type: "Directory"
+ , path: parent
+ , filter: function () {
+ // files should *always* get into tarballs
+ // in a user-writable state, even if they're
+ // being installed from some wackey vm-mounted
+ // read-only filesystem.
+ this.props.mode = this.props.mode | 0200
+ var inc = -1 !== files.indexOf(this.path)
+ // WARNING! Hackety hack!
+ // XXX Fix this in a better way.
+ // Rename .gitignore to .npmignore if there is not a
+ // .npmignore file there already, the better to lock
+ // down installed packages with git for deployment.
+ if (this.basename === ".gitignore") {
+ if (this.parent._entries.indexOf(".npmignore") !== -1) {
+ return false
+ }
+ var d = path.dirname(this.path)
+ this.basename = ".npmignore"
+ this.path = path.join(d, ".npmignore")
+ }
+ return inc
+ }
+ })
+ .on("error", log.er(cb, "error reading "+parent))
// By default, npm includes some proprietary attributes in the
// package tarball. This is sane, and allowed by the spec.
// However, npm *itself* excludes these from its own package,
@@ -45,14 +121,11 @@ function pack (targetTarball, folder, pkg, dfc, cb) {
.on("error", log.er(cb, "gzip error "+targetTarball))
.pipe(fstream.Writer({ type: "File", path: targetTarball }))
.on("error", log.er(cb, "Could not write "+targetTarball))
- .on("close", function () {
- cb()
- })
+ .on("close", cb)
}
function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
- log.verbose(tarball, "unpack")
if (typeof cb !== "function") cb = gid, gid = null
if (typeof cb !== "function") cb = uid, uid = null
if (typeof cb !== "function") cb = fMode, fMode = npm.modes.file
@@ -65,139 +138,466 @@ function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
}
function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb ) {
+ // If the desired target is /path/to/foo,
+ // then unpack into /path/to/.foo.npm/{something}
+ // rename that to /path/to/foo, and delete /path/to/.foo.npm
var parent = path.dirname(unpackTarget)
, base = path.basename(unpackTarget)
+ , tmp = path.resolve(parent, "___" + base + ".npm")
- rm(unpackTarget, function (er) {
- if (er) return cb(er)
-
+ mkdir(tmp, dMode || npm.modes.exec, uid, gid, function (er) {
+ log.verbose([uid, gid], "unpack_ uid, gid")
+ log.verbose(unpackTarget, "unpackTarget")
+ if (er) return log.er(cb, "Could not create "+tmp)(er)
+ // cp the gzip of the tarball, pipe the stdout into tar's stdin
// gzip {tarball} --decompress --stdout \
// | tar -mvxpf - --strip-components=1 -C {unpackTarget}
- gunzTarPerm( tarball, unpackTarget
+ gunzTarPerm( tarball, tmp
, dMode, fMode
, uid, gid
, function (er, folder) {
if (er) return cb(er)
- readJson(path.resolve(folder, "package.json"), cb)
+ log.verbose(folder, "gunzed")
+
+ rm(unpackTarget, function (er) {
+ if (er) return cb(er)
+ log.verbose(unpackTarget, "rm'ed")
+
+ moveIntoPlace(folder, unpackTarget, function (er) {
+ if (er) return cb(er)
+ log.verbose([folder, unpackTarget], "renamed")
+ // curse you, nfs! It will lie and tell you that the
+ // mv is done, when in fact, it isn't. In theory,
+ // reading the file should cause it to wait until it's done.
+ readJson( path.resolve(unpackTarget, "package.json")
+ , function (er, data) {
+ // now we read the json, so we know it's there.
+ rm(tmp, function (er2) { cb(er || er2, data) })
+ })
+ })
+ })
})
})
}
+// on Windows, A/V software can lock the directory, causing this
+// to fail with an EACCES. Try again on failure, for up to 1 second.
+// XXX Fix this by not unpacking into a temp directory, instead just
+// renaming things on the way out of the tarball.
+function moveIntoPlace (folder, unpackTarget, cb) {
+ var start = Date.now()
+ fs.rename(folder, unpackTarget, function CB (er) {
+ if (er
+ && process.platform === "win32"
+ && er.code === "EACCES"
+ && Date.now() - start < 1000) {
+ return fs.rename(folder, unpackTarget, CB)
+ }
+ cb(er)
+ })
+}
-function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
+
+function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {
if (!dMode) dMode = npm.modes.exec
if (!fMode) fMode = npm.modes.file
log.silly([dMode.toString(8), fMode.toString(8)], "gunzTarPerm modes")
- var cbCalled = false
- function cb (er) {
- if (cbCalled) return
- cbCalled = true
- cb_(er, target)
- }
-
- var fst = fs.createReadStream(tarball)
+ fs.createReadStream(tarball)
+ .on("error", log.er(cb, "error reading "+tarball))
+ .pipe(zlib.Unzip())
+ .on("error", log.er(cb, "unzip error "+tarball))
+ .pipe(tar.Extract({ type: "Directory", path: tmp }))
+ .on("error", log.er(cb, "Failed unpacking "+tarball))
+ .on("close", afterUntar)
- // figure out who we're supposed to be, if we're not pretending
- // to be a specific user.
- if (npm.config.get("unsafe-perm") && process.platform !== "win32") {
- uid = myUid
- gid = myGid
- }
+ //
+ // XXX Do all this in an Extract filter.
+ //
+ function afterUntar (er) {
+ log.silly(er, "afterUntar")
+ // if we're not doing ownership management,
+ // then we're done now.
+ if (er) return log.er(cb, "Failed unpacking "+tarball)(er)
- function extractEntry (entry) {
- log.silly(entry.path, "extracting entry")
- // never create things that are user-unreadable,
- // or dirs that are user-un-listable. Only leads to headaches.
- var originalMode = entry.mode = entry.mode || entry.props.mode
- entry.mode = entry.mode | (entry.type === "Directory" ? dMode : fMode)
- entry.mode = entry.mode & (~npm.modes.umask)
- entry.props.mode = entry.mode
- if (originalMode !== entry.mode) {
- log.silly([entry.path, originalMode, entry.mode], "modified mode")
+ // HACK skip on windows
+ if (npm.config.get("unsafe-perm") && process.platform !== "win32") {
+ uid = process.getuid()
+ gid = process.getgid()
+ if (uid === 0) {
+ if (process.env.SUDO_UID) uid = +process.env.SUDO_UID
+ if (process.env.SUDO_GID) gid = +process.env.SUDO_GID
+ }
}
- // if there's a specific owner uid/gid that we want, then set that
- if (process.platform !== "win32" &&
- typeof uid === "number" &&
- typeof gid === "number") {
- entry.props.uid = entry.uid = uid
- entry.props.gid = entry.gid = gid
+ if (process.platform === "win32") {
+ return fs.readdir(tmp, function (er, files) {
+ files = files.filter(function (f) {
+ return f && f.indexOf("\0") === -1
+ })
+ cb(er, files && path.resolve(tmp, files[0]))
+ })
}
+
+ find(tmp, function (f) {
+ return f !== tmp
+ }, function (er, files) {
+ if (er) return cb(er)
+ asyncMap(files, function (f, cb) {
+ f = path.resolve(f)
+ log.silly(f, "asyncMap in gTP")
+ fs.lstat(f, function (er, stat) {
+
+ if (er || stat.isSymbolicLink()) return cb(er)
+ if (typeof uid === "number" && typeof gid === "number") {
+ fs.chown(f, uid, gid, chown)
+ } else chown()
+
+ function chown (er) {
+ if (er) return cb(er)
+ var mode = stat.isDirectory() ? dMode : fMode
+ , oldMode = stat.mode & 0777
+ , newMode = (oldMode | mode) & (~npm.modes.umask)
+ if (mode && newMode !== oldMode) {
+ log.silly(newMode.toString(8), "chmod "+path.basename(f))
+ fs.chmod(f, newMode, cb)
+ } else cb()
+ }
+ })
+ }, function (er) {
+
+ if (er) return cb(er)
+ if (typeof myUid === "number" && typeof myGid === "number") {
+ fs.chown(tmp, myUid, myGid, chown)
+ } else chown()
+
+ function chown (er) {
+ if (er) return cb(er)
+ fs.readdir(tmp, function (er, folder) {
+ folder = folder && folder.filter(function (f) {
+ return f && !f.match(/^\._/)
+ })
+ cb(er, folder && path.resolve(tmp, folder[0]))
+ })
+ }
+ })
+ })
+ }
+}
+
+function makeList (dir, pkg, dfc, cb) {
+ if (typeof cb !== "function") cb = dfc, dfc = true
+ if (typeof cb !== "function") cb = pkg, pkg = null
+ dir = path.resolve(dir)
+
+ if (!pkg.path) pkg.path = dir
+
+ var name = path.basename(dir)
+
+ // since this is a top-level traversal, get the user and global
+ // exclude files, as well as the "ignore" config setting.
+ var confIgnore = npm.config.get("ignore").trim()
+ .split(/[\n\r\s\t]+/)
+ .filter(function (i) { return i.trim() })
+ , userIgnore = npm.config.get("userignorefile")
+ , globalIgnore = npm.config.get("globalignorefile")
+ , userExclude
+ , globalExclude
+
+ confIgnore.dir = dir
+ confIgnore.name = "confIgnore"
+
+ var defIgnore = ["build/"]
+ defIgnore.dir = dir
+
+ // TODO: only look these up once, and cache outside this function
+ excludes.parseIgnoreFile( userIgnore, null, dir
+ , function (er, uex) {
+ if (er) return cb(er)
+ userExclude = uex
+ next()
+ })
+
+ excludes.parseIgnoreFile( globalIgnore, null, dir
+ , function (er, gex) {
+ if (er) return cb(er)
+ globalExclude = gex
+ next()
+ })
+
+ function next () {
+ if (!globalExclude || !userExclude) return
+ var exList = [ defIgnore, confIgnore, globalExclude, userExclude ]
+
+ makeList_(dir, pkg, exList, dfc, function (er, files, cleanup) {
+ if (er) return cb(er)
+ var dirLen = dir.replace(/(\/|\\)$/, "").length + 1
+ log.silly([dir, dirLen], "dir, dirLen")
+ files = files.map(function (file) {
+ return path.join(name, file.substr(dirLen))
+ })
+ return cb(null, files, cleanup)
+ })
}
+}
+
+// Patterns ending in slashes will only match targets
+// ending in slashes. To implement this, add a / to
+// the filename iff it lstats isDirectory()
+function readDir (dir, pkg, dfc, cb) {
+ fs.readdir(dir, function (er, files) {
+ if (er) return cb(er)
+ files = files.filter(function (f) {
+ return f && f.charAt(0) !== "/" && f.indexOf("\0") === -1
+ })
+ asyncMap(files, function (file, cb) {
+ fs.lstat(path.resolve(dir, file), function (er, st) {
+ if (er) return cb(null, [])
+ // if it's a directory, then tack "/" onto the name
+ // so that it can match dir-only patterns in the
+ // include/exclude logic later.
+ if (st.isDirectory()) return cb(null, file + "/")
+
+ // if it's a symlink, then we need to do some more
+ // complex stuff for GH-691
+ if (st.isSymbolicLink()) return readSymlink(dir, file, pkg, dfc, cb)
+
+ // otherwise, just let it on through.
+ return cb(null, file)
+ })
+ }, cb)
+ })
+}
+
+// just see where this link is pointing, and resolve relative paths.
+function shallowReal (link, cb) {
+ link = path.resolve(link)
+ fs.readlink(link, function (er, t) {
+ if (er) return cb(er)
+ return cb(null, path.resolve(path.dirname(link), t), t)
+ })
+}
+
+function readSymlink (dir, file, pkg, dfc, cb) {
+ var isNM = dfc
+ && path.basename(dir) === "node_modules"
+ && path.dirname(dir) === pkg.path
+ // see if this thing is pointing outside of the package.
+ // external symlinks are resolved for deps, ignored for other things.
+ // internal symlinks are allowed through.
+ var df = path.resolve(dir, file)
+ shallowReal(df, function (er, r, target) {
+ if (er) return cb(null, []) // wtf? exclude file.
+ if (r.indexOf(dir) === 0) return cb(null, file) // internal
+ if (!isNM) return cb(null, []) // external non-dep
+ // now the fun stuff!
+ fs.realpath(df, function (er, resolved) {
+ if (er) return cb(null, []) // can't add it.
+ readJson(path.resolve(resolved, "package.json"), function (er) {
+ if (er) return cb(null, []) // not a package
+ resolveLinkDep(dir, file, resolved, target, pkg, function (er, f, c) {
+ cb(er, f, c)
+ })
+ })
+ })
+ })
+}
- var extractOpts = { type: "Directory", path: target, strip: 1 }
+// put the link back the way it was.
+function cleanupResolveLinkDep (cleanup, cb) {
+ // cut it out of the list, so that cycles will be broken.
+ if (!cleanup) return cb()
- if (process.platform !== "win32" &&
- typeof uid === "number" &&
- typeof gid === "number") {
- extractOpts.uid = uid
- extractOpts.gid = gid
+ asyncMap(cleanup, function (d, cb) {
+ rm(d[1], function (er) {
+ if (er) return cb(er)
+ fs.symlink(d[0], d[1], cb)
+ })
+ }, cb)
+}
+
+function resolveLinkDep (dir, file, resolved, target, pkg, cb) {
+ // we've already decided that this is a dep that will be bundled.
+ // make sure the data reflects this.
+ var bd = pkg.bundleDependencies || pkg.bundledDependencies || []
+ delete pkg.bundledDependencies
+ pkg.bundleDependencies = bd
+ var f = path.resolve(dir, file)
+ , cleanup = [[target, f, resolved]]
+
+ if (bd.indexOf(file) === -1) {
+ // then we don't do this one.
+ // just move the symlink out of the way.
+ return rm(f, function (er) {
+ cb(er, file, cleanup)
+ })
}
- extractOpts.filter = function () {
- // symbolic links are not allowed in packages.
- if (this.type.match(/^.*Link$/)) {
- log.warn( this.path.substr(target.length + 1)
- + ' -> ' + this.linkpath
- , "excluding symbolic link")
- return false
+ rm(f, function (er) {
+ if (er) return cb(er)
+ cache.add(resolved, function (er, data) {
+ if (er) return cb(er)
+ cache.unpack(data.name, data.version, f, function (er, data) {
+ if (er) return cb(er)
+ // now clear out the cache entry, since it's weird, probably.
+ // pass the cleanup object along so that the thing getting the
+ // list of files knows what to clean up afterwards.
+ cache.clean([data._id], function (er) { cb(er, file, cleanup) })
+ })
+ })
+ })
+}
+
+// exList is a list of ignore lists.
+// Each exList item is an array of patterns of files to ignore
+//
+function makeList_ (dir, pkg, exList, dfc, cb) {
+ var files = null
+ , cleanup = null
+
+ readDir(dir, pkg, dfc, function (er, f, c) {
+ if (er) return cb(er)
+ cleanup = c
+ files = f.map(function (f) {
+ // no nulls in paths!
+ return f.split(/\0/)[0]
+ }).filter(function (f) {
+ // always remove all source control folders and
+ // waf/vim/OSX garbage. this is a firm requirement.
+ return !( f === ".git/"
+ || f === ".lock-wscript"
+ || f === "CVS/"
+ || f === ".svn/"
+ || f === ".hg/"
+ || f.match(/^\..*\.swp/)
+ || f === ".DS_Store"
+ || f.match(/^\._/)
+ || f === "npm-debug.log"
+ || f === ""
+ || f.charAt(0) === "/"
+ )
+ })
+
+ // if (files.length > 0) files.push(".")
+
+ if (files.indexOf("package.json") !== -1 && dir !== pkg.path) {
+ // a package.json file starts the whole exclude/include
+ // logic all over. Otherwise, a parent could break its
+ // deps with its files list or .npmignore file.
+ readJson(path.resolve(dir, "package.json"), function (er, data) {
+ if (!er && typeof data === "object") {
+ data.path = dir
+ return makeList(dir, data, dfc, function (er, files) {
+ // these need to be mounted onto the directory now.
+ cb(er, files && files.map(function (f) {
+ return path.resolve(path.dirname(dir), f)
+ }))
+ })
+ }
+ next()
+ })
+ //next()
+ } else next()
+
+ // add a local ignore file, if found.
+ if (files.indexOf(".npmignore") === -1
+ && files.indexOf(".gitignore") === -1) next()
+ else {
+ excludes.addIgnoreFile( path.resolve(dir, ".npmignore")
+ , ".gitignore"
+ , exList
+ , dir
+ , function (er, list) {
+ if (!er) exList = list
+ next(er)
+ })
}
- return true
- }
+ })
+ var n = 2
+ , errState = null
+ function next (er) {
+ if (errState) return
+ if (er) return cb(errState = er, [], cleanup)
+ if (-- n > 0) return
- fst.on("error", log.er(cb, "error reading "+tarball))
- fst.on("data", function OD (c) {
- // detect what it is.
- // Then, depending on that, we'll figure out whether it's
- // a single-file module, gzipped tarball, or naked tarball.
- // gzipped files all start with 1f8b08
- if (c[0] === 0x1F &&
- c[1] === 0x8B &&
- c[2] === 0x08) {
- fst
- .pipe(zlib.Unzip())
- .on("error", log.er(cb, "unzip error "+tarball))
- .pipe(tar.Extract(extractOpts))
- .on("entry", extractEntry)
- .on("error", log.er(cb, "untar error "+tarball))
- .on("close", cb)
- } else if (c.toString().match(/^package\//)) {
- // naked tar
- fst
- .pipe(tar.Extract(extractOpts))
- .on("entry", extractEntry)
- .on("error", log.er(cb, "untar error "+tarball))
- .on("close", cb)
+ if (!pkg) return cb(new Error("No package.json file in "+dir))
+ if (pkg.path === dir && pkg.files) {
+ pkg.files = pkg.files.filter(function (f) {
+ f = f.trim()
+ return f && f.charAt(0) !== "#"
+ })
+ if (!pkg.files.length) pkg.files = null
+ }
+ if (pkg.path === dir && pkg.files) {
+ // stuff on the files list MUST be there.
+ // ignore everything, then include the stuff on the files list.
+ var pkgFiles = ["*"].concat(pkg.files.map(function (f) {
+ return "!" + f
+ }))
+ pkgFiles.dir = dir
+ pkgFiles.packageFiles = true
+ exList.push(pkgFiles)
+ }
+
+ if (path.basename(dir) === "node_modules"
+ && pkg.path === path.dirname(dir)
+ && dfc) { // do fancy crap
+ files = filterNodeModules(files, pkg)
} else {
- // naked js file
- var jsOpts = { path: path.resolve(target, "index.js") }
-
- if (process.platform !== "win32" &&
- typeof uid === "number" &&
- typeof gid === "number") {
- jsOpts.uid = uid
- jsOpts.gid = gid
+ // If a directory is excluded, we still need to be
+ // able to *include* a file within it, and have that override
+ // the prior exclusion.
+ //
+ // This whole makeList thing probably needs to be rewritten
+ files = files.filter(function (f) {
+ return excludes.filter(dir, exList)(f) || f.slice(-1) === "/"
+ })
+ }
+
+
+ asyncMap(files, function (file, cb) {
+ // if this is a dir, then dive into it.
+ // otherwise, don't.
+ file = path.resolve(dir, file)
+
+ // in 0.6.0, fs.readdir can produce some really odd results.
+ // XXX: remove this and make the engines hash exclude 0.6.0
+ if (file.indexOf(dir) !== 0) {
+ return cb(null, [])
}
- fst
- .pipe(fstream.Writer(jsOpts))
- .on("error", log.er(cb, "copy error "+tarball))
- .on("close", function () {
- var j = path.resolve(target, "package.json")
- readJson(j, function (er, d) {
- if (er) {
- log.error(tarball, "Not a package")
- return cb(er)
- }
- fs.writeFile(j, JSON.stringify(d) + "\n", cb)
- })
- })
- }
+ fs.lstat(file, function (er, st) {
+ if (er) return cb(er)
+ if (st.isDirectory()) {
+ return makeList_(file, pkg, exList, dfc, cb)
+ }
+ return cb(null, file)
+ })
+ }, function (er, files, c) {
+ if (c) cleanup = (cleanup || []).concat(c)
+ if (files.length > 0) files.push(dir)
+ return cb(er, files, cleanup)
+ })
+ }
+}
+
+// only include node_modules folder that are:
+// 1. not on the dependencies list or
+// 2. on the "bundleDependencies" list.
+function filterNodeModules (files, pkg) {
+ var bd = pkg.bundleDependencies || pkg.bundledDependencies || []
+ , deps = Object.keys(pkg.dependencies || {})
+ .filter(function (key) { return !pkg.dependencies[key].extraneous })
+ .concat(Object.keys(pkg.devDependencies || {}))
+
+ delete pkg.bundledDependencies
+ pkg.bundleDependencies = bd
- // now un-hook, and re-emit the chunk
- fst.removeListener("data", OD)
- fst.emit("data", c)
+ return files.filter(function (f) {
+ f = f.replace(/\/$/, "")
+ return f.charAt(0) !== "."
+ && f.charAt(0) !== "_"
+ && bd.indexOf(f) !== -1
})
}
diff --git a/deps/npm/lib/utils/uid-number.js b/deps/npm/lib/utils/uid-number.js
new file mode 100644
index 0000000000..3756275534
--- /dev/null
+++ b/deps/npm/lib/utils/uid-number.js
@@ -0,0 +1,55 @@
+module.exports = uidNumber
+
+// This module calls into bin/npm-get-uid-gid.js, which sets the
+// uid and gid to the supplied argument, in order to find out their
+// numeric value. This can't be done in the main node process,
+// because otherwise npm would be running as that user.
+
+var exec = require("./exec.js")
+ , path = require("path")
+ , log = require("./log.js")
+ , constants = require("constants")
+ , npm = require("../npm.js")
+ , uidSupport = process.getuid && process.setuid
+ , uidCache = {}
+ , gidCache = {}
+
+function uidNumber (uid, gid, cb) {
+ if (!uidSupport || npm.config.get("unsafe-perm")) return cb()
+ if (typeof cb !== "function") cb = gid, gid = null
+ if (typeof cb !== "function") cb = uid, uid = null
+ if (gid == null) gid = process.getgid()
+ if (uid == null) uid = process.getuid()
+ if (!isNaN(gid)) gid = +gid
+ if (!isNaN(uid)) uid = +uid
+
+ if (uidCache[uid]) uid = uidCache[uid]
+ if (gidCache[gid]) gid = gidCache[gid]
+
+ if (typeof gid === "number" && typeof uid === "number") {
+ return cb(null, uid, gid)
+ }
+
+ var getter = path.join(__dirname, "..", "..", "bin", "npm-get-uid-gid.js")
+ return exec( process.execPath, [getter, uid, gid], process.env, false
+ , null, process.getuid(), process.getgid()
+ , function (er, code, out, err) {
+ if (er) return log.er(cb, "Could not get uid/gid "+err)(er)
+ log.silly(out, "output from getuid/gid")
+ out = JSON.parse(out+"")
+ if (out.error) {
+ if (!npm.config.get("unsafe-perm")) {
+ var er = new Error(out.error)
+ er.errno = out.errno
+ return cb(er)
+ } else {
+ return cb(null, +process.getuid(), +process.getgid())
+ }
+ }
+ if (isNaN(out.uid) || isNaN(out.gid)) return cb(new Error(
+ "Could not get uid/gid: "+JSON.stringify(out)))
+ uidCache[uid] = out.uid
+ uidCache[gid] = out.gid
+ cb(null, out.uid, out.gid)
+ })
+}
diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js
index febb56d730..f13d9e1b2e 100644
--- a/deps/npm/lib/version.js
+++ b/deps/npm/lib/version.js
@@ -63,6 +63,6 @@ function checkGit (data, cb) {
}
function write (data, cb) {
fs.writeFile( path.join(process.cwd(), "package.json")
- , new Buffer(JSON.stringify(data, null, 2) + "\n")
+ , new Buffer(JSON.stringify(data, null, 2))
, cb )
}
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js
index 33a5d0df80..3e39f76de9 100644
--- a/deps/npm/lib/view.js
+++ b/deps/npm/lib/view.js
@@ -70,7 +70,6 @@ function view (args, silent, cb) {
data.versions = Object.keys(data.versions).sort(semver.compare)
if (!args.length) args = [""]
- // remove readme unless we asked for it
if (-1 === args.indexOf("readme")) {
delete data.readme
}
@@ -82,10 +81,6 @@ function view (args, silent, cb) {
delete versions[v]
}
if (semver.satisfies(v, version)) args.forEach(function (args) {
- // remove readme unless we asked for it
- if (-1 === args.indexOf("readme")) {
- delete versions[v].readme
- }
results.push(showFields(data, versions[v], args))
})
})
diff --git a/deps/npm/man/man1/README.1 b/deps/npm/man/man1/README.1
index d3c019dab9..a6c6243e17 100644
--- a/deps/npm/man/man1/README.1
+++ b/deps/npm/man/man1/README.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "April 2012" "" ""
+.TH "NPM" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
diff --git a/deps/npm/man/man1/adduser.1 b/deps/npm/man/man1/adduser.1
index 082812cc58..301c95a3e0 100644
--- a/deps/npm/man/man1/adduser.1
+++ b/deps/npm/man/man1/adduser.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ADDUSER" "1" "April 2012" "" ""
+.TH "NPM\-ADDUSER" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-adduser\fR \-\- Add a registry user account
diff --git a/deps/npm/man/man1/bin.1 b/deps/npm/man/man1/bin.1
index 3f62258d16..6c3ff4a89e 100644
--- a/deps/npm/man/man1/bin.1
+++ b/deps/npm/man/man1/bin.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "1" "April 2012" "" ""
+.TH "NPM\-BIN" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
diff --git a/deps/npm/man/man1/bugs.1 b/deps/npm/man/man1/bugs.1
index 384384511f..55aeeb7efc 100644
--- a/deps/npm/man/man1/bugs.1
+++ b/deps/npm/man/man1/bugs.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "1" "April 2012" "" ""
+.TH "NPM\-BUGS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
diff --git a/deps/npm/man/man1/build.1 b/deps/npm/man/man1/build.1
index 897781a480..9c2d7bb18d 100644
--- a/deps/npm/man/man1/build.1
+++ b/deps/npm/man/man1/build.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUILD" "1" "April 2012" "" ""
+.TH "NPM\-BUILD" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-build\fR \-\- Build a package
diff --git a/deps/npm/man/man1/bundle.1 b/deps/npm/man/man1/bundle.1
index 3fbe951c96..9a97ce95c5 100644
--- a/deps/npm/man/man1/bundle.1
+++ b/deps/npm/man/man1/bundle.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUNDLE" "1" "April 2012" "" ""
+.TH "NPM\-BUNDLE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bundle\fR \-\- REMOVED
diff --git a/deps/npm/man/man1/cache.1 b/deps/npm/man/man1/cache.1
index 6168b5097e..f4df1fa4b7 100644
--- a/deps/npm/man/man1/cache.1
+++ b/deps/npm/man/man1/cache.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CACHE" "1" "April 2012" "" ""
+.TH "NPM\-CACHE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-cache\fR \-\- Manipulates packages cache
diff --git a/deps/npm/man/man1/changelog.1 b/deps/npm/man/man1/changelog.1
index d972a2955e..a2112c8698 100644
--- a/deps/npm/man/man1/changelog.1
+++ b/deps/npm/man/man1/changelog.1
@@ -1,95 +1,13 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CHANGELOG" "1" "April 2012" "" ""
+.TH "NPM\-CHANGELOG" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-changelog\fR \-\- Changes
.
.SH "HISTORY"
.
-.SS "1\.1\.3, 1\.1\.4"
-.
-.IP "\(bu" 4
-Update request to support HTTPS\-over\-HTTP proxy tunneling
-.
-.IP "\(bu" 4
-Throw on undefined envs in config settings
-.
-.IP "\(bu" 4
-Update which to 1\.0\.5
-.
-.IP "\(bu" 4
-Fix windows UNC busyloop in findPrefix
-.
-.IP "\(bu" 4
-Bundle nested bundleDependencies properly
-.
-.IP "\(bu" 4
-Alias adduser to add\-user
-.
-.IP "\(bu" 4
-Doc updates (Christian Howe, Henrik Hodne, Andrew Lunny)
-.
-.IP "\(bu" 4
-ignore logfd/outfd streams in makeEnv() (Rod Vagg)
-.
-.IP "\(bu" 4
-shrinkwrap: Behave properly with url\-installed deps
-.
-.IP "\(bu" 4
-install: Support \-\-save with url install targets
-.
-.IP "\(bu" 4
-Support installing naked tars or single\-file modules from urls etc\.
-.
-.IP "\(bu" 4
-init: Don\'t add engines section
-.
-.IP "\(bu" 4
-Don\'t run make clean on rebuild
-.
-.IP "\(bu" 4
-Added missing unicode replacement (atomizer)
-.
-.IP "" 0
-.
-.SS "1\.1\.2"
-Dave Pacheco (2):
- add "npm shrinkwrap"
-.
-.P
-Martin Cooper (1):
- Fix #1753 Make a copy of the cached objects we\'ll modify\.
-.
-.P
-Tim Oxley (1):
- correctly remove readme from default npm view command\.
-.
-.P
-Tyler Green (1):
- fix #2187 set terminal columns to Infinity if 0
-.
-.P
-isaacs (19):
- update minimatch
- update request
- Experimental: single\-file modules
- Fix #2172 Don\'t remove global mans uninstalling local pkgs
- Add \-\-versions flag to show the version of node as well
- Support \-\-json flag for ls output
- update request to 2\.9\.151
-.
-.SS "1\.1"
-.
-.IP "\(bu" 4
-Replace system tar dependency with a JS tar
-.
-.IP "\(bu" 4
-Continue to refine
-.
-.IP "" 0
-.
.SS "1\.0"
.
.IP "\(bu" 4
diff --git a/deps/npm/man/man1/coding-style.1 b/deps/npm/man/man1/coding-style.1
index 8d5c60b3d0..2f63d8c005 100644
--- a/deps/npm/man/man1/coding-style.1
+++ b/deps/npm/man/man1/coding-style.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CODING\-STYLE" "1" "April 2012" "" ""
+.TH "NPM\-CODING\-STYLE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style
@@ -99,10 +99,10 @@ null loops like: \fBwhile (something) ;\fR (But you\'d better have a good
reason for doing that\.)
.
.IP "\(bu" 4
-\fBcase "foo": doSomething(); break\fR
+case "foo": doSomething(); break
.
.IP "\(bu" 4
-In front of a leading \fB(\fR or \fB[\fR at the start of the line\.
+In front of a leading ( or [ at the start of the line\.
This prevents the expression from being interpreted
as a function call or property access, respectively\.
.
diff --git a/deps/npm/man/man1/completion.1 b/deps/npm/man/man1/completion.1
index 3f45893333..db423418c4 100644
--- a/deps/npm/man/man1/completion.1
+++ b/deps/npm/man/man1/completion.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMPLETION" "1" "April 2012" "" ""
+.TH "NPM\-COMPLETION" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-completion\fR \-\- Tab Completion for npm
diff --git a/deps/npm/man/man1/config.1 b/deps/npm/man/man1/config.1
index 65e09d0c46..2e38c0f6f1 100644
--- a/deps/npm/man/man1/config.1
+++ b/deps/npm/man/man1/config.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "1" "April 2012" "" ""
+.TH "NPM\-CONFIG" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration file
@@ -171,12 +171,6 @@ The following shorthands are parsed on the command\-line:
\fB\-S\fR: \fB\-\-save\fR
.
.IP "\(bu" 4
-\fB\-D\fR: \fB\-\-save\-dev\fR
-.
-.IP "\(bu" 4
-\fB\-O\fR: \fB\-\-save\-optional\fR
-.
-.IP "\(bu" 4
\fB\-y\fR: \fB\-\-yes\fR
.
.IP "\(bu" 4
@@ -363,42 +357,6 @@ Type: path
.P
The location of npm\'s cache directory\. See \fBnpm help cache\fR
.
-.SS "cache\-max"
-.
-.IP "\(bu" 4
-Default: Infinity
-.
-.IP "\(bu" 4
-Type: Number
-.
-.IP "" 0
-.
-.P
-The maximum time (in seconds) to keep items in the registry cache before
-re\-checking against the registry\.
-.
-.P
-Note that no purging is done unless the \fBnpm cache clean\fR command is
-explicitly used, and that only GET requests use the cache\.
-.
-.SS "cache\-min"
-.
-.IP "\(bu" 4
-Default: 0
-.
-.IP "\(bu" 4
-Type: Number
-.
-.IP "" 0
-.
-.P
-The minimum time (in seconds) to keep items in the registry cache before
-re\-checking against the registry\.
-.
-.P
-Note that no purging is done unless the \fBnpm cache clean\fR command is
-explicitly used, and that only GET requests use the cache\.
-.
.SS "color"
.
.IP "\(bu" 4
@@ -609,19 +567,6 @@ Type: url
.P
A proxy to use for outgoing https requests\.
.
-.SS "user\-agent"
-.
-.IP "\(bu" 4
-Default: npm/{npm\.version} node/{process\.version}
-.
-.IP "\(bu" 4
-Type: String
-.
-.IP "" 0
-.
-.P
-Sets a User\-Agent to the request header
-.
.SS "ignore"
.
.IP "\(bu" 4
@@ -652,7 +597,7 @@ The value \fBnpm init\fR should use by default for the package version\.
.SS "init\.author\.name"
.
.IP "\(bu" 4
-Default: ""
+Default: "0\.0\.0"
.
.IP "\(bu" 4
Type: String
@@ -688,24 +633,6 @@ Type: String
.P
The value \fBnpm init\fR should use by default for the package author\'s homepage\.
.
-.SS "json"
-.
-.IP "\(bu" 4
-Default: false
-.
-.IP "\(bu" 4
-Type: Boolean
-.
-.IP "" 0
-.
-.P
-Whether or not to output JSON data, rather than the normal output\.
-.
-.P
-This feature is currently experimental, and the output data structures
-for many commands is either not implemented in JSON yet, or subject to
-change\. Only the output from \fBnpm ls \-\-json\fR is currently valid\.
-.
.SS "link"
.
.IP "\(bu" 4
@@ -1013,38 +940,6 @@ Save installed packages to a package\.json file as dependencies\.
.P
Only works if there is already a package\.json file present\.
.
-.SS "save\-dev"
-.
-.IP "\(bu" 4
-Default: false
-.
-.IP "\(bu" 4
-Type: Boolean
-.
-.IP "" 0
-.
-.P
-Save installed packages to a package\.json file as devDependencies\.
-.
-.P
-Only works if there is already a package\.json file present\.
-.
-.SS "save\-optional"
-.
-.IP "\(bu" 4
-Default: false
-.
-.IP "\(bu" 4
-Type: Boolean
-.
-.IP "" 0
-.
-.P
-Save installed packages to a package\.json file as optionalDependencies\.
-.
-.P
-Only works if there is already a package\.json file present\.
-.
.SS "searchopts"
.
.IP "\(bu" 4
@@ -1286,23 +1181,6 @@ If true, output the npm version and exit successfully\.
.P
Only relevant when specified explicitly on the command line\.
.
-.SS "versions"
-.
-.IP "\(bu" 4
-Default: false
-.
-.IP "\(bu" 4
-Type: boolean
-.
-.IP "" 0
-.
-.P
-If true, output the npm version as well as node\'s \fBprocess\.versions\fR
-hash, and exit successfully\.
-.
-.P
-Only relevant when specified explicitly on the command line\.
-.
.SS "viewer"
.
.IP "\(bu" 4
diff --git a/deps/npm/man/man1/deprecate.1 b/deps/npm/man/man1/deprecate.1
index 918fd23243..f0ba00bd2b 100644
--- a/deps/npm/man/man1/deprecate.1
+++ b/deps/npm/man/man1/deprecate.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "1" "April 2012" "" ""
+.TH "NPM\-DEPRECATE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
diff --git a/deps/npm/man/man1/developers.1 b/deps/npm/man/man1/developers.1
index 9d2e759417..61e16edb6a 100644
--- a/deps/npm/man/man1/developers.1
+++ b/deps/npm/man/man1/developers.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEVELOPERS" "1" "April 2012" "" ""
+.TH "NPM\-DEVELOPERS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-developers\fR \-\- Developer Guide
@@ -43,9 +43,6 @@ e) a \fB<name>@<tag>\fR that points to (d)
.IP "\(bu" 4
f) a \fB<name>\fR that has a "latest" tag satisfying (e)
.
-.IP "\(bu" 4
-g) a \fBgit\fR url that, when cloned, results in (a)\.
-.
.IP "" 0
.
.P
@@ -54,25 +51,6 @@ benefits of using npm if you just want to write a node program (a), and
perhaps if you also want to be able to easily install it elsewhere
after packing it up into a tarball (b)\.
.
-.P
-Git urls can be of the form:
-.
-.IP "" 4
-.
-.nf
-git://github\.com/user/project\.git#commit\-ish
-git+ssh://user@hostname:project\.git#commit\-ish
-git+http://user@hostname/project/blah\.git#commit\-ish
-git+https://user@hostname/project/blah\.git#commit\-ish
-.
-.fi
-.
-.IP "" 0
-.
-.P
-The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
-an argument to \fBgit checkout\fR\|\. The default is \fBmaster\fR\|\.
-.
.SH "The package\.json File"
You need to have a \fBpackage\.json\fR file in the root of your project to do
much of anything with npm\. That is basically the whole interface\.
diff --git a/deps/npm/man/man1/disputes.1 b/deps/npm/man/man1/disputes.1
index b74865f106..df52c52453 100644
--- a/deps/npm/man/man1/disputes.1
+++ b/deps/npm/man/man1/disputes.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DISPUTES" "1" "April 2012" "" ""
+.TH "NPM\-DISPUTES" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-disputes\fR \-\- Handling Module Name Disputes
diff --git a/deps/npm/man/man1/docs.1 b/deps/npm/man/man1/docs.1
index 00fa391538..7432cadde3 100644
--- a/deps/npm/man/man1/docs.1
+++ b/deps/npm/man/man1/docs.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "1" "April 2012" "" ""
+.TH "NPM\-DOCS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
diff --git a/deps/npm/man/man1/edit.1 b/deps/npm/man/man1/edit.1
index 742353d9a1..56cffbb607 100644
--- a/deps/npm/man/man1/edit.1
+++ b/deps/npm/man/man1/edit.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "1" "April 2012" "" ""
+.TH "NPM\-EDIT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
diff --git a/deps/npm/man/man1/explore.1 b/deps/npm/man/man1/explore.1
index 8b24eea66a..06be08b6d4 100644
--- a/deps/npm/man/man1/explore.1
+++ b/deps/npm/man/man1/explore.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "1" "April 2012" "" ""
+.TH "NPM\-EXPLORE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
diff --git a/deps/npm/man/man1/faq.1 b/deps/npm/man/man1/faq.1
index 1d68c0496a..0f8857ab10 100644
--- a/deps/npm/man/man1/faq.1
+++ b/deps/npm/man/man1/faq.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FAQ" "1" "April 2012" "" ""
+.TH "NPM\-FAQ" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-faq\fR \-\- Frequently Asked Questions
diff --git a/deps/npm/man/man1/folders.1 b/deps/npm/man/man1/folders.1
index bebd033edc..394f72d5cb 100644
--- a/deps/npm/man/man1/folders.1
+++ b/deps/npm/man/man1/folders.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "1" "April 2012" "" ""
+.TH "NPM\-FOLDERS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
diff --git a/deps/npm/man/man1/help-search.1 b/deps/npm/man/man1/help-search.1
index da5889bc8c..b2959ab0e1 100644
--- a/deps/npm/man/man1/help-search.1
+++ b/deps/npm/man/man1/help-search.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "1" "April 2012" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search npm help documentation
diff --git a/deps/npm/man/man1/help.1 b/deps/npm/man/man1/help.1
index 247122183d..5032a59f0b 100644
--- a/deps/npm/man/man1/help.1
+++ b/deps/npm/man/man1/help.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP" "1" "April 2012" "" ""
+.TH "NPM\-HELP" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-help\fR \-\- Get help on npm
diff --git a/deps/npm/man/man1/index.1 b/deps/npm/man/man1/index.1
index 419652ced1..43265769c3 100644
--- a/deps/npm/man/man1/index.1
+++ b/deps/npm/man/man1/index.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INDEX" "1" "April 2012" "" ""
+.TH "NPM\-INDEX" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-index\fR \-\- Index of all npm documentation
@@ -132,9 +132,6 @@
.SH "npm help semver"
The semantic versioner for npm
.
-.SH "npm help shrinkwrap"
- Lock down dependency versions
-.
.SH "npm help star"
Mark your favorite packages
.
@@ -249,9 +246,6 @@
.SH "npm apihelp search"
Search for packages
.
-.SH "npm apihelp shrinkwrap"
- programmatically generate package shrinkwrap file
-.
.SH "npm apihelp start"
Start a package
.
diff --git a/deps/npm/man/man1/init.1 b/deps/npm/man/man1/init.1
index ff4d537cb2..1ab75cbcc0 100644
--- a/deps/npm/man/man1/init.1
+++ b/deps/npm/man/man1/init.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INIT" "1" "April 2012" "" ""
+.TH "NPM\-INIT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-init\fR \-\- Interactively create a package\.json file
diff --git a/deps/npm/man/man1/install.1 b/deps/npm/man/man1/install.1
index a9d8431516..651ee17307 100644
--- a/deps/npm/man/man1/install.1
+++ b/deps/npm/man/man1/install.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "1" "April 2012" "" ""
+.TH "NPM\-INSTALL" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- Install a package
@@ -13,18 +13,15 @@ npm install (with no args in a package dir)
npm install <tarball file>
npm install <tarball url>
npm install <folder>
-npm install <name> [\-\-save|\-\-save\-dev|\-\-save\-optional]
+npm install <name>
npm install <name>@<tag>
npm install <name>@<version>
npm install <name>@<version range>
-npm install <name>@<version range>
.
.fi
.
.SH "DESCRIPTION"
-This command installs a package, and any packages that it depends on\. If the
-package has a shrinkwrap file, the installation of dependencies will be driven
-by that\. See npm help shrinkwrap\.
+This command installs a package, and any packages that it depends on\.
.
.P
A \fBpackage\fR is:
@@ -60,8 +57,6 @@ after packing it up into a tarball (b)\.
.
.IP "\(bu" 4
\fBnpm install\fR (in package directory, no arguments):
-.
-.IP
Install the dependencies in the local node_modules folder\.
.
.IP
@@ -71,14 +66,10 @@ directory) as a global package\.
.
.IP "\(bu" 4
\fBnpm install <folder>\fR:
-.
-.IP
Install a package that is sitting in a folder on the filesystem\.
.
.IP "\(bu" 4
\fBnpm install <tarball file>\fR:
-.
-.IP
Install a package that is sitting on the filesystem\. Note: if you just want
to link a dev directory into your npm root, you can do this more easily by
using \fBnpm link\fR\|\.
@@ -89,7 +80,7 @@ Example:
.IP "" 4
.
.nf
- npm install \./package\.tgz
+npm install \./package\.tgz
.
.fi
.
@@ -98,8 +89,6 @@ Example:
.
.IP "\(bu" 4
\fBnpm install <tarball url>\fR:
-.
-.IP
Fetch the tarball url, and then install it\. In order to distinguish between
this and other options, the argument must start with "http://" or "https://"
.
@@ -109,7 +98,7 @@ Example:
.IP "" 4
.
.nf
- npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6
+npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6
.
.fi
.
@@ -117,54 +106,28 @@ Example:
.
.IP "\(bu" 4
-\fBnpm install <name> [\-\-save|\-\-save\-dev|\-\-save\-optional]\fR:
-.
-.IP
-Do a \fB<name>@<tag>\fR install, where \fB<tag>\fR is the "tag" config\. (See \fBnpm help config\fR\|\.)
-.
-.IP
-In most cases, this will install the latest version
-of the module published on npm\.
+\fBnpm install <name>\fR:
+Do a \fB<name>@<tag>\fR install, where \fB<tag>\fR is the "tag" config\. (See \fBnpm help config\fR)
.
.IP
Example:
.
-.IP
- npm install sax
-.
-.IP
-\fBnpm install\fR takes 3 exclusive, optional flags which save or update
-the package version in your main package\.json:
-.
-.IP "\(bu" 4
-\fB\-\-save\fR: Package will appear in your \fBdependencies\fR\|\.
-.
-.IP "\(bu" 4
-\fB\-\-save\-dev\fR: Package will appear in your \fBdevDependencies\fR\|\.
+.IP "" 4
.
-.IP "\(bu" 4
-\fB\-\-save\-optional\fR: Package will appear in your \fBoptionalDependencies\fR\|\.
+.nf
+npm install sax
.
-.IP
-Examples:
+.fi
.
-.IP
- npm install sax \-\-save
- npm install node\-tap \-\-save\-dev
- npm install dtrace\-provider \-\-save\-optional
+.IP "" 0
.
.IP
\fBNote\fR: If there is a file or folder named \fB<name>\fR in the current
working directory, then it will try to install that, and only try to
fetch the package by name if it is not valid\.
.
-.IP "" 0
-
-.
.IP "\(bu" 4
\fBnpm install <name>@<tag>\fR:
-.
-.IP
Install the version of the package that is referenced by the specified tag\.
If the tag does not exist in the registry data for that package, then this
will fail\.
@@ -175,7 +138,7 @@ Example:
.IP "" 4
.
.nf
- npm install sax@latest
+npm install sax@latest
.
.fi
.
@@ -184,8 +147,6 @@ Example:
.
.IP "\(bu" 4
\fBnpm install <name>@<version>\fR:
-.
-.IP
Install the specified version of the package\. This will fail if the version
has not been published to the registry\.
.
@@ -195,7 +156,7 @@ Example:
.IP "" 4
.
.nf
- npm install sax@0\.1\.1
+npm install sax@0\.1\.1
.
.fi
.
@@ -204,8 +165,6 @@ Example:
.
.IP "\(bu" 4
\fBnpm install <name>@<version range>\fR:
-.
-.IP
Install a version of the package matching the specified version range\. This
will follow the same rules for resolving dependencies described in \fBnpm help json\fR\|\.
.
@@ -216,8 +175,15 @@ treat it as a single argument\.
.IP
Example:
.
-.IP
- npm install sax@">=0\.1\.0 <0\.2\.0"
+.IP "" 4
+.
+.nf
+npm install sax@">=0\.1\.0 <0\.2\.0"
+.
+.fi
+.
+.IP "" 0
+
.
.IP "\(bu" 4
\fBnpm install <git remote url>\fR:
@@ -226,8 +192,14 @@ Example:
Install a package by cloning a git remote url\. The format of the git
url is:
.
-.IP
- <protocol>://[<user>@]<hostname><separator><path>[#<commit\-ish>]
+.IP "" 4
+.
+.nf
+<protocol>://[<user>@]<hostname><separator><path>[#<commit\-ish>]
+.
+.fi
+.
+.IP "" 0
.
.IP
\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
@@ -239,9 +211,9 @@ Examples:
.IP "" 4
.
.nf
- git+ssh://git@github\.com:isaacs/npm\.git#v1\.0\.27
- git+https://isaacs@github\.com/isaacs/npm\.git
- git://github\.com/isaacs/npm\.git#v1\.0\.27
+git+ssh://git@github\.com:isaacs/npm\.git#v1\.0\.27
+git+https://isaacs@github\.com/isaacs/npm\.git
+git://github\.com/isaacs/npm\.git#v1\.0\.27
.
.fi
.
@@ -398,8 +370,5 @@ npm help tag
.IP "\(bu" 4
npm help rm
.
-.IP "\(bu" 4
-npm help shrinkwrap
-.
.IP "" 0
diff --git a/deps/npm/man/man1/json.1 b/deps/npm/man/man1/json.1
index a2384ac33e..73087c042c 100644
--- a/deps/npm/man/man1/json.1
+++ b/deps/npm/man/man1/json.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-JSON" "1" "April 2012" "" ""
+.TH "NPM\-JSON" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling
@@ -466,9 +466,6 @@ is a semver compatible version identifier\.
.IP "\(bu" 4
\fBrange1 || range2\fR Passes if either range1 or range2 are satisfied\.
.
-.IP "\(bu" 4
-\fBgit\.\.\.\fR See \'Git URLs as Dependencies\' below
-.
.IP "" 0
.
.P
@@ -557,25 +554,6 @@ of a version range\.
This tarball will be downloaded and installed locally to your package at
install time\.
.
-.SS "Git URLs as Dependencies"
-Git urls can be of the form:
-.
-.IP "" 4
-.
-.nf
-git://github\.com/user/project\.git#commit\-ish
-git+ssh://user@hostname:project\.git#commit\-ish
-git+http://user@hostname/project/blah\.git#commit\-ish
-git+https://user@hostname/project/blah\.git#commit\-ish
-.
-.fi
-.
-.IP "" 0
-.
-.P
-The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
-an argument to \fBgit checkout\fR\|\. The default is \fBmaster\fR\|\.
-.
.SH "devDependencies"
If someone is planning on downloading and using your module in their
program, then they probably don\'t want or need to download and build
@@ -631,67 +609,6 @@ are capable of properly installing your program\. For example:
.
.IP "" 0
.
-.SH "os"
-You can specify which operating systems your
-module will run on:
-.
-.IP "" 4
-.
-.nf
-"os" : [ "darwin", "linux" ]
-.
-.fi
-.
-.IP "" 0
-.
-.P
-You can also blacklist instead of whitelist operating systems,
-just prepend the blacklisted os with a \'!\':
-.
-.IP "" 4
-.
-.nf
-"os" : [ "!win32" ]
-.
-.fi
-.
-.IP "" 0
-.
-.P
-The host operating system is determined by \fBprocess\.platform\fR
-.
-.P
-It is allowed to both blacklist, and whitelist, although there isn\'t any
-good reason to do this\.
-.
-.SH "cpu"
-If your code only runs on certain cpu architectures,
-you can specify which ones\.
-.
-.IP "" 4
-.
-.nf
-"cpu" : [ "x64", "ia32" ]
-.
-.fi
-.
-.IP "" 0
-.
-.P
-Like the \fBos\fR option, you can also blacklist architectures:
-.
-.IP "" 4
-.
-.nf
-"cpu" : [ "!arm", "!mips" ]
-.
-.fi
-.
-.IP "" 0
-.
-.P
-The host architecture is determined by \fBprocess\.arch\fR
-.
.SH "preferGlobal"
If your package is primarily a command\-line application that should be
installed globally, then set this value to \fBtrue\fR to provide a warning
@@ -708,7 +625,7 @@ to publish it\.
.P
This is a way to prevent accidental publication of private repositories\.
If you would like to ensure that a given package is only ever published
-to a specific registry (for example, an internal registry),
+to a speciic registry (for example, an internal registry),
then use the \fBpublishConfig\fR hash described below
to override the \fBregistry\fR config param at publish\-time\.
.
diff --git a/deps/npm/man/man1/link.1 b/deps/npm/man/man1/link.1
index 1e4ac176f6..83d73a55dc 100644
--- a/deps/npm/man/man1/link.1
+++ b/deps/npm/man/man1/link.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "1" "April 2012" "" ""
+.TH "NPM\-LINK" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
diff --git a/deps/npm/man/man1/list.1 b/deps/npm/man/man1/list.1
index a629f7eef6..95c6362388 100644
--- a/deps/npm/man/man1/list.1
+++ b/deps/npm/man/man1/list.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "1" "April 2012" "" ""
+.TH "NPM\-LS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
@@ -32,19 +32,6 @@ When run as \fBll\fR or \fBla\fR, it shows extended information by default\.
.
.SH "CONFIGURATION"
.
-.SS "json"
-.
-.IP "\(bu" 4
-Default: false
-.
-.IP "\(bu" 4
-Type: Boolean
-.
-.IP "" 0
-.
-.P
-Show information in JSON format\.
-.
.SS "long"
.
.IP "\(bu" 4
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index b85b940b2c..7d606a7c9a 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "April 2012" "" ""
+.TH "NPM" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
@@ -14,7 +14,7 @@ npm <command> [args]
.fi
.
.SH "VERSION"
-1.1.18
+1.1.0-2
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man1/outdated.1 b/deps/npm/man/man1/outdated.1
index a30dce9a19..658d31106e 100644
--- a/deps/npm/man/man1/outdated.1
+++ b/deps/npm/man/man1/outdated.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "1" "April 2012" "" ""
+.TH "NPM\-OUTDATED" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
diff --git a/deps/npm/man/man1/owner.1 b/deps/npm/man/man1/owner.1
index b91d382314..719fd6633a 100644
--- a/deps/npm/man/man1/owner.1
+++ b/deps/npm/man/man1/owner.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "1" "April 2012" "" ""
+.TH "NPM\-OWNER" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
diff --git a/deps/npm/man/man1/pack.1 b/deps/npm/man/man1/pack.1
index 56eb667a84..578659d74d 100644
--- a/deps/npm/man/man1/pack.1
+++ b/deps/npm/man/man1/pack.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "1" "April 2012" "" ""
+.TH "NPM\-PACK" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
diff --git a/deps/npm/man/man1/prefix.1 b/deps/npm/man/man1/prefix.1
index 6284d683c3..235daa52b8 100644
--- a/deps/npm/man/man1/prefix.1
+++ b/deps/npm/man/man1/prefix.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "1" "April 2012" "" ""
+.TH "NPM\-PREFIX" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
diff --git a/deps/npm/man/man1/prune.1 b/deps/npm/man/man1/prune.1
index 53fa1aebab..25c1abfdfc 100644
--- a/deps/npm/man/man1/prune.1
+++ b/deps/npm/man/man1/prune.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "1" "April 2012" "" ""
+.TH "NPM\-PRUNE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
diff --git a/deps/npm/man/man1/publish.1 b/deps/npm/man/man1/publish.1
index ef16486f54..51bc9495bb 100644
--- a/deps/npm/man/man1/publish.1
+++ b/deps/npm/man/man1/publish.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "1" "April 2012" "" ""
+.TH "NPM\-PUBLISH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
diff --git a/deps/npm/man/man1/rebuild.1 b/deps/npm/man/man1/rebuild.1
index 4824951c49..8836b1b9b2 100644
--- a/deps/npm/man/man1/rebuild.1
+++ b/deps/npm/man/man1/rebuild.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "1" "April 2012" "" ""
+.TH "NPM\-REBUILD" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
diff --git a/deps/npm/man/man1/registry.1 b/deps/npm/man/man1/registry.1
index 757cd47487..e5b552eeec 100644
--- a/deps/npm/man/man1/registry.1
+++ b/deps/npm/man/man1/registry.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REGISTRY" "1" "April 2012" "" ""
+.TH "NPM\-REGISTRY" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-registry\fR \-\- The JavaScript Package Registry
diff --git a/deps/npm/man/man1/removing-npm.1 b/deps/npm/man/man1/removing-npm.1
index ff8412a9e9..b8e7242517 100644
--- a/deps/npm/man/man1/removing-npm.1
+++ b/deps/npm/man/man1/removing-npm.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REMOVAL" "1" "April 2012" "" ""
+.TH "NPM\-REMOVAL" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-removal\fR \-\- Cleaning the Slate
diff --git a/deps/npm/man/man1/restart.1 b/deps/npm/man/man1/restart.1
index 804593c5c4..a5fc7863e4 100644
--- a/deps/npm/man/man1/restart.1
+++ b/deps/npm/man/man1/restart.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "1" "April 2012" "" ""
+.TH "NPM\-RESTART" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
diff --git a/deps/npm/man/man1/root.1 b/deps/npm/man/man1/root.1
index 25ba27e7af..6f0f8c0518 100644
--- a/deps/npm/man/man1/root.1
+++ b/deps/npm/man/man1/root.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "1" "April 2012" "" ""
+.TH "NPM\-ROOT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
diff --git a/deps/npm/man/man1/run-script.1 b/deps/npm/man/man1/run-script.1
index 041b7018e6..1561bb9be9 100644
--- a/deps/npm/man/man1/run-script.1
+++ b/deps/npm/man/man1/run-script.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "1" "April 2012" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
diff --git a/deps/npm/man/man1/scripts.1 b/deps/npm/man/man1/scripts.1
index 4f0b385167..ff949bade4 100644
--- a/deps/npm/man/man1/scripts.1
+++ b/deps/npm/man/man1/scripts.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SCRIPTS" "1" "April 2012" "" ""
+.TH "NPM\-SCRIPTS" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-scripts\fR \-\- How npm handles the "scripts" field
@@ -94,26 +94,6 @@ Package scripts run in an environment where many pieces of information are
made available regarding the setup of npm and the current state of the
process\.
.
-.SS "path"
-If you depend on modules that define executable scripts, like test suites,
-then those executables will be added to the \fBPATH\fR for executing the scripts\.
-So, if your package\.json has this:
-.
-.IP "" 4
-.
-.nf
-{ "name" : "foo"
-, "dependencies" : { "bar" : "0\.1\.x" }
-, "scripts": { "start" : "bar \./test" } }
-.
-.fi
-.
-.IP "" 0
-.
-.P
-then you could run \fBnpm start\fR to execute the \fBbar\fR script, which is exported
-into the \fBnode_modules/\.bin\fR directory on \fBnpm install\fR\|\.
-.
.SS "package\.json vars"
The package\.json fields are tacked onto the \fBnpm_package_\fR prefix\. So, for
instance, if you had \fB{"name":"foo", "version":"1\.2\.5"}\fR in your package\.json
diff --git a/deps/npm/man/man1/search.1 b/deps/npm/man/man1/search.1
index c2015ed6f2..52a77841ac 100644
--- a/deps/npm/man/man1/search.1
+++ b/deps/npm/man/man1/search.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "1" "April 2012" "" ""
+.TH "NPM\-SEARCH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
diff --git a/deps/npm/man/man1/semver.1 b/deps/npm/man/man1/semver.1
index 6cb1be072d..892b03366b 100644
--- a/deps/npm/man/man1/semver.1
+++ b/deps/npm/man/man1/semver.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEMVER" "1" "April 2012" "" ""
+.TH "NPM\-SEMVER" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-semver\fR \-\- The semantic versioner for npm
diff --git a/deps/npm/man/man1/star.1 b/deps/npm/man/man1/star.1
index 9dd32b7fb5..3a43c8c12d 100644
--- a/deps/npm/man/man1/star.1
+++ b/deps/npm/man/man1/star.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STAR" "1" "April 2012" "" ""
+.TH "NPM\-STAR" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-star\fR \-\- Mark your favorite packages
diff --git a/deps/npm/man/man1/start.1 b/deps/npm/man/man1/start.1
index 83b0751005..acc0fc465b 100644
--- a/deps/npm/man/man1/start.1
+++ b/deps/npm/man/man1/start.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "1" "April 2012" "" ""
+.TH "NPM\-START" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
diff --git a/deps/npm/man/man1/stop.1 b/deps/npm/man/man1/stop.1
index aace69a708..96d71ef986 100644
--- a/deps/npm/man/man1/stop.1
+++ b/deps/npm/man/man1/stop.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "1" "April 2012" "" ""
+.TH "NPM\-STOP" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
diff --git a/deps/npm/man/man1/submodule.1 b/deps/npm/man/man1/submodule.1
index 26a1bd3503..831a11f33f 100644
--- a/deps/npm/man/man1/submodule.1
+++ b/deps/npm/man/man1/submodule.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "1" "April 2012" "" ""
+.TH "NPM\-SUBMODULE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
diff --git a/deps/npm/man/man1/tag.1 b/deps/npm/man/man1/tag.1
index 48e23d4d16..b0573216c1 100644
--- a/deps/npm/man/man1/tag.1
+++ b/deps/npm/man/man1/tag.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "1" "April 2012" "" ""
+.TH "NPM\-TAG" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
diff --git a/deps/npm/man/man1/test.1 b/deps/npm/man/man1/test.1
index c09f456dd0..1fc73a4085 100644
--- a/deps/npm/man/man1/test.1
+++ b/deps/npm/man/man1/test.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "1" "April 2012" "" ""
+.TH "NPM\-TEST" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
diff --git a/deps/npm/man/man1/uninstall.1 b/deps/npm/man/man1/uninstall.1
index d779b0bf4c..dd96d1725c 100644
--- a/deps/npm/man/man1/uninstall.1
+++ b/deps/npm/man/man1/uninstall.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "April 2012" "" ""
+.TH "NPM\-RM" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
diff --git a/deps/npm/man/man1/unpublish.1 b/deps/npm/man/man1/unpublish.1
index 4a7b96e89a..22b93d141e 100644
--- a/deps/npm/man/man1/unpublish.1
+++ b/deps/npm/man/man1/unpublish.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "1" "April 2012" "" ""
+.TH "NPM\-UNPUBLISH" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
diff --git a/deps/npm/man/man1/update.1 b/deps/npm/man/man1/update.1
index bdb703633e..73cccbe4b4 100644
--- a/deps/npm/man/man1/update.1
+++ b/deps/npm/man/man1/update.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "1" "April 2012" "" ""
+.TH "NPM\-UPDATE" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
diff --git a/deps/npm/man/man1/version.1 b/deps/npm/man/man1/version.1
index 80acf696f9..bc6275121d 100644
--- a/deps/npm/man/man1/version.1
+++ b/deps/npm/man/man1/version.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "1" "April 2012" "" ""
+.TH "NPM\-VERSION" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
diff --git a/deps/npm/man/man1/view.1 b/deps/npm/man/man1/view.1
index 0ecd6da51f..774fdba007 100644
--- a/deps/npm/man/man1/view.1
+++ b/deps/npm/man/man1/view.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "1" "April 2012" "" ""
+.TH "NPM\-VIEW" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
diff --git a/deps/npm/man/man1/whoami.1 b/deps/npm/man/man1/whoami.1
index f47a0e84a9..1d7f502bd8 100644
--- a/deps/npm/man/man1/whoami.1
+++ b/deps/npm/man/man1/whoami.1
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "1" "April 2012" "" ""
+.TH "NPM\-WHOAMI" "1" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
diff --git a/deps/npm/man/man3/bin.3 b/deps/npm/man/man3/bin.3
index 268f75e6e3..a318723329 100644
--- a/deps/npm/man/man3/bin.3
+++ b/deps/npm/man/man3/bin.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "3" "April 2012" "" ""
+.TH "NPM\-BIN" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
diff --git a/deps/npm/man/man3/bugs.3 b/deps/npm/man/man3/bugs.3
index 38ee6a1ca5..61deea7e7f 100644
--- a/deps/npm/man/man3/bugs.3
+++ b/deps/npm/man/man3/bugs.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "3" "April 2012" "" ""
+.TH "NPM\-BUGS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
diff --git a/deps/npm/man/man3/commands.3 b/deps/npm/man/man3/commands.3
index e8b8260e63..38a6e0a426 100644
--- a/deps/npm/man/man3/commands.3
+++ b/deps/npm/man/man3/commands.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMMANDS" "3" "April 2012" "" ""
+.TH "NPM\-COMMANDS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-commands\fR \-\- npm commands
diff --git a/deps/npm/man/man3/config.3 b/deps/npm/man/man3/config.3
index 6debd412ee..05e64b08ed 100644
--- a/deps/npm/man/man3/config.3
+++ b/deps/npm/man/man3/config.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "3" "April 2012" "" ""
+.TH "NPM\-CONFIG" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
diff --git a/deps/npm/man/man3/deprecate.3 b/deps/npm/man/man3/deprecate.3
index b4b91612e0..2786d1ff80 100644
--- a/deps/npm/man/man3/deprecate.3
+++ b/deps/npm/man/man3/deprecate.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "3" "April 2012" "" ""
+.TH "NPM\-DEPRECATE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
diff --git a/deps/npm/man/man3/docs.3 b/deps/npm/man/man3/docs.3
index a61b0df6c6..200df585b7 100644
--- a/deps/npm/man/man3/docs.3
+++ b/deps/npm/man/man3/docs.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "3" "April 2012" "" ""
+.TH "NPM\-DOCS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
diff --git a/deps/npm/man/man3/edit.3 b/deps/npm/man/man3/edit.3
index dc4b183e97..5c6e5e71f8 100644
--- a/deps/npm/man/man3/edit.3
+++ b/deps/npm/man/man3/edit.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "3" "April 2012" "" ""
+.TH "NPM\-EDIT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
diff --git a/deps/npm/man/man3/explore.3 b/deps/npm/man/man3/explore.3
index 8817ce0081..c6443f3ef8 100644
--- a/deps/npm/man/man3/explore.3
+++ b/deps/npm/man/man3/explore.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "3" "April 2012" "" ""
+.TH "NPM\-EXPLORE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
diff --git a/deps/npm/man/man3/help-search.3 b/deps/npm/man/man3/help-search.3
index d42d68e55e..61d54c1a1f 100644
--- a/deps/npm/man/man3/help-search.3
+++ b/deps/npm/man/man3/help-search.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "3" "April 2012" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search the help pages
diff --git a/deps/npm/man/man3/init.3 b/deps/npm/man/man3/init.3
index f751030a6c..31f508d73f 100644
--- a/deps/npm/man/man3/init.3
+++ b/deps/npm/man/man3/init.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "INIT" "3" "April 2012" "" ""
+.TH "INIT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBinit\fR \-\- Interactively create a package\.json file
diff --git a/deps/npm/man/man3/install.3 b/deps/npm/man/man3/install.3
index 6a9cea4f1d..89d0eb9408 100644
--- a/deps/npm/man/man3/install.3
+++ b/deps/npm/man/man3/install.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "3" "April 2012" "" ""
+.TH "NPM\-INSTALL" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- install a package programmatically
diff --git a/deps/npm/man/man3/link.3 b/deps/npm/man/man3/link.3
index edc3905a9a..dfe050cad5 100644
--- a/deps/npm/man/man3/link.3
+++ b/deps/npm/man/man3/link.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "3" "April 2012" "" ""
+.TH "NPM\-LINK" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
diff --git a/deps/npm/man/man3/load.3 b/deps/npm/man/man3/load.3
index c44d9f1167..fe47803146 100644
--- a/deps/npm/man/man3/load.3
+++ b/deps/npm/man/man3/load.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LOAD" "3" "April 2012" "" ""
+.TH "NPM\-LOAD" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-load\fR \-\- Load config settings
diff --git a/deps/npm/man/man3/ls.3 b/deps/npm/man/man3/ls.3
index 2d45dde312..1c9e9ec118 100644
--- a/deps/npm/man/man3/ls.3
+++ b/deps/npm/man/man3/ls.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "3" "April 2012" "" ""
+.TH "NPM\-LS" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
@@ -31,13 +31,6 @@ It will print out extraneous, missing, and invalid packages\.
If the silent parameter is set to true, nothing will be output to the screen,
but the data will still be returned\.
.
-.P
-Callback is provided an error if one occurred, the full data about which
-packages are installed and which dependencies they will receive, and a
-"lite" data object which just shows which versions are installed where\.
-Note that the full data object is a circular structure, so care must be
-taken if it is serialized to JSON\.
-.
.SH "CONFIGURATION"
.
.SS "long"
diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3
index ed3851ae85..ff96d77780 100644
--- a/deps/npm/man/man3/npm.3
+++ b/deps/npm/man/man3/npm.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "3" "April 2012" "" ""
+.TH "NPM" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
@@ -21,7 +21,7 @@ npm\.load(configObject, function (er, npm) {
.fi
.
.SH "VERSION"
-1.1.18
+1.1.0-2
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
diff --git a/deps/npm/man/man3/outdated.3 b/deps/npm/man/man3/outdated.3
index 4c0bd4dbe9..68940b357a 100644
--- a/deps/npm/man/man3/outdated.3
+++ b/deps/npm/man/man3/outdated.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "3" "April 2012" "" ""
+.TH "NPM\-OUTDATED" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
diff --git a/deps/npm/man/man3/owner.3 b/deps/npm/man/man3/owner.3
index 922769f76d..7da0e4a950 100644
--- a/deps/npm/man/man3/owner.3
+++ b/deps/npm/man/man3/owner.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "3" "April 2012" "" ""
+.TH "NPM\-OWNER" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
diff --git a/deps/npm/man/man3/pack.3 b/deps/npm/man/man3/pack.3
index 5c05479963..9b33661278 100644
--- a/deps/npm/man/man3/pack.3
+++ b/deps/npm/man/man3/pack.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "3" "April 2012" "" ""
+.TH "NPM\-PACK" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
diff --git a/deps/npm/man/man3/prefix.3 b/deps/npm/man/man3/prefix.3
index 3ba398aa3e..6f1db94cbe 100644
--- a/deps/npm/man/man3/prefix.3
+++ b/deps/npm/man/man3/prefix.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "3" "April 2012" "" ""
+.TH "NPM\-PREFIX" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
diff --git a/deps/npm/man/man3/prune.3 b/deps/npm/man/man3/prune.3
index 566f57e8a5..16b4d93b7f 100644
--- a/deps/npm/man/man3/prune.3
+++ b/deps/npm/man/man3/prune.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "3" "April 2012" "" ""
+.TH "NPM\-PRUNE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
diff --git a/deps/npm/man/man3/publish.3 b/deps/npm/man/man3/publish.3
index edddf21b97..41280810f8 100644
--- a/deps/npm/man/man3/publish.3
+++ b/deps/npm/man/man3/publish.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "3" "April 2012" "" ""
+.TH "NPM\-PUBLISH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
diff --git a/deps/npm/man/man3/rebuild.3 b/deps/npm/man/man3/rebuild.3
index a20d55cedd..3f284c9b9a 100644
--- a/deps/npm/man/man3/rebuild.3
+++ b/deps/npm/man/man3/rebuild.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "3" "April 2012" "" ""
+.TH "NPM\-REBUILD" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
diff --git a/deps/npm/man/man3/restart.3 b/deps/npm/man/man3/restart.3
index 3530cf9192..43939557ef 100644
--- a/deps/npm/man/man3/restart.3
+++ b/deps/npm/man/man3/restart.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "3" "April 2012" "" ""
+.TH "NPM\-RESTART" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
diff --git a/deps/npm/man/man3/root.3 b/deps/npm/man/man3/root.3
index 8fa00a0f79..07c1b0cdd8 100644
--- a/deps/npm/man/man3/root.3
+++ b/deps/npm/man/man3/root.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "3" "April 2012" "" ""
+.TH "NPM\-ROOT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
diff --git a/deps/npm/man/man3/run-script.3 b/deps/npm/man/man3/run-script.3
index 4ace64ed53..b5f03e270d 100644
--- a/deps/npm/man/man3/run-script.3
+++ b/deps/npm/man/man3/run-script.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "3" "April 2012" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
diff --git a/deps/npm/man/man3/search.3 b/deps/npm/man/man3/search.3
index 9afb739b7d..4c4a4a2d0e 100644
--- a/deps/npm/man/man3/search.3
+++ b/deps/npm/man/man3/search.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "3" "April 2012" "" ""
+.TH "NPM\-SEARCH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
diff --git a/deps/npm/man/man3/start.3 b/deps/npm/man/man3/start.3
index 1d05cdee8d..a050305ef7 100644
--- a/deps/npm/man/man3/start.3
+++ b/deps/npm/man/man3/start.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "3" "April 2012" "" ""
+.TH "NPM\-START" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
diff --git a/deps/npm/man/man3/stop.3 b/deps/npm/man/man3/stop.3
index 5514b4ee3d..302d72756b 100644
--- a/deps/npm/man/man3/stop.3
+++ b/deps/npm/man/man3/stop.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "3" "April 2012" "" ""
+.TH "NPM\-STOP" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
diff --git a/deps/npm/man/man3/submodule.3 b/deps/npm/man/man3/submodule.3
index 24f4c14d42..8c60894b12 100644
--- a/deps/npm/man/man3/submodule.3
+++ b/deps/npm/man/man3/submodule.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "3" "April 2012" "" ""
+.TH "NPM\-SUBMODULE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
diff --git a/deps/npm/man/man3/tag.3 b/deps/npm/man/man3/tag.3
index e3f7e49162..ab48222d1d 100644
--- a/deps/npm/man/man3/tag.3
+++ b/deps/npm/man/man3/tag.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "3" "April 2012" "" ""
+.TH "NPM\-TAG" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
diff --git a/deps/npm/man/man3/test.3 b/deps/npm/man/man3/test.3
index 9614b92e85..3b9514a988 100644
--- a/deps/npm/man/man3/test.3
+++ b/deps/npm/man/man3/test.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "3" "April 2012" "" ""
+.TH "NPM\-TEST" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
diff --git a/deps/npm/man/man3/uninstall.3 b/deps/npm/man/man3/uninstall.3
index acc26cde17..0349773b68 100644
--- a/deps/npm/man/man3/uninstall.3
+++ b/deps/npm/man/man3/uninstall.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNINSTALL" "3" "April 2012" "" ""
+.TH "NPM\-UNINSTALL" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-uninstall\fR \-\- uninstall a package programmatically
diff --git a/deps/npm/man/man3/unpublish.3 b/deps/npm/man/man3/unpublish.3
index ac35cb83a6..91e66771cc 100644
--- a/deps/npm/man/man3/unpublish.3
+++ b/deps/npm/man/man3/unpublish.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "3" "April 2012" "" ""
+.TH "NPM\-UNPUBLISH" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
diff --git a/deps/npm/man/man3/update.3 b/deps/npm/man/man3/update.3
index ded33bd86b..299006b51f 100644
--- a/deps/npm/man/man3/update.3
+++ b/deps/npm/man/man3/update.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "3" "April 2012" "" ""
+.TH "NPM\-UPDATE" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
diff --git a/deps/npm/man/man3/version.3 b/deps/npm/man/man3/version.3
index b9015ebed3..1925688c28 100644
--- a/deps/npm/man/man3/version.3
+++ b/deps/npm/man/man3/version.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "3" "April 2012" "" ""
+.TH "NPM\-VERSION" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
diff --git a/deps/npm/man/man3/view.3 b/deps/npm/man/man3/view.3
index 3e8e4a60f3..d3485f6b8d 100644
--- a/deps/npm/man/man3/view.3
+++ b/deps/npm/man/man3/view.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "3" "April 2012" "" ""
+.TH "NPM\-VIEW" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
diff --git a/deps/npm/man/man3/whoami.3 b/deps/npm/man/man3/whoami.3
index d4beb9ce4f..58d3462db4 100644
--- a/deps/npm/man/man3/whoami.3
+++ b/deps/npm/man/man3/whoami.3
@@ -1,7 +1,7 @@
.\" Generated with Ronnjs/v0.1
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "3" "April 2012" "" ""
+.TH "NPM\-WHOAMI" "3" "January 2012" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
diff --git a/deps/npm/node_modules/block-stream/package.json b/deps/npm/node_modules/block-stream/package.json
index 1080b6bc9a..203961a144 100644
--- a/deps/npm/node_modules/block-stream/package.json
+++ b/deps/npm/node_modules/block-stream/package.json
@@ -2,13 +2,13 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "block-stream",
"description": "a stream of blocks",
- "version": "0.0.5",
+ "version": "0.0.4",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/block-stream.git"
},
"engines": {
- "node": "0.4 || ~0.5.8 || 0.6 || 0.7"
+ "node": "0.4 || ~0.5.8 || 0.6"
},
"main": "block-stream.js",
"dependencies": {
diff --git a/deps/npm/node_modules/fast-list/.npmignore b/deps/npm/node_modules/fast-list/.npmignore
new file mode 100644
index 0000000000..c2658d7d1b
--- /dev/null
+++ b/deps/npm/node_modules/fast-list/.npmignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/deps/npm/node_modules/fast-list/.travis.yml b/deps/npm/node_modules/fast-list/.travis.yml
new file mode 100644
index 0000000000..f1d0f13c8a
--- /dev/null
+++ b/deps/npm/node_modules/fast-list/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
diff --git a/deps/npm/node_modules/fast-list/README.md b/deps/npm/node_modules/fast-list/README.md
new file mode 100644
index 0000000000..88a842ef0e
--- /dev/null
+++ b/deps/npm/node_modules/fast-list/README.md
@@ -0,0 +1,116 @@
+# The Problem
+
+You've got some thing where you need to push a bunch of stuff into a
+queue and then shift it out. Or, maybe it's a stack, and you're just
+pushing and popping it.
+
+Arrays work for this, but are a bit costly performance-wise.
+
+# The Solution
+
+A linked-list implementation that takes advantage of what v8 is good at:
+creating objects with a known shape.
+
+This is faster for this use case. How much faster? About 50%.
+
+ $ node bench.js
+ benchmarking /Users/isaacs/dev-src/js/fast-list/bench.js
+ Please be patient.
+ { node: '0.6.2-pre',
+ v8: '3.6.6.8',
+ ares: '1.7.5-DEV',
+ uv: '0.1',
+ openssl: '0.9.8l' }
+ Scores: (bigger is better)
+
+ new FastList()
+ Raw:
+ > 22556.39097744361
+ > 23054.755043227666
+ > 22770.398481973436
+ > 23414.634146341465
+ > 23099.133782483157
+ Average (mean) 22979.062486293868
+
+ []
+ Raw:
+ > 12195.121951219513
+ > 12184.508268059182
+ > 12173.91304347826
+ > 12216.404886561955
+ > 12184.508268059182
+ Average (mean) 12190.891283475617
+
+ new Array()
+ Raw:
+ > 12131.715771230503
+ > 12184.508268059182
+ > 12216.404886561955
+ > 12195.121951219513
+ > 11940.298507462687
+ Average (mean) 12133.609876906768
+
+ Winner: new FastList()
+ Compared with next highest ([]), it's:
+ 46.95% faster
+ 1.88 times as fast
+ 0.28 order(s) of magnitude faster
+
+ Compared with the slowest (new Array()), it's:
+ 47.2% faster
+ 1.89 times as fast
+ 0.28 order(s) of magnitude faster
+
+This lacks a lot of features that arrays have:
+
+1. You can't specify the size at the outset.
+2. It's not indexable.
+3. There's no join, concat, etc.
+
+If any of this matters for your use case, you're probably better off
+using an Array object.
+
+## Installing
+
+```
+npm install fast-list
+```
+
+## API
+
+```javascript
+var FastList = require("fast-list")
+var list = new FastList()
+list.push("foo")
+list.unshift("bar")
+list.push("baz")
+console.log(list.length) // 2
+console.log(list.pop()) // baz
+console.log(list.shift()) // bar
+console.log(list.shift()) // foo
+```
+
+### Methods
+
+* `push`: Just like Array.push, but only can take a single entry
+* `pop`: Just like Array.pop
+* `shift`: Just like Array.shift
+* `unshift`: Just like Array.unshift, but only can take a single entry
+* `drop`: Drop all entries
+* `item(n)`: Retrieve the nth item in the list. This involves a walk
+ every time. It's very slow. If you find yourself using this,
+ consider using a normal Array instead.
+* `map(fn, thisp)`: Like `Array.prototype.map`. Returns a new FastList.
+* `reduce(fn, startValue, thisp)`: Like `Array.prototype.reduce`
+* `forEach(fn, this)`: Like `Array.prototype.forEach`
+* `filter(fn, thisp)`: Like `Array.prototype.filter`. Returns a new
+ FastList.
+* `slice(start, end)`: Retrieve an array of the items at this position.
+ This involves a walk every time. It's very slow. If you find
+ yourself using this, consider using a normal Array instead.
+
+### Members
+
+* `length`: The number of things in the list. Note that, unlike
+ Array.length, this is not a getter/setter, but rather a counter that
+ is internally managed. Setting it can only cause harm.
diff --git a/deps/npm/node_modules/fast-list/fast-list.js b/deps/npm/node_modules/fast-list/fast-list.js
new file mode 100644
index 0000000000..692db0df8f
--- /dev/null
+++ b/deps/npm/node_modules/fast-list/fast-list.js
@@ -0,0 +1,144 @@
+;(function() { // closure for web browsers
+
+function Item (data, prev, next) {
+ this.next = next
+ if (next) next.prev = this
+ this.prev = prev
+ if (prev) prev.next = this
+ this.data = data
+}
+
+function FastList () {
+ if (!(this instanceof FastList)) return new FastList
+ this._head = null
+ this._tail = null
+ this.length = 0
+}
+
+FastList.prototype =
+{ push: function (data) {
+ this._tail = new Item(data, this._tail, null)
+ if (!this._head) this._head = this._tail
+ this.length ++
+ }
+
+, pop: function () {
+ if (this.length === 0) return undefined
+ var t = this._tail
+ this._tail = t.prev
+ if (t.prev) {
+ t.prev = this._tail.next = null
+ }
+ this.length --
+ if (this.length === 1) this._head = this._tail
+ else if (this.length === 0) this._head = this._tail = null
+ return t.data
+ }
+
+, unshift: function (data) {
+ this._head = new Item(data, null, this._head)
+ if (!this._tail) this._tail = this._head
+ this.length ++
+ }
+
+, shift: function () {
+ if (this.length === 0) return undefined
+ var h = this._head
+ this._head = h.next
+ if (h.next) {
+ h.next = this._head.prev = null
+ }
+ this.length --
+ if (this.length === 1) this._tail = this._head
+ else if (this.length === 0) this._head = this._tail = null
+ return h.data
+ }
+
+, item: function (n) {
+ if (n < 0) n = this.length + n
+ var h = this._head
+ while (n-- > 0 && h) h = h.next
+ return h ? h.data : undefined
+ }
+
+, slice: function (n, m) {
+ if (!n) n = 0
+ if (!m) m = this.length
+ if (m < 0) m = this.length + m
+ if (n < 0) n = this.length + n
+
+ if (m === n) {
+ return []
+ }
+
+ if (m < n) {
+ throw new Error("invalid offset: "+n+","+m+" (length="+this.length+")")
+ }
+
+ var len = m - n
+ , ret = new Array(len)
+ , i = 0
+ , h = this._head
+ while (n-- > 0 && h) h = h.next
+ while (i < len && h) {
+ ret[i++] = h.data
+ h = h.next
+ }
+ return ret
+ }
+
+, drop: function () {
+ FastList.call(this)
+ }
+
+, forEach: function (fn, thisp) {
+ var p = this._head
+ , i = 0
+ , len = this.length
+ while (i < len && p) {
+ fn.call(thisp || this, p.data, i, this)
+ p = p.next
+ i ++
+ }
+ }
+
+, map: function (fn, thisp) {
+ var n = new FastList()
+ this.forEach(function (v, i, me) {
+ n.push(fn.call(thisp || me, v, i, me))
+ })
+ return n
+ }
+
+, filter: function (fn, thisp) {
+ var n = new FastList()
+ this.forEach(function (v, i, me) {
+ if (fn.call(thisp || me, v, i, me)) n.push(v)
+ })
+ return n
+ }
+
+, reduce: function (fn, val, thisp) {
+ var i = 0
+ , p = this._head
+ , len = this.length
+ if (!val) {
+ i = 1
+ val = p && p.data
+ p = p && p.next
+ }
+ while (i < len && p) {
+ val = fn.call(thisp || this, val, p.data, this)
+ i ++
+ p = p.next
+ }
+ return val
+ }
+}
+
+if ("undefined" !== typeof(exports)) module.exports = FastList
+else if ("function" === typeof(define) && define.amd) {
+ define("FastList", function() { return FastList })
+} else (function () { return this })().FastList = FastList
+
+})()
diff --git a/deps/npm/node_modules/fast-list/package.json b/deps/npm/node_modules/fast-list/package.json
new file mode 100644
index 0000000000..9bcc6b4133
--- /dev/null
+++ b/deps/npm/node_modules/fast-list/package.json
@@ -0,0 +1,20 @@
+{
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "name": "fast-list",
+ "description": "A fast linked list (good for queues, stacks, etc.)",
+ "version": "1.0.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/fast-list.git"
+ },
+ "main": "fast-list.js",
+ "dependencies": {},
+ "devDependencies": {
+ "bench": "~0.3.2",
+ "tap": "~0.1.0"
+ },
+ "scripts": {
+ "test": "tap test.js",
+ "bench": "node bench.js"
+ }
+}
diff --git a/deps/npm/node_modules/fstream/.npmignore b/deps/npm/node_modules/fstream/.npmignore
index 494272a81a..66880db1ab 100644
--- a/deps/npm/node_modules/fstream/.npmignore
+++ b/deps/npm/node_modules/fstream/.npmignore
@@ -1,5 +1,3 @@
.*.swp
+examples/deep-copy
node_modules/
-examples/deep-copy/
-examples/path/
-examples/filter-copy/
diff --git a/deps/npm/node_modules/fstream/lib/abstract.js b/deps/npm/node_modules/fstream/lib/abstract.js
index 5675d4a1b1..add48b945d 100644
--- a/deps/npm/node_modules/fstream/lib/abstract.js
+++ b/deps/npm/node_modules/fstream/lib/abstract.js
@@ -20,11 +20,6 @@ Abstract.prototype.on = function (ev, fn) {
return this
}
-Abstract.prototype.abort = function () {
- this._aborted = true
- this.emit("abort")
-}
-
Abstract.prototype.destroy = function () {}
Abstract.prototype.warn = function (msg, code) {
diff --git a/deps/npm/node_modules/fstream/lib/dir-reader.js b/deps/npm/node_modules/fstream/lib/dir-reader.js
index 6a418c0bc1..ab990d1501 100644
--- a/deps/npm/node_modules/fstream/lib/dir-reader.js
+++ b/deps/npm/node_modules/fstream/lib/dir-reader.js
@@ -11,7 +11,6 @@ var fs = require("graceful-fs")
, mkdir = require("mkdirp")
, path = require("path")
, Reader = require("./reader.js")
- , assert = require("assert").ok
inherits(DirReader, Reader)
@@ -25,42 +24,25 @@ function DirReader (props) {
throw new Error("Non-directory type "+ props.type)
}
- me.entries = null
+ me._entries = null
me._index = -1
me._paused = false
me._length = -1
- if (props.sort) {
- this.sort = props.sort
- }
-
Reader.call(this, props)
}
DirReader.prototype._getEntries = function () {
var me = 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
-
fs.readdir(me._path, function (er, entries) {
if (er) return me.error(er)
-
- me.entries = entries
-
- me.emit("entries", entries)
- if (me._paused) me.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))
- }
- me._read()
+ me._entries = entries
+ me._length = entries.length
+ // console.error("DR %s sort =", me.path, me.props.sort)
+ if (typeof me.props.sort === "function") {
+ me._entries.sort(me.props.sort)
}
+ me._read()
})
}
@@ -68,7 +50,7 @@ DirReader.prototype._getEntries = function () {
DirReader.prototype._read = function () {
var me = this
- if (!me.entries) return me._getEntries()
+ if (!me._entries) return me._getEntries()
if (me._paused || me._currentEntry || me._aborted) {
// console.error("DR paused=%j, current=%j, aborted=%j", me._paused, !!me._currentEntry, me._aborted)
@@ -76,7 +58,7 @@ DirReader.prototype._read = function () {
}
me._index ++
- if (me._index >= me.entries.length) {
+ if (me._index >= me._length) {
if (!me._ended) {
me._ended = true
me.emit("end")
@@ -88,26 +70,20 @@ 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(me._path, me._entries[me._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)
- var who = me._proxy || me
-
- stat.path = p
- stat.basename = path.basename(p)
- stat.dirname = path.dirname(p)
- var childProps = me.getChildProps.call(who, stat)
- childProps.path = p
- childProps.basename = path.basename(p)
- childProps.dirname = path.dirname(p)
-
- var entry = Reader(childProps, stat)
+ var entry = Reader({ path: p
+ , depth: me.depth + 1
+ , root: me.root || me._proxy || me
+ , parent: me._proxy || me
+ , follow: me.follow
+ , filter: me.filter
+ , sort: me.props.sort
+ }, stat)
// console.error("DR Entry", p, stat.size)
@@ -118,25 +94,17 @@ DirReader.prototype._read = function () {
// This nomenclature is not completely final.
entry.on("pause", function (who) {
- if (!me._paused && !entry._disowned) {
+ if (!me._paused) {
me.pause(who)
}
})
entry.on("resume", function (who) {
- if (me._paused && !entry._disowned) {
+ if (me._paused) {
me.resume(who)
}
})
- entry.on("stat", function (props) {
- me.emit("_entryStat", entry, props)
- if (entry._aborted) return
- if (entry._paused) entry.once("resume", function () {
- me.emit("entryStat", entry, props)
- })
- })
-
entry.on("ready", function EMITCHILD () {
// console.error("DR emit child", entry._path)
if (me._paused) {
@@ -154,25 +122,23 @@ DirReader.prototype._read = function () {
if (entry.type === "Socket") {
me.emit("socket", entry)
} else {
- me.emitEntry(entry)
+ me.emit("entry", entry)
+ me.emit("child", entry)
}
})
var ended = false
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()
- }
+ me._read()
}
- // XXX Remove this. Works in node as of 0.6.2 or so.
+ // XXX Make this work in node.
// Long filenames should not break stuff.
entry.on("error", function (er) {
if (entry._swallowErrors) {
@@ -194,26 +160,6 @@ DirReader.prototype._read = function () {
})
}
-DirReader.prototype.disown = function (entry) {
- entry.emit("beforeDisown")
- entry._disowned = true
- entry.parent = entry.root = null
- if (entry === this._currentEntry) {
- this._currentEntry = null
- }
- 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
- }
-}
-
DirReader.prototype.pause = function (who) {
var me = this
if (me._paused) return
@@ -239,11 +185,8 @@ DirReader.prototype.resume = function (who) {
}
if (me._currentEntry) {
- if (me._currentEntry.resume) me._currentEntry.resume(who)
+ if (me._currentEntry.resume) {
+ me._currentEntry.resume(who)
+ }
} else me._read()
}
-
-DirReader.prototype.emitEntry = function (entry) {
- this.emit("entry", entry)
- this.emit("child", entry)
-}
diff --git a/deps/npm/node_modules/fstream/lib/dir-writer.js b/deps/npm/node_modules/fstream/lib/dir-writer.js
index 7073b883ea..01920244c1 100644
--- a/deps/npm/node_modules/fstream/lib/dir-writer.js
+++ b/deps/npm/node_modules/fstream/lib/dir-writer.js
@@ -37,7 +37,6 @@ DirWriter.prototype._create = function () {
// ready to start getting entries!
me.ready = true
me.emit("ready")
- me._process()
})
}
@@ -100,9 +99,7 @@ DirWriter.prototype._process = function () {
// don't allow recursive copying
var p = entry
do {
- var pp = p._path || p.path
- if (pp === me.root._path || pp === me._path ||
- (pp && pp.indexOf(me._path) === 0)) {
+ if (p._path === me.root._path || p._path === me._path) {
// console.error("DW Exit (recursive)", entry.basename, me._path)
me._processing = false
if (entry._collected) entry.pipe()
@@ -125,9 +122,6 @@ DirWriter.prototype._process = function () {
// get rid of any ../../ shenanigans
props.path = path.join(me.path, path.join("/", p))
- // if i have a filter, the child should inherit it.
- props.filter = me.filter
-
// all the rest of the stuff, copy over from the source.
Object.keys(entry.props).forEach(function (k) {
if (!props.hasOwnProperty(k)) {
diff --git a/deps/npm/node_modules/fstream/lib/link-writer.js b/deps/npm/node_modules/fstream/lib/link-writer.js
index 5c8f1e7012..8a98163800 100644
--- a/deps/npm/node_modules/fstream/lib/link-writer.js
+++ b/deps/npm/node_modules/fstream/lib/link-writer.js
@@ -4,6 +4,7 @@ module.exports = LinkWriter
var fs = require("graceful-fs")
, Writer = require("./writer.js")
, inherits = require("inherits")
+ , collect = require("./collect.js")
, path = require("path")
, rimraf = require("rimraf")
diff --git a/deps/npm/node_modules/fstream/lib/proxy-reader.js b/deps/npm/node_modules/fstream/lib/proxy-reader.js
index a0ece34a26..f99b28fe55 100644
--- a/deps/npm/node_modules/fstream/lib/proxy-reader.js
+++ b/deps/npm/node_modules/fstream/lib/proxy-reader.js
@@ -59,11 +59,7 @@ ProxyReader.prototype._addProxy = function (proxy) {
, "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))
diff --git a/deps/npm/node_modules/fstream/lib/reader.js b/deps/npm/node_modules/fstream/lib/reader.js
index e4e1b482cf..6aa67ada78 100644
--- a/deps/npm/node_modules/fstream/lib/reader.js
+++ b/deps/npm/node_modules/fstream/lib/reader.js
@@ -187,38 +187,19 @@ Reader.prototype._stat = function (currentStat) {
// 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
// special handling for ProxyReaders
- if (!me.filter.call(who, who, props)) {
- if (!me._disowned) {
- me.abort()
- me.emit("end")
- me.emit("close")
- }
- return
- }
- }
-
- // last chance to abort or disown before the flow starts!
- var events = ["_stat", "stat", "ready"]
- var e = 0
- ;(function go () {
- if (me._aborted) {
+ if (!me.filter.call(me._proxy || me)) {
+ me._aborted = true
me.emit("end")
me.emit("close")
return
}
+ }
- if (me._paused) {
- me.once("resume", go)
- return
- }
+ me.emit("ready", props)
- var ev = events[e ++]
- if (!ev) return me._read()
- me.emit(ev, props)
- go()
- })()
+ // if it's a directory, then we'll be emitting "entry" events.
+ me._read()
}
}
diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js
index 243f6b64e8..dde29fd7b2 100644
--- a/deps/npm/node_modules/fstream/lib/writer.js
+++ b/deps/npm/node_modules/fstream/lib/writer.js
@@ -98,8 +98,6 @@ function Writer (props, current) {
me._buffer = []
me.ready = false
- me.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.
@@ -123,19 +121,11 @@ Writer.prototype._stat = function (current) {
var me = this
, props = me.props
, stat = props.follow ? "stat" : "lstat"
- , who = me._proxy || me
if (current) statCb(null, current)
else fs[stat](me._path, statCb)
function statCb (er, current) {
- if (me.filter && !me.filter.call(who, who, current)) {
- me._aborted = true
- me.emit("end")
- me.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) {
@@ -166,83 +156,13 @@ function create (me) {
// 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) {
+ mkdir(path.dirname(me._path), Writer.dirmode, function (er) {
// console.error("W created", path.dirname(me._path), er)
if (er) return me.error(er)
-
- // later on, we have to set the mode and owner for these
- me._madeDir = made
- return me._create()
+ me._create()
})
}
-function endChmod (me, want, current, path, cb) {
- var wantMode = want.mode
- , chmod = want.follow || me.type !== "SymbolicLink"
- ? "chmod" : "lchmod"
-
- if (!fs[chmod]) return cb()
- if (typeof wantMode !== "number") return cb()
-
- var curMode = current.mode & 0777
- wantMode = wantMode & 0777
- if (wantMode === curMode) return cb()
-
- fs[chmod](path, wantMode, cb)
-}
-
-
-function endChown (me, want, current, path, cb) {
- // Don't even try it unless root. Too easy to EPERM.
- 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 (current.uid === want.uid &&
- current.gid === want.gid) return cb()
-
- var chown = (me.props.follow || me.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
-
- fs[chown](path, want.uid, want.gid, cb)
-}
-
-function endUtimes (me, want, current, path, cb) {
- if (!fs.utimes || process.platform === "win32") return cb()
-
- var utimes = (want.follow || me.type !== "SymbolicLink")
- ? "utimes" : "lutimes"
-
- 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
-
- if (meA === undefined) meA = curA
- if (meM === undefined) meM = curM
-
- if (!isDate(meA)) meA = new Date(meA)
- if (!isDate(meM)) meA = new Date(meM)
-
- if (meA.getTime() === curA.getTime() &&
- meM.getTime() === curM.getTime()) return cb()
-
- fs[utimes](path, meA, meM, cb)
-}
-
-
-// XXX This function is beastly. Break it up!
Writer.prototype._finish = function () {
var me = this
@@ -290,82 +210,88 @@ Writer.prototype._finish = function () {
return
function setProps (current) {
- 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("chown"))
- }
+ // console.error(" W setprops", me._path)
+ // mode
+ var wantMode = me.props.mode
+ , chmod = me.props.follow || me.type !== "SymbolicLink"
+ ? "chmod" : "lchmod"
- function next (what) {
- todo ++
- return function (er) {
- // console.error(" W Finish", what, todo)
- if (errState) return
- if (er) {
- er.fstream_finish_call = what
- return me.error(errState = er)
- }
- if (--todo > 0) return
- if (done) return
- done = true
-
- // 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)
-
- function end (er) {
- if (er) {
- er.fstream_finish_call = "setupMadeDir"
- return me.error(er)
+ if (fs[chmod] && typeof wantMode === "number") {
+ wantMode = wantMode & 0777
+ todo ++
+ // console.error(" W chmod", wantMode.toString(8), me.basename, "\r")
+ fs[chmod](me._path, wantMode, next(chmod))
+ }
+
+ // uid, gid
+ // Don't even try it unless root. Too easy to EPERM.
+ if (process.platform !== "win32" &&
+ process.getuid && process.getuid() === 0 &&
+ ( typeof me.props.uid === "number" ||
+ typeof me.props.gid === "number" )) {
+ var chown = (me.props.follow || me.type !== "SymbolicLink")
+ ? "chown" : "lchown"
+ if (fs[chown]) {
+ if (typeof me.props.uid !== "number") me.props.uid = current.uid
+ if (typeof me.props.gid !== "number") me.props.gid = current.gid
+ if (me.props.uid !== current.uid || me.props.gid !== current.gid) {
+ todo ++
+ // console.error(" W chown", me.props.uid, me.props.gid, me.basename)
+ fs[chown](me._path, me.props.uid, me.props.gid, next("chown"))
}
- // all the props have been set, so we're completely done.
- me.emit("end")
- me.emit("close")
}
}
- }
-}
-function endMadeDir (me, p, cb) {
- var made = me._madeDir
- // everything *between* made and path.dirname(me._path)
- // needs to be set up. Note that this may just be one dir.
- var d = path.dirname(p)
+ // atime, mtime.
+ if (fs.utimes && process.platform !== "win32") {
+ var utimes = (me.props.follow || me.type !== "SymbolicLink")
+ ? "utimes" : "lutimes"
- endMadeDir_(me, d, function (er) {
- if (er) return cb(er)
- if (d === made) {
- return cb()
- }
- endMadeDir(me, d, cb)
- })
-}
+ if (utimes === "lutimes" && !fs[utimes]) {
+ utimes = "utimes"
+ }
+
+ var curA = current.atime
+ , curM = current.mtime
+ , meA = me.props.atime
+ , meM = me.props.mtime
-function endMadeDir_ (me, p, cb) {
- var dirProps = {}
- Object.keys(me.props).forEach(function (k) {
- dirProps[k] = me.props[k]
+ if (meA === undefined) meA = curA
+ if (meM === undefined) meM = curM
- // only make non-readable dirs if explicitly requested.
- if (k === "mode" && me.type !== "Directory") {
- dirProps[k] = dirProps[k] | 0111
+ if (!isDate(meA)) meA = new Date(meA)
+ if (!isDate(meM)) meA = new Date(meM)
+
+ if (meA.getTime() !== curA.getTime() ||
+ meM.getTime() !== curM.getTime()) {
+ todo ++
+ // console.error(" W utimes", meA, meM, me.basename)
+ fs[utimes](me._path, meA, meM, next("utimes"))
+ }
}
- })
- var todo = 3
- , 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)
- })
+ // finally, handle the case if there was nothing to do.
+ if (todo === 0) {
+ // console.error(" W nothing to do", me.basename)
+ next("nothing to do")()
+ }
+ }
- function next (er) {
+ function next (what) { return function (er) {
+ // console.error(" W Finish", what, todo)
if (errState) return
- if (er) return cb(errState = er)
- if (-- todo === 0) return cb()
- }
+ if (er) {
+ er.fstream_finish_call = what
+ return me.error(errState = er)
+ }
+ if (--todo > 0) return
+ if (done) return
+ done = true
+
+ // all the props have been set, so we're completely done.
+ me.emit("end")
+ me.emit("close")
+ }}
}
Writer.prototype.pipe = function () {
diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json
index 2be498e095..eb8561532c 100644
--- a/deps/npm/node_modules/fstream/package.json
+++ b/deps/npm/node_modules/fstream/package.json
@@ -1,42 +1,26 @@
{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "fstream",
"description": "Advanced file system stream things",
- "version": "0.1.18",
+ "version": "0.1.11",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream.git"
},
"main": "fstream.js",
"engines": {
- "node": ">=0.6"
+ "node": "0.5 || 0.6 || 0.7"
},
"dependencies": {
- "rimraf": "2",
- "mkdirp": "0.3",
+ "rimraf": "~1.0.8",
+ "mkdirp": "~0.1.0",
"graceful-fs": "~1.1.2",
"inherits": "~1.0.0"
},
"devDependencies": {
- "tap": ""
+ "tap": "0.1"
},
"scripts": {
"test": "tap examples/*.js"
- },
- "license": "BSD",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "fstream@0.1.18",
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.13",
- "_nodeVersion": "v0.7.7-pre",
- "_defaultsLoaded": true,
- "_from": "fstream@~0.1.17"
+ }
}
diff --git a/deps/npm/node_modules/graceful-fs/graceful-fs.js b/deps/npm/node_modules/graceful-fs/graceful-fs.js
index ecbda31a5a..7467f304a2 100644
--- a/deps/npm/node_modules/graceful-fs/graceful-fs.js
+++ b/deps/npm/node_modules/graceful-fs/graceful-fs.js
@@ -6,7 +6,8 @@ var fs = require("fs")
// there is such a thing as TOO graceful.
if (fs.open === gracefulOpen) return
-var queue = []
+var FastList = require("fast-list")
+ , queue = new FastList()
, curOpen = 0
, constants = require("constants")
@@ -209,67 +210,3 @@ if (!fs.lutimes) {
fs.lutimesSync = function () {}
}
}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-function chownErOk (er) {
- // if there's no getuid, or if getuid() is something other than 0,
- // and the error is EINVAL or EPERM, then just ignore it.
- // This specific case is a silent failure in cp, install, tar,
- // and most other unix tools that manage permissions.
- // When running as root, or if other types of errors are encountered,
- // then it's strict.
- if (!er || (!process.getuid || process.getuid() !== 0)
- && (er.code === "EINVAL" || er.code === "EPERM")) return true
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- cb(er)
- })
- }
-}
diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json
index 757d3014c8..ec72affa13 100644
--- a/deps/npm/node_modules/graceful-fs/package.json
+++ b/deps/npm/node_modules/graceful-fs/package.json
@@ -1,31 +1,18 @@
{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "graceful-fs",
"description": "fs monkey-patching to avoid EMFILE and other problems",
- "version": "1.1.8",
+ "version": "1.1.2",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-graceful-fs.git"
},
"main": "graceful-fs.js",
"engines": {
- "node": ">=0.4.0"
+ "node": "0.4 || 0.5 || 0.6"
},
- "devDependencies": {},
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
+ "dependencies": {
+ "fast-list": "1"
},
- "_id": "graceful-fs@1.1.8",
- "dependencies": {},
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.10",
- "_nodeVersion": "v0.7.7-pre",
- "_defaultsLoaded": true,
- "_from": "graceful-fs@~1.1.1"
+ "devDependencies": {}
}
diff --git a/deps/npm/node_modules/inherits/LICENSE b/deps/npm/node_modules/inherits/LICENSE
index 5a8e332545..c78c4f6618 100644
--- a/deps/npm/node_modules/inherits/LICENSE
+++ b/deps/npm/node_modules/inherits/LICENSE
@@ -1,14 +1,26 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
+Copyright 2011 Isaac Z. Schlueter (the "Author")
+All rights reserved.
- Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+General Public Obviousness License
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
+The Author asserts that this software and associated documentation
+files (the "Software"), while the Author's original creation, is
+nonetheless obvious, trivial, unpatentable, and implied by the
+context in which the software was created. If you sat down and
+thought about the problem for an hour or less, you'd probably
+come up with exactly this solution.
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+Permission is granted to use this software in any way
+whatsoever, with the following restriction:
- 0. You just DO WHAT THE FUCK YOU WANT TO.
+You may not release the Software under a more restrictive license
+than this one.
+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/inherits/package.json b/deps/npm/node_modules/inherits/package.json
index b5499c1ec8..7dc32771b9 100644
--- a/deps/npm/node_modules/inherits/package.json
+++ b/deps/npm/node_modules/inherits/package.json
@@ -1,44 +1,8 @@
-{
- "name": "inherits",
- "description": "A tiny simple way to do classic inheritance in js",
- "version": "1.0.0",
- "keywords": [
- "inheritance",
- "class",
- "klass",
- "oop",
- "object-oriented"
- ],
- "main": "./inherits.js",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/inherits.git"
- },
- "license": {
- "type": "WTFPL2"
- },
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "inherits@1.0.0",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "_engineSupported": true,
- "_npmVersion": "1.1.10",
- "_nodeVersion": "v0.7.7-pre",
- "_defaultsLoaded": true,
- "dist": {
- "shasum": "12dbc03c9f7c203289234b214a7d05a311d71450"
- },
- "_from": "git://github.com/isaacs/inherits"
-}
+{ "name" : "inherits"
+, "description": "A tiny simple way to do classic inheritance in js"
+, "version" : "1.0.0"
+, "keywords" : ["inheritance", "class", "klass", "oop", "object-oriented"]
+, "main" : "./inherits.js"
+, "repository" : "https://github.com/isaacs/inherits"
+, "license": { "type": "GPOL", "url": "https://raw.github.com/isaacs/inherits/master/LICENSE" }
+, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)" }
diff --git a/deps/npm/node_modules/minimatch/README.md b/deps/npm/node_modules/minimatch/README.md
index 6fd07d2e97..d5f97234cd 100644
--- a/deps/npm/node_modules/minimatch/README.md
+++ b/deps/npm/node_modules/minimatch/README.md
@@ -60,12 +60,11 @@ thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
`a/**b` will not. **Note that this is different from the way that `**` is
handled by ruby's `Dir` class.**
-If an escaped pattern has no matches, and the `nonull` flag is set,
+If an escaped pattern has no matches, and the `null` flag is not set,
then minimatch.match returns the pattern as-provided, rather than
interpreting the character escapes. For example,
`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
+`"*a?"`.
If brace expansion is not disabled, then it is performed before any
other interpretation of the glob pattern. Thus, a pattern like
@@ -148,8 +147,8 @@ var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
### minimatch.match(list, pattern, options)
Match against the list of
-files, in the style of fnmatch or glob. If nothing is matched, and
-options.nonull is set, then return a list containing the pattern itself.
+files, in the style of fnmatch or glob. If nothing is matched, then
+return the pattern (unless `{ null: true }` in the options.)
```javascript
var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
@@ -211,8 +210,3 @@ comment.
### nonegate
Suppress the behavior of treating a leading `!` character as negation.
-
-### flipNegate
-
-Returns from negate expressions the same as if they were not negated.
-(Ie, true on a hit, false on a miss.)
diff --git a/deps/npm/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/minimatch/minimatch.js
index 1ca08104ee..768c8ebac7 100644
--- a/deps/npm/node_modules/minimatch/minimatch.js
+++ b/deps/npm/node_modules/minimatch/minimatch.js
@@ -4,6 +4,7 @@ minimatch.Minimatch = Minimatch
var LRU = require("lru-cache")
, cache = minimatch.cache = new LRU(100)
, GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+ , pathSplit = process.platform === "win32" ? /\\|\// : "/"
var path = require("path")
// any single thing other than /
@@ -129,7 +130,7 @@ function make () {
this.parseNegate()
// step 2: expand braces
- var set = this.globSet = this.braceExpand()
+ var set = this.braceExpand()
if (options.debug) console.error(this.pattern, set)
@@ -138,10 +139,36 @@ function make () {
// These will be regexps, except in the case of "**", which is
// set to the GLOBSTAR object for globstar behavior,
// and will not contain any / characters
- set = this.globParts = set.map(function (s) {
+ set = set.map(function (s) {
return s.split(slashSplit)
})
+ // step 4: if we have a defined root, then patterns starting with ""
+ // get attached to that. If we have a defined cwd, then patterns
+ // *not* starting with "" get attached to that.
+ // Exception 1: on windows, a pattern like //\?/c:/ or c:/ will
+ // not get anything prefixed to it.
+ // Exception 2: If matchBase is set, and it's just a filename,
+ // then don't prefix anything onto it, since it'll only match
+ // files with that basename anyhow.
+ set = set.map(function (p) {
+ if (process.platform === "win32" &&
+ ( (p[0] === "" && p[1] === "" && p[2] === "\\?") // unc
+ || (p[0].match(/^[a-zA-Z]:$/)) )) {
+ return p
+ }
+ if (options.matchBase && p.length === 1) return p
+ // do prefixing.
+ if (options.root && p[0] === "") {
+ return options.root.split(pathSplit).concat(p)
+ }
+ if (options.cwd && p[0] !== "") {
+ return options.cwd.split(pathSplit).concat(p)
+ }
+ return p
+ })
+
+
if (options.debug) console.error(this.pattern, set)
// glob --> regexps
@@ -518,8 +545,7 @@ function parse (pattern, isSub) {
patternListStack.push({ type: plType
, start: i - 1
, reStart: re.length })
- // negation is (?:(?!js)[^/]*)
- re += stateChar === "!" ? "(?:(?!" : "(?:"
+ re += stateChar === "!" ? "(?!" : "(?:"
stateChar = false
continue
@@ -532,15 +558,11 @@ function parse (pattern, isSub) {
hasMagic = true
re += ")"
plType = patternListStack.pop().type
- // negation is (?:(?!js)[^/]*)
- // The others are (?:<pattern>)<type>
switch (plType) {
- case "!":
- re += "[^/]*?)"
- break
case "?":
case "+":
case "*": re += plType
+ case "!": // already handled by the start
case "@": break // the default anyway
}
continue
@@ -764,12 +786,13 @@ function match (f, partial) {
if (this.comment) return false
if (this.empty) return f === ""
- if (f === "/" && partial) return true
-
var options = this.options
// first, normalize any slash-separated path parts.
// f = path.normalize(f)
+ var absolute = isAbsolute(f)
+
+ // console.error(this.pattern, f, absolute)
// windows: need to use /, not \
// On other platforms, \ is a valid (albeit bad) filename char.
@@ -779,9 +802,7 @@ function match (f, partial) {
// treat the test path as a set of pathparts.
f = f.split(slashSplit)
- if (options.debug) {
- console.error(this.pattern, "split", f)
- }
+ // console.error(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
@@ -795,14 +816,12 @@ function match (f, partial) {
var pattern = set[i]
var hit = this.matchOne(f, pattern, partial)
if (hit) {
- if (options.flipNegate) return true
return !this.negate
}
}
// didn't get any hits. this is success if it's a negative
// pattern, failure otherwise.
- if (options.flipNegate) return false
return this.negate
}
@@ -984,3 +1003,19 @@ function globUnescape (s) {
function regExpEscape (s) {
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
}
+
+
+function isAbsolute (p) {
+ if (process.platform !== "win32") return p.charAt(0) === "/"
+
+ // yanked from node/lib/path.js
+ var splitDeviceRe =
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?([\s\S]*?)$/
+
+ var result = p.match(splitDeviceRe)
+ , device = result[1] || ""
+ , isUnc = device && device.charAt(1) !== ":"
+ , isAbs = !!result[2] || isUnc // UNC always absolute
+
+ return isAbs
+}
diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json
index 1bcb3d43e6..92ccac5fb9 100644
--- a/deps/npm/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/minimatch/package.json
@@ -1,12 +1,8 @@
{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "minimatch",
"description": "a glob matcher in javascript",
- "version": "0.2.2",
+ "version": "0.1.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
@@ -22,23 +18,12 @@
"lru-cache": "~1.0.5"
},
"devDependencies": {
- "tap": ""
+ "tap": "~0.1.3"
},
- "licenses": [
+ "licenses" : [
{
- "type": "MIT",
- "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
+ "type" : "MIT",
+ "url" : "http://github.com/isaacs/minimatch/raw/master/LICENSE"
}
- ],
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "minimatch@0.2.2",
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.12",
- "_nodeVersion": "v0.7.7-pre",
- "_defaultsLoaded": true,
- "_from": "minimatch@0"
+ ]
}
diff --git a/deps/npm/node_modules/mkdirp/README.markdown b/deps/npm/node_modules/mkdirp/README.markdown
index b4dd75fdc6..0393c4ea53 100644
--- a/deps/npm/node_modules/mkdirp/README.markdown
+++ b/deps/npm/node_modules/mkdirp/README.markdown
@@ -3,14 +3,14 @@ mkdirp
Like `mkdir -p`, but in node.js!
-example
+Example
=======
pow.js
------
var mkdirp = require('mkdirp');
- mkdirp('/tmp/foo/bar/baz', function (err) {
+ mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
if (err) console.error(err)
else console.log('pow!')
});
@@ -19,36 +19,3 @@ Output
pow!
And now /tmp/foo/bar/baz exists, huzzah!
-
-methods
-=======
-
-var mkdirp = require('mkdirp');
-
-mkdirp(dir, mode, cb)
----------------------
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `mode`.
-
-If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-mkdirp.sync(dir, mode)
-----------------------
-
-Synchronously create a new directory and any necessary subdirectories at `dir`
-with octal permission string `mode`.
-
-If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-install
-=======
-
-With [npm](http://npmjs.org) do:
-
- npm install mkdirp
-
-license
-=======
-
-MIT/X11
diff --git a/deps/npm/node_modules/mkdirp/index.js b/deps/npm/node_modules/mkdirp/index.js
index 871488f63f..6602801463 100644
--- a/deps/npm/node_modules/mkdirp/index.js
+++ b/deps/npm/node_modules/mkdirp/index.js
@@ -4,28 +4,17 @@ var fs = require('fs');
module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
function mkdirP (p, mode, f) {
- if (typeof mode === 'function' || mode === undefined) {
- f = mode;
- mode = 0777 & (~process.umask());
- }
-
- // secret passalong argument.
- var made = arguments[3] || null;
-
var cb = f || function () {};
if (typeof mode === 'string') mode = parseInt(mode, 8);
p = path.resolve(p);
fs.mkdir(p, mode, function (er) {
- if (!er) {
- made = made || p;
- return cb(null, made);
- }
+ if (!er) return cb();
switch (er.code) {
case 'ENOENT':
- mkdirP(path.dirname(p), mode, function (er, made) {
- if (er) cb(er, made);
- else mkdirP(p, mode, cb, made);
+ mkdirP(path.dirname(p), mode, function (er) {
+ if (er) cb(er);
+ else mkdirP(p, mode, cb);
});
break;
@@ -33,55 +22,15 @@ function mkdirP (p, mode, f) {
fs.stat(p, function (er2, stat) {
// if the stat fails, then that's super weird.
// let the original EEXIST be the failure reason.
- if (er2 || !stat.isDirectory()) cb(er, made)
- else cb(null, made);
+ if (er2 || !stat.isDirectory()) cb(er)
+ else if ((stat.mode & 0777) !== mode) fs.chmod(p, mode, cb);
+ else cb();
});
break;
default:
- cb(er, made);
+ cb(er);
break;
}
});
}
-
-mkdirP.sync = function sync (p, mode) {
- if (mode === undefined) {
- mode = 0777 & (~process.umask());
- }
-
- // secret passalong argument
- var made = arguments[2] || null;
-
- if (typeof mode === 'string') mode = parseInt(mode, 8);
- p = path.resolve(p);
-
- try {
- fs.mkdirSync(p, mode);
- made = made || p;
- }
- catch (err0) {
- switch (err0.code) {
- case 'ENOENT' :
- made = sync(path.dirname(p), mode, made);
- sync(p, mode, made);
- break;
-
- case 'EEXIST' :
- var stat;
- try {
- stat = fs.statSync(p);
- }
- catch (err1) {
- throw err0;
- }
- if (!stat.isDirectory()) throw err0;
- break;
- default :
- throw err0
- break;
- }
- }
-
- return made;
-};
diff --git a/deps/npm/node_modules/mkdirp/package.json b/deps/npm/node_modules/mkdirp/package.json
index 2a40503c5f..99149f747d 100644
--- a/deps/npm/node_modules/mkdirp/package.json
+++ b/deps/npm/node_modules/mkdirp/package.json
@@ -1,44 +1,23 @@
{
- "name": "mkdirp",
- "description": "Recursively mkdir, like `mkdir -p`",
- "version": "0.3.0",
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "main": "./index",
- "keywords": [
- "mkdir",
- "directory"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/node-mkdirp.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "devDependencies": {
- "tap": "0.2"
- },
- "license": "MIT/X11",
- "engines": {
- "node": "*"
- },
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "mkdirp@0.3.0",
- "dependencies": {},
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.13",
- "_nodeVersion": "v0.7.7-pre",
- "_defaultsLoaded": true,
- "dist": {
- "shasum": "a3cc6816e78b84f570caf9d95cb7368dc5d0bab8"
- },
- "_from": "../mkdirp"
+ "name" : "mkdirp",
+ "description" : "Recursively mkdir, like `mkdir -p`",
+ "version" : "0.1.0",
+ "author" : "James Halliday <mail@substack.net> (http://substack.net)",
+ "main" : "./index",
+ "keywords" : [
+ "mkdir",
+ "directory"
+ ],
+ "repository" : {
+ "type" : "git",
+ "url" : "http://github.com/substack/node-mkdirp.git"
+ },
+ "scripts" : {
+ "test" : "tap test/*.js"
+ },
+ "devDependencies" : {
+ "tap" : "0.0.x"
+ },
+ "license" : "MIT/X11",
+ "engines": { "node": "*" }
}
diff --git a/deps/npm/node_modules/read/lib/read.js b/deps/npm/node_modules/read/lib/read.js
index ba2ef0ae78..246044bcd9 100644
--- a/deps/npm/node_modules/read/lib/read.js
+++ b/deps/npm/node_modules/read/lib/read.js
@@ -5,14 +5,6 @@ var buffer = ""
, tty = require("tty")
, StringDecoder = require("string_decoder").StringDecoder
-function raw (mode) {
- try {
- process.stdin.setRawMode(mode)
- } catch (e) {
- tty.setRawMode(mode)
- }
-}
-
function read (opts, cb) {
if (!cb) cb = opts, opts = {}
@@ -33,7 +25,7 @@ function read (opts, cb) {
cb = (function (cb) {
var called = false
var t = setTimeout(function () {
- raw(false)
+ tty.setRawMode(false)
process.stdout.write("\n")
if (def) done(null, def)
else done(new Error("timeout"))
@@ -117,7 +109,7 @@ function rawRead (def, timeout, delim, silent, num, cb) {
, val = ""
, decoder = new StringDecoder
- raw(true)
+ tty.setRawMode(true)
stdin.resume()
stdin.on("error", cb)
stdin.on("data", function D (c) {
@@ -130,7 +122,7 @@ function rawRead (def, timeout, delim, silent, num, cb) {
case "\u0004": // EOF
case delim:
- raw(false)
+ tty.setRawMode(false)
stdin.removeListener("data", D)
stdin.removeListener("error", cb)
val = val.trim() || def
@@ -139,7 +131,7 @@ function rawRead (def, timeout, delim, silent, num, cb) {
return cb(null, val)
case "\u0003": case "\0": // ^C or other signal abort
- raw(false)
+ tty.setRawMode(false)
stdin.removeListener("data", D)
stdin.removeListener("error", cb)
stdin.pause()
diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json
index f206a719b3..bc05577aac 100644
--- a/deps/npm/node_modules/read/package.json
+++ b/deps/npm/node_modules/read/package.json
@@ -1,28 +1,16 @@
{
"name": "read",
- "version": "0.0.2",
+ "version": "0.0.1",
"main": "lib/read.js",
"dependencies": {},
"devDependencies": {},
"engines": {
"node": ">=0.6"
},
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"description": "read(1) for node programs",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/read.git"
- },
- "license": "BSD",
- "_id": "read@0.0.2",
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.15",
- "_nodeVersion": "v0.7.7",
- "_defaultsLoaded": true,
- "_from": "read@0"
+ }
}
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index e5839b50e6..4ea89f794a 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -38,7 +38,7 @@ request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.
```javascript
-fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
+fs.readStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
```
Request can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.
@@ -146,7 +146,6 @@ request.post({url:url, oauth:oauth}, function (e, r, body) {
The first argument can be either a url or an options object. The only required option is uri, all others are optional.
* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()
-* `qs` - object containing querystring values to be appended to the uri
* `method` - http method, defaults to GET
* `headers` - http headers, defaults to {}
* `body` - entity body for POST and PUT requests. Must be buffer or string.
@@ -154,7 +153,6 @@ The first argument can be either a url or an options object. The only required o
* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header.
* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.
* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.
-* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.
* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.
* `onResponse` - If true the callback will be fired on the "response" event instead of "end". If a function it will be called on "response" and not effect the regular semantics of the main callback on "end".
* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.
diff --git a/deps/npm/node_modules/request/forever.js b/deps/npm/node_modules/request/forever.js
index ac853c0d28..e6531a21b3 100644
--- a/deps/npm/node_modules/request/forever.js
+++ b/deps/npm/node_modules/request/forever.js
@@ -1,11 +1,8 @@
module.exports = ForeverAgent
-ForeverAgent.SSL = ForeverAgentSSL
var util = require('util')
, Agent = require('http').Agent
, net = require('net')
- , tls = require('tls')
- , AgentSSL = require('https').Agent
function ForeverAgent(options) {
var self = this
@@ -37,14 +34,12 @@ function ForeverAgent(options) {
socket.destroy();
}
})
-
+ self.createConnection = net.createConnection
}
util.inherits(ForeverAgent, Agent)
ForeverAgent.defaultMinSockets = 5
-
-ForeverAgent.prototype.createConnection = net.createConnection
ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
ForeverAgent.prototype.addRequest = function(req, host, port) {
var name = host + ':' + port
@@ -87,17 +82,3 @@ ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
this.createSocket(name, host, port).emit('free');
}
}
-
-function ForeverAgentSSL (options) {
- ForeverAgent.call(this, options)
-}
-util.inherits(ForeverAgentSSL, ForeverAgent)
-
-ForeverAgentSSL.prototype.createConnection = createConnectionSSL
-ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
-
-function createConnectionSSL (port, host, options) {
- options.port = port
- options.host = host
- return tls.connect(options)
-}
diff --git a/deps/npm/node_modules/request/main.js b/deps/npm/node_modules/request/main.js
index 5a6bd9eb04..a25393ec3e 100644
--- a/deps/npm/node_modules/request/main.js
+++ b/deps/npm/node_modules/request/main.js
@@ -1,4 +1,4 @@
-// Copyright 2010-2012 Mikeal Rogers
+// Copyright 2010-2011 Mikeal Rogers
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@ var http = require('http')
, Cookie = require('./vendor/cookie')
, CookieJar = require('./vendor/cookie/jar')
, cookieJar = new CookieJar
- , tunnel = require('./tunnel')
;
if (process.logging) {
@@ -68,9 +67,7 @@ function isReadStream (rs) {
function copy (obj) {
var o = {}
- Object.keys(obj).forEach(function (i) {
- o[i] = obj[i]
- })
+ for (var i in obj) o[i] = obj[i]
return o
}
@@ -86,31 +83,24 @@ function Request (options) {
if (typeof options === 'string') {
options = {uri:options}
}
-
- var reserved = Object.keys(Request.prototype)
+
for (var i in options) {
- if (reserved.indexOf(i) === -1) {
- this[i] = options[i]
- } else {
- if (typeof options[i] === 'function') {
- delete options[i]
- }
- }
+ this[i] = options[i]
}
- options = copy(options)
-
- this.init(options)
+ if (!this.pool) this.pool = globalPool
+ this.dests = []
+ this.__isRequestRequest = true
}
util.inherits(Request, stream.Stream)
-Request.prototype.init = function (options) {
+Request.prototype.getAgent = function (host, port) {
+ if (!this.pool[host+':'+port]) {
+ this.pool[host+':'+port] = new this.httpModule.Agent({host:host, port:port})
+ }
+ return this.pool[host+':'+port]
+}
+Request.prototype.request = function () {
var self = this
-
- if (!options) options = {}
-
- if (!self.pool) self.pool = globalPool
- self.dests = []
- self.__isRequestRequest = true
-
+
// Protect against double callback
if (!self._callback && self.callback) {
self._callback = self.callback
@@ -134,32 +124,17 @@ Request.prototype.init = function (options) {
}
if (self.proxy) {
if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy)
-
- // do the HTTP CONNECT dance using koichik/node-tunnel
- if (http.globalAgent && self.uri.protocol === "https:") {
- var tunnelFn = self.proxy.protocol === "http:"
- ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
-
- var tunnelOptions = { proxy: { host: self.proxy.hostname
- , port: +self.proxy.port
- , proxyAuth: self.proxy.auth }
- , ca: this.ca }
-
- self.agent = tunnelFn(tunnelOptions)
- self.tunnel = true
- }
}
self._redirectsFollowed = self._redirectsFollowed || 0
self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true
- self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false;
- if (self.followRedirect || self.followAllRedirects)
+ if (self.followRedirect)
self.redirects = self.redirects || []
self.headers = self.headers ? copy(self.headers) : {}
- self.setHost = false
+ var setHost = false
if (!self.headers.host) {
self.headers.host = self.uri.hostname
if (self.uri.port) {
@@ -167,10 +142,27 @@ Request.prototype.init = function (options) {
!(self.uri.port === 443 && self.uri.protocol === 'https:') )
self.headers.host += (':'+self.uri.port)
}
- self.setHost = true
+ setHost = true
+ }
+
+ if (self.jar === false) {
+ // disable cookies
+ var cookies = false;
+ self._disableCookies = true;
+ } else if (self.jar) {
+ // fetch cookie from the user defined cookie jar
+ var cookies = self.jar.get({ url: self.uri.href })
+ } else {
+ // fetch cookie from the global cookie jar
+ var cookies = cookieJar.get({ url: self.uri.href })
+ }
+ if (cookies) {
+ var cookieString = cookies.map(function (c) {
+ return c.name + "=" + c.value;
+ }).join("; ");
+
+ self.headers.Cookie = cookieString;
}
-
- self.jar(self._jar || options.jar)
if (!self.uri.pathname) {self.uri.pathname = '/'}
if (!self.uri.port) {
@@ -178,7 +170,7 @@ Request.prototype.init = function (options) {
else if (self.uri.protocol == 'https:') {self.uri.port = 443}
}
- if (self.proxy && !self.tunnel) {
+ if (self.proxy) {
self.port = self.proxy.port
self.host = self.proxy.hostname
} else {
@@ -191,43 +183,74 @@ Request.prototype.init = function (options) {
delete self.callback
}
- self.clientErrorHandler = function (error) {
- if (self._aborted) return
-
- if (self.setHost) delete self.headers.host
- if (self.req._reusedSocket && error.code === 'ECONNRESET'
- && self.agent.addRequestNoreuse) {
- self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
+ var clientErrorHandler = function (error) {
+ if (setHost) delete self.headers.host
+ if (self.req._reusedSocket && error.code === 'ECONNRESET') {
+ self.agent = {addRequest: ForeverAgent.prototype.addRequestNoreuse.bind(self.agent)}
self.start()
self.req.end()
return
}
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer);
- self.timeoutTimer = null;
- }
+ if (self.timeout && self.timeoutTimer) clearTimeout(self.timeoutTimer)
self.emit('error', error)
}
if (self.onResponse) self.on('error', function (e) {self.onResponse(e)})
if (self.callback) self.on('error', function (e) {self.callback(e)})
- if (options.form) {
- self.form(options.form)
- }
-
- if (options.oauth) {
- self.oauth(options.oauth)
+ if (self.form) {
+ self.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8'
+ self.body = qs.stringify(self.form).toString('utf8')
+ }
+
+ if (self.oauth) {
+ var form
+ if (self.headers['content-type'] &&
+ self.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) ===
+ 'application/x-www-form-urlencoded'
+ ) {
+ form = qs.parse(self.body)
+ }
+ if (self.uri.query) {
+ form = qs.parse(self.uri.query)
+ }
+ if (!form) form = {}
+ var oa = {}
+ for (var i in form) oa[i] = form[i]
+ for (var i in self.oauth) oa['oauth_'+i] = self.oauth[i]
+ if (!oa.oauth_version) oa.oauth_version = '1.0'
+ if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( (new Date()).getTime() / 1000 ).toString()
+ if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
+
+ oa.oauth_signature_method = 'HMAC-SHA1'
+
+ var consumer_secret = oa.oauth_consumer_secret
+ delete oa.oauth_consumer_secret
+ var token_secret = oa.oauth_token_secret
+ delete oa.oauth_token_secret
+
+ var baseurl = self.uri.protocol + '//' + self.uri.host + self.uri.pathname
+ var signature = oauth.hmacsign(self.method, baseurl, oa, consumer_secret, token_secret)
+
+ // oa.oauth_signature = signature
+ for (var i in form) {
+ if ( i.slice(0, 'oauth_') in self.oauth) {
+ // skip
+ } else {
+ delete oa['oauth_'+i]
+ }
+ }
+ self.headers.authorization =
+ 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
+ self.headers.authorization += ',oauth_signature="'+oauth.rfc3986(signature)+'"'
}
if (self.uri.auth && !self.headers.authorization) {
self.headers.authorization = "Basic " + toBase64(self.uri.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
}
- if (self.proxy && self.proxy.auth && !self.headers['proxy-authorization'] && !self.tunnel) {
+ if (self.proxy && self.proxy.auth && !self.headers['proxy-authorization']) {
self.headers['proxy-authorization'] = "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
}
- if (options.qs) self.qs(options.qs)
-
if (self.uri.path) {
self.path = self.uri.path
} else {
@@ -236,12 +259,41 @@ Request.prototype.init = function (options) {
if (self.path.length === 0) self.path = '/'
- if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
+ if (self.proxy) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
+
+ if (self.json) {
+ self.headers['content-type'] = 'application/json'
+ if (typeof self.json === 'boolean') {
+ if (typeof self.body === 'object') self.body = JSON.stringify(self.body)
+ } else {
+ self.body = JSON.stringify(self.json)
+ }
+
+ } else if (self.multipart) {
+ self.body = []
+
+ if (!self.headers['content-type']) {
+ self.headers['content-type'] = 'multipart/related;boundary="frontier"';
+ } else {
+ self.headers['content-type'] = self.headers['content-type'].split(';')[0] + ';boundary="frontier"';
+ }
+
+ if (!self.multipart.forEach) throw new Error('Argument error, options.multipart.')
- if (options.json) {
- self.json(options.json)
- } else if (options.multipart) {
- self.multipart(options.multipart)
+ self.multipart.forEach(function (part) {
+ var body = part.body
+ if(!body) throw Error('Body attribute missing in multipart.')
+ delete part.body
+ var preamble = '--frontier\r\n'
+ Object.keys(part).forEach(function(key){
+ preamble += key + ': ' + part[key] + '\r\n'
+ })
+ preamble += '\r\n'
+ self.body.push(new Buffer(preamble))
+ self.body.push(new Buffer(body))
+ self.body.push(new Buffer('\r\n'))
+ })
+ self.body.push(new Buffer('--frontier--'))
}
if (self.body) {
@@ -265,7 +317,7 @@ Request.prototype.init = function (options) {
}
}
- var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
+ var protocol = self.proxy ? self.proxy.protocol : self.uri.protocol
, defaultModules = {'http:':http, 'https:':https}
, httpModules = self.httpModules || {}
;
@@ -273,34 +325,177 @@ Request.prototype.init = function (options) {
if (!self.httpModule) throw new Error("Invalid protocol")
- if (options.ca) self.ca = options.ca
-
- if (!self.agent) {
- if (options.agentOptions) self.agentOptions = options.agentOptions
-
- if (options.agentClass) {
- self.agentClass = options.agentClass
- } else if (options.forever) {
- self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
- } else {
- self.agentClass = self.httpModule.Agent
- }
- }
-
if (self.pool === false) {
self.agent = false
} else {
- self.agent = self.agent || self.getAgent()
if (self.maxSockets) {
// Don't use our pooling if node has the refactored client
+ self.agent = self.agent || self.httpModule.globalAgent || self.getAgent(self.host, self.port)
self.agent.maxSockets = self.maxSockets
}
if (self.pool.maxSockets) {
// Don't use our pooling if node has the refactored client
+ self.agent = self.agent || self.httpModule.globalAgent || self.getAgent(self.host, self.port)
self.agent.maxSockets = self.pool.maxSockets
}
}
+ self.start = function () {
+ self._started = true
+ self.method = self.method || 'GET'
+ self.href = self.uri.href
+ if (log) log('%method %href', self)
+ self.req = self.httpModule.request(self, function (response) {
+ self.response = response
+ response.request = self
+
+ if (self.httpModule === https &&
+ self.strictSSL &&
+ !response.client.authorized) {
+ var sslErr = response.client.authorizationError
+ self.emit('error', new Error('SSL Error: '+ sslErr))
+ return
+ }
+
+ if (setHost) delete self.headers.host
+ if (self.timeout && self.timeoutTimer) clearTimeout(self.timeoutTimer)
+
+ if (response.headers['set-cookie'] && (!self._disableCookies)) {
+ response.headers['set-cookie'].forEach(function(cookie) {
+ if (self.jar) self.jar.add(new Cookie(cookie))
+ else cookieJar.add(new Cookie(cookie))
+ })
+ }
+
+ if (response.statusCode >= 300 &&
+ response.statusCode < 400 &&
+ self.followRedirect &&
+ self.method !== 'PUT' &&
+ self.method !== 'POST' &&
+ response.headers.location) {
+ if (self._redirectsFollowed >= self.maxRedirects) {
+ self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
+ return
+ }
+ self._redirectsFollowed += 1
+
+ if (!isUrl.test(response.headers.location)) {
+ response.headers.location = url.resolve(self.uri.href, response.headers.location)
+ }
+ self.uri = response.headers.location
+ self.redirects.push(
+ { statusCode : response.statusCode
+ , redirectUri: response.headers.location
+ }
+ )
+ delete self.req
+ delete self.agent
+ delete self._started
+ if (self.headers) {
+ delete self.headers.host
+ }
+ if (log) log('Redirect to %uri', self)
+ request(self, self.callback)
+ return // Ignore the rest of the response
+ } else {
+ self._redirectsFollowed = self._redirectsFollowed || 0
+ // Be a good stream and emit end when the response is finished.
+ // Hack to emit end on close because of a core bug that never fires end
+ response.on('close', function () {
+ if (!self._ended) self.response.emit('end')
+ })
+
+ if (self.encoding) {
+ if (self.dests.length !== 0) {
+ console.error("Ingoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
+ } else {
+ response.setEncoding(self.encoding)
+ }
+ }
+
+ self.pipeDest = function (dest) {
+ if (dest.headers) {
+ dest.headers['content-type'] = response.headers['content-type']
+ if (response.headers['content-length']) {
+ dest.headers['content-length'] = response.headers['content-length']
+ }
+ }
+ if (dest.setHeader) {
+ for (var i in response.headers) {
+ dest.setHeader(i, response.headers[i])
+ }
+ dest.statusCode = response.statusCode
+ }
+ if (self.pipefilter) self.pipefilter(response, dest)
+ }
+
+ self.dests.forEach(function (dest) {
+ self.pipeDest(dest)
+ })
+
+ response.on("data", function (chunk) {
+ self._destdata = true
+ self.emit("data", chunk)
+ })
+ response.on("end", function (chunk) {
+ self._ended = true
+ self.emit("end", chunk)
+ })
+ response.on("close", function () {self.emit("close")})
+
+ self.emit('response', response)
+
+ if (self.onResponse) {
+ self.onResponse(null, response)
+ }
+ if (self.callback) {
+ var buffer = []
+ var bodyLen = 0
+ self.on("data", function (chunk) {
+ buffer.push(chunk)
+ bodyLen += chunk.length
+ })
+ self.on("end", function () {
+ if (buffer.length && Buffer.isBuffer(buffer[0])) {
+ var body = new Buffer(bodyLen)
+ var i = 0
+ buffer.forEach(function (chunk) {
+ chunk.copy(body, i, 0, chunk.length)
+ i += chunk.length
+ })
+ if (self.encoding === null) {
+ response.body = body
+ } else {
+ response.body = body.toString()
+ }
+ } else if (buffer.length) {
+ response.body = buffer.join('')
+ }
+
+ if (self.json) {
+ try {
+ response.body = JSON.parse(response.body)
+ } catch (e) {}
+ }
+
+ self.callback(null, response, response.body)
+ })
+ }
+ }
+ })
+
+ if (self.timeout && !self.timeoutTimer) {
+ self.timeoutTimer = setTimeout(function() {
+ self.req.abort()
+ var e = new Error("ETIMEDOUT")
+ e.code = "ETIMEDOUT"
+ self.emit("error", e)
+ }, self.timeout)
+ }
+
+ self.req.on('error', clientErrorHandler)
+ }
+
self.once('pipe', function (src) {
if (self.ntick) throw new Error("You cannot pipe to this stream after the first nextTick() after creation of the request stream.")
self.src = src
@@ -326,8 +521,6 @@ Request.prototype.init = function (options) {
})
process.nextTick(function () {
- if (self._aborted) return
-
if (self.body) {
if (Array.isArray(self.body)) {
self.body.forEach(function(part) {
@@ -347,538 +540,47 @@ Request.prototype.init = function (options) {
self.ntick = true
})
}
-
-// Must call this when following a redirect from https to http or vice versa
-// Attempts to keep everything as identical as possible, but update the
-// httpModule, Tunneling agent, and/or Forever Agent in use.
-Request.prototype._updateProtocol = function () {
- var self = this
- var protocol = self.uri.protocol
-
- if (protocol === 'https:') {
- // previously was doing http, now doing https
- // if it's https, then we might need to tunnel now.
- if (self.proxy) {
- self.tunnel = true
- var tunnelFn = self.proxy.protocol === 'http:'
- ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
- var tunnelOptions = { proxy: { host: self.proxy.hostname
- , post: +self.proxy.port
- , proxyAuth: self.proxy.auth }
- , ca: self.ca }
- self.agent = tunnelFn(tunnelOptions)
- return
- }
-
- self.httpModule = https
- switch (self.agentClass) {
- case ForeverAgent:
- self.agentClass = ForeverAgent.SSL
- break
- case http.Agent:
- self.agentClass = https.Agent
- break
- default:
- // nothing we can do. Just hope for the best.
- return
- }
-
- // if there's an agent, we need to get a new one.
- if (self.agent) self.agent = self.getAgent()
-
- } else {
- if (log) log('previously https, now http')
- // previously was doing https, now doing http
- // stop any tunneling.
- if (self.tunnel) self.tunnel = false
- self.httpModule = http
- switch (self.agentClass) {
- case ForeverAgent.SSL:
- self.agentClass = ForeverAgent
- break
- case https.Agent:
- self.agentClass = http.Agent
- break
- default:
- // nothing we can do. just hope for the best
- return
- }
-
- // if there's an agent, then get a new one.
- if (self.agent) {
- self.agent = null
- self.agent = self.getAgent()
- }
- }
-}
-
-Request.prototype.getAgent = function () {
- var Agent = this.agentClass
- var options = {}
- if (this.agentOptions) {
- for (var i in this.agentOptions) {
- options[i] = this.agentOptions[i]
- }
- }
- if (this.ca) options.ca = this.ca
-
- var poolKey = ''
-
- // different types of agents are in different pools
- if (Agent !== this.httpModule.Agent) {
- poolKey += Agent.name
- }
-
- if (!this.httpModule.globalAgent) {
- // node 0.4.x
- options.host = this.host
- options.port = this.port
- if (poolKey) poolKey += ':'
- poolKey += this.host + ':' + this.port
- }
-
- // ca option is only relevant if proxy or destination are https
- var proxy = this.proxy
- if (typeof proxy === 'string') proxy = url.parse(proxy)
- var caRelevant = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
- if (options.ca && caRelevant) {
- if (poolKey) poolKey += ':'
- poolKey += options.ca
- }
-
- if (!poolKey && Agent === this.httpModule.Agent && this.httpModule.globalAgent) {
- // not doing anything special. Use the globalAgent
- return this.httpModule.globalAgent
- }
-
- // we're using a stored agent. Make sure it's protocol-specific
- poolKey = this.uri.protocol + poolKey
-
- // already generated an agent for this setting
- if (this.pool[poolKey]) return this.pool[poolKey]
-
- return this.pool[poolKey] = new Agent(options)
-}
-
-Request.prototype.start = function () {
- var self = this
-
- if (self._aborted) return
-
- self._started = true
- self.method = self.method || 'GET'
- self.href = self.uri.href
- if (log) log('%method %href', self)
- self.req = self.httpModule.request(self, function (response) {
- if (self._aborted) return
- if (self._paused) response.pause()
-
- self.response = response
- response.request = self
-
- if (self.httpModule === https &&
- self.strictSSL &&
- !response.client.authorized) {
- var sslErr = response.client.authorizationError
- self.emit('error', new Error('SSL Error: '+ sslErr))
- return
- }
-
- if (self.setHost) delete self.headers.host
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer);
- self.timeoutTimer = null;
- }
-
- if (response.headers['set-cookie'] && (!self._disableCookies)) {
- response.headers['set-cookie'].forEach(function(cookie) {
- if (self._jar) self._jar.add(new Cookie(cookie))
- else cookieJar.add(new Cookie(cookie))
- })
- }
-
- if (response.statusCode >= 300 && response.statusCode < 400 &&
- (self.followAllRedirects ||
- (self.followRedirect && (self.method !== 'PUT' && self.method !== 'POST' && self.method !== 'DELETE'))) &&
- response.headers.location) {
- if (self._redirectsFollowed >= self.maxRedirects) {
- self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
- return
- }
- self._redirectsFollowed += 1
-
- if (!isUrl.test(response.headers.location)) {
- response.headers.location = url.resolve(self.uri.href, response.headers.location)
- }
-
- var uriPrev = self.uri
- self.uri = url.parse(response.headers.location)
-
- // handle the case where we change protocol from https to http or vice versa
- if (self.uri.protocol !== uriPrev.protocol) {
- self._updateProtocol()
- }
-
- self.redirects.push(
- { statusCode : response.statusCode
- , redirectUri: response.headers.location
- }
- )
- self.method = 'GET'; // Force all redirects to use GET
- delete self.req
- delete self.agent
- delete self._started
- delete self.body
- if (self.headers) {
- delete self.headers.host
- }
- if (log) log('Redirect to %uri', self)
- self.init()
- return // Ignore the rest of the response
- } else {
- self._redirectsFollowed = self._redirectsFollowed || 0
- // Be a good stream and emit end when the response is finished.
- // Hack to emit end on close because of a core bug that never fires end
- response.on('close', function () {
- if (!self._ended) self.response.emit('end')
- })
-
- if (self.encoding) {
- if (self.dests.length !== 0) {
- console.error("Ingoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
- } else {
- response.setEncoding(self.encoding)
- }
- }
-
- self.dests.forEach(function (dest) {
- self.pipeDest(dest)
- })
-
- response.on("data", function (chunk) {
- self._destdata = true
- self.emit("data", chunk)
- })
- response.on("end", function (chunk) {
- self._ended = true
- self.emit("end", chunk)
- })
- response.on("close", function () {self.emit("close")})
-
- self.emit('response', response)
-
- if (self.onResponse) {
- self.onResponse(null, response)
- }
- if (self.callback) {
- var buffer = []
- var bodyLen = 0
- self.on("data", function (chunk) {
- buffer.push(chunk)
- bodyLen += chunk.length
- })
- self.on("end", function () {
- if (self._aborted) return
-
- if (buffer.length && Buffer.isBuffer(buffer[0])) {
- var body = new Buffer(bodyLen)
- var i = 0
- buffer.forEach(function (chunk) {
- chunk.copy(body, i, 0, chunk.length)
- i += chunk.length
- })
- if (self.encoding === null) {
- response.body = body
- } else {
- response.body = body.toString()
- }
- } else if (buffer.length) {
- response.body = buffer.join('')
- }
-
- if (self._json) {
- try {
- response.body = JSON.parse(response.body)
- } catch (e) {}
- }
-
- self.callback(null, response, response.body)
- })
- }
- }
- })
-
- if (self.timeout && !self.timeoutTimer) {
- self.timeoutTimer = setTimeout(function() {
- self.req.abort()
- var e = new Error("ETIMEDOUT")
- e.code = "ETIMEDOUT"
- self.emit("error", e)
- }, self.timeout)
-
- // Set additional timeout on socket - in case if remote
- // server freeze after sending headers
- if (self.req.setTimeout) { // only works on node 0.6+
- self.req.setTimeout(self.timeout, function(){
- if (self.req) {
- self.req.abort()
- var e = new Error("ESOCKETTIMEDOUT")
- e.code = "ESOCKETTIMEDOUT"
- self.emit("error", e)
- }
- })
- }
- }
-
- self.req.on('error', self.clientErrorHandler)
-
- self.emit('request', self.req)
-}
-
-Request.prototype.abort = function() {
- this._aborted = true;
-
- if (this.req) {
- this.req.abort()
- }
- else if (this.response) {
- this.response.abort()
- }
-
- this.emit("abort")
-}
-
-Request.prototype.pipeDest = function (dest) {
- var response = this.response
- // Called after the response is received
- if (dest.headers) {
- dest.headers['content-type'] = response.headers['content-type']
- if (response.headers['content-length']) {
- dest.headers['content-length'] = response.headers['content-length']
- }
- }
- if (dest.setHeader) {
- for (var i in response.headers) {
- dest.setHeader(i, response.headers[i])
- }
- dest.statusCode = response.statusCode
- }
- if (this.pipefilter) this.pipefilter(response, dest)
-}
-
-// Composable API
-Request.prototype.setHeader = function (name, value, clobber) {
- if (clobber === undefined) clobber = true
- if (clobber || !this.headers.hasOwnProperty(name)) this.headers[name] = value
- else this.headers[name] += ',' + value
- return this
-}
-Request.prototype.setHeaders = function (headers) {
- for (i in headers) {this.setHeader(i, headers[i])}
- return this
-}
-Request.prototype.qs = function (q, clobber) {
- var base
- if (!clobber && this.uri.query) base = qs.parse(this.uri.query)
- else base = {}
-
- for (var i in q) {
- base[i] = q[i]
- }
-
- this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base))
- this.url = this.uri
-
- return this
-}
-Request.prototype.form = function (form) {
- this.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8'
- this.body = qs.stringify(form).toString('utf8')
- return this
-}
-Request.prototype.multipart = function (multipart) {
- var self = this
- self.body = []
-
- if (!self.headers['content-type']) {
- self.headers['content-type'] = 'multipart/related;boundary="frontier"';
- } else {
- self.headers['content-type'] = self.headers['content-type'].split(';')[0] + ';boundary="frontier"';
- }
-
- if (!multipart.forEach) throw new Error('Argument error, options.multipart.')
-
- multipart.forEach(function (part) {
- var body = part.body
- if(!body) throw Error('Body attribute missing in multipart.')
- delete part.body
- var preamble = '--frontier\r\n'
- Object.keys(part).forEach(function(key){
- preamble += key + ': ' + part[key] + '\r\n'
- })
- preamble += '\r\n'
- self.body.push(new Buffer(preamble))
- self.body.push(new Buffer(body))
- self.body.push(new Buffer('\r\n'))
- })
- self.body.push(new Buffer('--frontier--'))
- return self
-}
-Request.prototype.json = function (val) {
- this.setHeader('content-type', 'application/json')
- this.setHeader('accept', 'application/json')
- this._json = true
- if (typeof val === 'boolean') {
- if (typeof this.body === 'object') this.body = JSON.stringify(this.body)
- } else {
- this.body = JSON.stringify(val)
- }
- return this
-}
-Request.prototype.oauth = function (_oauth) {
- var form
- if (this.headers['content-type'] &&
- this.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) ===
- 'application/x-www-form-urlencoded'
- ) {
- form = qs.parse(this.body)
- }
- if (this.uri.query) {
- form = qs.parse(this.uri.query)
- }
- if (!form) form = {}
- var oa = {}
- for (var i in form) oa[i] = form[i]
- for (var i in _oauth) oa['oauth_'+i] = _oauth[i]
- if (!oa.oauth_version) oa.oauth_version = '1.0'
- if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( (new Date()).getTime() / 1000 ).toString()
- if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
-
- oa.oauth_signature_method = 'HMAC-SHA1'
-
- var consumer_secret = oa.oauth_consumer_secret
- delete oa.oauth_consumer_secret
- var token_secret = oa.oauth_token_secret
- delete oa.oauth_token_secret
-
- var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname
- var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret)
-
- // oa.oauth_signature = signature
- for (var i in form) {
- if ( i.slice(0, 'oauth_') in _oauth) {
- // skip
- } else {
- delete oa['oauth_'+i]
- }
- }
- this.headers.authorization =
- 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
- this.headers.authorization += ',oauth_signature="'+oauth.rfc3986(signature)+'"'
- return this
-}
-Request.prototype.jar = function (jar) {
- var cookies
-
- if (this._redirectsFollowed === 0) {
- this.originalCookieHeader = this.headers.cookie
- }
-
- if (jar === false) {
- // disable cookies
- cookies = false;
- this._disableCookies = true;
- } else if (jar) {
- // fetch cookie from the user defined cookie jar
- cookies = jar.get({ url: this.uri.href })
- } else {
- // fetch cookie from the global cookie jar
- cookies = cookieJar.get({ url: this.uri.href })
- }
-
- if (cookies && cookies.length) {
- var cookieString = cookies.map(function (c) {
- return c.name + "=" + c.value
- }).join("; ")
-
- if (this.originalCookieHeader) {
- // Don't overwrite existing Cookie header
- this.headers.cookie = this.originalCookieHeader + '; ' + cookieString
- } else {
- this.headers.cookie = cookieString
- }
- }
- this._jar = jar
- return this
-}
-
-
-// Stream API
-Request.prototype.pipe = function (dest, opts) {
+Request.prototype.pipe = function (dest) {
if (this.response) {
if (this._destdata) {
throw new Error("You cannot pipe after data has been emitted from the response.")
} else if (this._ended) {
throw new Error("You cannot pipe after the response has been ended.")
} else {
- stream.Stream.prototype.pipe.call(this, dest, opts)
+ stream.Stream.prototype.pipe.call(this, dest)
this.pipeDest(dest)
return dest
}
} else {
this.dests.push(dest)
- stream.Stream.prototype.pipe.call(this, dest, opts)
+ stream.Stream.prototype.pipe.call(this, dest)
return dest
}
}
Request.prototype.write = function () {
if (!this._started) this.start()
+ if (!this.req) throw new Error("This request has been piped before http.request() was called.")
this.req.write.apply(this.req, arguments)
}
-Request.prototype.end = function (chunk) {
- if (chunk) this.write(chunk)
+Request.prototype.end = function () {
if (!this._started) this.start()
- this.req.end()
+ if (!this.req) throw new Error("This request has been piped before http.request() was called.")
+ this.req.end.apply(this.req, arguments)
}
Request.prototype.pause = function () {
- if (!this.response) this._paused = true
- else this.response.pause.apply(this.response, arguments)
+ if (!this.response) throw new Error("This request has been piped before http.request() was called.")
+ this.response.pause.apply(this.response, arguments)
}
Request.prototype.resume = function () {
- if (!this.response) this._paused = false
- else this.response.resume.apply(this.response, arguments)
-}
-Request.prototype.destroy = function () {
- if (!this._ended) this.end()
+ if (!this.response) throw new Error("This request has been piped before http.request() was called.")
+ this.response.resume.apply(this.response, arguments)
}
-// organize params for post, put, head, del
-function initParams(uri, options, callback) {
- if ((typeof options === 'function') && !callback) callback = options;
- if (typeof options === 'object') {
- options.uri = uri;
- } else if (typeof uri === 'string') {
- options = {uri:uri};
- } else {
- options = uri;
- uri = options.uri;
- }
- return { uri: uri, options: options, callback: callback };
-}
-
-function request (uri, options, callback) {
- if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.')
- if ((typeof options === 'function') && !callback) callback = options;
- if (typeof options === 'object') {
- options.uri = uri;
- } else if (typeof uri === 'string') {
- options = {uri:uri};
- } else {
- options = uri;
- }
-
- if (callback) options.callback = callback;
+function request (options, callback) {
+ if (typeof options === 'string') options = {uri:options}
+ if (callback) options.callback = callback
var r = new Request(options)
+ r.request()
return r
}
@@ -886,12 +588,12 @@ module.exports = request
request.defaults = function (options) {
var def = function (method) {
- var d = function (uri, opts, callback) {
- var params = initParams(uri, opts, callback);
+ var d = function (opts, callback) {
+ if (typeof opts === 'string') opts = {uri:opts}
for (var i in options) {
- if (params.options[i] === undefined) params.options[i] = options[i]
+ if (opts[i] === undefined) opts[i] = options[i]
}
- return method(params.uri, params.options, params.callback)
+ return method(opts, callback)
}
return d
}
@@ -908,48 +610,43 @@ request.defaults = function (options) {
request.forever = function (agentOptions, optionsArg) {
var options = {}
- if (optionsArg) {
+ if (agentOptions) {
for (option in optionsArg) {
options[option] = optionsArg[option]
}
}
- if (agentOptions) options.agentOptions = agentOptions
- options.forever = true
+ options.agent = new ForeverAgent(agentOptions)
return request.defaults(options)
}
request.get = request
-request.post = function (uri, options, callback) {
- var params = initParams(uri, options, callback);
- params.options.method = 'POST';
- return request(params.uri || null, params.options, params.callback)
-}
-request.put = function (uri, options, callback) {
- var params = initParams(uri, options, callback);
- params.options.method = 'PUT'
- return request(params.uri || null, params.options, params.callback)
-}
-request.head = function (uri, options, callback) {
- var params = initParams(uri, options, callback);
- params.options.method = 'HEAD'
- if (params.options.body ||
- params.options.requestBodyStream ||
- (params.options.json && typeof params.options.json !== 'boolean') ||
- params.options.multipart) {
+request.post = function (options, callback) {
+ if (typeof options === 'string') options = {uri:options}
+ options.method = 'POST'
+ return request(options, callback)
+}
+request.put = function (options, callback) {
+ if (typeof options === 'string') options = {uri:options}
+ options.method = 'PUT'
+ return request(options, callback)
+}
+request.head = function (options, callback) {
+ if (typeof options === 'string') options = {uri:options}
+ options.method = 'HEAD'
+ if (options.body || options.requestBodyStream || options.json || options.multipart) {
throw new Error("HTTP HEAD requests MUST NOT include a request body.")
}
- return request(params.uri || null, params.options, params.callback)
+ return request(options, callback)
}
-request.del = function (uri, options, callback) {
- var params = initParams(uri, options, callback);
- params.options.method = 'DELETE'
- return request(params.uri || null, params.options, params.callback)
+request.del = function (options, callback) {
+ if (typeof options === 'string') options = {uri:options}
+ options.method = 'DELETE'
+ return request(options, callback)
}
request.jar = function () {
return new CookieJar
}
request.cookie = function (str) {
- if (str && str.uri) str = str.uri
if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
return new Cookie(str)
}
diff --git a/deps/npm/node_modules/request/mimetypes.js b/deps/npm/node_modules/request/mimetypes.js
index 59b21b419c..86910064c9 100644
--- a/deps/npm/node_modules/request/mimetypes.js
+++ b/deps/npm/node_modules/request/mimetypes.js
@@ -1,6 +1,5 @@
// from http://github.com/felixge/node-paperboy
exports.types = {
- "3gp":"video/3gpp",
"aiff":"audio/x-aiff",
"arj":"application/x-arj-compressed",
"asf":"video/x-ms-asf",
@@ -51,21 +50,17 @@ exports.types = {
"lzh":"application/octet-stream",
"m":"text/plain",
"m3u":"audio/x-mpegurl",
- "m4v":"video/mp4",
"man":"application/x-troff-man",
"me":"application/x-troff-me",
"midi":"audio/midi",
"mif":"application/x-mif",
"mime":"www/mime",
- "mkv":" video/x-matrosk",
"movie":"video/x-sgi-movie",
+ "mustache":"text/plain",
"mp4":"video/mp4",
- "mp41":"video/mp4",
- "mp42":"video/mp4",
"mpg":"video/mpeg",
"mpga":"audio/mpeg",
"ms":"application/x-troff-ms",
- "mustache":"text/plain",
"nc":"application/x-netcdf",
"oda":"application/oda",
"ogm":"application/ogg",
@@ -128,7 +123,6 @@ exports.types = {
"vrm":"x-world/x-vrml",
"wav":"audio/x-wav",
"wax":"audio/x-ms-wax",
- "webm":"video/webm",
"wma":"audio/x-ms-wma",
"wmv":"video/x-ms-wmv",
"wmx":"video/x-ms-wmx",
@@ -140,7 +134,7 @@ exports.types = {
"xpm":"image/x-xpixmap",
"xwd":"image/x-xwindowdump",
"xyz":"chemical/x-pdb",
- "zip":"application/zip"
+ "zip":"application/zip",
};
exports.lookup = function(ext, defaultType) {
diff --git a/deps/npm/node_modules/request/oauth.js b/deps/npm/node_modules/request/oauth.js
index 31b9dc65fe..25db669775 100644
--- a/deps/npm/node_modules/request/oauth.js
+++ b/deps/npm/node_modules/request/oauth.js
@@ -19,7 +19,7 @@ function rfc3986 (str) {
function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret, body) {
// adapted from https://dev.twitter.com/docs/auth/oauth
var base =
- (httpMethod || 'GET') + "&" +
+ httpMethod + "&" +
encodeURIComponent( base_uri ) + "&" +
Object.keys(params).sort().map(function (i) {
// big WTF here with the escape + encoding but it's what twitter wants
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index 0e6ddc5d85..e7b899a8b1 100644
--- a/deps/npm/node_modules/request/package.json
+++ b/deps/npm/node_modules/request/package.json
@@ -1,45 +1,15 @@
-{
- "name": "request",
- "description": "Simplified HTTP request client.",
- "tags": [
- "http",
- "simple",
- "util",
- "utility"
- ],
- "version": "2.9.153",
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/mikeal/request.git"
- },
- "bugs": {
- "url": "http://github.com/mikeal/request/issues"
- },
- "engines": [
- "node >= 0.3.6"
- ],
- "main": "./main",
- "scripts": {
- "test": "node tests/run.js"
- },
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "request@2.9.153",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.8",
- "_nodeVersion": "v0.6.12",
- "_defaultsLoaded": true,
- "dist": {
- "shasum": "6f07c2ba3acfbe0cfe941f43647102740f05ff73"
- },
- "_from": "../request"
+{ "name" : "request"
+, "description" : "Simplified HTTP request client."
+, "tags" : ["http", "simple", "util", "utility"]
+, "version" : "2.9.3"
+, "author" : "Mikeal Rogers <mikeal.rogers@gmail.com>"
+, "repository" :
+ { "type" : "git"
+ , "url" : "http://github.com/mikeal/request.git"
+ }
+, "bugs" :
+ { "url" : "http://github.com/mikeal/request/issues" }
+, "engines" : ["node >= 0.3.6"]
+, "main" : "./main"
+, "scripts": { "test": "bash tests/run.sh" }
}
diff --git a/deps/npm/node_modules/request/vendor/cookie/index.js b/deps/npm/node_modules/request/vendor/cookie/index.js
index ff44b3e629..1eb2eaa220 100644
--- a/deps/npm/node_modules/request/vendor/cookie/index.js
+++ b/deps/npm/node_modules/request/vendor/cookie/index.js
@@ -21,27 +21,22 @@ var url = require('url');
var Cookie = exports = module.exports = function Cookie(str, req) {
this.str = str;
+ // First key is the name
+ this.name = str.substr(0, str.indexOf('=')).trim();
+
// Map the key/val pairs
str.split(/ *; */).reduce(function(obj, pair){
var p = pair.indexOf('=');
- var key = p > 0 ? pair.substring(0, p).trim() : pair.trim();
- var lowerCasedKey = key.toLowerCase();
- var value = p > 0 ? pair.substring(p + 1).trim() : true;
-
- if (!obj.name) {
- // First key is the name
- obj.name = key;
- obj.value = value;
- }
- else if (lowerCasedKey === 'httponly') {
- obj.httpOnly = value;
- }
- else {
- obj[lowerCasedKey] = value;
- }
+ if(p > 0)
+ obj[pair.substring(0, p).trim()] = pair.substring(p + 1).trim();
+ else
+ obj[pair.trim()] = true;
return obj;
}, this);
+ // Assign value
+ this.value = this[this.name];
+
// Expires
this.expires = this.expires
? new Date(this.expires)
diff --git a/deps/npm/node_modules/rimraf/AUTHORS b/deps/npm/node_modules/rimraf/AUTHORS
index 247b754373..008cbe7dd9 100644
--- a/deps/npm/node_modules/rimraf/AUTHORS
+++ b/deps/npm/node_modules/rimraf/AUTHORS
@@ -3,4 +3,3 @@ Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)
Wayne Larsen <wayne@larsen.st> (http://github.com/wvl)
ritch <skawful@gmail.com>
Marcel Laverdet
-Yosef Dinerstein <yosefd@microsoft.com>
diff --git a/deps/npm/node_modules/rimraf/README.md b/deps/npm/node_modules/rimraf/README.md
index 96ce9b2a0b..99983dc437 100644
--- a/deps/npm/node_modules/rimraf/README.md
+++ b/deps/npm/node_modules/rimraf/README.md
@@ -4,7 +4,7 @@ Install with `npm install rimraf`, or just drop rimraf.js somewhere.
## API
-`rimraf(f, callback)`
+`rimraf(f, [options,] callback)`
The callback will be called with an error if there is one. Certain
errors are handled for you:
@@ -14,6 +14,17 @@ errors are handled for you:
* `EMFILE` - If too many file descriptors get opened, rimraf will
patiently wait until more become available.
+## Options
+
+The options object is optional. These fields are respected:
+
+* `maxBusyTries` - The number of times to retry a file or folder in the
+ event of an `EBUSY` error. The default is 3.
+* `gently` - If provided a `gently` path, then rimraf will only delete
+ files and folders that are beneath this path, and only delete symbolic
+ links that point to a place within this path. (This is very important
+ to npm's use-case, and shows rimraf's pedigree.)
+
## rimraf.sync
diff --git a/deps/npm/node_modules/rimraf/fiber.js b/deps/npm/node_modules/rimraf/fiber.js
new file mode 100644
index 0000000000..8812a6b449
--- /dev/null
+++ b/deps/npm/node_modules/rimraf/fiber.js
@@ -0,0 +1,86 @@
+// fiber/future port originally written by Marcel Laverdet
+// https://gist.github.com/1131093
+// I updated it to bring to feature parity with cb version.
+// The bugs are probably mine, not Marcel's.
+// -- isaacs
+
+var path = require('path')
+ , fs = require('fs')
+ , Future = require('fibers/future')
+
+// Create future-returning fs functions
+var fs2 = {}
+for (var ii in fs) {
+ fs2[ii] = Future.wrap(fs[ii])
+}
+
+// Return a future which just pauses for a certain amount of time
+
+function timer (ms) {
+ var future = new Future
+ setTimeout(function () {
+ future.return()
+ }, ms)
+ return future
+}
+
+function realish (p) {
+ return path.resolve(path.dirname(fs2.readlink(p)))
+}
+
+// for EMFILE backoff.
+var timeout = 0
+ , EMFILE_MAX = 1000
+
+function rimraf_ (p, opts) {
+ opts = opts || {}
+ opts.maxBusyTries = opts.maxBusyTries || 3
+ if (opts.gently) opts.gently = path.resolve(opts.gently)
+ var busyTries = 0
+
+ // exits by throwing or returning.
+ // loops on handled errors.
+ while (true) {
+ try {
+ var stat = fs2.lstat(p).wait()
+
+ // check to make sure that symlinks are ours.
+ if (opts.gently) {
+ var rp = stat.isSymbolicLink() ? realish(p) : path.resolve(p)
+ if (rp.indexOf(opts.gently) !== 0) {
+ var er = new Error("Refusing to delete: "+p+" not in "+opts.gently)
+ er.errno = require("constants").EEXIST
+ er.code = "EEXIST"
+ er.path = p
+ throw er
+ }
+ }
+
+ if (!stat.isDirectory()) return fs2.unlink(p).wait()
+
+ var rimrafs = fs2.readdir(p).wait().map(function (file) {
+ return rimraf(path.join(p, file), opts)
+ })
+
+ Future.wait(rimrafs)
+ fs2.rmdir(p).wait()
+ timeout = 0
+ return
+
+ } catch (er) {
+ if (er.message.match(/^EMFILE/) && timeout < EMFILE_MAX) {
+ timer(timeout++).wait()
+ } else if (er.message.match(/^EBUSY/)
+ && busyTries < opt.maxBusyTries) {
+ timer(++busyTries * 100).wait()
+ } else if (er.message.match(/^ENOENT/)) {
+ // already gone
+ return
+ } else {
+ throw er
+ }
+ }
+ }
+}
+
+var rimraf = module.exports = rimraf_.future()
diff --git a/deps/npm/node_modules/rimraf/package.json b/deps/npm/node_modules/rimraf/package.json
index 952bc8af9f..2b69536ef9 100644
--- a/deps/npm/node_modules/rimraf/package.json
+++ b/deps/npm/node_modules/rimraf/package.json
@@ -1,10 +1,9 @@
{"name":"rimraf"
-,"version":"2.0.1"
+,"version":"1.0.9"
,"main":"rimraf.js"
,"description":"A deep deletion module for node (like `rm -rf`)"
,"author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
,"license":
{"type":"MIT", "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE"}
-,"optionalDependencies":{"graceful-fs":"~1.1"}
,"repository":"git://github.com/isaacs/rimraf.git"
,"scripts":{"test":"cd test && bash run.sh"}}
diff --git a/deps/npm/node_modules/rimraf/rimraf.js b/deps/npm/node_modules/rimraf/rimraf.js
index 67d018ab4a..e8104e9e4b 100644
--- a/deps/npm/node_modules/rimraf/rimraf.js
+++ b/deps/npm/node_modules/rimraf/rimraf.js
@@ -16,30 +16,34 @@ var lstat = process.platform === "win32" ? "stat" : "lstat"
// for EMFILE handling
var timeout = 0
-exports.EMFILE_MAX = 1000
-exports.BUSYTRIES_MAX = 3
+ , EMFILE_MAX = 1000
-function rimraf (p, cb) {
+function rimraf (p, opts, cb) {
+ if (typeof opts === "function") cb = opts, opts = {}
if (!cb) throw new Error("No callback passed to rimraf()")
+ if (!opts) opts = {}
var busyTries = 0
+ opts.maxBusyTries = opts.maxBusyTries || 3
- rimraf_(p, function CB (er) {
+ if (opts.gently) opts.gently = path.resolve(opts.gently)
+
+ rimraf_(p, opts, function CB (er) {
if (er) {
- if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) {
- var time = (exports.BUSYTRIES_MAX - busyTries) * 100
+ if (er.code === "EBUSY" && busyTries < opts.maxBusyTries) {
+ var time = (opts.maxBusyTries - busyTries) * 100
busyTries ++
// try again, with the same exact callback as this one.
return setTimeout(function () {
- rimraf_(p, CB)
+ rimraf_(p, opts, CB)
})
}
// this one won't happen if graceful-fs is used.
- if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) {
+ if (er.code === "EMFILE" && timeout < EMFILE_MAX) {
return setTimeout(function () {
- rimraf_(p, CB)
+ rimraf_(p, opts, CB)
}, timeout ++)
}
@@ -52,8 +56,9 @@ function rimraf (p, cb) {
})
}
-function rimraf_ (p, cb) {
+function rimraf_ (p, opts, cb) {
fs[lstat](p, function (er, s) {
+ // if the stat fails, then assume it's already gone.
if (er) {
// already gone
if (er.code === "ENOENT") return cb()
@@ -61,55 +66,20 @@ function rimraf_ (p, cb) {
return cb(er)
}
- return rm_(p, s, false, cb)
+ // don't delete that don't point actually live in the "gently" path
+ if (opts.gently) return clobberTest(p, s, opts, cb)
+ return rm_(p, s, opts, cb)
})
}
-
-var myGid = function myGid () {
- var g = process.getuid && process.getgid()
- myGid = function myGid () { return g }
- return g
-}
-
-var myUid = function myUid () {
- var u = process.getuid && process.getuid()
- myUid = function myUid () { return u }
- return u
-}
-
-
-function writable (s) {
- var mode = s.mode || 0777
- , uid = myUid()
- , gid = myGid()
- return (mode & 0002)
- || (gid === s.gid && (mode & 0020))
- || (uid === s.uid && (mode & 0200))
-}
-
-function rm_ (p, s, didWritableCheck, cb) {
- if (!didWritableCheck && !writable(s)) {
- // make file writable
- // user/group/world, doesn't matter at this point
- // since it's about to get nuked.
- return fs.chmod(p, s.mode | 0222, function (er) {
- if (er) return cb(er)
- rm_(p, s, true, cb)
- })
- }
-
- if (!s.isDirectory()) {
- return fs.unlink(p, cb)
- }
-
- // directory
+function rm_ (p, s, opts, cb) {
+ if (!s.isDirectory()) return fs.unlink(p, cb)
fs.readdir(p, function (er, files) {
if (er) return cb(er)
asyncForEach(files.map(function (f) {
return path.join(p, f)
}), function (file, cb) {
- rimraf(file, cb)
+ rimraf(file, opts, cb)
}, function (er) {
if (er) return cb(er)
fs.rmdir(p, cb)
@@ -117,6 +87,34 @@ function rm_ (p, s, didWritableCheck, cb) {
})
}
+function clobberTest (p, s, opts, cb) {
+ var gently = opts.gently
+ if (!s.isSymbolicLink()) next(null, path.resolve(p))
+ else realish(p, next)
+
+ function next (er, rp) {
+ if (er) return rm_(p, s, cb)
+ if (rp.indexOf(gently) !== 0) return clobberFail(p, gently, cb)
+ else return rm_(p, s, opts, cb)
+ }
+}
+
+function realish (p, cb) {
+ fs.readlink(p, function (er, r) {
+ if (er) return cb(er)
+ return cb(null, path.resolve(path.dirname(p), r))
+ })
+}
+
+function clobberFail (p, g, cb) {
+ var er = new Error("Refusing to delete: "+p+" not in "+g)
+ , constants = require("constants")
+ er.errno = constants.EEXIST
+ er.code = "EEXIST"
+ er.path = p
+ return cb(er)
+}
+
function asyncForEach (list, fn, cb) {
if (!list.length) cb()
var c = list.length
@@ -139,13 +137,7 @@ function rimrafSync (p) {
if (er.code === "ENOENT") return
throw er
}
-
- if (!writable(s)) {
- fs.chmodSync(p, s.mode | 0222)
- }
-
if (!s.isDirectory()) return fs.unlinkSync(p)
-
fs.readdirSync(p).forEach(function (f) {
rimrafSync(path.join(p, f))
})
diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js
index c34a81e21f..e45974c723 100644
--- a/deps/npm/node_modules/tar/lib/extract.js
+++ b/deps/npm/node_modules/tar/lib/extract.js
@@ -24,10 +24,6 @@ function Extract (opts) {
opts.type = "Directory"
opts.Directory = true
- // similar to --strip or --strip-components
- opts.strip = +opts.strip
- if (!opts.strip || opts.strip <= 0) opts.strip = 0
-
this._fst = fstream.Writer(opts)
this.pause()
@@ -37,16 +33,6 @@ function Extract (opts) {
// of the tarball. So, they need to be resolved against
// the target directory in order to be created properly.
me.on("entry", function (entry) {
- // if there's a "strip" argument, then strip off that many
- // path components.
- if (opts.strip) {
- var p = entry.path.split("/").slice(opts.strip).join("/")
- entry.path = entry.props.path = p
- if (entry.linkpath) {
- var lp = entry.linkpath.split("/").slice(opts.strip).join("/")
- entry.linkpath = entry.props.linkpath = lp
- }
- }
if (entry.type !== "Link") return
entry.linkpath = entry.props.linkpath =
path.join(opts.path, path.join("/", entry.props.linkpath))
diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json
index 849d0d6918..aa53022c64 100644
--- a/deps/npm/node_modules/tar/package.json
+++ b/deps/npm/node_modules/tar/package.json
@@ -1,12 +1,8 @@
{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "tar",
"description": "tar for node",
- "version": "0.1.13",
+ "version": "0.1.12",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
@@ -26,19 +22,5 @@
"devDependencies": {
"tap": "0.x",
"rimraf": "1.x"
- },
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "tar@0.1.13",
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.4",
- "_nodeVersion": "v0.7.6-pre",
- "_defaultsLoaded": true,
- "dist": {
- "shasum": "804bdaaacaab928ec1c9bbd8b848a042c3adacb2"
- },
- "_from": "tar@0.1.13"
+ }
}
diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json
index c45dafee92..02990697f7 100644
--- a/deps/npm/node_modules/which/package.json
+++ b/deps/npm/node_modules/which/package.json
@@ -1,34 +1,17 @@
{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "which",
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
- "version": "1.0.5",
+ "version": "1.0.2",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-which.git"
},
"main": "which.js",
- "bin": {
- "which": "./bin/which"
- },
+ "bin": "./bin/which",
"engines": {
"node": "*"
},
"dependencies": {},
- "devDependencies": {},
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "which@1.0.5",
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.2",
- "_nodeVersion": "v0.7.6-pre",
- "_defaultsLoaded": true,
- "_from": "which@1"
+ "devDependencies": {}
}
diff --git a/deps/npm/node_modules/which/which.js b/deps/npm/node_modules/which/which.js
index db7e8f74dc..b124ead672 100644
--- a/deps/npm/node_modules/which/which.js
+++ b/deps/npm/node_modules/which/which.js
@@ -4,7 +4,6 @@ which.sync = whichSync
var path = require("path")
, fs
, COLON = process.platform === "win32" ? ";" : ":"
- , isExe
try {
fs = require("graceful-fs")
@@ -12,31 +11,24 @@ try {
fs = require("fs")
}
-if (process.platform == "win32") {
- // 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 & 0100) && process.getuid && uid === process.getuid()
- //console.error("isExe?", ret)
- return ret
- }
-}
-
-
+// console.log(process.execPath)
+// console.log(process.argv)
+function isExe (mod, uid, gid) {
+ //console.error("isExe?", (mod & 0111).toString(8))
+ var ret = (mod & 0001)
+ || (mod & 0010) && process.getgid && gid === process.getgid()
+ || (mod & 0100) && process.getuid && uid === process.getuid()
+ //console.error("isExe?", ret)
+ return ret
+}
function which (cmd, cb) {
- if (isAbsolute(cmd)) return cb(null, cmd)
+ if (cmd.charAt(0) === "/") 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("")
}
//console.error("pathEnv", pathEnv)
;(function F (i, l) {
@@ -60,45 +52,16 @@ function which (cmd, cb) {
})(0, pathEnv.length)
}
+
function whichSync (cmd) {
- if (isAbsolute(cmd)) return cmd
+ if (cmd.charAt(0) === "/") 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("")
- }
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
- }
+ if (p === process.execPath) return p
+ var stat
+ try { stat = fs.statSync(p) } catch (ex) {}
+ if (stat && isExe(stat.mode, stat.uid, stat.gid)) return p
}
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 === ""
-}
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 87be4559dc..55a2adf4c9 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -10,7 +10,7 @@
"install",
"package.json"
],
- "version": "1.1.18",
+ "version": "1.1.0-2",
"preferGlobal": true,
"config": {
"publishtest": false
@@ -39,25 +39,21 @@
"slide": "1",
"abbrev": "1",
"graceful-fs": "~1.1.1",
- "minimatch": "~0.2",
+ "minimatch": "0",
"nopt": "1",
"node-uuid": "~1.3",
"proto-list": "1",
- "rimraf": "2",
+ "rimraf": "1",
"request": "~2.9",
"which": "1",
"tar": "~0.1.12",
- "fstream": "~0.1.17",
+ "fstream": "~0.1.5",
"block-stream": "*",
"inherits": "1",
- "mkdirp": "0.3",
+ "mkdirp": "0.1",
+ "fast-list": "~1.0.1",
"read": "0",
- "lru-cache": "1",
- "node-gyp": "~0.4.1",
- "fstream-npm": "0 >=0.0.5",
- "uid-number": "0",
- "archy": "0",
- "chownr": "0"
+ "lru-cache": "1"
},
"bundleDependencies": [
"slide",
@@ -77,13 +73,9 @@
"block-stream",
"inherits",
"mkdirp",
+ "fast-list",
"read",
- "lru-cache",
- "node-gyp",
- "fstream-npm",
- "uid-number",
- "archy",
- "chownr"
+ "lru-cache"
],
"devDependencies": {
"ronn": "https://github.com/isaacs/ronnjs/tarball/master"
diff --git a/deps/npm/scripts/index-build.js b/deps/npm/scripts/index-build.js
index 551bb1d563..b3c19a03a1 100755
--- a/deps/npm/scripts/index-build.js
+++ b/deps/npm/scripts/index-build.js
@@ -12,7 +12,6 @@ fs.readdir(api, done("api"))
function done (which) { return function (er, docs) {
if (er) throw er
- docs.sort()
if (which === "api") apidocs = docs
else clidocs = docs
diff --git a/deps/npm/test/packages/npm-test-env-reader/package.json b/deps/npm/test/packages/npm-test-env-reader/package.json
index 99d7fc9307..ddd5c91abd 100644
--- a/deps/npm/test/packages/npm-test-env-reader/package.json
+++ b/deps/npm/test/packages/npm-test-env-reader/package.json
@@ -1,14 +1,14 @@
{ "name":"npm-test-env-reader"
, "version" : "1.2.3"
, "scripts" :
- { "install" : "node test.js"
- , "preinstall" : "node test.js"
- , "preuninstall" : "node test.js"
- , "postuninstall" : "node test.js"
- , "test" : "node test.js"
- , "stop" : "node test.js"
- , "start" : "node test.js"
- , "restart" : "node test.js"
- , "foo" : "node test.js"
+ { "install" : "./test.sh"
+ , "preinstall" : "./test.sh"
+ , "preuninstall" : "./test.sh"
+ , "postuninstall" : "./test.sh"
+ , "test" : "./test.sh"
+ , "stop" : "./test.sh"
+ , "start" : "./test.sh"
+ , "restart" : "./test.sh"
+ , "foo" : "./test.sh"
}
}
diff --git a/deps/npm/test/packages/npm-test-env-reader/test.sh b/deps/npm/test/packages/npm-test-env-reader/test.sh
new file mode 100755
index 0000000000..b4ca4374ed
--- /dev/null
+++ b/deps/npm/test/packages/npm-test-env-reader/test.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+env | grep npm | sort | uniq
+echo PATH=$PATH
diff --git a/deps/npm/test/packages/npm-test-files/package.json b/deps/npm/test/packages/npm-test-files/package.json
index 2afa12dc56..7c067828e2 100644
--- a/deps/npm/test/packages/npm-test-files/package.json
+++ b/deps/npm/test/packages/npm-test-files/package.json
@@ -5,6 +5,5 @@
, "sub/include"
, "sub/include2"
, "sub/include4"
- , "test.sh"
- , ".npmignore" ]
+ , "test.sh" ]
, "scripts":{"test":"bash test.sh"}}
diff --git a/deps/npm/test/packages/npm-test-optional-deps/package.json b/deps/npm/test/packages/npm-test-optional-deps/package.json
index 56c6f09ed0..ebcd56832d 100644
--- a/deps/npm/test/packages/npm-test-optional-deps/package.json
+++ b/deps/npm/test/packages/npm-test-optional-deps/package.json
@@ -1,12 +1,10 @@
{ "name": "npm-test-optional-deps"
, "version": "1.2.5"
-, "scripts": { "test": "node test.js" }
, "optionalDependencies":
{ "npm-test-foobarzaaakakaka": "http://example.com/"
, "dnode": "10.999.14234"
- , "sax": "0.3.5"
+ , "sax": "*"
, "999 invalid name": "1.2.3"
, "glob": "some invalid version 99 #! $$ x y z"
- , "npm-test-failer":"*"
}
}
diff --git a/deps/uv/src/unix/error.c b/deps/uv/src/unix/error.c
index aaeaf76e4f..c2651a3a9e 100644
--- a/deps/uv/src/unix/error.c
+++ b/deps/uv/src/unix/error.c
@@ -59,6 +59,7 @@ void uv_fatal_error(const int errorno, const char* syscall) {
uv_err_code uv_translate_sys_error(int sys_errno) {
switch (sys_errno) {
case 0: return UV_OK;
+ case EIO: return UV_EIO;
case EPERM: return UV_EPERM;
case ENOSYS: return UV_ENOSYS;
case ENOTSOCK: return UV_ENOTSOCK;
diff --git a/deps/uv/src/win/error.c b/deps/uv/src/win/error.c
index 499abe3ead..294041264c 100644
--- a/deps/uv/src/win/error.c
+++ b/deps/uv/src/win/error.c
@@ -67,6 +67,21 @@ void uv_fatal_error(const int errorno, const char* syscall) {
uv_err_code uv_translate_sys_error(int sys_errno) {
switch (sys_errno) {
case ERROR_SUCCESS: return UV_OK;
+ case ERROR_BEGINNING_OF_MEDIA: return UV_EIO;
+ case ERROR_BUS_RESET: return UV_EIO;
+ case ERROR_CRC: return UV_EIO;
+ case ERROR_DEVICE_DOOR_OPEN: return UV_EIO;
+ case ERROR_DEVICE_REQUIRES_CLEANING: return UV_EIO;
+ case ERROR_DISK_CORRUPT: return UV_EIO;
+ case ERROR_EOM_OVERFLOW: return UV_EIO;
+ case ERROR_FILEMARK_DETECTED: return UV_EIO;
+ case ERROR_INVALID_BLOCK_LENGTH: return UV_EIO;
+ case ERROR_IO_DEVICE: return UV_EIO;
+ case ERROR_NO_DATA_DETECTED: return UV_EIO;
+ case ERROR_NO_SIGNAL_SENT: return UV_EIO;
+ case ERROR_OPEN_FAILED: return UV_EIO;
+ case ERROR_SETMARK_DETECTED: return UV_EIO;
+ case ERROR_SIGNAL_REFUSED: return UV_EIO;
case ERROR_FILE_NOT_FOUND: return UV_ENOENT;
case ERROR_INVALID_NAME: return UV_ENOENT;
case ERROR_MOD_NOT_FOUND: return UV_ENOENT;
@@ -129,6 +144,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case WSAETIMEDOUT: return UV_ETIMEDOUT;
case WSAHOST_NOT_FOUND: return UV_ENOENT;
case WSAENOTSOCK: return UV_ENOTSOCK;
+ case ERROR_NOT_SAME_DEVICE: return UV_EXDEV;
default: return UV_UNKNOWN;
}
}
diff --git a/deps/v8/test/mjsunit/regexp-capture-3.js b/deps/v8/test/mjsunit/regexp-capture-3.js
new file mode 100644
index 0000000000..50e423ff30
--- /dev/null
+++ b/deps/v8/test/mjsunit/regexp-capture-3.js
@@ -0,0 +1,30 @@
+// Copyright 2012 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
+// OWNER 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.
+
+"abcd".replace(/b/g, function() { });
+
+assertEquals("cd", RegExp.rightContext);