From 3ccee087597c6a14c1b171d43a618c10889d4169 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 14 Aug 2012 20:27:28 -0700 Subject: [PATCH] npm: Upgrade to 1.1.49 - node-gyp@0.6.5 - abstracted-out configs - publishing over proxies - bugfixes to all the deps --- deps/npm/README.md | 47 +-- deps/npm/bin/npm-cli.js | 11 +- 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 | 49 +-- 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 | 2 +- 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 | 2 +- deps/npm/html/doc/link.html | 2 +- deps/npm/html/doc/list.html | 4 +- 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/adduser.js | 11 +- deps/npm/lib/build.js | 8 +- deps/npm/lib/completion.js | 4 +- deps/npm/lib/config.js | 183 ++++----- deps/npm/lib/npm.js | 59 ++- deps/npm/lib/publish.js | 7 +- deps/npm/lib/utils/error-handler.js | 5 +- deps/npm/lib/utils/ini.js | 352 ------------------ deps/npm/lib/utils/lifecycle.js | 9 +- deps/npm/lib/version.js | 20 +- deps/npm/lib/view.js | 1 - deps/npm/man/man1/README.1 | 100 +---- deps/npm/man/man1/list.1 | 2 +- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man3/npm.3 | 2 +- .../node_modules/couch-login/couch-login.js | 4 + .../npm/node_modules/couch-login/package.json | 6 +- deps/npm/node_modules/glob/glob.js | 2 +- deps/npm/node_modules/glob/package.json | 4 +- deps/npm/node_modules/ini/ini.js | 32 +- deps/npm/node_modules/ini/package.json | 16 +- deps/npm/node_modules/ini/test/bar.js | 23 ++ .../node_modules/ini/test/fixtures/foo.ini | 29 ++ deps/npm/node_modules/ini/test/foo.js | 59 +++ deps/npm/node_modules/lru-cache/README.md | 53 ++- .../node_modules/lru-cache/lib/lru-cache.js | 72 ++-- deps/npm/node_modules/lru-cache/package.json | 11 +- deps/npm/node_modules/lru-cache/test/basic.js | 78 +++- deps/npm/node_modules/minimatch/minimatch.js | 2 +- deps/npm/node_modules/minimatch/package.json | 24 +- deps/npm/node_modules/node-gyp/addon.gypi | 24 ++ .../node_modules/node-gyp/lib/configure.js | 68 ++-- deps/npm/node_modules/node-gyp/lib/install.js | 28 +- deps/npm/node_modules/node-gyp/package.json | 6 +- .../npm/node_modules/node-gyp/updateLegacy.sh | 9 - .../node_modules/npm-registry-client/index.js | 1 + .../npm-registry-client/package.json | 6 +- deps/npm/node_modules/npmconf/.npmignore | 1 + deps/npm/node_modules/npmconf/README.md | 33 ++ .../npmconf}/config-defs.js | 14 +- .../node_modules/config-chain/.npmignore | 3 + .../npmconf/node_modules/config-chain/LICENCE | 22 ++ .../node_modules/config-chain/index.js | 282 ++++++++++++++ .../node_modules}/proto-list/LICENSE | 0 .../node_modules}/proto-list/README.md | 0 .../node_modules/proto-list/package.json | 28 ++ .../node_modules}/proto-list/proto-list.js | 73 ++-- .../node_modules/proto-list/test/basic.js | 61 +++ .../node_modules/config-chain/package.json | 28 ++ .../node_modules/config-chain/readme.markdown | 228 ++++++++++++ .../node_modules/config-chain/test/broken.js | 10 + .../config-chain/test/broken.json | 21 ++ .../config-chain/test/chain-class.js | 100 +++++ .../node_modules/config-chain/test/env.js | 10 + .../config-chain/test/find-file.js | 13 + .../config-chain/test/ignore-unfound-file.js | 5 + .../node_modules/config-chain/test/ini.js | 18 + .../node_modules/config-chain/test/save.js | 59 +++ deps/npm/node_modules/npmconf/npmconf.js | 324 ++++++++++++++++ deps/npm/node_modules/npmconf/package.json | 42 +++ .../npm/node_modules/npmconf/test/00-setup.js | 27 ++ deps/npm/node_modules/npmconf/test/basic.js | 72 ++++ deps/npm/node_modules/npmconf/test/builtin.js | 72 ++++ .../npmconf/test/fixtures/builtin | 1 + .../npmconf/test/fixtures/globalconfig | 1 + .../npmconf/test/fixtures/userconfig | 22 ++ deps/npm/node_modules/npmconf/test/save.js | 74 ++++ deps/npm/node_modules/once/LICENSE | 27 ++ deps/npm/node_modules/once/README.md | 33 ++ deps/npm/node_modules/once/once.js | 19 + deps/npm/node_modules/once/package.json | 35 ++ deps/npm/node_modules/once/test/once.js | 18 + deps/npm/node_modules/proto-list/package.json | 9 - .../read-package-json/package.json | 6 +- .../read-package-json/read-json.js | 2 +- deps/npm/node_modules/read/lib/read.js | 9 +- deps/npm/node_modules/read/package.json | 4 +- deps/npm/node_modules/read/test/many.js | 76 ++++ deps/npm/package.json | 29 +- 175 files changed, 2549 insertions(+), 983 deletions(-) delete mode 100644 deps/npm/lib/utils/ini.js create mode 100644 deps/npm/node_modules/ini/test/bar.js create mode 100644 deps/npm/node_modules/ini/test/fixtures/foo.ini create mode 100644 deps/npm/node_modules/ini/test/foo.js create mode 100644 deps/npm/node_modules/node-gyp/addon.gypi delete mode 100755 deps/npm/node_modules/node-gyp/updateLegacy.sh create mode 100644 deps/npm/node_modules/npmconf/.npmignore create mode 100644 deps/npm/node_modules/npmconf/README.md rename deps/npm/{lib/utils => node_modules/npmconf}/config-defs.js (97%) create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/.npmignore create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/LICENCE create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/index.js rename deps/npm/node_modules/{ => npmconf/node_modules/config-chain/node_modules}/proto-list/LICENSE (100%) rename deps/npm/node_modules/{ => npmconf/node_modules/config-chain/node_modules}/proto-list/README.md (100%) create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json rename deps/npm/node_modules/{ => npmconf/node_modules/config-chain/node_modules}/proto-list/proto-list.js (56%) create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/package.json create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.js create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/broken.json create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/chain-class.js create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/env.js create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/find-file.js create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/ini.js create mode 100644 deps/npm/node_modules/npmconf/node_modules/config-chain/test/save.js create mode 100644 deps/npm/node_modules/npmconf/npmconf.js create mode 100644 deps/npm/node_modules/npmconf/package.json create mode 100644 deps/npm/node_modules/npmconf/test/00-setup.js create mode 100644 deps/npm/node_modules/npmconf/test/basic.js create mode 100644 deps/npm/node_modules/npmconf/test/builtin.js create mode 100644 deps/npm/node_modules/npmconf/test/fixtures/builtin create mode 100644 deps/npm/node_modules/npmconf/test/fixtures/globalconfig create mode 100644 deps/npm/node_modules/npmconf/test/fixtures/userconfig create mode 100644 deps/npm/node_modules/npmconf/test/save.js create mode 100644 deps/npm/node_modules/once/LICENSE create mode 100644 deps/npm/node_modules/once/README.md create mode 100644 deps/npm/node_modules/once/once.js create mode 100644 deps/npm/node_modules/once/package.json create mode 100644 deps/npm/node_modules/once/test/once.js delete mode 100644 deps/npm/node_modules/proto-list/package.json create mode 100644 deps/npm/node_modules/read/test/many.js diff --git a/deps/npm/README.md b/deps/npm/README.md index 1257f14716..0c138134e4 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -35,31 +35,18 @@ paths, etc.) then read on. ## Fancy Install (Unix) -To install npm with one command, do this: - - curl http://npmjs.org/install.sh | sh - -To skip the npm 0.x cleanup, do this: - - curl http://npmjs.org/install.sh | clean=no sh - -To say "yes" to the 0.x cleanup, but skip the prompt: - - curl http://npmjs.org/install.sh | clean=yes sh - -If you get permission errors, you'll need to **run** the script as root. -(Note, just putting `sudo` in front of the `curl` will **fetch** the script -as root.) +There's a pretty robust install script at +. You can download that and run it. ### Slightly Fancier You can set any npm configuration params with that script: - curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh +npm_config_prefix=/some/path sh install.sh Or, you can run it in uber-debuggery mode: - curl http://npmjs.org/install.sh | npm_debug=1 sh +npm_debug=1 sh install.sh ### Even Fancier @@ -83,21 +70,6 @@ git, and mess with it directly. No. -## Dev Install - -To install the latest **unstable** development version from git: - - git clone https://github.com/isaacs/npm.git - cd npm - sudo make install # (or: `node cli.js install -gf`) - -If you're sitting in the code folder reading this document in your -terminal, then you've already got the code. Just do: - - sudo make install - -and npm will install itself. - ## Permissions when Using npm to Install Other Stuff **tl;dr** @@ -163,6 +135,14 @@ you have chosen. If you would like to use npm programmatically, you can do that. It's not very well documented, but it *is* rather simple. +Most of the time, unless you actually want to do all the things that +npm does, you should try using one of npm's dependencies rather than +using npm itself, if possible. + +Eventually, npm will be just a thin cli wrapper around the modules +that it depends on, but for now, there are some things that you must +use npm itself to do. + var npm = require("npm") npm.load(myConfigObject, function (er) { if (er) return handlError(er) @@ -195,8 +175,7 @@ especially the [faq](http://npmjs.org/doc/faq.html). You can use the `npm help` command to read any of them. If you're a developer, and you want to use npm to publish your program, -you should -[read this](http://npmjs.org/doc/developers.html) +you should [read this](http://npmjs.org/doc/developers.html) ## Legal Stuff diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js index a71985b37b..ef8873542b 100755 --- a/deps/npm/bin/npm-cli.js +++ b/deps/npm/bin/npm-cli.js @@ -22,10 +22,10 @@ log.info("it worked if it ends with", "ok") var fs = require("graceful-fs") , path = require("path") , npm = require("../lib/npm.js") - , ini = require("../lib/utils/ini.js") + , npmconf = require("npmconf") , errorHandler = require("../lib/utils/error-handler.js") - , configDefs = require("../lib/utils/config-defs.js") + , configDefs = npmconf.defs , shorthands = configDefs.shorthands , types = configDefs.types , nopt = require("nopt") @@ -50,10 +50,9 @@ if (conf.version) { } if (conf.versions) { - var v = process.versions - v.npm = npm.version - console.log(v) - return + npm.command = "version" + conf.usage = false + npm.argv = [] } log.info("using", "npm@%s", npm.version) diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 8d7fbc97d6..d3650c2777 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.

- +