From 13198357e9973c6d29283ca7d69d57f5986b9474 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 10 Jun 2012 21:29:47 -0700 Subject: [PATCH 1/5] Upgrade npm to 1.1.25 --- deps/npm/LICENSE | 5 + deps/npm/bin/npm-cli.js | 12 +- deps/npm/doc/cli/coding-style.md | 21 +- deps/npm/doc/cli/config.md | 22 -- 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 | 23 +- deps/npm/html/doc/completion.html | 2 +- deps/npm/html/doc/config.html | 21 +- 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 | 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/html/style.css | 29 +-- deps/npm/lib/adduser.js | 11 +- deps/npm/lib/bugs.js | 16 +- deps/npm/lib/build.js | 18 +- deps/npm/lib/cache.js | 127 +++++---- deps/npm/lib/config.js | 4 +- deps/npm/lib/deprecate.js | 7 +- deps/npm/lib/docs.js | 10 +- deps/npm/lib/edit.js | 1 - deps/npm/lib/help-search.js | 7 +- deps/npm/lib/help.js | 4 +- deps/npm/lib/init.js | 9 +- deps/npm/lib/install.js | 77 +++--- deps/npm/lib/link.js | 28 +- deps/npm/lib/ls.js | 10 +- deps/npm/lib/npm.js | 47 ++-- deps/npm/lib/outdated.js | 1 - deps/npm/lib/owner.js | 60 +++-- deps/npm/lib/publish.js | 27 +- deps/npm/lib/rebuild.js | 8 +- deps/npm/lib/root.js | 1 - deps/npm/lib/run-script.js | 4 +- deps/npm/lib/search.js | 5 +- deps/npm/lib/shrinkwrap.js | 6 +- deps/npm/lib/star.js | 8 +- deps/npm/lib/substack.js | 14 +- deps/npm/lib/tag.js | 3 +- deps/npm/lib/unbuild.js | 5 +- deps/npm/lib/uninstall.js | 6 +- deps/npm/lib/unpublish.js | 10 +- deps/npm/lib/update.js | 4 +- deps/npm/lib/utils/cmd-shim.js | 6 +- .../lib/utils/completion/remote-packages.js | 5 +- deps/npm/lib/utils/completion/users.js | 13 +- deps/npm/lib/utils/config-defs.js | 23 +- deps/npm/lib/utils/error-handler.js | 153 ++++++----- deps/npm/lib/utils/exec.js | 40 +-- deps/npm/lib/utils/fetch.js | 8 +- deps/npm/lib/utils/ini.js | 8 +- deps/npm/lib/utils/lifecycle.js | 29 +-- deps/npm/lib/utils/link.js | 7 +- deps/npm/lib/utils/load-package-defaults.js | 8 +- deps/npm/lib/utils/log.js | 170 ------------ .../lib/utils/npm-registry-client/adduser.js | 100 ------- deps/npm/lib/utils/npm-registry-client/get.js | 186 ------------- .../lib/utils/npm-registry-client/index.js | 16 -- .../lib/utils/npm-registry-client/publish.js | 170 ------------ .../lib/utils/npm-registry-client/request.js | 245 ------------------ .../npm/lib/utils/npm-registry-client/star.js | 32 --- deps/npm/lib/utils/npm-registry-client/tag.js | 8 - .../utils/npm-registry-client/unpublish.js | 98 ------- deps/npm/lib/utils/read-installed.js | 23 +- deps/npm/lib/utils/read-json.js | 52 ++-- deps/npm/lib/utils/sha.js | 17 +- deps/npm/lib/utils/tar.js | 72 +++-- deps/npm/lib/version.js | 7 +- deps/npm/lib/view.js | 10 +- deps/npm/lib/whoami.js | 1 - deps/npm/lib/xmas.js | 8 +- deps/npm/man/man1/coding-style.1 | 30 +-- deps/npm/man/man1/config.1 | 40 --- deps/npm/man/man1/npm.1 | 2 +- deps/npm/man/man3/npm.3 | 2 +- deps/npm/node_modules/mkdirp/package.json | 11 +- .../node-gyp/node_modules/ansi/package.json | 2 +- .../node-gyp/node_modules/glob/package.json | 2 +- deps/npm/node_modules/node-gyp/package.json | 7 +- deps/npm/node_modules/request/README.md | 1 - deps/npm/node_modules/request/main.js | 178 +++++-------- deps/npm/node_modules/request/oauth.js | 10 +- deps/npm/node_modules/request/package.json | 12 +- deps/npm/node_modules/rimraf/package.json | 75 +++++- deps/npm/node_modules/rimraf/rimraf.js | 16 +- deps/npm/package.json | 16 +- 172 files changed, 872 insertions(+), 1906 deletions(-) delete mode 100644 deps/npm/lib/utils/log.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/adduser.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/get.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/index.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/publish.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/request.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/star.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/tag.js delete mode 100644 deps/npm/lib/utils/npm-registry-client/unpublish.js diff --git a/deps/npm/LICENSE b/deps/npm/LICENSE index c94425929d..3702d8a05b 100644 --- a/deps/npm/LICENSE +++ b/deps/npm/LICENSE @@ -49,6 +49,11 @@ and are not covered by this license. "npm Logo" created by Mathias Pettersson and Brian Hammond, used with permission. +"Gubblebum Blocky" font +Copyright (c) 2007 by Tjarda Koster, http://jelloween.deviantart.com +included for use in the npm website and documentation, +used with permission. + This program uses "node-uuid", Copyright (c) 2010 Robert Kieffer, according to the terms of the MIT license. diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js index f29437093e..a71985b37b 100755 --- a/deps/npm/bin/npm-cli.js +++ b/deps/npm/bin/npm-cli.js @@ -15,9 +15,9 @@ if (typeof WScript !== "undefined") { process.title = "npm" -var log = require("../lib/utils/log.js") -log.waitForConfig() -log.info("ok", "it worked if it ends with") +var log = require("npmlog") +log.pause() // will be unpaused when config is loaded. +log.info("it worked if it ends with", "ok") var fs = require("graceful-fs") , path = require("path") @@ -36,7 +36,7 @@ if (path.basename(process.argv[1]).slice(-1) === "g") { process.argv.splice(1, 1, "npm", "-g") } -log.verbose(process.argv, "cli") +log.verbose("cli", process.argv) var conf = nopt(types, shorthands) npm.argv = conf.argv.remain @@ -56,8 +56,8 @@ if (conf.versions) { return } -log.info("npm@"+npm.version, "using") -log.info("node@"+process.version, "using") +log.info("using", "npm@%s", npm.version) +log.info("using", "node@%s", process.version) // make sure that this version of node works with this version of npm. var semver = require("semver") diff --git a/deps/npm/doc/cli/coding-style.md b/deps/npm/doc/cli/coding-style.md index 42ac1d785f..c505dba83f 100644 --- a/deps/npm/doc/cli/coding-style.md +++ b/deps/npm/doc/cli/coding-style.md @@ -129,29 +129,18 @@ Just send the error message back as the first argument to the callback. Always create a new Error object with your message. Don't just return a string message to the callback. Stack traces are handy. -Use the `require("./utils/log").er` function. It takes a callback and an -error message, and returns an object that will report the message in the -event of a failure. It's quite handy. - - function myThing (args, cb) { - getData(args, function (er, data) { - if (er) return log.er(cb, "Couldn't get data")(er) - doSomethingElse(data, cb) - }) - } - function justHasToWork (cb) { - doSomething(log.er(cb, "the doSomething failed.")) - } - ## Logging +Logging is done using the [npmlog](https://github.com/isaacs/npmlog) +utility. + Please clean up logs when they are no longer helpful. In particular, logging the same object over and over again is not helpful. Logs should report what's happening so that it's easier to track down where a fault occurs. -Use appropriate log levels. The default log() function logs at the -"info" level. See `npm-config(1)` and search for "loglevel". +Use appropriate log levels. See `npm-config(1)` and search for +"loglevel". ## Case, naming, etc. diff --git a/deps/npm/doc/cli/config.md b/deps/npm/doc/cli/config.md index 3fd9cb8269..659895eaf9 100644 --- a/deps/npm/doc/cli/config.md +++ b/deps/npm/doc/cli/config.md @@ -430,13 +430,6 @@ if one of the two conditions are met: * the globally installed version is identical to the version that is being installed locally. -### logfd - -* Default: stderr file descriptor -* Type: Number or Stream - -The location to write log output. - ### loglevel * Default: "http" @@ -449,14 +442,6 @@ What level of logs to report. On failure, *all* logs are written to Any logs of a higher level than the setting are shown. The default is "http", which shows http, warn, and error output. -### logprefix - -* Default: true on Posix, false on Windows -* Type: Boolean - -Whether or not to prefix log messages with "npm" and the log level. See -also "color" and "loglevel". - ### long * Default: false @@ -503,13 +488,6 @@ The url to report npat test results. A node module to `require()` when npm loads. Useful for programmatic usage. -### outfd - -* Default: standard output file descriptor -* Type: Number or Stream - -Where to write "normal" output. This has no effect on log output. - ### parseable * Default: false diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index f6781bfa4f..cca295eab5 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.

- +