Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
npm: Upgrade to 1.1.37
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jul 10, 2012
1 parent 8a946c2 commit ae5a209
Show file tree
Hide file tree
Showing 396 changed files with 8,641 additions and 4,122 deletions.
22 changes: 11 additions & 11 deletions 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
Expand Down
5 changes: 5 additions & 0 deletions deps/npm/AUTHORS
Expand Up @@ -66,3 +66,8 @@ Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
Dalmais Maxence <github@maxired.fr>
Marcus Ekwall <marcus.ekwall@gmail.com>
Aaron Stacy <aaron.r.stacy@gmail.com>
Phillip Howell <phowell@cothm.org>
Domenic Denicola <domenic@domenicdenicola.com>
James Halliday <mail@substack.net>
Jeremy Cantrell <jmcantrell@gmail.com>
Ribettes <patlogan29@gmail.com>
5 changes: 5 additions & 0 deletions deps/npm/LICENSE
Expand Up @@ -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.

Expand Down
6 changes: 0 additions & 6 deletions deps/npm/README.md
Expand Up @@ -89,21 +89,15 @@ To install the latest **unstable** development version from git:

git clone https://github.com/isaacs/npm.git
cd npm
git submodule update --init --recursive
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:

git submodule update --init --recursive
sudo make install

and npm will install itself.

Note that github tarballs **do not contain submodules**, so
those won't work. You'll have to also fetch the appropriate submodules
listed in the .gitmodules file.

## Permissions when Using npm to Install Other Stuff

**tl;dr**
Expand Down
13 changes: 10 additions & 3 deletions deps/npm/bin/npm
@@ -1,6 +1,13 @@
#!/bin/sh
if [ -x "`dirname "$0"`/node.exe" ]; then
"`dirname "$0"`/node.exe" "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"

basedir=`dirname "$0"`

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node.exe" ]; then
"$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
else
node "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"
node "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
fi
12 changes: 6 additions & 6 deletions deps/npm/bin/npm-cli.js
Expand Up @@ -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")
Expand All @@ -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
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/bin/read-package-json.js
Expand Up @@ -6,7 +6,7 @@ if (argv.length < 3) {

var fs = require("fs")
, file = argv[2]
, readJson = require("../lib/utils/read-json")
, readJson = require("read-package-json")

readJson(file, function (er, data) {
if (er) throw er
Expand Down
21 changes: 5 additions & 16 deletions deps/npm/doc/cli/coding-style.md
Expand Up @@ -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.

Expand Down

0 comments on commit ae5a209

Please sign in to comment.