From c721604d254f57eefef715d4bd83329fac0750c7 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 28 Jun 2012 19:08:32 -0700 Subject: [PATCH 01/21] npm: Upgrade to 1.1.33 Support for parallel use of the cache folder Retry on registry timeouts or network failures Reduce 'engines' failures to a warning Use new zsh completion if aviailable --- deps/npm/.npmignore | 22 +- deps/npm/doc/cli/config.md | 62 ++++ deps/npm/doc/cli/json.md | 19 +- 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 | 2 +- deps/npm/html/doc/coding-style.html | 2 +- deps/npm/html/doc/completion.html | 2 +- deps/npm/html/doc/config.html | 56 +++- deps/npm/html/doc/deprecate.html | 2 +- deps/npm/html/doc/developers.html | 2 +- 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 | 21 +- 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 | 2 +- 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 | 274 +++++++++++++----- deps/npm/lib/install.js | 16 +- deps/npm/lib/npm.js | 21 +- deps/npm/lib/utils/cmd-shim.js | 2 +- deps/npm/lib/utils/completion.sh | 15 +- deps/npm/lib/utils/config-defs.js | 19 ++ deps/npm/lib/utils/fetch.js | 43 ++- deps/npm/lib/utils/link.js | 12 +- deps/npm/man/man1/config.1 | 110 +++++++ deps/npm/man/man1/json.1 | 20 +- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man3/npm.3 | 2 +- deps/npm/node_modules/lockfile/LICENSE | 25 ++ deps/npm/node_modules/lockfile/README.md | 81 ++++++ deps/npm/node_modules/lockfile/lockfile.js | 241 +++++++++++++++ deps/npm/node_modules/lockfile/package.json | 36 +++ .../node_modules/npm-registry-client/LICENSE | 25 ++ .../npm-registry-client/README.md | 7 + .../node_modules/npm-registry-client/index.js | 5 + .../npm-registry-client/lib/get.js | 2 +- .../npm-registry-client/lib/request.js | 38 ++- .../npm-registry-client/package.json | 15 +- .../read-package-json/package.json | 6 +- .../read-package-json/read-json.js | 2 +- deps/npm/node_modules/retry/.npmignore | 1 + deps/npm/node_modules/retry/License | 21 ++ deps/npm/node_modules/retry/Makefile | 7 + deps/npm/node_modules/retry/Readme.md | 167 +++++++++++ deps/npm/node_modules/retry/equation.gif | Bin 0 -> 1209 bytes deps/npm/node_modules/retry/index.js | 1 + deps/npm/node_modules/retry/lib/retry.js | 50 ++++ .../node_modules/retry/lib/retry_operation.js | 109 +++++++ deps/npm/node_modules/retry/package.json | 29 ++ deps/npm/package.json | 10 +- 131 files changed, 1538 insertions(+), 244 deletions(-) create mode 100644 deps/npm/node_modules/lockfile/LICENSE create mode 100644 deps/npm/node_modules/lockfile/README.md create mode 100644 deps/npm/node_modules/lockfile/lockfile.js create mode 100644 deps/npm/node_modules/lockfile/package.json create mode 100644 deps/npm/node_modules/npm-registry-client/LICENSE create mode 100644 deps/npm/node_modules/retry/.npmignore create mode 100644 deps/npm/node_modules/retry/License create mode 100644 deps/npm/node_modules/retry/Makefile create mode 100644 deps/npm/node_modules/retry/Readme.md create mode 100644 deps/npm/node_modules/retry/equation.gif create mode 100644 deps/npm/node_modules/retry/index.js create mode 100644 deps/npm/node_modules/retry/lib/retry.js create mode 100644 deps/npm/node_modules/retry/lib/retry_operation.js create mode 100644 deps/npm/node_modules/retry/package.json diff --git a/deps/npm/.npmignore b/deps/npm/.npmignore index 94dc33f004..b1d9066bde 100644 --- a/deps/npm/.npmignore +++ b/deps/npm/.npmignore @@ -1,16 +1,16 @@ *.swp -test/bin -test/output.log -test/packages/*/node_modules -test/packages/npm-test-depends-on-spark/which-spark.log -test/packages/test-package/random-data.txt -test/root -node_modules/ronn -node_modules/.bin npm-debug.log -./npmrc -.gitignore -release/ +/test/bin +/test/output.log +/test/packages/*/node_modules +/test/packages/npm-test-depends-on-spark/which-spark.log +/test/packages/test-package/random-data.txt +/test/root +/node_modules/ronn +/node_modules/tap +/node_modules/.bin +/npmrc +/release/ # don't need these in the npm package. html/*.png diff --git a/deps/npm/doc/cli/config.md b/deps/npm/doc/cli/config.md index 505b9bac9e..537af5ca0e 100644 --- a/deps/npm/doc/cli/config.md +++ b/deps/npm/doc/cli/config.md @@ -195,6 +195,27 @@ See also the `strict-ssl` config. The location of npm's cache directory. See `npm-cache(1)` +### cache-lock-stale + +* Default: 60000 (1 minute) +* Type: Number + +The number of ms before cache folder lockfiles are considered stale. + +### cache-lock-retries + +* Default: 10 +* Type: Number + +Number of times to retry to acquire a lock on cache folder lockfiles. + +### cache-lock-wait + +* Default: 10000 (10 seconds) +* Type: Number + +Number of ms to wait for cache lock files to expire. + ### cache-max * Default: Infinity @@ -266,6 +287,15 @@ set. The command to run for `npm edit` or `npm config edit`. +### engine-strict + +* Default: false +* Type: Boolean + +If set to true, then npm will stubbornly refuse to install (or even +consider installing) any package that claims to not be compatible with +the current Node.js version. + ### force * Default: false @@ -278,6 +308,38 @@ Makes various commands more forceful. * skips cache when requesting from the registry. * prevents checks against clobbering non-npm files. +### fetch-retries + +* Default: 2 +* Type: Number + +The "retries" config for the `retry` module to use when fetching +packages from the registry. + +### fetch-retry-factor + +* Default: 10 +* Type: Number + +The "factor" config for the `retry` module to use when fetching +packages. + +### fetch-retry-mintimeout + +* Default: 10000 (10 seconds) +* Type: Number + +The "minTimeout" config for the `retry` module to use when fetching +packages. + +### fetch-retry-maxtimeout + +* Default: 60000 (1 minute) +* Type: Number + +The "maxTimeout" config for the `retry` module to use when fetching +packages. + ### git * Default: `"git"` diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md index 5f50cd2cfa..b6bf89ca37 100644 --- a/deps/npm/doc/cli/json.md +++ b/deps/npm/doc/cli/json.md @@ -453,8 +453,7 @@ Entries in `optionalDependencies` will override entries of the same name in ## engines -You can specify the version of -node that your stuff works on: +You can specify the version of node that your stuff works on: { "engines" : { "node" : ">=0.1.27 <0.1.30" } } @@ -470,6 +469,22 @@ are capable of properly installing your program. For example: { "engines" : { "npm" : "~1.0.20" } } +Note that, unless the user has set the `engine-strict` config flag, this +field is advisory only. + +## engineStrict + +If you are sure that your module will *definitely not* run properly on +versions of Node/npm other than those specified in the `engines` hash, +then you can set `"engineStrict": true` in your package.json file. +This will override the user's `engine-strict` config setting. + +Please do not do this unless you are really very very sure. If your +engines hash is something overly restrictive, you can quite easily and +inadvertently lock yourself into obscurity and prevent your users from +updating to new versions of Node. Consider this choice carefully. If +people abuse it, it will be removed in a future version of npm. + ## os You can specify which operating systems your diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 03f32bb284..4e62af7019 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.