From 054127112ce335ceb4477a481e99e3fb2176b457 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 2 Mar 2012 09:31:24 -0800 Subject: Upgrade npm to 1.1.3 * 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) --- deps/npm/AUTHORS | 5 + deps/npm/Makefile | 2 +- deps/npm/doc/cli/changelog.md | 44 ++++ deps/npm/doc/cli/coding-style.md | 4 +- deps/npm/doc/cli/developers.md | 11 + deps/npm/doc/cli/json.md | 13 ++ deps/npm/doc/cli/scripts.md | 14 ++ deps/npm/html/api/bin.html | 2 +- deps/npm/html/api/bugs.html | 2 +- deps/npm/html/api/commands.html | 2 +- deps/npm/html/api/config.html | 2 +- deps/npm/html/api/deprecate.html | 2 +- deps/npm/html/api/docs.html | 2 +- deps/npm/html/api/edit.html | 2 +- deps/npm/html/api/explore.html | 2 +- deps/npm/html/api/help-search.html | 2 +- deps/npm/html/api/init.html | 2 +- deps/npm/html/api/install.html | 2 +- deps/npm/html/api/link.html | 2 +- deps/npm/html/api/load.html | 2 +- deps/npm/html/api/ls.html | 2 +- deps/npm/html/api/npm.html | 4 +- deps/npm/html/api/outdated.html | 2 +- deps/npm/html/api/owner.html | 2 +- deps/npm/html/api/pack.html | 2 +- deps/npm/html/api/prefix.html | 2 +- deps/npm/html/api/prune.html | 2 +- deps/npm/html/api/publish.html | 2 +- deps/npm/html/api/rebuild.html | 2 +- deps/npm/html/api/restart.html | 2 +- deps/npm/html/api/root.html | 2 +- deps/npm/html/api/run-script.html | 2 +- deps/npm/html/api/search.html | 2 +- deps/npm/html/api/shrinkwrap.html | 2 +- deps/npm/html/api/start.html | 2 +- deps/npm/html/api/stop.html | 2 +- deps/npm/html/api/submodule.html | 2 +- deps/npm/html/api/tag.html | 2 +- deps/npm/html/api/test.html | 2 +- deps/npm/html/api/uninstall.html | 2 +- deps/npm/html/api/unpublish.html | 2 +- deps/npm/html/api/update.html | 2 +- deps/npm/html/api/version.html | 2 +- deps/npm/html/api/view.html | 2 +- deps/npm/html/api/whoami.html | 2 +- deps/npm/html/doc/README.html | 2 +- deps/npm/html/doc/adduser.html | 2 +- deps/npm/html/doc/bin.html | 2 +- deps/npm/html/doc/bugs.html | 2 +- deps/npm/html/doc/build.html | 2 +- deps/npm/html/doc/bundle.html | 2 +- deps/npm/html/doc/cache.html | 2 +- deps/npm/html/doc/changelog.html | 33 ++- deps/npm/html/doc/coding-style.html | 4 +- deps/npm/html/doc/completion.html | 2 +- deps/npm/html/doc/config.html | 2 +- deps/npm/html/doc/deprecate.html | 2 +- deps/npm/html/doc/developers.html | 14 +- deps/npm/html/doc/disputes.html | 2 +- deps/npm/html/doc/docs.html | 2 +- deps/npm/html/doc/edit.html | 2 +- deps/npm/html/doc/explore.html | 2 +- deps/npm/html/doc/faq.html | 2 +- deps/npm/html/doc/folders.html | 2 +- deps/npm/html/doc/help-search.html | 2 +- deps/npm/html/doc/help.html | 2 +- deps/npm/html/doc/index.html | 2 +- deps/npm/html/doc/init.html | 2 +- deps/npm/html/doc/install.html | 2 +- deps/npm/html/doc/json.html | 16 +- deps/npm/html/doc/link.html | 2 +- deps/npm/html/doc/list.html | 2 +- deps/npm/html/doc/npm.html | 4 +- deps/npm/html/doc/outdated.html | 2 +- deps/npm/html/doc/owner.html | 2 +- deps/npm/html/doc/pack.html | 2 +- deps/npm/html/doc/prefix.html | 2 +- deps/npm/html/doc/prune.html | 2 +- deps/npm/html/doc/publish.html | 2 +- deps/npm/html/doc/rebuild.html | 2 +- deps/npm/html/doc/registry.html | 2 +- deps/npm/html/doc/removing-npm.html | 2 +- deps/npm/html/doc/restart.html | 2 +- deps/npm/html/doc/root.html | 2 +- deps/npm/html/doc/run-script.html | 2 +- deps/npm/html/doc/scripts.html | 15 +- deps/npm/html/doc/search.html | 2 +- deps/npm/html/doc/semver.html | 2 +- deps/npm/html/doc/shrinkwrap.html | 2 +- deps/npm/html/doc/star.html | 2 +- deps/npm/html/doc/start.html | 2 +- deps/npm/html/doc/stop.html | 2 +- deps/npm/html/doc/submodule.html | 2 +- deps/npm/html/doc/tag.html | 2 +- deps/npm/html/doc/test.html | 2 +- deps/npm/html/doc/uninstall.html | 2 +- deps/npm/html/doc/unpublish.html | 2 +- deps/npm/html/doc/update.html | 2 +- deps/npm/html/doc/version.html | 2 +- deps/npm/html/doc/view.html | 2 +- deps/npm/html/doc/whoami.html | 2 +- deps/npm/lib/cache.js | 19 +- deps/npm/lib/init.js | 7 - deps/npm/lib/install.js | 63 ++++-- deps/npm/lib/ls.js | 10 + deps/npm/lib/npm.js | 1 + deps/npm/lib/rebuild.js | 3 - deps/npm/lib/utils/fetch.js | 3 +- deps/npm/lib/utils/find-prefix.js | 5 +- deps/npm/lib/utils/get-agent.js | 62 ------ deps/npm/lib/utils/ini.js | 10 +- deps/npm/lib/utils/lifecycle.js | 4 + deps/npm/lib/utils/npm-registry-client/request.js | 3 +- deps/npm/lib/utils/output.js | 1 + deps/npm/lib/utils/tar.js | 68 ++++-- deps/npm/lib/version.js | 2 +- deps/npm/man/man1/README.1 | 2 +- deps/npm/man/man1/adduser.1 | 2 +- deps/npm/man/man1/bin.1 | 2 +- deps/npm/man/man1/bugs.1 | 2 +- deps/npm/man/man1/build.1 | 2 +- deps/npm/man/man1/bundle.1 | 2 +- deps/npm/man/man1/cache.1 | 2 +- deps/npm/man/man1/changelog.1 | 84 +++++++- deps/npm/man/man1/coding-style.1 | 6 +- deps/npm/man/man1/completion.1 | 2 +- deps/npm/man/man1/config.1 | 2 +- deps/npm/man/man1/deprecate.1 | 2 +- deps/npm/man/man1/developers.1 | 24 ++- deps/npm/man/man1/disputes.1 | 2 +- deps/npm/man/man1/docs.1 | 2 +- deps/npm/man/man1/edit.1 | 2 +- deps/npm/man/man1/explore.1 | 2 +- deps/npm/man/man1/faq.1 | 2 +- deps/npm/man/man1/folders.1 | 2 +- deps/npm/man/man1/help-search.1 | 2 +- deps/npm/man/man1/help.1 | 2 +- deps/npm/man/man1/index.1 | 2 +- deps/npm/man/man1/init.1 | 2 +- deps/npm/man/man1/install.1 | 2 +- deps/npm/man/man1/json.1 | 24 ++- deps/npm/man/man1/link.1 | 2 +- deps/npm/man/man1/list.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/outdated.1 | 2 +- deps/npm/man/man1/owner.1 | 2 +- deps/npm/man/man1/pack.1 | 2 +- deps/npm/man/man1/prefix.1 | 2 +- deps/npm/man/man1/prune.1 | 2 +- deps/npm/man/man1/publish.1 | 2 +- deps/npm/man/man1/rebuild.1 | 2 +- deps/npm/man/man1/registry.1 | 2 +- deps/npm/man/man1/removing-npm.1 | 2 +- deps/npm/man/man1/restart.1 | 2 +- deps/npm/man/man1/root.1 | 2 +- deps/npm/man/man1/run-script.1 | 2 +- deps/npm/man/man1/scripts.1 | 22 +- deps/npm/man/man1/search.1 | 2 +- deps/npm/man/man1/semver.1 | 2 +- deps/npm/man/man1/shrinkwrap.1 | 2 +- deps/npm/man/man1/star.1 | 2 +- deps/npm/man/man1/start.1 | 2 +- deps/npm/man/man1/stop.1 | 2 +- deps/npm/man/man1/submodule.1 | 2 +- deps/npm/man/man1/tag.1 | 2 +- deps/npm/man/man1/test.1 | 2 +- deps/npm/man/man1/uninstall.1 | 2 +- deps/npm/man/man1/unpublish.1 | 2 +- deps/npm/man/man1/update.1 | 2 +- deps/npm/man/man1/version.1 | 2 +- deps/npm/man/man1/view.1 | 2 +- deps/npm/man/man1/whoami.1 | 2 +- deps/npm/man/man3/bin.3 | 2 +- deps/npm/man/man3/bugs.3 | 2 +- deps/npm/man/man3/commands.3 | 2 +- deps/npm/man/man3/config.3 | 2 +- deps/npm/man/man3/deprecate.3 | 2 +- deps/npm/man/man3/docs.3 | 2 +- deps/npm/man/man3/edit.3 | 2 +- deps/npm/man/man3/explore.3 | 2 +- deps/npm/man/man3/help-search.3 | 2 +- deps/npm/man/man3/init.3 | 2 +- deps/npm/man/man3/install.3 | 2 +- deps/npm/man/man3/link.3 | 2 +- deps/npm/man/man3/load.3 | 2 +- deps/npm/man/man3/ls.3 | 2 +- deps/npm/man/man3/npm.3 | 4 +- deps/npm/man/man3/outdated.3 | 2 +- deps/npm/man/man3/owner.3 | 2 +- deps/npm/man/man3/pack.3 | 2 +- deps/npm/man/man3/prefix.3 | 2 +- deps/npm/man/man3/prune.3 | 2 +- deps/npm/man/man3/publish.3 | 2 +- deps/npm/man/man3/rebuild.3 | 2 +- deps/npm/man/man3/restart.3 | 2 +- deps/npm/man/man3/root.3 | 2 +- deps/npm/man/man3/run-script.3 | 2 +- deps/npm/man/man3/search.3 | 2 +- deps/npm/man/man3/shrinkwrap.3 | 2 +- deps/npm/man/man3/start.3 | 2 +- deps/npm/man/man3/stop.3 | 2 +- deps/npm/man/man3/submodule.3 | 2 +- deps/npm/man/man3/tag.3 | 2 +- deps/npm/man/man3/test.3 | 2 +- deps/npm/man/man3/uninstall.3 | 2 +- deps/npm/man/man3/unpublish.3 | 2 +- deps/npm/man/man3/update.3 | 2 +- deps/npm/man/man3/version.3 | 2 +- deps/npm/man/man3/view.3 | 2 +- deps/npm/man/man3/whoami.3 | 2 +- deps/npm/node_modules/request/forever.js | 21 +- deps/npm/node_modules/request/main.js | 158 +++++++++++--- deps/npm/node_modules/request/package.json | 58 ++++-- deps/npm/node_modules/request/tunnel.js | 229 +++++++++++++++++++++ deps/npm/node_modules/which/package.json | 25 ++- deps/npm/node_modules/which/which.js | 29 ++- deps/npm/package.json | 2 +- .../npm-test-shrinkwrap/npm-shrinkwrap.json | 43 ++++ .../test/packages/npm-test-shrinkwrap/package.json | 13 ++ deps/npm/test/packages/npm-test-shrinkwrap/test.sh | 20 ++ 220 files changed, 1183 insertions(+), 375 deletions(-) delete mode 100644 deps/npm/lib/utils/get-agent.js create mode 100644 deps/npm/node_modules/request/tunnel.js create mode 100644 deps/npm/test/packages/npm-test-shrinkwrap/npm-shrinkwrap.json create mode 100644 deps/npm/test/packages/npm-test-shrinkwrap/package.json create mode 100644 deps/npm/test/packages/npm-test-shrinkwrap/test.sh (limited to 'deps') diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index b1b915af67..86899d4305 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -54,3 +54,8 @@ Paul Vorbach George Ornbo Tim Oxley Tyler Green +atomizer +Rod Vagg +Christian Howe +Andrew Lunny +Henrik Hodne diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 415a1b3d68..19efd815c9 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/*.zip npmjs.org:/var/www/npmjs.org/public/dist/ + scp release/* npmjs.org:/var/www/npmjs.org/public/dist/ release: @bash scripts/release.sh diff --git a/deps/npm/doc/cli/changelog.md b/deps/npm/doc/cli/changelog.md index 0115405ca0..7c3a124c4f 100644 --- a/deps/npm/doc/cli/changelog.md +++ b/deps/npm/doc/cli/changelog.md @@ -3,6 +3,50 @@ npm-changelog(1) -- Changes ## HISTORY +### 1.1.3 + +* 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 5315c575c1..42ac1d785f 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/developers.md b/deps/npm/doc/cli/developers.md index 9123f35a33..7ab905bfa0 100644 --- a/deps/npm/doc/cli/developers.md +++ b/deps/npm/doc/cli/developers.md @@ -27,12 +27,23 @@ A package is: * d) a `@` that is published on the registry with (c) * e) a `@` that points to (d) * f) a `` 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/json.md b/deps/npm/doc/cli/json.md index 5f6e7ef621..0ded878944 100644 --- a/deps/npm/doc/cli/json.md +++ b/deps/npm/doc/cli/json.md @@ -332,6 +332,7 @@ 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: @@ -387,6 +388,18 @@ 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 diff --git a/deps/npm/doc/cli/scripts.md b/deps/npm/doc/cli/scripts.md index 64b3ec41a0..3d33a83919 100644 --- a/deps/npm/doc/cli/scripts.md +++ b/deps/npm/doc/cli/scripts.md @@ -62,6 +62,20 @@ 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 f532874a08..8008d21459 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@

This function should not be used programmatically. Instead, just refer to the npm.bin member.

- +