Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
authorisaacs <i@izs.me>
Fri, 4 May 2012 22:12:47 +0000 (15:12 -0700)
committerisaacs <i@izs.me>
Fri, 4 May 2012 22:12:47 +0000 (15:12 -0700)
Conflicts:
ChangeLog
Makefile
deps/npm/AUTHORS
deps/npm/html/api/bin.html
deps/npm/html/api/bugs.html
deps/npm/html/api/commands.html
deps/npm/html/api/config.html
deps/npm/html/api/deprecate.html
deps/npm/html/api/docs.html
deps/npm/html/api/edit.html
deps/npm/html/api/explore.html
deps/npm/html/api/help-search.html
deps/npm/html/api/init.html
deps/npm/html/api/install.html
deps/npm/html/api/link.html
deps/npm/html/api/load.html
deps/npm/html/api/ls.html
deps/npm/html/api/npm.html
deps/npm/html/api/outdated.html
deps/npm/html/api/owner.html
deps/npm/html/api/pack.html
deps/npm/html/api/prefix.html
deps/npm/html/api/prune.html
deps/npm/html/api/publish.html
deps/npm/html/api/rebuild.html
deps/npm/html/api/restart.html
deps/npm/html/api/root.html
deps/npm/html/api/run-script.html
deps/npm/html/api/search.html
deps/npm/html/api/shrinkwrap.html
deps/npm/html/api/start.html
deps/npm/html/api/stop.html
deps/npm/html/api/submodule.html
deps/npm/html/api/tag.html
deps/npm/html/api/test.html
deps/npm/html/api/uninstall.html
deps/npm/html/api/unpublish.html
deps/npm/html/api/update.html
deps/npm/html/api/version.html
deps/npm/html/api/view.html
deps/npm/html/api/whoami.html
deps/npm/html/doc/README.html
deps/npm/html/doc/adduser.html
deps/npm/html/doc/bin.html
deps/npm/html/doc/bugs.html
deps/npm/html/doc/build.html
deps/npm/html/doc/bundle.html
deps/npm/html/doc/cache.html
deps/npm/html/doc/changelog.html
deps/npm/html/doc/coding-style.html
deps/npm/html/doc/completion.html
deps/npm/html/doc/config.html
deps/npm/html/doc/deprecate.html
deps/npm/html/doc/developers.html
deps/npm/html/doc/disputes.html
deps/npm/html/doc/docs.html
deps/npm/html/doc/edit.html
deps/npm/html/doc/explore.html
deps/npm/html/doc/faq.html
deps/npm/html/doc/folders.html
deps/npm/html/doc/help-search.html
deps/npm/html/doc/help.html
deps/npm/html/doc/index.html
deps/npm/html/doc/init.html
deps/npm/html/doc/install.html
deps/npm/html/doc/json.html
deps/npm/html/doc/link.html
deps/npm/html/doc/list.html
deps/npm/html/doc/npm.html
deps/npm/html/doc/outdated.html
deps/npm/html/doc/owner.html
deps/npm/html/doc/pack.html
deps/npm/html/doc/prefix.html
deps/npm/html/doc/prune.html
deps/npm/html/doc/publish.html
deps/npm/html/doc/rebuild.html
deps/npm/html/doc/registry.html
deps/npm/html/doc/removing-npm.html
deps/npm/html/doc/restart.html
deps/npm/html/doc/root.html
deps/npm/html/doc/run-script.html
deps/npm/html/doc/scripts.html
deps/npm/html/doc/search.html
deps/npm/html/doc/semver.html
deps/npm/html/doc/shrinkwrap.html
deps/npm/html/doc/star.html
deps/npm/html/doc/start.html
deps/npm/html/doc/stop.html
deps/npm/html/doc/submodule.html
deps/npm/html/doc/tag.html
deps/npm/html/doc/test.html
deps/npm/html/doc/uninstall.html
deps/npm/html/doc/unpublish.html
deps/npm/html/doc/update.html
deps/npm/html/doc/version.html
deps/npm/html/doc/view.html
deps/npm/html/doc/whoami.html
deps/npm/man/man1/npm.1
deps/npm/man/man3/npm.3
deps/npm/package.json
doc/api/url.markdown
lib/http.js
src/node_version.h
test/simple/test-fs-sync-fd-leak.js

299 files changed:
1  2 
AUTHORS
ChangeLog
Makefile
deps/npm/.npmignore
deps/npm/AUTHORS
deps/npm/LICENSE
deps/npm/Makefile
deps/npm/bin/npm-cli.js
deps/npm/bin/npm-get-uid-gid.js
deps/npm/bin/npm.cmd
deps/npm/doc/api/ls.md
deps/npm/doc/cli/changelog.md
deps/npm/doc/cli/coding-style.md
deps/npm/doc/cli/config.md
deps/npm/doc/cli/developers.md
deps/npm/doc/cli/index.md
deps/npm/doc/cli/install.md
deps/npm/doc/cli/json.md
deps/npm/doc/cli/list.md
deps/npm/doc/cli/scripts.md
deps/npm/html/api/bin.html
deps/npm/html/api/bugs.html
deps/npm/html/api/commands.html
deps/npm/html/api/config.html
deps/npm/html/api/deprecate.html
deps/npm/html/api/docs.html
deps/npm/html/api/edit.html
deps/npm/html/api/explore.html
deps/npm/html/api/help-search.html
deps/npm/html/api/init.html
deps/npm/html/api/install.html
deps/npm/html/api/link.html
deps/npm/html/api/load.html
deps/npm/html/api/ls.html
deps/npm/html/api/npm.html
deps/npm/html/api/outdated.html
deps/npm/html/api/owner.html
deps/npm/html/api/pack.html
deps/npm/html/api/prefix.html
deps/npm/html/api/prune.html
deps/npm/html/api/publish.html
deps/npm/html/api/rebuild.html
deps/npm/html/api/restart.html
deps/npm/html/api/root.html
deps/npm/html/api/run-script.html
deps/npm/html/api/search.html
deps/npm/html/api/shrinkwrap.html
deps/npm/html/api/start.html
deps/npm/html/api/stop.html
deps/npm/html/api/submodule.html
deps/npm/html/api/tag.html
deps/npm/html/api/test.html
deps/npm/html/api/uninstall.html
deps/npm/html/api/unpublish.html
deps/npm/html/api/update.html
deps/npm/html/api/version.html
deps/npm/html/api/view.html
deps/npm/html/api/whoami.html
deps/npm/html/doc/README.html
deps/npm/html/doc/adduser.html
deps/npm/html/doc/bin.html
deps/npm/html/doc/bugs.html
deps/npm/html/doc/build.html
deps/npm/html/doc/bundle.html
deps/npm/html/doc/cache.html
deps/npm/html/doc/changelog.html
deps/npm/html/doc/coding-style.html
deps/npm/html/doc/completion.html
deps/npm/html/doc/config.html
deps/npm/html/doc/deprecate.html
deps/npm/html/doc/developers.html
deps/npm/html/doc/disputes.html
deps/npm/html/doc/docs.html
deps/npm/html/doc/edit.html
deps/npm/html/doc/explore.html
deps/npm/html/doc/faq.html
deps/npm/html/doc/folders.html
deps/npm/html/doc/help-search.html
deps/npm/html/doc/help.html
deps/npm/html/doc/index.html
deps/npm/html/doc/init.html
deps/npm/html/doc/install.html
deps/npm/html/doc/json.html
deps/npm/html/doc/link.html
deps/npm/html/doc/list.html
deps/npm/html/doc/npm.html
deps/npm/html/doc/outdated.html
deps/npm/html/doc/owner.html
deps/npm/html/doc/pack.html
deps/npm/html/doc/prefix.html
deps/npm/html/doc/prune.html
deps/npm/html/doc/publish.html
deps/npm/html/doc/rebuild.html
deps/npm/html/doc/registry.html
deps/npm/html/doc/removing-npm.html
deps/npm/html/doc/restart.html
deps/npm/html/doc/root.html
deps/npm/html/doc/run-script.html
deps/npm/html/doc/scripts.html
deps/npm/html/doc/search.html
deps/npm/html/doc/semver.html
deps/npm/html/doc/shrinkwrap.html
deps/npm/html/doc/star.html
deps/npm/html/doc/start.html
deps/npm/html/doc/stop.html
deps/npm/html/doc/submodule.html
deps/npm/html/doc/tag.html
deps/npm/html/doc/test.html
deps/npm/html/doc/uninstall.html
deps/npm/html/doc/unpublish.html
deps/npm/html/doc/update.html
deps/npm/html/doc/version.html
deps/npm/html/doc/view.html
deps/npm/html/doc/whoami.html
deps/npm/html/index.html
deps/npm/lib/bugs.js
deps/npm/lib/cache.js
deps/npm/lib/config.js
deps/npm/lib/docs.js
deps/npm/lib/init.js
deps/npm/lib/install.js
deps/npm/lib/link.js
deps/npm/lib/ls.js
deps/npm/lib/npm.js
deps/npm/lib/outdated.js
deps/npm/lib/rebuild.js
deps/npm/lib/search.js
deps/npm/lib/set.js
deps/npm/lib/unbuild.js
deps/npm/lib/uninstall.js
deps/npm/lib/utils/cmd-shim.js
deps/npm/lib/utils/completion/file-completion.js
deps/npm/lib/utils/config-defs.js
deps/npm/lib/utils/error-handler.js
deps/npm/lib/utils/excludes.js
deps/npm/lib/utils/fetch.js
deps/npm/lib/utils/find-prefix.js
deps/npm/lib/utils/get-agent.js
deps/npm/lib/utils/get.js
deps/npm/lib/utils/ini.js
deps/npm/lib/utils/lifecycle.js
deps/npm/lib/utils/link.js
deps/npm/lib/utils/mkdir-p.js
deps/npm/lib/utils/npm-registry-client/get.js
deps/npm/lib/utils/npm-registry-client/request.js
deps/npm/lib/utils/output.js
deps/npm/lib/utils/read-installed.js
deps/npm/lib/utils/read-json.js
deps/npm/lib/utils/set.js
deps/npm/lib/utils/tar.js
deps/npm/lib/utils/uid-number.js
deps/npm/lib/version.js
deps/npm/lib/view.js
deps/npm/man/man1/README.1
deps/npm/man/man1/adduser.1
deps/npm/man/man1/bin.1
deps/npm/man/man1/bugs.1
deps/npm/man/man1/build.1
deps/npm/man/man1/bundle.1
deps/npm/man/man1/cache.1
deps/npm/man/man1/changelog.1
deps/npm/man/man1/coding-style.1
deps/npm/man/man1/completion.1
deps/npm/man/man1/config.1
deps/npm/man/man1/deprecate.1
deps/npm/man/man1/developers.1
deps/npm/man/man1/disputes.1
deps/npm/man/man1/docs.1
deps/npm/man/man1/edit.1
deps/npm/man/man1/explore.1
deps/npm/man/man1/faq.1
deps/npm/man/man1/folders.1
deps/npm/man/man1/help-search.1
deps/npm/man/man1/help.1
deps/npm/man/man1/index.1
deps/npm/man/man1/init.1
deps/npm/man/man1/install.1
deps/npm/man/man1/json.1
deps/npm/man/man1/link.1
deps/npm/man/man1/list.1
deps/npm/man/man1/npm.1
deps/npm/man/man1/outdated.1
deps/npm/man/man1/owner.1
deps/npm/man/man1/pack.1
deps/npm/man/man1/prefix.1
deps/npm/man/man1/prune.1
deps/npm/man/man1/publish.1
deps/npm/man/man1/rebuild.1
deps/npm/man/man1/registry.1
deps/npm/man/man1/removing-npm.1
deps/npm/man/man1/restart.1
deps/npm/man/man1/root.1
deps/npm/man/man1/run-script.1
deps/npm/man/man1/scripts.1
deps/npm/man/man1/search.1
deps/npm/man/man1/semver.1
deps/npm/man/man1/star.1
deps/npm/man/man1/start.1
deps/npm/man/man1/stop.1
deps/npm/man/man1/submodule.1
deps/npm/man/man1/tag.1
deps/npm/man/man1/test.1
deps/npm/man/man1/uninstall.1
deps/npm/man/man1/unpublish.1
deps/npm/man/man1/update.1
deps/npm/man/man1/version.1
deps/npm/man/man1/view.1
deps/npm/man/man1/whoami.1
deps/npm/man/man3/bin.3
deps/npm/man/man3/bugs.3
deps/npm/man/man3/commands.3
deps/npm/man/man3/config.3
deps/npm/man/man3/deprecate.3
deps/npm/man/man3/docs.3
deps/npm/man/man3/edit.3
deps/npm/man/man3/explore.3
deps/npm/man/man3/help-search.3
deps/npm/man/man3/init.3
deps/npm/man/man3/install.3
deps/npm/man/man3/link.3
deps/npm/man/man3/load.3
deps/npm/man/man3/ls.3
deps/npm/man/man3/npm.3
deps/npm/man/man3/outdated.3
deps/npm/man/man3/owner.3
deps/npm/man/man3/pack.3
deps/npm/man/man3/prefix.3
deps/npm/man/man3/prune.3
deps/npm/man/man3/publish.3
deps/npm/man/man3/rebuild.3
deps/npm/man/man3/restart.3
deps/npm/man/man3/root.3
deps/npm/man/man3/run-script.3
deps/npm/man/man3/search.3
deps/npm/man/man3/start.3
deps/npm/man/man3/stop.3
deps/npm/man/man3/submodule.3
deps/npm/man/man3/tag.3
deps/npm/man/man3/test.3
deps/npm/man/man3/uninstall.3
deps/npm/man/man3/unpublish.3
deps/npm/man/man3/update.3
deps/npm/man/man3/version.3
deps/npm/man/man3/view.3
deps/npm/man/man3/whoami.3
deps/npm/node_modules/block-stream/package.json
deps/npm/node_modules/fast-list/.npmignore
deps/npm/node_modules/fast-list/.travis.yml
deps/npm/node_modules/fast-list/README.md
deps/npm/node_modules/fast-list/fast-list.js
deps/npm/node_modules/fast-list/package.json
deps/npm/node_modules/fstream/.npmignore
deps/npm/node_modules/fstream/lib/abstract.js
deps/npm/node_modules/fstream/lib/dir-reader.js
deps/npm/node_modules/fstream/lib/dir-writer.js
deps/npm/node_modules/fstream/lib/link-writer.js
deps/npm/node_modules/fstream/lib/proxy-reader.js
deps/npm/node_modules/fstream/lib/reader.js
deps/npm/node_modules/fstream/lib/writer.js
deps/npm/node_modules/fstream/package.json
deps/npm/node_modules/graceful-fs/graceful-fs.js
deps/npm/node_modules/graceful-fs/package.json
deps/npm/node_modules/inherits/LICENSE
deps/npm/node_modules/inherits/package.json
deps/npm/node_modules/minimatch/README.md
deps/npm/node_modules/minimatch/minimatch.js
deps/npm/node_modules/minimatch/package.json
deps/npm/node_modules/mkdirp/README.markdown
deps/npm/node_modules/mkdirp/index.js
deps/npm/node_modules/mkdirp/package.json
deps/npm/node_modules/read/lib/read.js
deps/npm/node_modules/read/package.json
deps/npm/node_modules/request/README.md
deps/npm/node_modules/request/forever.js
deps/npm/node_modules/request/main.js
deps/npm/node_modules/request/mimetypes.js
deps/npm/node_modules/request/oauth.js
deps/npm/node_modules/request/package.json
deps/npm/node_modules/request/vendor/cookie/index.js
deps/npm/node_modules/rimraf/AUTHORS
deps/npm/node_modules/rimraf/README.md
deps/npm/node_modules/rimraf/fiber.js
deps/npm/node_modules/rimraf/package.json
deps/npm/node_modules/rimraf/rimraf.js
deps/npm/node_modules/tar/lib/extract.js
deps/npm/node_modules/tar/package.json
deps/npm/node_modules/which/package.json
deps/npm/node_modules/which/which.js
deps/npm/package.json
deps/npm/scripts/index-build.js
deps/npm/test/packages/npm-test-env-reader/package.json
deps/npm/test/packages/npm-test-env-reader/test.sh
deps/npm/test/packages/npm-test-files/package.json
deps/npm/test/packages/npm-test-optional-deps/package.json
deps/uv/src/unix/error.c
doc/api/child_process.markdown
doc/api/url.markdown
lib/fs.js
test/simple/test-domain-implicit-fs.js

diff --cc AUTHORS
+++ b/AUTHORS
@@@ -268,36 -268,12 +268,41 @@@ Paddy Byers <paddy.byers@gmail.com
  Seth Fitzsimmons <seth@mojodna.net>
  Einar Otto Stangvik <einaros@gmail.com>
  Paul Vorbach <paul@vorb.de>
 -tedsuo <ted@radicaldesigns.org>
 +Luke Gallagher <notfornoone@gmail.com>
 +Tomasz Buchert <tomek.buchert@gmail.com>
 +Myles Byrne <myles@myles.id.au>
 +T.C. Hollingsworth <tchollingsworth@gmail.com>
 +Cam Pedersen <diffference@gmail.com>
 +Roly Fentanes <roly426@gmail.com>
 +Ted Young <ted@radicaldesigns.org>
  Joshua Holbrook <josh.holbrook@gmail.com>
 +Blake Miner <miner.blake@gmail.com>
 +Vincent Ollivier <contact@vincentollivier.com>
 +Jimb Esser <jimb@railgun3d.com>
 +Sambasiva Suda <sambasivarao@gmail.com>
 +Sadique Ali <sadiqalikm@gmail.com>
 +Dmitry Nizovtsev <dmitry@ukrteam.com>
 +Alex Kocharin <rlidwka@kocharin.ru>
 +Ming Liu <vmliu1@gmail.com>
 +Shea Levy <shea@shealevy.com>
 +Nao Iizuka <iizuka@kyu-mu.net>
 +Christian Ress <christian@ressonline.de>
  Rod Vagg <rod@vagg.org>
 +Matt Ezell <ezell.matt@gmail.com>
 +Charlie McConnell <charlie@charlieistheman.com>
 +Farid Neshat <FaridN_SOAD@yahoo.com>
 +Johannes Wüller <johanneswueller@gmail.com>
 +Erik Lundin <mjor.himself@gmail.com>
 +Mikael Bourges-Sevenier <mikeseven@gmail.com>
 +Yosef Dinerstein <yosefd@microsoft.com>
 +Nathan Friedly <nathan@nfriedly.com>
 +Aaron Jacobs <jacobsa@google.com>
 +Mustansir Golawala <mgolawala@gmail.com>
 +fukayatsu <fukayatsu@gmail.com>
 +Domenic Denicola <domenic@domenicdenicola.com>
  Bryan Cantrill <bryan@joyent.com>
+ lrn@chromium.org <lrn@chromium.org>
+ Dane Springmeyer <dane@dbsgeo.com>
+ Sambasiva Suda <sambasivarao@gmail.com>
+ Vincent Voyer <v@fasterize.com>
+ ANDO Takahiro <takahiro.ando@gmail.com>
diff --cc ChangeLog
+++ b/ChangeLog
 -2012.05.04 Version 0.6.17 (stable)
 +2012.04.18, Version 0.7.8, (unstable)
 +
 +* Upgrade V8 to 3.9.24.9
 +
 +* Upgrade OpenSSL to 1.0.0f
 +
 +* Upgrade npm to 1.1.18
 +
 +* Show licenses in Binary installers
 +
 +* Domains (isaacs)
 +
 +* readline: rename "end" to "close" (Nathan Rajlich)
 +
 +* tcp: make getsockname() return address family as string (Shigeki Ohtsu)
 +
 +* http, https: fix .setTimeout() (ssuda)
 +
 +* os: add cross platform EOL character (Mustansir Golawala)
 +
 +* typed arrays: unexport SizeOfArrayElementForType() (Aaron Jacobs)
 +
 +* net: honor 'enable' flag in .setNoDelay() (Ben Noordhuis)
 +
 +* child_process: emit error when .kill fails (Andreas Madsen)
 +
 +* gyp: fix 'argument list too long' build error (Ben Noordhuis)
 +
 +* fs.WriteStream: Handle modifications to fs.open (isaacs)
 +
 +* repl, readline: Handle newlines better (Nathan Rajlich, Nathan Friedly)
 +
 +* build: target OSX 10.5 when building on darwin (Nathan Rajlich)
 +
 +* Fix #3052 Handle errors properly in zlib (isaacs)
 +
 +* build: add support for DTrace and postmortem (Dave Pacheco)
 +
 +* core: add reusable Slab allocator (Ben Noordhuis)
 +
 +
 +2012.03.30, Version 0.7.7 (unstable), 5cda2542fdb086f9fe5de889bea435a65e377dea
 +
 +* Upgrade V8 to 3.9.24.7
 +
 +* Upgrade npm to 1.1.15
 +
 +* Handle Emoji characters properly (Erik Corry, Bert Belder)
 +
 +* readline: migrate ansi/vt100 logic from tty to readline (Nathan Rajlich)
 +
 +* readline: Fix multiline handling (Alex Kocharin)
 +
 +* add a -i/--interactive flag to force the REPL (Nathan Rajlich)
 +
 +* debugger: add breakOnException command (Fedor Indutny)
 +
 +* cluster: kill workers when master dies (Andreas Madsen)
 +
 +* cluster: add graceful disconnect support (Andreas Madsen)
 +
 +* child_process: Separate 'close' event from 'exit' (Charlie McConnell)
 +
 +* typed arrays: add Uint8ClampedArray (Mikael Bourges-Sevenier)
 +
 +* buffer: Fix byte alignment issues (Ben Noordhuis, Erik Lundin)
 +
 +* tls: fix CryptoStream.setKeepAlive() (Shigeki Ohtsu)
 +
 +* Expose http parse error codes (Felix Geisendörfer)
 +
 +* events: don't delete the listeners array (Ben Noordhuis, Nathan Rajlich)
 +
 +* process: add process.config to view node's ./configure settings (Nathan Rajlich)
 +
 +* process: process.execArgv to see node's arguments (Micheil Smith)
 +
 +* process: fix process.title setter (Ben Noordhuis)
 +
 +* timers: handle negative or non-numeric timeout values (Ben Noordhuis)
 +
 +
 +2012.03.13, Version 0.7.6 (unstable), f06abda6f58e517349d1b63a2cbf5a8d04a03505
 +
 +* Upgrade v8 to 3.9.17
 +
 +* Upgrade npm to 1.1.8
 +  - Add support for os/cpu fields in package.json (Adam Blackburn)
 +  - Automatically node-gyp packages containing a binding.gyp
 +  - Fix failures unpacking in UNC shares
 +  - Never create un-listable directories
 +  - Handle cases where an optionalDependency fails to build
 +
 +* events: newListener emit correct fn when using 'once' (Roly Fentanes)
 +
 +* url: Ignore empty port component (Łukasz Walukiewicz)
 +
 +* module: replace 'children' array (isaacs)
 +
 +* tls: parse multiple values of a key in ssl certificate (Sambasiva Suda)
 +
 +* cluster: support passing of named pipes (Ben Noordhuis)
 +
 +* Windows: include syscall in fs errors (Bert Belder)
 +
 +* http: #2888 Emit end event only once (Igor Zinkovsky)
 +
 +* readline: add multiline support (Rlidwka)
 +
 +* process: add `process.hrtime()` (Nathan Rajlich)
 +
 +* net, http, https: add localAddress option (Dmitry Nizovtsev)
 +
 +* addon improvements (Nathan Rajlich)
 +
 +* build improvements (Ben Noordhuis, Sadique Ali, T.C. Hollingsworth, Nathan Rajlich)
 +
 +* add support for "SEARCH" request methods (Nathan Rajlich)
 +
 +* expose the zlib and http_parser version in process.versions (Nathan Rajlich)
 +
 +
 +2012.02.23, Version 0.7.5 (unstable), d384b8b0d2ab7f05465f0a3e15fe20b4e25b5f86
 +
 +* startup speed improvements (Maciej Małecki)
 +
 +* crypto: add function getDiffieHellman() (Tomasz Buchert)
 +
 +* buffer: support decoding of URL-safe base64 (Ben Noordhuis)
 +
 +* Make QueryString.parse() even faster (Brian White)
 +
 +* url: decode url entities in auth section (Ben Noordhuis)
 +
 +* http: support PURGE request method (Ben Noordhuis)
 +
 +* http: Generate Date headers on responses (Mark Nottingham)
 +
 +* Fix #2762: Add callback to close function. (Mikeal Rogers)
 +
 +* dgram: fix out-of-bound memory read (Ben Noordhuis)
 +
 +* repl: add automatic loading of built-in libs (Brandon Benvie)
 +
 +* repl: remove double calls where possible (Fedor Indutny)
 +
 +* Readline improvements. Related: #2737 #2756 (Colton Baker)
 +
 +* build: disable -fomit-frame-pointer on solaris (Dave Pacheco)
 +
 +* build: arch detection improvements (Nathan Rajlich)
 +
 +* build: Make a fat binary for the OS X `make pkg`. (Nathan Rajlich)
 +
 +* jslint src/ and lib/ on 'make test' (isaacs)
 +
 +
 +
 +2012.02.14, Version 0.7.4 (unstable), de21de920cf93ec40736ada3792a7f85f3eadeda
 +
 +* Upgrade V8 to 3.9.5
 +
 +* Upgrade npm to 1.1.1
 +
 +* build: Detect host_arch better (Karl Skomski)
 +
 +* debugger: export `debug_port` to `process` (Fedor Indutny)
 +
 +* api docs: CSS bug fixes (isaacs)
 +
 +* build: use -fPIC for native addons on UNIX (Nathan Rajlich)
 +
 +* Re-add top-level v8::Locker (Marcel Laverdet)
 +
 +* Move images out of the dist tarballs (isaacs)
 +
 +* libuv: Remove uv_export and uv_import (Ben Noordhuis)
 +
 +* build: Support x64 build on Windows (Igor Zinkovsky)
 +
 +
 +2012.02.07, Version 0.7.3 (unstable), 99059aad8d654acda4abcfaa68df182b50f2ec90
 +
 +* Upgrade V8 to 3.9.2
 +
 +* Revert support for isolates. (Ben Noordhuis)
 +
 +* cluster: Cleanup docs, event handling, and process.disconnect (Andreas Madsen)
 +
 +* gyp_addon: link with node.lib on Windows (Nathan Rajlich)
 +
 +* http: fix case where http-parser is freed twice (koichik)
 +
 +* Windows: disable RTTI and exceptions (Bert Belder)
 +
 +
 +2012.02.01, Version 0.7.2 (unstable), ec79acb3a6166e30f0bf271fbbfda1fb575b3321
 +
 +* Update V8 to 3.8.9
 +
 +* Support for sharing streams across Isolates (Igor Zinkovsky)
 +
 +* #2636 - Fix case where http_parsers are freed too early (koichik)
 +
 +* url: Support for IPv6 addresses in URLs (Łukasz Walukiewicz)
 +
 +* child_process: Add disconnect() method to child processes (Andreas Madsen)
 +
 +* fs: add O_EXCL support, exclusive open file (Ben Noordhuis)
 +
 +* fs: more specific error messages (Tj Holowaychuk)
 +
 +* tty: emit 'unknown' key event if key sequence not found (Dan VerWeire, Nathan Rajlich)
 +
 +* build: compile release build too if BUILDTYPE=Debug (Ben Noordhuis)
 +
 +* module: fix --debug-brk on symlinked scripts (Fedor Indutny)
 +
 +* zlib: fix `Failed to set dictionary` issue (Fedor Indutny)
 +
 +* waf: predict target arch for OS X (Fedor Indutny)
 +
 +
 +2012.01.23, Version 0.7.1 (unstable), a74354735ab5d5b0fa35a1e4ff7e653757d2069b
 +
 +* Update V8 to 3.8.8
 +
 +* Install node-waf by default (Fedor Indutny)
 +
 +* crypto: Add ability to turn off PKCS padding (Ingmar Runge)
 +
 +* v8: implement VirtualMemory class on SunOS (Ben Noordhuis)
 +
 +* Add cluster.setupMaster (Andreas Madsen)
 +
 +* move `path.exists*` to `fs.exists*` (Maciej Małecki)
 +
 +* typed arrays: set class name (Ben Noordhuis)
 +
 +* libuv bug fixes (Igor Zinkovsky, Ben Noordhuis, Dan VerWeire)
 +
 +
 +2012.01.16, Version 0.7.0 (unstable), 9cc55dca6f67a6096c858b841c677b0593404321
 +
 +* Upgrade V8 to 3.8.6
 +
 +* Use GYP build system on unix (Ben Noordhuis)
 +
 +* Experimenetal isolates support (Ben Noordhuis)
 +
 +* Improvements to Cluster API (Andreas Madsen)
 +
 +* Use isolates for internal debugger (Fedor Indutny)
 +
 +* Bug fixes
 +
 +
- 2012.04.09 Version 0.6.15 (stable)
++2012.05.04 Version 0.6.17 (stable), 4ced23deaf36493f4303a18f6fdce768c58becc0
+ * Upgrade npm to 1.1.21
+ * uv: Add support for EROFS errors (Ben Noordhuis, Maciej Małecki)
+ * uv: Add support for EIO and ENOSPC errors (Fedor Indutny)
+ * windows: Add support for EXDEV errors (Bert Belder)
+ * http: Fix client memory leaks (isaacs, Vincent Voyer)
+ * fs: fix file descriptor leak in sync functions (Ben Noordhuis)
+ * fs: fix ReadStream / WriteStream double close bug (Ben Noordhuis)
+ 2012.04.30 Version 0.6.16 (stable), a1d193963ddc80a27da5da01b59751e14e33d1d6
+ * Upgrade V8 to 3.6.6.25
+ * Upgrade npm to 1.1.19
+ * Windows: add mappings for UV_ENOENT (Bert Belder)
+ * linux: add IN_MOVE_SELF to inotify event mask (Ben Noordhuis)
+ * unix: call pipe handle connection cb on accept() error (Ben Noordhuis)
+ * unix: handle EWOULDBLOCK (Ben Noordhuis)
+ * map EWOULDBLOCK to UV_EAGAIN (Ben Noordhuis)
+ * Map ENOMEM to UV_ENOMEM (isaacs)
+ * Child process: support the `gid` and `uid` options (Bert Belder)
+ * test: cluster: add worker death event test (Ben Noordhuis)
+ * typo in node_http_parser (isaacs)
+ * http_parser: Eat CRLF between requests, even on connection:close. (Ben Noordhuis)
+ * don't check return value of unsetenv (Ben Noordhuis)
+ 2012.04.09 Version 0.6.15 (stable), f160a45b254e591eb33716311c92be533c6d86c4
  
  * Update npm to 1.1.16
  
diff --cc Makefile
Simple merge
@@@ -11,7 -11,7 +11,3 @@@ npm-debug.lo
  ./npmrc
  .gitignore
  release/
--
--# don't ignore .npmignore files
--# these are used in some tests.
--!.npmignore
@@@ -51,16 -51,17 +51,3 @@@ Stephen Sugden <glurgle@gmail.com
  Gautham Pai <buzypi@gmail.com>
  David Trejo <david.daniel.trejo@gmail.com>
  Paul Vorbach <paul@vorb.de>
--George Ornbo <george@shapeshed.com>
--Tim Oxley <secoif@gmail.com>
--Tyler Green <tyler.green2@gmail.com>
--atomizer <danila.gerasimov@gmail.com>
--Rod Vagg <rod@vagg.org>
--Christian Howe <coderarity@gmail.com>
--Andrew Lunny <alunny@gmail.com>
--Henrik Hodne <dvyjones@binaryhex.com>
--Adam Blackburn <regality@gmail.com>
--Kris Windham <kriswindham@gmail.com>
--Jens Grunert <jens.grunert@gmail.com>
--Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
--Dalmais Maxence <github@maxired.fr>
 -Marcus Ekwall <marcus.ekwall@gmail.com>
@@@ -1,4 -1,4 +1,4 @@@
--Copyright 2009-2012, Isaac Z. Schlueter (the "Original Author")
++Copyright 2009, 2010, 2011 Isaac Z. Schlueter (the "Author")
  All rights reserved.
  
  MIT +no-false-attribs License
@@@ -20,9 -20,9 +20,9 @@@ by the recipients as they would use th
  containing modifications that substantially alter, remove, or
  disable functionality of the Software, outside of the documented
  configuration mechanisms provided by the Software, shall be
--modified such that the Original Author's bug reporting email
--addresses and urls are either replaced with the contact information
--of the parties responsible for the changes, or removed entirely.
++modified such that the Author's bug reporting email addresses and
++urls are either replaced with the contact information of the
++parties responsible for the changes, or removed entirely.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
@@@ -36,7 -36,7 +36,7 @@@ OTHER DEALINGS IN THE SOFTWARE
  
  Except where noted, this license applies to any and all software
  programs and associated documentation files created by the
--Original Author, when distributed with the Software.
++Author, when distributed with the Software.
  
  "Node.js" and "node" trademark Joyent, Inc. npm is not officially
  part of the Node.js project, and is neither owned by nor
@@@ -49,11 -49,11 +49,13 @@@ and are not covered by this license
  "npm Logo" created by Mathias Pettersson and Brian Hammond,
  used with permission.
  
++This program includes a BSDTar/LibArchive version 2.8.3-1 binary,
++originally distributed as part of the MinGW suite, compiled for
++Win32, according to the terms of the BSD license.
++See deps/basic-bsdtar-2.8.3-1-ming32-bin/basic-bsdtar.LICENSE.
++
  This program uses "node-uuid", Copyright (c) 2010 Robert Kieffer,
  according to the terms of the MIT license.
  
  This program uses "request", Copyright (c) 2011 Mikeal Rogers,
  according to the terms of the Apache license.
--
--This program uses "mkdirp",  Copyright (c) 2010 James Halliday,
--according to the terms of the MIT/X11 license.
@@@ -123,7 -123,7 +123,7 @@@ doc-publish: do
        rsync -vazu --stats --no-implied-dirs --delete html/api/ npmjs.org:/var/www/npmjs.org/public/api
  
  zip-publish: release
--      scp release/* npmjs.org:/var/www/npmjs.org/public/dist/
++      scp release/*.zip npmjs.org:/var/www/npmjs.org/public/dist/
  
  release:
        @bash scripts/release.sh
@@@ -49,13 -49,13 +49,6 @@@ if (conf.version) 
    return
  }
  
--if (conf.versions) {
--  var v = process.versions
--  v.npm = npm.version
--  console.log(v)
--  return
--}
--
  log.info("npm@"+npm.version, "using")
  log.info("node@"+process.version, "using")
  
index 0000000,0000000..390e0f2
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,16 @@@
++var argv = process.argv.slice(2)
++  , user = argv[0] || process.getuid()
++  , group = argv[1] || process.getgid()
++
++if (!isNaN(user)) user = +user
++if (!isNaN(group)) group = +group
++
++console.error([user, group])
++
++try {
++  process.setgid(group)
++  process.setuid(user)
++  console.log(JSON.stringify({uid:+process.getuid(), gid:+process.getgid()}))
++} catch (ex) {
++  console.log(JSON.stringify({error:ex.message,errno:ex.errno}))
++}
@@@ -1,6 -1,6 +1,6 @@@
  :: Created by npm, please don't edit manually.\r
--@IF EXIST "%~dp0\node.exe" (\r
--  "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
++@IF EXIST "%~dp0"\"node.exe" (\r
++  "%~dp0"\"node.exe"  "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
  ) ELSE (\r
--  node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
--)\r
++  node  "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
++)
@@@ -21,12 -21,12 +21,6 @@@ It will print out extraneous, missing, 
  If the silent parameter is set to true, nothing will be output to the screen,
  but the data will still be returned.
  
--Callback is provided an error if one occurred, the full data about which
--packages are installed and which dependencies they will receive, and a
--"lite" data object which just shows which versions are installed where.
--Note that the full data object is a circular structure, so care must be
--taken if it is serialized to JSON.
--
  ## CONFIGURATION
  
  ### long
@@@ -3,50 -3,50 +3,6 @@@ npm-changelog(1) -- Change
  
  ## HISTORY
  
--### 1.1.3, 1.1.4
--
--* 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) 
@@@ -59,8 -59,8 +59,8 @@@ Don't use them except in four situation
  * `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.
  
@@@ -115,8 -115,8 +115,6 @@@ The following shorthands are parsed on 
  * `-l`: `--long`
  * `-desc`: `--description`
  * `-S`: `--save`
--* `-D`: `--save-dev`
--* `-O`: `--save-optional`
  * `-y`: `--yes`
  * `-n`: `--yes false`
  * `ll` and `la` commands: `ls --long`
@@@ -220,28 -220,28 +218,6 @@@ See also the `strict-ssl` config
  
  The location of npm's cache directory.  See `npm-cache(1)`
  
--### cache-max
--
--* Default: Infinity
--* Type: Number
--
--The maximum time (in seconds) to keep items in the registry cache before
--re-checking against the registry.
--
--Note that no purging is done unless the `npm cache clean` command is
--explicitly used, and that only GET requests use the cache.
--
--### cache-min
--
--* Default: 0
--* Type: Number
--
--The minimum time (in seconds) to keep items in the registry cache before
--re-checking against the registry.
--
--Note that no purging is done unless the `npm cache clean` command is
--explicitly used, and that only GET requests use the cache.
--
  ### color
  
  * Default: true on Posix, false on Windows
@@@ -360,13 -360,13 +336,6 @@@ user
  
  A proxy to use for outgoing https requests.
  
--### user-agent
--
--* Default: npm/{npm.version} node/{process.version}
--* Type: String
--
--Sets a User-Agent to the request header
--
  ### ignore
  
  * Default: ""
@@@ -384,7 -384,7 +353,7 @@@ The value `npm init` should use by defa
  
  ### init.author.name
  
--* Default: ""
++* Default: "0.0.0"
  * Type: String
  
  The value `npm init` should use by default for the package author's name.
@@@ -403,17 -403,17 +372,6 @@@ The value `npm init` should use by defa
  
  The value `npm init` should use by default for the package author's homepage.
  
--### json
--
--* Default: false
--* Type: Boolean
--
--Whether or not to output JSON data, rather than the normal output.
--
--This feature is currently experimental, and the output data structures
--for many commands is either not implemented in JSON yet, or subject to
--change.  Only the output from `npm ls --json` is currently valid.
--
  ### link
  
  * Default: false
@@@ -586,24 -586,24 +544,6 @@@ Save installed packages to a package.js
  
  Only works if there is already a package.json file present.
  
--### save-dev
--
--* Default: false
--* Type: Boolean
--
--Save installed packages to a package.json file as devDependencies.
--
--Only works if there is already a package.json file present.
--
--### save-optional
--
--* Default: false
--* Type: Boolean
--
--Save installed packages to a package.json file as optionalDependencies.
--
--Only works if there is already a package.json file present.
--
  ### searchopts
  
  * Default: ""
@@@ -742,16 -742,16 +682,6 @@@ If true, output the npm version and exi
  
  Only relevant when specified explicitly on the command line.
  
--### versions
--
--* Default: false
--* Type: boolean
--
--If true, output the npm version as well as node's `process.versions`
--hash, and exit successfully.
--
--Only relevant when specified explicitly on the command line.
--
  ### viewer
  
  * Default: "man" on Posix, "browser" on Windows
@@@ -27,23 -27,23 +27,12 @@@ A package is
  * d) a `<name>@<version>` that is published on the registry with (c)
  * e) a `<name>@<tag>` that points to (d)
  * f) a `<name>` 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
@@@ -170,10 -170,10 +170,6 @@@ npm-index(1) -- Index of all npm docume
  
   The semantic versioner for npm
  
--## npm-shrinkwrap(1)
--
-- Lock down dependency versions
--
  ## npm-star(1)
  
   Mark your favorite packages
  
   Search for packages
  
--## npm-shrinkwrap(3)
--
-- programmatically generate package shrinkwrap file
--
  ## npm-start(3)
  
   Start a package
@@@ -7,17 -7,17 +7,14 @@@ npm-install(1) -- Install a packag
      npm install <tarball file>
      npm install <tarball url>
      npm install <folder>
--    npm install <name> [--save|--save-dev|--save-optional]
++    npm install <name>
      npm install <name>@<tag>
      npm install <name>@<version>
      npm install <name>@<version range>
--    npm install <name>@<version range>
  
  ## DESCRIPTION
  
--This command installs a package, and any packages that it depends on. If the
--package has a shrinkwrap file, the installation of dependencies will be driven
--by that. See npm-shrinkwrap(1).
++This command installs a package, and any packages that it depends on.
  
  A `package` is:
  
@@@ -36,116 -36,116 +33,88 @@@ after packing it up into a tarball (b)
  
  
  * `npm install` (in package directory, no arguments):
++  Install the dependencies in the local node_modules folder.
  
--    Install the dependencies in the local node_modules folder.
--
--    In global mode (ie, with `-g` or `--global` appended to the command),
--    it installs the current package context (ie, the current working
--    directory) as a global package.
--
++  In global mode (ie, with `-g` or `--global` appended to the command),
++  it installs the current package context (ie, the current working
++  directory) as a global package.
  
  * `npm install <folder>`:
--
--    Install a package that is sitting in a folder on the filesystem.
++  Install a package that is sitting in a folder on the filesystem.
  
  * `npm install <tarball file>`:
++  Install a package that is sitting on the filesystem.  Note: if you just want
++  to link a dev directory into your npm root, you can do this more easily by
++  using `npm link`.
  
--    Install a package that is sitting on the filesystem.  Note: if you just want
--    to link a dev directory into your npm root, you can do this more easily by
--    using `npm link`.
--
--    Example:
++  Example:
  
--          npm install ./package.tgz
++        npm install ./package.tgz
  
  * `npm install <tarball url>`:
++  Fetch the tarball url, and then install it.  In order to distinguish between
++  this and other options, the argument must start with "http://" or "https://"
  
--    Fetch the tarball url, and then install it.  In order to distinguish between
--    this and other options, the argument must start with "http://" or "https://"
--
--    Example:
--
--          npm install https://github.com/indexzero/forever/tarball/v0.5.6
--
--* `npm install <name> [--save|--save-dev|--save-optional]`:
--
--    Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
--    `npm-config(1)`.)
++  Example:
  
--    In most cases, this will install the latest version
--    of the module published on npm.
++        npm install https://github.com/indexzero/forever/tarball/v0.5.6
  
--    Example:
++* `npm install <name>`:
++  Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
++  `npm-config(1)`)
  
--          npm install sax
++  Example:
  
--    `npm install` takes 3 exclusive, optional flags which save or update
--    the package version in your main package.json:
++        npm install sax
  
--    * `--save`: Package will appear in your `dependencies`.
--
--    * `--save-dev`: Package will appear in your `devDependencies`.
--
--    * `--save-optional`: Package will appear in your `optionalDependencies`.
--
--    Examples:
--
--          npm install sax --save
--          npm install node-tap --save-dev
--          npm install dtrace-provider --save-optional
--
--
--    **Note**: If there is a file or folder named `<name>` in the current
--    working directory, then it will try to install that, and only try to
--    fetch the package by name if it is not valid.
++  **Note**: If there is a file or folder named `<name>` in the current
++  working directory, then it will try to install that, and only try to
++  fetch the package by name if it is not valid.
  
  * `npm install <name>@<tag>`:
++  Install the version of the package that is referenced by the specified tag.
++  If the tag does not exist in the registry data for that package, then this
++  will fail.
  
--    Install the version of the package that is referenced by the specified tag.
--    If the tag does not exist in the registry data for that package, then this
--    will fail.
--
--    Example:
++  Example:
  
--          npm install sax@latest
++        npm install sax@latest
  
  * `npm install <name>@<version>`:
++  Install the specified version of the package.  This will fail if the version
++  has not been published to the registry.
  
--    Install the specified version of the package.  This will fail if the version
--    has not been published to the registry.
++  Example:
  
--    Example:
--
--          npm install sax@0.1.1
++        npm install sax@0.1.1
  
  * `npm install <name>@<version range>`:
++  Install a version of the package matching the specified version range.  This
++  will follow the same rules for resolving dependencies described in `npm-json(1)`.
  
--    Install a version of the package matching the specified version range.  This
--    will follow the same rules for resolving dependencies described in `npm-json(1)`.
--
--    Note that most version ranges must be put in quotes so that your shell will
--    treat it as a single argument.
++  Note that most version ranges must be put in quotes so that your shell will
++  treat it as a single argument.
  
--    Example:
++  Example:
  
--          npm install sax@">=0.1.0 <0.2.0"
++        npm install sax@">=0.1.0 <0.2.0"
  
  * `npm install <git remote url>`:
  
--    Install a package by cloning a git remote url.  The format of the git
--    url is:
++  Install a package by cloning a git remote url.  The format of the git
++  url is:
  
--          <protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
++        <protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
  
--    `<protocol>` is one of `git`, `git+ssh`, `git+http`, or
--    `git+https`.  If no `<commit-ish>` is specified, then `master` is
--    used.
++  `<protocol>` is one of `git`, `git+ssh`, `git+http`, or
++  `git+https`.  If no `<commit-ish>` is specified, then `master` is
++  used.
  
--    Examples:
++  Examples:
  
--          git+ssh://git@github.com:isaacs/npm.git#v1.0.27
--          git+https://isaacs@github.com/isaacs/npm.git
--          git://github.com/isaacs/npm.git#v1.0.27
++        git+ssh://git@github.com:isaacs/npm.git#v1.0.27
++        git+https://isaacs@github.com/isaacs/npm.git
++        git://github.com/isaacs/npm.git#v1.0.27
  
  You may combine multiple arguments, and even multiple types of arguments.
  For example:
@@@ -230,4 -230,4 +199,3 @@@ affects a real use-case, it will be inv
  * npm-folders(1)
  * npm-tag(1)
  * npm-rm(1)
--* npm-shrinkwrap(1)
@@@ -332,7 -332,7 +332,6 @@@ is a semver compatible version identifi
  * `""` (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:
  
@@@ -388,18 -388,18 +387,6 @@@ 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
@@@ -428,7 -428,7 +415,7 @@@ node that your stuff works on
      { "engines" : { "node" : ">=0.1.27 <0.1.30" } }
  
  And, like with dependencies, if you don't specify the version (or if you
--specify "\*" as the version), then any version of node will do.
++specify "*" as the version), then any version of node will do.
  
  If you specify an "engines" field, then npm will require that "node" be
  somewhere on that list. If "engines" is omitted, then npm will just assume
@@@ -439,36 -439,36 +426,6 @@@ are capable of properly installing you
  
      { "engines" : { "npm" : "~1.0.20" } }
  
--## os
--
--You can specify which operating systems your
--module will run on:
--
--    "os" : [ "darwin", "linux" ]
--
--You can also blacklist instead of whitelist operating systems,
--just prepend the blacklisted os with a '!':
--
--    "os" : [ "!win32" ]
--
--The host operating system is determined by `process.platform`
--
--It is allowed to both blacklist, and whitelist, although there isn't any
--good reason to do this.
--
--## cpu
--
--If your code only runs on certain cpu architectures,
--you can specify which ones.
--
--    "cpu" : [ "x64", "ia32" ]
--
--Like the `os` option, you can also blacklist architectures:
--
--    "cpu" : [ "!arm", "!mips" ]
--
--The host architecture is determined by `process.arch`
--
  ## preferGlobal
  
  If your package is primarily a command-line application that should be
@@@ -485,7 -485,7 +442,7 @@@ to publish it
  
  This is a way to prevent accidental publication of private repositories.
  If you would like to ensure that a given package is only ever published
--to a specific registry (for example, an internal registry),
++to a speciic registry (for example, an internal registry),
  then use the `publishConfig` hash described below
  to override the `registry` config param at publish-time.
  
@@@ -22,13 -22,13 +22,6 @@@ When run as `ll` or `la`, it shows exte
  
  ## CONFIGURATION
  
--### json
--
--* Default: false
--* Type: Boolean
--
--Show information in JSON format.
--
  ### long
  
  * Default: false
@@@ -62,20 -62,20 +62,6 @@@ Package scripts run in an environment w
  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
@@@ -19,7 -19,7 +19,7 @@@
  <p>This function should not be used programmatically.  Instead, just refer
  to the <code>npm.bin</code> member.</p>
  </div>
- <p id="footer">bin &mdash; npm@1.1.18</p>
 -<p id="footer">bin &mdash; npm@1.1.21</p>
++<p id="footer">bin &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -25,7 -25,7 +25,7 @@@ optional version number.</p
  <p>This command will launch a browser, so this command may not be the most
  friendly for programmatic use.</p>
  </div>
- <p id="footer">bugs &mdash; npm@1.1.18</p>
 -<p id="footer">bugs &mdash; npm@1.1.21</p>
++<p id="footer">bugs &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -28,7 -28,7 +28,7 @@@ usage, or <code>man 3 npm-&lt;command&g
  
  <ul><li><a href="../doc/index.html">index(1)</a></li></ul>
  </div>
- <p id="footer">commands &mdash; npm@1.1.18</p>
 -<p id="footer">commands &mdash; npm@1.1.21</p>
++<p id="footer">commands &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -33,7 -33,7 +33,7 @@@ functions instead.</p
  
  <ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
  </div>
- <p id="footer">config &mdash; npm@1.1.18</p>
 -<p id="footer">config &mdash; npm@1.1.21</p>
++<p id="footer">config &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -30,7 -30,7 +30,7 @@@ install the package.</p></li></ul
  
  <ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
  </div>
- <p id="footer">deprecate &mdash; npm@1.1.18</p>
 -<p id="footer">deprecate &mdash; npm@1.1.21</p>
++<p id="footer">deprecate &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -25,7 -25,7 +25,7 @@@ optional version number.</p
  <p>This command will launch a browser, so this command may not be the most
  friendly for programmatic use.</p>
  </div>
- <p id="footer">docs &mdash; npm@1.1.18</p>
 -<p id="footer">docs &mdash; npm@1.1.21</p>
++<p id="footer">docs &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -30,7 -30,7 +30,7 @@@ to open. The package can optionally hav
  <p>Since this command opens an editor in a new process, be careful about where
  and how this is used.</p>
  </div>
- <p id="footer">edit &mdash; npm@1.1.18</p>
 -<p id="footer">edit &mdash; npm@1.1.21</p>
++<p id="footer">edit &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -24,7 -24,7 +24,7 @@@ sure to use <code>npm rebuild &lt;pkg&g
  
  <p>The first element in the 'args' parameter must be a package name.  After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
  </div>
- <p id="footer">explore &mdash; npm@1.1.18</p>
 -<p id="footer">explore &mdash; npm@1.1.21</p>
++<p id="footer">explore &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -32,7 -32,7 +32,7 @@@ Name of the file that matched</li></ul
  
  <p>The silent parameter is not neccessary not used, but it may in the future.</p>
  </div>
- <p id="footer">help-search &mdash; npm@1.1.18</p>
 -<p id="footer">help-search &mdash; npm@1.1.21</p>
++<p id="footer">help-search &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -35,7 -35,7 +35,7 @@@ then go ahead and use this programmatic
  
  <p><a href="../doc/json.html">json(1)</a></p>
  </div>
- <p id="footer">init &mdash; npm@1.1.18</p>
 -<p id="footer">init &mdash; npm@1.1.21</p>
++<p id="footer">init &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -25,7 -25,7 +25,7 @@@ the name of a package to be installed.<
  <p>Finally, 'callback' is a function that will be called when all packages have been
  installed or when an error has been encountered.</p>
  </div>
- <p id="footer">install &mdash; npm@1.1.18</p>
 -<p id="footer">install &mdash; npm@1.1.21</p>
++<p id="footer">install &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -39,7 -39,7 +39,7 @@@ npm.commands.link('redis', cb)  # link-
  <p>Now, any changes to the redis package will be reflected in
  the package in the current working directory</p>
  </div>
- <p id="footer">link &mdash; npm@1.1.18</p>
 -<p id="footer">link &mdash; npm@1.1.21</p>
++<p id="footer">link &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -32,7 -32,7 +32,7 @@@ config object.</p
  
  <p>For a list of all the available command-line configs, see <code>npm help config</code></p>
  </div>
- <p id="footer">load &mdash; npm@1.1.18</p>
 -<p id="footer">load &mdash; npm@1.1.21</p>
++<p id="footer">load &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -28,12 -28,12 +28,6 @@@ like with any other command, such as <c
  <p>If the silent parameter is set to true, nothing will be output to the screen,
  but the data will still be returned.</p>
  
--<p>Callback is provided an error if one occurred, the full data about which
--packages are installed and which dependencies they will receive, and a
--"lite" data object which just shows which versions are installed where.
--Note that the full data object is a circular structure, so care must be
--taken if it is serialized to JSON.</p>
--
  <h2 id="CONFIGURATION">CONFIGURATION</h2>
  
  <h3 id="long">long</h3>
@@@ -59,7 -59,7 +53,7 @@@ project.</p
  This means that if a submodule a same dependency as a parent module, then the
  dependency will only be output once.</p>
  </div>
- <p id="footer">ls &mdash; npm@1.1.18</p>
 -<p id="footer">ls &mdash; npm@1.1.21</p>
++<p id="footer">ls &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -24,7 -24,7 +24,7 @@@ npm.load(configObject, function (er, np
  
  <h2 id="VERSION">VERSION</h2>
  
- <p>1.1.18</p>
 -<p>1.1.21</p>
++<p>1.1.0-2</p>
  
  <h2 id="DESCRIPTION">DESCRIPTION</h2>
  
@@@ -91,7 -91,7 +91,7 @@@ method names.  Use the <code>npm.deref<
  
  <pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
  </div>
- <p id="footer">npm &mdash; npm@1.1.18</p>
 -<p id="footer">npm &mdash; npm@1.1.21</p>
++<p id="footer">npm &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -19,7 -19,7 +19,7 @@@ currently outdated.</p
  
  <p>If the 'packages' parameter is left out, npm will check all packages.</p>
  </div>
- <p id="footer">outdated &mdash; npm@1.1.18</p>
 -<p id="footer">outdated &mdash; npm@1.1.21</p>
++<p id="footer">outdated &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -34,7 -34,7 +34,7 @@@ that is not implemented at this time.</
  
  <ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
  </div>
- <p id="footer">owner &mdash; npm@1.1.18</p>
 -<p id="footer">owner &mdash; npm@1.1.21</p>
++<p id="footer">owner &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -25,7 -25,7 +25,7 @@@ overwritten the second time.</p
  
  <p>If no arguments are supplied, then npm packs the current package folder.</p>
  </div>
- <p id="footer">pack &mdash; npm@1.1.18</p>
 -<p id="footer">pack &mdash; npm@1.1.21</p>
++<p id="footer">pack &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -21,7 -21,7 +21,7 @@@
  
  <p>This function is not useful programmatically</p>
  </div>
- <p id="footer">prefix &mdash; npm@1.1.18</p>
 -<p id="footer">prefix &mdash; npm@1.1.21</p>
++<p id="footer">prefix &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -23,7 -23,7 +23,7 @@@
  <p>Extraneous packages are packages that are not listed on the parent
  package's dependencies list.</p>
  </div>
- <p id="footer">prune &mdash; npm@1.1.18</p>
 -<p id="footer">prune &mdash; npm@1.1.21</p>
++<p id="footer">prune &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -32,7 -32,7 +32,7 @@@ the registry.  Overwrites when the "for
  
  <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
  </div>
- <p id="footer">publish &mdash; npm@1.1.18</p>
 -<p id="footer">publish &mdash; npm@1.1.21</p>
++<p id="footer">publish &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -22,7 -22,7 +22,7 @@@ the new binary. If no 'packages' parame
  
  <p>See <code>npm help build</code></p>
  </div>
- <p id="footer">rebuild &mdash; npm@1.1.18</p>
 -<p id="footer">rebuild &mdash; npm@1.1.21</p>
++<p id="footer">rebuild &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -27,7 -27,7 +27,7 @@@ in the <code>packages</code> parameter.
  
  <ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
  </div>
- <p id="footer">restart &mdash; npm@1.1.18</p>
 -<p id="footer">restart &mdash; npm@1.1.21</p>
++<p id="footer">restart &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -21,7 -21,7 +21,7 @@@
  
  <p>This function is not useful programmatically.</p>
  </div>
- <p id="footer">root &mdash; npm@1.1.18</p>
 -<p id="footer">root &mdash; npm@1.1.21</p>
++<p id="footer">root &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -29,7 -29,7 +29,7 @@@ assumed to be the command to run. All o
  
  <ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
  </div>
- <p id="footer">run-script &mdash; npm@1.1.18</p>
 -<p id="footer">run-script &mdash; npm@1.1.21</p>
++<p id="footer">run-script &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -32,7 -32,7 +32,7 @@@ excluded term (the "searchexclude" conf
  and doesn't try to read your mind (it doesn't do any verb tense matching or the
  like).</p>
  </div>
- <p id="footer">search &mdash; npm@1.1.18</p>
 -<p id="footer">search &mdash; npm@1.1.21</p>
++<p id="footer">search &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -26,7 -26,7 +26,7 @@@ but the shrinkwrap file will still be w
  <p>Finally, 'callback' is a function that will be called when the shrinkwrap has
  been saved.</p>
  </div>
- <p id="footer">shrinkwrap &mdash; npm@1.1.18</p>
 -<p id="footer">shrinkwrap &mdash; npm@1.1.21</p>
++<p id="footer">shrinkwrap &mdash; npm@1.1.16</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -19,7 -19,7 +19,7 @@@
  <p>npm can run tests on multiple packages. Just specify multiple packages
  in the <code>packages</code> parameter.</p>
  </div>
- <p id="footer">start &mdash; npm@1.1.18</p>
 -<p id="footer">start &mdash; npm@1.1.21</p>
++<p id="footer">start &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -19,7 -19,7 +19,7 @@@
  <p>npm can run stop on multiple packages. Just specify multiple packages
  in the <code>packages</code> parameter.</p>
  </div>
- <p id="footer">stop &mdash; npm@1.1.18</p>
 -<p id="footer">stop &mdash; npm@1.1.21</p>
++<p id="footer">stop &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -33,7 -33,7 +33,7 @@@ dependencies into the submodule folder.
  
  <ul><li>npm help json</li><li>git help submodule</li></ul>
  </div>
- <p id="footer">submodule &mdash; npm@1.1.18</p>
 -<p id="footer">submodule &mdash; npm@1.1.21</p>
++<p id="footer">submodule &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -29,7 -29,7 +29,7 @@@ parameter is missing or falsey (empty)
  used. For more information about how to set this config, check
  <code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
  </div>
- <p id="footer">tag &mdash; npm@1.1.18</p>
 -<p id="footer">tag &mdash; npm@1.1.21</p>
++<p id="footer">tag &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -22,7 -22,7 +22,7 @@@ true.</p
  <p>npm can run tests on multiple packages. Just specify multiple packages
  in the <code>packages</code> parameter.</p>
  </div>
- <p id="footer">test &mdash; npm@1.1.18</p>
 -<p id="footer">test &mdash; npm@1.1.21</p>
++<p id="footer">test &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -22,7 -22,7 +22,7 @@@ the name of a package to be uninstalled
  <p>Finally, 'callback' is a function that will be called when all packages have been
  uninstalled or when an error has been encountered.</p>
  </div>
- <p id="footer">uninstall &mdash; npm@1.1.18</p>
 -<p id="footer">uninstall &mdash; npm@1.1.21</p>
++<p id="footer">uninstall &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -26,7 -26,7 +26,7 @@@ is what is meant.</p
  <p>If no version is specified, or if all versions are removed then
  the root package entry is removed from the registry entirely.</p>
  </div>
- <p id="footer">unpublish &mdash; npm@1.1.18</p>
 -<p id="footer">unpublish &mdash; npm@1.1.21</p>
++<p id="footer">unpublish &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -18,7 -18,7 +18,7 @@@
  
  <p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
  </div>
- <p id="footer">update &mdash; npm@1.1.18</p>
 -<p id="footer">update &mdash; npm@1.1.21</p>
++<p id="footer">update &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -24,7 -24,7 +24,7 @@@ fail if the repo is not clean.</p
  parameter. The difference, however, is this function will fail if it does
  not have exactly one element. The only element should be a version number.</p>
  </div>
- <p id="footer">version &mdash; npm@1.1.18</p>
 -<p id="footer">version &mdash; npm@1.1.21</p>
++<p id="footer">version &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -99,7 -99,7 +99,7 @@@ the field name.</p
  
  <p>corresponding to the list of fields selected.</p>
  </div>
- <p id="footer">view &mdash; npm@1.1.18</p>
 -<p id="footer">view &mdash; npm@1.1.21</p>
++<p id="footer">view &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -21,7 -21,7 +21,7 @@@
  
  <p>This function is not useful programmatically</p>
  </div>
- <p id="footer">whoami &mdash; npm@1.1.18</p>
 -<p id="footer">whoami &mdash; npm@1.1.21</p>
++<p id="footer">whoami &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -267,7 -267,7 +267,7 @@@ will no doubt tell you to put the outpu
  
  <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
  </div>
- <p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.18</p>
 -<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.21</p>
++<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -39,7 -39,7 +39,7 @@@ authorize on a new machine.</p
  
  <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
  </div>
- <p id="footer">adduser &mdash; npm@1.1.18</p>
 -<p id="footer">adduser &mdash; npm@1.1.21</p>
++<p id="footer">adduser &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -20,7 -20,7 +20,7 @@@
  
  <ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">bin &mdash; npm@1.1.18</p>
 -<p id="footer">bin &mdash; npm@1.1.21</p>
++<p id="footer">bin &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -36,7 -36,7 +36,7 @@@ config param.</p
  
  <ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
  </div>
- <p id="footer">bugs &mdash; npm@1.1.18</p>
 -<p id="footer">bugs &mdash; npm@1.1.21</p>
++<p id="footer">bugs &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -25,7 -25,7 +25,7 @@@ A folder containing a <code>package.jso
  
  <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
  </div>
- <p id="footer">build &mdash; npm@1.1.18</p>
 -<p id="footer">build &mdash; npm@1.1.21</p>
++<p id="footer">build &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -20,7 -20,7 +20,7 @@@ install packages into the local space.<
  
  <ul><li><a href="../doc/install.html">install(1)</a></li></ul>
  </div>
- <p id="footer">bundle &mdash; npm@1.1.18</p>
 -<p id="footer">bundle &mdash; npm@1.1.21</p>
++<p id="footer">bundle &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -66,7 -66,7 +66,7 @@@ they do not make an HTTP request to th
  
  <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
  </div>
- <p id="footer">cache &mdash; npm@1.1.18</p>
 -<p id="footer">cache &mdash; npm@1.1.21</p>
++<p id="footer">cache &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
  
  <h2 id="HISTORY">HISTORY</h2>
  
--<h3 id="1-1-3-1-1-4">1.1.3, 1.1.4</h3>
--
--<ul><li>Update request to support HTTPS-over-HTTP proxy tunneling</li><li>Throw on undefined envs in config settings</li><li>Update which to 1.0.5</li><li>Fix windows UNC busyloop in findPrefix</li><li>Bundle nested bundleDependencies properly</li><li>Alias adduser to add-user</li><li>Doc updates  (Christian Howe, Henrik Hodne, Andrew Lunny)</li><li>ignore logfd/outfd streams in makeEnv() (Rod Vagg)</li><li>shrinkwrap: Behave properly with url-installed deps</li><li>install: Support --save with url install targets</li><li>Support installing naked tars or single-file modules from urls etc.</li><li>init: Don't add engines section</li><li>Don't run make clean on rebuild</li><li>Added missing unicode replacement (atomizer)</li></ul>
--
--<h3 id="1-1-2">1.1.2</h3>
--
--<p>Dave Pacheco (2):
--      add "npm shrinkwrap"</p>
--
--<p>Martin Cooper (1):
--      Fix #1753 Make a copy of the cached objects we'll modify.</p>
--
--<p>Tim Oxley (1):
--      correctly remove readme from default npm view command.</p>
--
--<p>Tyler Green (1):
--      fix #2187 set terminal columns to Infinity if 0</p>
--
--<p>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</p>
--
--<h3 id="1-1">1.1</h3>
--
--<ul><li>Replace system tar dependency with a JS tar</li><li>Continue to refine</li></ul>
--
  <h3 id="1-0">1.0</h3>
  
  <ul><li>Greatly simplified folder structure </li><li>Install locally (bundle by default) </li><li>Drastic rearchitecture</li></ul>
@@@ -65,7 -65,7 +34,7 @@@
  
  <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
  </div>
- <p id="footer">changelog &mdash; npm@1.1.18</p>
 -<p id="footer">changelog &mdash; npm@1.1.21</p>
++<p id="footer">changelog &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -64,7 -64,7 +64,7 @@@ while (foo) 
  <p>Don't use them except in four situations:</p>
  
  <ul><li><code>for (;;)</code> loops.  They're actually required.</li><li>null loops like: <code>while (something) ;</code> (But you'd better have a good
--reason for doing that.)</li><li><code>case "foo": doSomething(); break</code></li><li>In front of a leading <code>(</code> or <code>[</code> at the start of the line.
++reason for doing that.)</li><li>case "foo": doSomething(); break</li><li>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.</li></ul>
  
@@@ -191,7 -191,7 +191,7 @@@ set to anything."</p
  
  <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
  </div>
- <p id="footer">coding-style &mdash; npm@1.1.18</p>
 -<p id="footer">coding-style &mdash; npm@1.1.21</p>
++<p id="footer">coding-style &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -33,7 -33,7 +33,7 @@@ completions based on the arguments.</p
  
  <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
  </div>
- <p id="footer">completion &mdash; npm@1.1.18</p>
 -<p id="footer">completion &mdash; npm@1.1.21</p>
++<p id="footer">completion &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -105,7 -105,7 +105,7 @@@ global config.</p
  
  <p>The following shorthands are parsed on the command-line:</p>
  
--<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-D</code>: <code>--save-dev</code></li><li><code>-O</code>: <code>--save-optional</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
++<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
  
  <p>If the specified configuration param resolves unambiguously to a known
  configuration parameter, then it is expanded to that configuration
@@@ -200,26 -200,26 +200,6 @@@ to trust only that specific signing aut
  
  <p>The location of npm's cache directory.  See <code><a href="../doc/cache.html">cache(1)</a></code></p>
  
--<h3 id="cache-max">cache-max</h3>
--
--<ul><li>Default: Infinity</li><li>Type: Number</li></ul>
--
--<p>The maximum time (in seconds) to keep items in the registry cache before
--re-checking against the registry.</p>
--
--<p>Note that no purging is done unless the <code>npm cache clean</code> command is
--explicitly used, and that only GET requests use the cache.</p>
--
--<h3 id="cache-min">cache-min</h3>
--
--<ul><li>Default: 0</li><li>Type: Number</li></ul>
--
--<p>The minimum time (in seconds) to keep items in the registry cache before
--re-checking against the registry.</p>
--
--<p>Note that no purging is done unless the <code>npm cache clean</code> command is
--explicitly used, and that only GET requests use the cache.</p>
--
  <h3 id="color">color</h3>
  
  <ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean or <code>"always"</code></li></ul>
@@@ -320,12 -320,12 +300,6 @@@ user.</p
  
  <p>A proxy to use for outgoing https requests.</p>
  
--<h3 id="user-agent">user-agent</h3>
--
--<ul><li>Default: npm/{npm.version} node/{process.version}</li><li>Type: String</li></ul>
--
--<p>Sets a User-Agent to the request header</p>
--
  <h3 id="ignore">ignore</h3>
  
  <ul><li>Default: ""</li><li>Type: string</li></ul>
@@@ -341,7 -341,7 +315,7 @@@ from packages when building tarballs.</
  
  <h3 id="init-author-name">init.author.name</h3>
  
--<ul><li>Default: ""</li><li>Type: String</li></ul>
++<ul><li>Default: "0.0.0"</li><li>Type: String</li></ul>
  
  <p>The value <code>npm init</code> should use by default for the package author's name.</p>
  
  
  <p>The value <code>npm init</code> should use by default for the package author's homepage.</p>
  
--<h3 id="json">json</h3>
--
--<ul><li>Default: false</li><li>Type: Boolean</li></ul>
--
--<p>Whether or not to output JSON data, rather than the normal output.</p>
--
--<p>This feature is currently experimental, and the output data structures
--for many commands is either not implemented in JSON yet, or subject to
--change.  Only the output from <code>npm ls --json</code> is currently valid.</p>
--
  <h3 id="link">link</h3>
  
  <ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@@ -516,22 -516,22 +480,6 @@@ this as true.</p
  
  <p>Only works if there is already a package.json file present.</p>
  
--<h3 id="save-dev">save-dev</h3>
--
--<ul><li>Default: false</li><li>Type: Boolean</li></ul>
--
--<p>Save installed packages to a package.json file as devDependencies.</p>
--
--<p>Only works if there is already a package.json file present.</p>
--
--<h3 id="save-optional">save-optional</h3>
--
--<ul><li>Default: false</li><li>Type: Boolean</li></ul>
--
--<p>Save installed packages to a package.json file as optionalDependencies.</p>
--
--<p>Only works if there is already a package.json file present.</p>
--
  <h3 id="searchopts">searchopts</h3>
  
  <ul><li>Default: ""</li><li>Type: String</li></ul>
@@@ -653,15 -653,15 +601,6 @@@ this value.  Thus, the defaults are <co
  
  <p>Only relevant when specified explicitly on the command line.</p>
  
--<h3 id="versions">versions</h3>
--
--<ul><li>Default: false</li><li>Type: boolean</li></ul>
--
--<p>If true, output the npm version as well as node's <code>process.versions</code>
--hash, and exit successfully.</p>
--
--<p>Only relevant when specified explicitly on the command line.</p>
--
  <h3 id="viewer">viewer</h3>
  
  <ul><li>Default: "man" on Posix, "browser" on Windows</li><li>Type: path</li></ul>
@@@ -684,7 -684,7 +623,7 @@@ then answer "no" to any prompt.</p
  
  <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
  </div>
- <p id="footer">config &mdash; npm@1.1.18</p>
 -<p id="footer">config &mdash; npm@1.1.21</p>
++<p id="footer">config &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -29,7 -29,7 +29,7 @@@ something like this:</p
  
  <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
  </div>
- <p id="footer">deprecate &mdash; npm@1.1.18</p>
 -<p id="footer">deprecate &mdash; npm@1.1.21</p>
++<p id="footer">deprecate &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -28,23 -28,23 +28,13 @@@ topic, or <code>npm help thing</code> t
  
  <p>A package is:</p>
  
--<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code>&lt;name&gt;@&lt;version&gt;</code> that is published on the registry with (c)</li><li>e) a <code>&lt;name&gt;@&lt;tag&gt;</code> that points to (d)</li><li>f) a <code>&lt;name&gt;</code> that has a "latest" tag satisfying (e)</li><li>g) a <code>git</code> url that, when cloned, results in (a).</li></ul>
++<ul><li>a) a folder containing a program described by a package.json file</li><li>b) a gzipped tarball containing (a)</li><li>c) a url that resolves to (b)</li><li>d) a <code>&lt;name&gt;@&lt;version&gt;</code> that is published on the registry with (c)</li><li>e) a <code>&lt;name&gt;@&lt;tag&gt;</code> that points to (d)</li><li>f) a <code>&lt;name&gt;</code> that has a "latest" tag satisfying (e)</li></ul>
  
  <p>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).</p>
  
--<p>Git urls can be of the form:</p>
--
--<pre><code>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</code></pre>
--
--<p>The <code>commit-ish</code> can be any tag, sha, or branch which can be supplied as
--an argument to <code>git checkout</code>.  The default is <code>master</code>.</p>
--
  <h2 id="The-package-json-File">The package.json File</h2>
  
  <p>You need to have a <code>package.json</code> file in the root of your project to do
@@@ -160,7 -160,7 +150,7 @@@ from a fresh checkout.</p
  
  <ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
  </div>
- <p id="footer">developers &mdash; npm@1.1.18</p>
 -<p id="footer">developers &mdash; npm@1.1.21</p>
++<p id="footer">developers &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -80,7 -80,7 +80,7 @@@ license statement)</li><li>Illegal cont
  
  <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
  </div>
- <p id="footer">disputes &mdash; npm@1.1.18</p>
 -<p id="footer">disputes &mdash; npm@1.1.21</p>
++<p id="footer">disputes &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -37,7 -37,7 +37,7 @@@ config param.</p
  
  <ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
  </div>
- <p id="footer">docs &mdash; npm@1.1.18</p>
 -<p id="footer">docs &mdash; npm@1.1.21</p>
++<p id="footer">docs &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -37,7 -37,7 +37,7 @@@ or <code>"notepad"</code> on Windows.</
  
  <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">edit &mdash; npm@1.1.18</p>
 -<p id="footer">edit &mdash; npm@1.1.21</p>
++<p id="footer">edit &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -40,7 -40,7 +40,7 @@@ Windows</li><li>Type: path</li></ul
  
  <ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
  </div>
- <p id="footer">explore &mdash; npm@1.1.18</p>
 -<p id="footer">explore &mdash; npm@1.1.21</p>
++<p id="footer">explore &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -241,7 -241,7 +241,7 @@@ We'll have someone kick it or something
  
  <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
  </div>
- <p id="footer">faq &mdash; npm@1.1.18</p>
 -<p id="footer">faq &mdash; npm@1.1.21</p>
++<p id="footer">faq &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -205,7 -205,7 +205,7 @@@ cannot be found elsewhere.  See <code><
  
  <ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
  </div>
- <p id="footer">folders &mdash; npm@1.1.18</p>
 -<p id="footer">folders &mdash; npm@1.1.21</p>
++<p id="footer">folders &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -38,7 -38,7 +38,7 @@@ where the terms were found in the docum
  
  <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
  </div>
- <p id="footer">help-search &mdash; npm@1.1.18</p>
 -<p id="footer">help-search &mdash; npm@1.1.21</p>
++<p id="footer">help-search &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -36,7 -36,7 +36,7 @@@ matches are equivalent to specifying a 
  
  <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
  </div>
- <p id="footer">help &mdash; npm@1.1.18</p>
 -<p id="footer">help &mdash; npm@1.1.21</p>
++<p id="footer">help &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
  
  <p> The semantic versioner for npm</p>
  
--<h2 id="npm-shrinkwrap-1"><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></h2>
--
--<p> Lock down dependency versions</p>
--
  <h2 id="npm-star-1"><a href="../doc/star.html">star(1)</a></h2>
  
  <p> Mark your favorite packages</p>
  
  <p> Search for packages</p>
  
--<h2 id="npm-shrinkwrap-3"><a href="../api/shrinkwrap.html">shrinkwrap(3)</a></h2>
--
--<p> programmatically generate package shrinkwrap file</p>
--
  <h2 id="npm-start-3"><a href="../api/start.html">start(3)</a></h2>
  
  <p> Start a package</p>
  
  <p> Display npm username</p>
  </div>
- <p id="footer">index &mdash; npm@1.1.18</p>
 -<p id="footer">index &mdash; npm@1.1.21</p>
++<p id="footer">index &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -29,7 -29,7 +29,7 @@@ without a really good reason to do so.<
  
  <ul><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
  </div>
- <p id="footer">init &mdash; npm@1.1.18</p>
 -<p id="footer">init &mdash; npm@1.1.21</p>
++<p id="footer">init &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
  npm install &lt;tarball file&gt;
  npm install &lt;tarball url&gt;
  npm install &lt;folder&gt;
--npm install &lt;name&gt; [--save|--save-dev|--save-optional]
++npm install &lt;name&gt;
  npm install &lt;name&gt;@&lt;tag&gt;
  npm install &lt;name&gt;@&lt;version&gt;
--npm install &lt;name&gt;@&lt;version range&gt;
  npm install &lt;name&gt;@&lt;version range&gt;</code></pre>
  
  <h2 id="DESCRIPTION">DESCRIPTION</h2>
  
--<p>This command installs a package, and any packages that it depends on. If the
--package has a shrinkwrap file, the installation of dependencies will be driven
--by that. See <a href="../doc/shrinkwrap.html">shrinkwrap(1)</a>.</p>
++<p>This command installs a package, and any packages that it depends on.</p>
  
  <p>A <code>package</code> is:</p>
  
@@@ -35,29 -35,29 +32,33 @@@ benefits of using npm if you just want 
  perhaps if you also want to be able to easily install it elsewhere
  after packing it up into a tarball (b).</p>
  
--<ul><li><p><code>npm install</code> (in package directory, no arguments):</p><p>Install the dependencies in the local node_modules folder.</p><p>In global mode (ie, with <code>-g</code> or <code>--global</code> appended to the command),
++<ul><li><p><code>npm install</code> (in package directory, no arguments):
++Install the dependencies in the local node_modules folder.</p><p>In global mode (ie, with <code>-g</code> or <code>--global</code> appended to the command),
  it installs the current package context (ie, the current working
--directory) as a global package.</p></li><li><p><code>npm install &lt;folder&gt;</code>:</p><p>Install a package that is sitting in a folder on the filesystem.</p></li><li><p><code>npm install &lt;tarball file&gt;</code>:</p><p>Install a package that is sitting on the filesystem.  Note: if you just want
++directory) as a global package.</p></li><li><p><code>npm install &lt;folder&gt;</code>:
++Install a package that is sitting in a folder on the filesystem.</p></li><li><p><code>npm install &lt;tarball file&gt;</code>:
++Install a package that is sitting on the filesystem.  Note: if you just want
  to link a dev directory into your npm root, you can do this more easily by
--using <code>npm link</code>.</p><p>Example:</p><pre><code>  npm install ./package.tgz</code></pre></li><li><p><code>npm install &lt;tarball url&gt;</code>:</p><p>Fetch the tarball url, and then install it.  In order to distinguish between
--this and other options, the argument must start with "http://" or "https://"</p><p>Example:</p><pre><code>  npm install https://github.com/indexzero/forever/tarball/v0.5.6</code></pre></li><li><p><code>npm install &lt;name&gt; [--save|--save-dev|--save-optional]</code>:</p><p>Do a <code>&lt;name&gt;@&lt;tag&gt;</code> install, where <code>&lt;tag&gt;</code> is the "tag" config. (See
--<code><a href="../doc/config.html">config(1)</a></code>.)</p><p>In most cases, this will install the latest version
--of the module published on npm.</p><p>Example:</p><p>      npm install sax</p><p><code>npm install</code> takes 3 exclusive, optional flags which save or update
--the package version in your main package.json:</p><ul><li><p><code>--save</code>: Package will appear in your <code>dependencies</code>.</p></li><li><p><code>--save-dev</code>: Package will appear in your <code>devDependencies</code>.</p></li><li><p><code>--save-optional</code>: Package will appear in your <code>optionalDependencies</code>.</p><p>Examples:</p><p>  npm install sax --save
--  npm install node-tap --save-dev
--  npm install dtrace-provider --save-optional</p><p><strong>Note</strong>: If there is a file or folder named <code>&lt;name&gt;</code> in the current
++using <code>npm link</code>.</p><p>Example:</p><pre><code>npm install ./package.tgz</code></pre></li><li><p><code>npm install &lt;tarball url&gt;</code>:
++Fetch the tarball url, and then install it.  In order to distinguish between
++this and other options, the argument must start with "http://" or "https://"</p><p>Example:</p><pre><code>npm install https://github.com/indexzero/forever/tarball/v0.5.6</code></pre></li><li><p><code>npm install &lt;name&gt;</code>:
++Do a <code>&lt;name&gt;@&lt;tag&gt;</code> install, where <code>&lt;tag&gt;</code> is the "tag" config. (See
++<code><a href="../doc/config.html">config(1)</a></code>)</p><p>Example:</p><pre><code>npm install sax</code></pre><p><strong>Note</strong>: If there is a file or folder named <code>&lt;name&gt;</code> in the current
  working directory, then it will try to install that, and only try to
--fetch the package by name if it is not valid.</p></li></ul></li><li><p><code>npm install &lt;name&gt;@&lt;tag&gt;</code>:</p><p>Install the version of the package that is referenced by the specified tag.
++fetch the package by name if it is not valid.</p></li><li><p><code>npm install &lt;name&gt;@&lt;tag&gt;</code>:
++Install the version of the package that is referenced by the specified tag.
  If the tag does not exist in the registry data for that package, then this
--will fail.</p><p>Example:</p><pre><code>  npm install sax@latest</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version&gt;</code>:</p><p>Install the specified version of the package.  This will fail if the version
--has not been published to the registry.</p><p>Example:</p><pre><code>  npm install sax@0.1.1</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version range&gt;</code>:</p><p>Install a version of the package matching the specified version range.  This
++will fail.</p><p>Example:</p><pre><code>npm install sax@latest</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version&gt;</code>:
++Install the specified version of the package.  This will fail if the version
++has not been published to the registry.</p><p>Example:</p><pre><code>npm install sax@0.1.1</code></pre></li><li><p><code>npm install &lt;name&gt;@&lt;version range&gt;</code>:
++Install a version of the package matching the specified version range.  This
  will follow the same rules for resolving dependencies described in <code><a href="../doc/json.html">json(1)</a></code>.</p><p>Note that most version ranges must be put in quotes so that your shell will
--treat it as a single argument.</p><p>Example:</p><p>      npm install sax@"&gt;=0.1.0 &lt;0.2.0"</p></li><li><p><code>npm install &lt;git remote url&gt;</code>:</p><p>Install a package by cloning a git remote url.  The format of the git
--url is:</p><p>      &lt;protocol&gt;://[&lt;user&gt;@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]</p><p><code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
++treat it as a single argument.</p><p>Example:</p><pre><code>npm install sax@"&gt;=0.1.0 &lt;0.2.0"</code></pre></li><li><p><code>npm install &lt;git remote url&gt;</code>:</p><p>Install a package by cloning a git remote url.  The format of the git
++url is:</p><pre><code>&lt;protocol&gt;://[&lt;user&gt;@]&lt;hostname&gt;&lt;separator&gt;&lt;path&gt;[#&lt;commit-ish&gt;]</code></pre><p><code>&lt;protocol&gt;</code> is one of <code>git</code>, <code>git+ssh</code>, <code>git+http</code>, or
  <code>git+https</code>.  If no <code>&lt;commit-ish&gt;</code> is specified, then <code>master</code> is
--used.</p><p>Examples:</p><pre><code>  git+ssh://git@github.com:isaacs/npm.git#v1.0.27
--  git+https://isaacs@github.com/isaacs/npm.git
--  git://github.com/isaacs/npm.git#v1.0.27</code></pre></li></ul>
++used.</p><p>Examples:</p><pre><code>git+ssh://git@github.com:isaacs/npm.git#v1.0.27
++git+https://isaacs@github.com/isaacs/npm.git
++git://github.com/isaacs/npm.git#v1.0.27</code></pre></li></ul>
  
  <p>You may combine multiple arguments, and even multiple types of arguments.
  For example:</p>
@@@ -131,9 -131,9 +132,9 @@@ affects a real use-case, it will be inv
  
  <h2 id="SEE-ALSO">SEE ALSO</h2>
  
--<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
++<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
  </div>
- <p id="footer">install &mdash; npm@1.1.18</p>
 -<p id="footer">install &mdash; npm@1.1.21</p>
++<p id="footer">install &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -311,7 -311,7 +311,7 @@@ space-separated descriptors, OR a rang
  <p>Version range descriptors may be any of the following styles, where "version"
  is a semver compatible version identifier.</p>
  
--<ul><li><code>version</code> Must match <code>version</code> exactly</li><li><code>=version</code> Same as just <code>version</code></li><li><code>&gt;version</code> Must be greater than <code>version</code></li><li><code>&gt;=version</code> etc</li><li><code>&lt;version</code></li><li><code>&lt;=version</code></li><li><code>~version</code> See 'Tilde Version Ranges' below</li><li><code>1.2.x</code> See 'X Version Ranges' below</li><li><code>http://...</code> See 'URLs as Dependencies' below</li><li><code>*</code> Matches any version</li><li><code>""</code> (just an empty string) Same as <code>*</code></li><li><code>version1 - version2</code> Same as <code>&gt;=version1 &lt;=version2</code>.</li><li><code>range1 || range2</code> Passes if either range1 or range2 are satisfied.</li><li><code>git...</code> See 'Git URLs as Dependencies' below</li></ul>
++<ul><li><code>version</code> Must match <code>version</code> exactly</li><li><code>=version</code> Same as just <code>version</code></li><li><code>&gt;version</code> Must be greater than <code>version</code></li><li><code>&gt;=version</code> etc</li><li><code>&lt;version</code></li><li><code>&lt;=version</code></li><li><code>~version</code> See 'Tilde Version Ranges' below</li><li><code>1.2.x</code> See 'X Version Ranges' below</li><li><code>http://...</code> See 'URLs as Dependencies' below</li><li><code>*</code> Matches any version</li><li><code>""</code> (just an empty string) Same as <code>*</code></li><li><code>version1 - version2</code> Same as <code>&gt;=version1 &lt;=version2</code>.</li><li><code>range1 || range2</code> Passes if either range1 or range2 are satisfied.</li></ul>
  
  <p>For example, these are all valid:</p>
  
@@@ -360,18 -360,18 +360,6 @@@ of a version range.</p
  <p>This tarball will be downloaded and installed locally to your package at
  install time.</p>
  
--<h3 id="Git-URLs-as-Dependencies">Git URLs as Dependencies</h3>
--
--<p>Git urls can be of the form:</p>
--
--<pre><code>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</code></pre>
--
--<p>The <code>commit-ish</code> can be any tag, sha, or branch which can be supplied as
--an argument to <code>git checkout</code>.  The default is <code>master</code>.</p>
--
  <h2 id="devDependencies">devDependencies</h2>
  
  <p>If someone is planning on downloading and using your module in their
@@@ -411,36 -411,36 +399,6 @@@ are capable of properly installing you
  
  <pre><code>{ "engines" : { "npm" : "~1.0.20" } }</code></pre>
  
--<h2 id="os">os</h2>
--
--<p>You can specify which operating systems your
--module will run on:</p>
--
--<pre><code>"os" : [ "darwin", "linux" ]</code></pre>
--
--<p>You can also blacklist instead of whitelist operating systems,
--just prepend the blacklisted os with a '!':</p>
--
--<pre><code>"os" : [ "!win32" ]</code></pre>
--
--<p>The host operating system is determined by <code>process.platform</code></p>
--
--<p>It is allowed to both blacklist, and whitelist, although there isn't any
--good reason to do this.</p>
--
--<h2 id="cpu">cpu</h2>
--
--<p>If your code only runs on certain cpu architectures,
--you can specify which ones.</p>
--
--<pre><code>"cpu" : [ "x64", "ia32" ]</code></pre>
--
--<p>Like the <code>os</code> option, you can also blacklist architectures:</p>
--
--<pre><code>"cpu" : [ "!arm", "!mips" ]</code></pre>
--
--<p>The host architecture is determined by <code>process.arch</code></p>
--
  <h2 id="preferGlobal">preferGlobal</h2>
  
  <p>If your package is primarily a command-line application that should be
@@@ -457,7 -457,7 +415,7 @@@ to publish it.</p
  
  <p>This is a way to prevent accidental publication of private repositories.
  If you would like to ensure that a given package is only ever published
--to a specific registry (for example, an internal registry),
++to a speciic registry (for example, an internal registry),
  then use the <code>publishConfig</code> hash described below
  to override the <code>registry</code> config param at publish-time.</p>
  
@@@ -478,7 -478,7 +436,7 @@@ overridden.</p
  
  <ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
  </div>
- <p id="footer">json &mdash; npm@1.1.18</p>
 -<p id="footer">json &mdash; npm@1.1.21</p>
++<p id="footer">json &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -58,7 -58,7 +58,7 @@@ installation target into your project'
  
  <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">link &mdash; npm@1.1.18</p>
 -<p id="footer">link &mdash; npm@1.1.21</p>
++<p id="footer">link &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -29,12 -29,12 +29,6 @@@ like with any other command, such as <c
  
  <h2 id="CONFIGURATION">CONFIGURATION</h2>
  
--<h3 id="json">json</h3>
--
--<ul><li>Default: false</li><li>Type: Boolean</li></ul>
--
--<p>Show information in JSON format.</p>
--
  <h3 id="long">long</h3>
  
  <ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@@ -58,7 -58,7 +52,7 @@@ project.</p
  
  <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
  </div>
- <p id="footer">list &mdash; npm@1.1.18</p>
 -<p id="footer">list &mdash; npm@1.1.21</p>
++<p id="footer">list &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -14,7 -14,7 +14,7 @@@
  
  <h2 id="VERSION">VERSION</h2>
  
- <p>1.1.18</p>
 -<p>1.1.21</p>
++<p>1.1.0-2</p>
  
  <h2 id="DESCRIPTION">DESCRIPTION</h2>
  
@@@ -135,7 -135,7 +135,7 @@@ will no doubt tell you to put the outpu
  
  <ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
  </div>
- <p id="footer">npm &mdash; npm@1.1.18</p>
 -<p id="footer">npm &mdash; npm@1.1.21</p>
++<p id="footer">npm &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -21,7 -21,7 +21,7 @@@ packages are currently outdated.</p
  
  <ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
  </div>
- <p id="footer">outdated &mdash; npm@1.1.18</p>
 -<p id="footer">outdated &mdash; npm@1.1.21</p>
++<p id="footer">outdated &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -34,7 -34,7 +34,7 @@@ that is not implemented at this time.</
  
  <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
  </div>
- <p id="footer">owner &mdash; npm@1.1.18</p>
 -<p id="footer">owner &mdash; npm@1.1.21</p>
++<p id="footer">owner &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -29,7 -29,7 +29,7 @@@ overwritten the second time.</p
  
  <ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">pack &mdash; npm@1.1.18</p>
 -<p id="footer">pack &mdash; npm@1.1.21</p>
++<p id="footer">pack &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -20,7 -20,7 +20,7 @@@
  
  <ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">prefix &mdash; npm@1.1.18</p>
 -<p id="footer">prefix &mdash; npm@1.1.21</p>
++<p id="footer">prefix &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -25,7 -25,7 +25,7 @@@ package's dependencies list.</p
  
  <ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
  </div>
- <p id="footer">prune &mdash; npm@1.1.18</p>
 -<p id="footer">prune &mdash; npm@1.1.21</p>
++<p id="footer">prune &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -29,7 -29,7 +29,7 @@@ the registry.  Overwrites when the "--f
  
  <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
  </div>
- <p id="footer">publish &mdash; npm@1.1.18</p>
 -<p id="footer">publish &mdash; npm@1.1.21</p>
++<p id="footer">publish &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -25,7 -25,7 +25,7 @@@ the new binary.</p
  
  <ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
  </div>
- <p id="footer">rebuild &mdash; npm@1.1.18</p>
 -<p id="footer">rebuild &mdash; npm@1.1.21</p>
++<p id="footer">rebuild &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -97,7 -97,7 +97,7 @@@ ask for help on the <a href="mailto:npm
  
  <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
  </div>
- <p id="footer">registry &mdash; npm@1.1.18</p>
 -<p id="footer">registry &mdash; npm@1.1.21</p>
++<p id="footer">registry &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -58,7 -58,7 +58,7 @@@ modules.  To track those down, you can 
  
  <ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
  </div>
- <p id="footer">removing-npm &mdash; npm@1.1.18</p>
 -<p id="footer">removing-npm &mdash; npm@1.1.21</p>
++<p id="footer">removing-npm &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -24,7 -24,7 +24,7 @@@ the "start" script.</p
  
  <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
  </div>
- <p id="footer">restart &mdash; npm@1.1.18</p>
 -<p id="footer">restart &mdash; npm@1.1.21</p>
++<p id="footer">restart &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -20,7 -20,7 +20,7 @@@
  
  <ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">root &mdash; npm@1.1.18</p>
 -<p id="footer">root &mdash; npm@1.1.21</p>
++<p id="footer">root &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -23,7 -23,7 +23,7 @@@ called directly, as well.</p
  
  <ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
  </div>
- <p id="footer">run-script &mdash; npm@1.1.18</p>
 -<p id="footer">run-script &mdash; npm@1.1.21</p>
++<p id="footer">run-script &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -52,19 -52,19 +52,6 @@@ privileges.</p
  made available regarding the setup of npm and the current state of the
  process.</p>
  
--<h3 id="path">path</h3>
--
--<p>If you depend on modules that define executable scripts, like test suites,
--then those executables will be added to the <code>PATH</code> for executing the scripts.
--So, if your package.json has this:</p>
--
--<pre><code>{ "name" : "foo"
--, "dependencies" : { "bar" : "0.1.x" }
--, "scripts": { "start" : "bar ./test" } }</code></pre>
--
--<p>then you could run <code>npm start</code> to execute the <code>bar</code> script, which is exported
--into the <code>node_modules/.bin</code> directory on <code>npm install</code>.</p>
--
  <h3 id="package-json-vars">package.json vars</h3>
  
  <p>The package.json fields are tacked onto the <code>npm_package_</code> prefix. So, for
@@@ -177,7 -177,7 +164,7 @@@ will sudo the npm command in question.<
  
  <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
  </div>
- <p id="footer">scripts &mdash; npm@1.1.18</p>
 -<p id="footer">scripts &mdash; npm@1.1.21</p>
++<p id="footer">scripts &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -24,7 -24,7 +24,7 @@@ expression characters must be escaped o
  
  <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
  </div>
- <p id="footer">search &mdash; npm@1.1.18</p>
 -<p id="footer">search &mdash; npm@1.1.21</p>
++<p id="footer">search &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -104,7 -104,7 +104,7 @@@ that satisfies the range, or null if no
  
  <ul><li><a href="../doc/json.html">json(1)</a></li></ul>
  </div>
- <p id="footer">semver &mdash; npm@1.1.18</p>
 -<p id="footer">semver &mdash; npm@1.1.21</p>
++<p id="footer">semver &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -169,7 -169,7 +169,7 @@@ versions.</p
  
  <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
  </div>
- <p id="footer">shrinkwrap &mdash; npm@1.1.18</p>
 -<p id="footer">shrinkwrap &mdash; npm@1.1.21</p>
++<p id="footer">shrinkwrap &mdash; npm@1.1.16</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -26,7 -26,7 +26,7 @@@ a vaguely positive way to show that yo
  
  <ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
  </div>
- <p id="footer">star &mdash; npm@1.1.18</p>
 -<p id="footer">star &mdash; npm@1.1.21</p>
++<p id="footer">star &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -20,7 -20,7 +20,7 @@@
  
  <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
  </div>
- <p id="footer">start &mdash; npm@1.1.18</p>
 -<p id="footer">start &mdash; npm@1.1.21</p>
++<p id="footer">start &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -20,7 -20,7 +20,7 @@@
  
  <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
  </div>
- <p id="footer">stop &mdash; npm@1.1.18</p>
 -<p id="footer">stop &mdash; npm@1.1.21</p>
++<p id="footer">stop &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -33,7 -33,7 +33,7 @@@ dependencies into the submodule folder.
  
  <ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
  </div>
- <p id="footer">submodule &mdash; npm@1.1.18</p>
 -<p id="footer">submodule &mdash; npm@1.1.21</p>
++<p id="footer">submodule &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -21,7 -21,7 +21,7 @@@
  
  <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">tag &mdash; npm@1.1.18</p>
 -<p id="footer">tag &mdash; npm@1.1.21</p>
++<p id="footer">tag &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -23,7 -23,7 +23,7 @@@ true.</p
  
  <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
  </div>
- <p id="footer">test &mdash; npm@1.1.18</p>
 -<p id="footer">test &mdash; npm@1.1.21</p>
++<p id="footer">test &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -22,7 -22,7 +22,7 @@@ on its behalf.</p
  
  <ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
  </div>
- <p id="footer">uninstall &mdash; npm@1.1.18</p>
 -<p id="footer">uninstall &mdash; npm@1.1.21</p>
++<p id="footer">uninstall &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -34,7 -34,7 +34,7 @@@ the root package entry is removed from 
  
  <ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
  </div>
- <p id="footer">unpublish &mdash; npm@1.1.18</p>
 -<p id="footer">unpublish &mdash; npm@1.1.21</p>
++<p id="footer">unpublish &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -23,7 -23,7 +23,7 @@@
  
  <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
  </div>
- <p id="footer">update &mdash; npm@1.1.18</p>
 -<p id="footer">update &mdash; npm@1.1.21</p>
++<p id="footer">update &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -31,7 -31,7 +31,7 @@@ will use it as a commit message when cr
  
  <ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
  </div>
- <p id="footer">version &mdash; npm@1.1.18</p>
 -<p id="footer">version &mdash; npm@1.1.21</p>
++<p id="footer">version &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -88,7 -88,7 +88,7 @@@ the field name.</p
  
  <ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
  </div>
- <p id="footer">view &mdash; npm@1.1.18</p>
 -<p id="footer">view &mdash; npm@1.1.21</p>
++<p id="footer">view &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -20,7 -20,7 +20,7 @@@
  
  <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
  </div>
- <p id="footer">whoami &mdash; npm@1.1.18</p>
 -<p id="footer">whoami &mdash; npm@1.1.21</p>
++<p id="footer">whoami &mdash; npm@1.1.0-2</p>
  <script>
  ;(function () {
  var wrapper = document.getElementById("wrapper")
@@@ -59,14 -59,14 +59,11 @@@ code { background:#fff ; outline: 1px s
  <p>npm is a package manager for <a href="http://nodejs.org/">node</a>.  You can use it to install
    and publish your node programs.  It manages dependencies and does other cool stuff.</p>
  
--<h2>Easy Zero Line Install</h2>
++<h2>One Line Install</h2>
  
--<p><a href="http://nodejs.org/#download">Install Node.js</a> <br>
--(npm comes with it.)</p>
++<code>curl http://npmjs.org/install.sh | sh</code>
  
--<p>Because a one-line install is one too many.</p>
--
--<h2>Fancy Install</h2>
++<h2>More Than One Line Install</h2>
  
  <ol>
    <li><a href="https://github.com/isaacs/npm">Get the code.</a>
        says to do.
  </ol>
  
--<p>There's a pretty thorough install script at
--<a href="http://npmjs.org/install.sh">http://npmjs.org/install.sh</a></p>
--
--<p>For maximum security, make sure to thorougly inspect every
--program that you run on your computer!</p>
--
  <h2>Other Cool Stuff</h2>
  
  <ul>
@@@ -28,7 -28,7 +28,7 @@@ function bugs (args, cb) 
      }
      if (repo) {
        if (Array.isArray(repo)) repo = repo.shift()
--      if (repo.hasOwnProperty("url")) repo = repo.url
++      if (repo.url) repo = repo.url
        log.verbose(repo, "repository")
        if (repo && repo.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) {
          return open(repo.replace(/^git(@|:\/\/)/, "http://")
@@@ -3,10 -3,10 +3,11 @@@
  /*
  adding a folder:
  1. tar into tmp/random/package.tgz
--2. untar into tmp/random/contents/package, stripping one dir piece
--3. tar tmp/random/contents/package to cache/n/v/package.tgz
--4. untar cache/n/v/package.tgz into cache/n/v/package
--5. rm tmp/random
++2. untar into tmp/random/contents/{blah}
++3. rename {blah} to "package"
++4. tar tmp/random/contents/package to cache/n/v/package.tgz
++5. untar cache/n/v/package.tgz into cache/n/v/package
++6. rm tmp/random
  
  Adding a url:
  1. fetch to tmp/random/package.tgz
@@@ -31,7 -31,7 +32,7 @@@ exports.read = rea
  exports.clean = clean
  exports.unpack = unpack
  
--var mkdir = require("mkdirp")
++var mkdir = require("./utils/mkdir-p.js")
    , exec = require("./utils/exec.js")
    , fetch = require("./utils/fetch.js")
    , npm = require("./npm.js")
@@@ -49,7 -49,7 +50,6 @@@
    , tar = require("./utils/tar.js")
    , fileCompletion = require("./utils/completion/file-completion.js")
    , url = require("url")
--  , chownr = require("chownr")
  
  cache.usage = "npm cache add <tarball file>"
              + "\nnpm cache add <folder>"
@@@ -95,10 -95,10 +95,12 @@@ function cache (args, cb) 
  // if the pkg and ver are in the cache, then
  // just do a readJson and return.
  // if they're not, then fetch them from the registry.
++var cacheSeen = {}
  function read (name, ver, forceBypass, cb) {
    if (typeof cb !== "function") cb = forceBypass, forceBypass = true
    var jsonFile = path.join(npm.cache, name, ver, "package", "package.json")
    function c (er, data) {
++    if (!er) cacheSeen[data._id] = data
      if (data) deprCheck(data)
      return cb(er, data)
    }
      return addNamed(name, ver, c)
    }
  
++  if (name+"@"+ver in cacheSeen) {
++    return cb(null, cacheSeen[name+"@"+ver])
++  }
++
    readJson(jsonFile, function (er, data) {
      if (er) return addNamed(name, ver, c)
      deprCheck(data)
@@@ -120,13 -120,13 +126,9 @@@ function ls (args, cb) 
    output = output || require("./utils/output.js")
    args = args.join("/").split("@").join("/")
    if (args.substr(-1) === "/") args = args.substr(0, args.length - 1)
--  var prefix = npm.config.get("cache")
--  if (0 === prefix.indexOf(process.env.HOME)) {
--    prefix = "~" + prefix.substr(process.env.HOME.length)
--  }
    ls_(args, npm.config.get("depth"), function(er, files) {
      output.write(files.map(function (f) {
--      return path.join(prefix, f)
++      return path.join("~/.npm", f)
      }).join("\n").trim(), function (er) {
        return cb(er, files)
      })
@@@ -210,7 -210,7 +212,7 @@@ function add (args, cb) 
  
    // see if the spec is a url
    // otherwise, treat as name@version
--  var p = url.parse(spec) || {}
++  var p = url.parse(spec.replace(/^git\+/, "git")) || {}
    log.verbose(p, "parsed url")
  
    // it could be that we got name@http://blah
      case "https:":
        return addRemoteTarball(spec, null, name, cb)
      case "git:":
--    case "git+http:":
--    case "git+https:":
--    case "git+rsync:":
--    case "git+ftp:":
--    case "git+ssh:":
++    case "githttp:":
++    case "githttps:":
++    case "gitrsync:":
++    case "gitftp:":
++    case "gitssh:":
        //p.protocol = p.protocol.replace(/^git([^:])/, "$1")
        return addRemoteGit(spec, p, name, cb)
      default:
@@@ -634,7 -634,7 +636,7 @@@ function getCacheStat (cb) 
  }
  
  function makeCacheDir (cb) {
--  if (!process.getuid) return mkdir(npm.cache, cb)
++  if (!process.getuid) return mkdir(npm.cache, npm.modes.exec, cb)
  
    var uid = +process.getuid()
      , gid = +process.getgid()
    }
    if (uid !== 0 || !process.env.HOME) {
      cacheStat = {uid: uid, gid: gid}
--    return mkdir(npm.cache, afterMkdir)
++    return mkdir(npm.cache, npm.modes.exec, uid, gid, function (er) {
++      return cb(er, cacheStat)
++    })
    }
--
    fs.stat(process.env.HOME, function (er, st) {
      if (er) return log.er(cb, "homeless?")(er)
      cacheStat = st
      log.silly([st.uid, st.gid], "uid, gid for cache dir")
--    return mkdir(npm.cache, afterMkdir)
--  })
--
--  function afterMkdir (er, made) {
--    if (er || !cacheStat || isNaN(cacheStat.uid) || isNaN(cacheStat.gid)) {
--      return cb(er, cacheStat)
--    }
--
--    if (!made) return cb(er, cacheStat)
--
--    // ensure that the ownership is correct.
--    chownr(made, cacheStat.uid, cacheStat.gid, function (er) {
++    return mkdir(npm.cache, npm.modes.exec, st.uid, st.gid, function (er) {
        return cb(er, cacheStat)
      })
--  }
++  })
  }
  
  
@@@ -744,20 -744,20 +736,9 @@@ function addLocalDirectory (p, name, cb
        , tgz = placeDirect ? placed : tmptgz
        , doFancyCrap = p.indexOf(npm.tmp) !== 0
                      && p.indexOf(npm.cache) !== 0
--    getCacheStat(function (er, cs) {
--      mkdir(path.dirname(tgz), function (er, made) {
--        if (er) return cb(er)
--        tar.pack(tgz, p, data, doFancyCrap, function (er) {
--          if (er) return log.er(cb,"couldn't pack "+p+ " to "+tgz)(er)
--
--          if (er || !cs || isNaN(cs.uid) || isNaN(cs.gid)) return cb()
--
--          chownr(made || tgz, cs.uid, cs.gid, function (er) {
--            if (er) return cb(er)
--            addLocalTarball(tgz, name, cb)
--          })
--        })
--      })
++    tar.pack(tgz, p, data, doFancyCrap, function (er) {
++      if (er) return log.er(cb,"couldn't pack "+p+ " to "+tgz)(er)
++      addLocalTarball(tgz, name, cb)
      })
    })
  }
@@@ -766,15 -766,15 +747,36 @@@ function addTmpTarball (tgz, name, cb) 
    if (!cb) cb = name, name = ""
    getCacheStat(function (er, cs) {
      if (er) return cb(er)
--    var contents = path.dirname(tgz)
--    tar.unpack( tgz, path.resolve(contents, "package")
--              , null, null
--              , cs.uid, cs.gid
--              , function (er) {
--      if (er) {
--        return cb(er)
++    return addTmpTarball_(tgz, name, cs.uid, cs.gid, cb)
++  })
++}
++
++function addTmpTarball_ (tgz, name, uid, gid, cb) {
++  var contents = path.resolve(path.dirname(tgz))  // , "contents")
++  tar.unpack( tgz, path.resolve(contents, "package")
++            , null, null
++            , uid, gid
++            , function (er) {
++    if (er) return log.er(cb, "couldn't unpack "+tgz+" to "+contents)(er)
++    fs.readdir(contents, function (er, folder) {
++      if (er) return log.er(cb, "couldn't readdir "+contents)(er)
++      log.verbose(folder, "tarball contents")
++      if (folder.length > 1) {
++        folder = folder.filter(function (f) {
++          return !f.match(/^\.|^tmp\.tgz$/)
++        })
++      }
++      if (folder.length > 1) {
++        log.warn(folder.slice(1).join("\n")
++                ,"extra junk in folder, ignoring")
        }
--      addLocalDirectory(path.resolve(contents, "package"), name, cb)
++      if (!folder.length) return cb(new Error("Empty package tarball"))
++      folder = path.join(contents, folder[0])
++      var newName = path.join(contents, "package")
++      fs.rename(folder, newName, function (er) {
++        if (er) return log.er(cb, "couldn't rename "+folder+" to package")(er)
++        addLocalDirectory(newName, name, cb)
++      })
      })
    })
  }
@@@ -790,14 -790,14 +792,11 @@@ function unpack (pkg, ver, unpackTarget
        log.error("Could not read data for "+pkg+"@"+ver)
        return cb(er)
      }
--    npm.commands.unbuild([unpackTarget], function (er) {
--      if (er) return cb(er)
--      tar.unpack( path.join(npm.cache, pkg, ver, "package.tgz")
--                , unpackTarget
--                , dMode, fMode
--                , uid, gid
--                , cb )
--    })
++    tar.unpack( path.join(npm.cache, pkg, ver, "package.tgz")
++             , unpackTarget
++             , dMode, fMode
++             , uid, gid
++             , cb )
    })
  }
  
@@@ -2,12 -2,12 +2,10 @@@
  module.exports = config
  
  config.usage = "npm config set <key> <value>"
--             + "\nnpm config get [<key>]"
++             + "\nnpm config get <key>"
               + "\nnpm config delete <key>"
               + "\nnpm config list"
               + "\nnpm config edit"
--             + "\nnpm set <key> <value>"
--             + "\nnpm get [<key>]"
  
  var ini = require("./utils/ini.js")
    , log = require("./utils/log.js")
@@@ -115,9 -115,9 +113,6 @@@ function del (key, cb) 
  }
  
  function set (key, val, cb) {
--  if (key === undefined) {
--    return unknown("", cb)
--  }
    if (val === undefined) {
      if (key.indexOf("=") !== -1) {
        var k = key.split("=")
@@@ -25,7 -25,7 +25,7 @@@ function docs (args, cb) 
      if (homepage) return open(homepage, cb)
      if (repo) {
        if (Array.isArray(repo)) repo = repo.shift()
--      if (repo.hasOwnProperty("url")) repo = repo.url
++      if (repo.url) repo = repo.url
        log.verbose(repo, "repository")
        if (repo) {
          return open(repo.replace(/^git(@|:\/\/)/, 'http://')
@@@ -99,10 -99,10 +99,7 @@@ function init_ (data, folder, cb) 
            , function (er, r) {
                if (er) return cb(er)
                if (r !== "none") {
--                data.repository = (data.repository || {})
--                data.repository.url = r
--              } else {
--                delete data.repository
++                data.repository = (data.repository || {}).url = r
                }
                cb()
              }
          (data.scripts = data.scripts || {}).test = t
        }
      )
++    ( read
++    , [ { prompt: "What versions of node does it run on? "
++        , default: data.engines && data.engines.node || (eng) } ]
++    , function (nodever) {
++        (data.engines = data.engines || {}).node = nodever
++      }
++    )
      (cleanupPaths, [data, folder])
      (function (cb) {
        try { data = readJson.processJson(data) }
@@@ -1,15 -1,15 +1,14 @@@
++
  // npm install <pkg> <pkg> <pkg>
  //
  // See doc/install.md for more description
  
--// Managing contexts...
--// there's a lot of state associated with an "install" operation, including
--// packages that are already installed, parent packages, current shrinkwrap, and
--// so on. We maintain this state in a "context" object that gets passed around.
--// every time we dive into a deeper node_modules folder, the "family" list that
--// gets passed along uses the previous "family" list as its __proto__.  Any
--// "resolved precise dependency" things that aren't already on this object get
--// added, and then that's passed to the next generation of installation.
++// Managing "family" lists...
++// every time we dive into a deeper node_modules folder, the "family"
++// list that gets passed along uses the previous "family" list as
++// it's __proto__.  Any "resolved precise dependency" things that aren't
++// already on this object get added, and then that's passed to the next
++// generation of installation.
  
  module.exports = install
  
@@@ -21,9 -21,9 +20,7 @@@ install.usage = "npm install <tarball f
                + "\nnpm install <pkg>@<version>"
                + "\nnpm install <pkg>@<version range>"
                + "\n\nCan specify one or more: npm install ./foo.tgz bar@stable /some/folder"
--              + "\nIf no argument is supplied and ./npm-shrinkwrap.json is "
--              + "\npresent, installs dependencies specified in the shrinkwrap."
--              + "\nOtherwise, installs dependencies from ./package.json."
++              + "\nInstalls dependencies in ./package.json if no argument supplied"
  
  install.completion = function (opts, cb) {
    // install can complete to a folder with a package.json, or any package.
@@@ -67,9 -67,9 +64,8 @@@ var npm = require("./npm.js"
    , relativize = require("./utils/relativize.js")
    , output
    , url = require("url")
--  , mkdir = require("mkdirp")
++  , mkdir = require("./utils/mkdir-p.js")
    , lifecycle = require("./utils/lifecycle.js")
--  , archy = require("archy")
  
  function install (args, cb_) {
  
      output = output || require("./utils/output.js")
  
      var tree = treeify(installed)
--      , pretty = prettify(tree, installed).trim()
--
--    if (pretty) output.write(pretty, afterWrite)
--    else afterWrite()
++      , pretty = prettify(tree, installed)
  
--    function afterWrite (er) {
++    output.write(pretty, function (er) {
        if (er) return cb_(er)
        save(where, installed, tree, pretty, cb_)
--    }
++    })
    }
  
    // the /path/to/node_modules/..
      })
    }
  
--  mkdir(where, function (er, made) {
++  mkdir(where, function (er) {
      if (er) return cb(er)
      // install dependencies locally by default,
      // or install current folder globally
      if (!args.length) {
        if (npm.config.get("global")) args = ["."]
--      else return readDependencies( null
--                                  , where
--                                  , { dev: !npm.config.get("production") }
--                                  , function (er, data) {
++      else return readJson( path.resolve(where, "package.json")
++                          , { dev: !npm.config.get("production") }
++                          , function (er, data) {
          if (er) return log.er(cb, "Couldn't read dependencies.")(er)
          var deps = Object.keys(data.dependencies || {})
          log.verbose([where, deps], "where, deps")
--        var context = { family: {}
--                      , ancestors: {}
--                      , explicit: false
--                      , parent: data
--                      , wrap: null }
--        context.family[data.name] = context.ancestors[data.name] = data.version
++        var family = {}
++          , ancestors = {}
++        family[data.name] = ancestors[data.name] = data.version
          installManyTop(deps.map(function (dep) {
            var target = data.dependencies[dep]
              , parsed = url.parse(target.replace(/^git\+/, "git"))
            target = dep + "@" + target
            return target
--        }), where, context, cb)
++        }), where, family, ancestors, false, data, cb)
        })
      }
  
      // initial "family" is the name:version of the root, if it's got
--    // a package.json file.
++    // a pacakge.json file.
      readJson(path.resolve(where, "package.json"), function (er, data) {
        if (er) data = null
--      var context = { family: {}
--                    , ancestors: {}
--                    , explicit: true
--                    , parent: data
--                    , wrap: null }
--      if (data) {
--        context.family[data.name] = context.ancestors[data.name] = data.version
--      }
++      var family = {}
++        , ancestors = {}
++      if (data) family[data.name] = ancestors[data.name] = data.version
        var fn = npm.config.get("global") ? installMany : installManyTop
--      fn(args, where, context, cb)
--    })
--  })
--}
--
--// reads dependencies for the package at "where". There are several cases,
--// depending on our current state and the package's configuration:
--//
--// 1. If "context" is specified, then we examine the context to see if there's a
--//    shrinkwrap there. In that case, dependencies are read from the shrinkwrap.
--// 2. Otherwise, if an npm-shrinkwrap.json file is present, dependencies are
--//    read from there.
--// 3. Otherwise, dependencies come from package.json.
--//
--// Regardless of which case we fall into, "cb" is invoked with a first argument
--// describing the full package (as though readJson had been used) but with
--// "dependencies" read as described above. The second argument to "cb" is the
--// shrinkwrap to use in processing this package's dependencies, which may be
--// "wrap" (in case 1) or a new shrinkwrap (in case 2).
--function readDependencies (context, where, opts, cb) {
--  var wrap = context ? context.wrap : null
--
--  readJson( path.resolve(where, "package.json")
--          , opts
--          , function (er, data) {
--    if (er)  return cb(er)
--
--    if (wrap) {
--      log.verbose([where, wrap], "readDependencies: using existing wrap")
--      var rv = {}
--      Object.keys(data).forEach(function (key) {
--        rv[key] = data[key]
--      })
--      rv.dependencies = {}
--      Object.keys(wrap).forEach(function (key) {
--        log.verbose([key, wrap[key]], "from wrap")
--        var w = wrap[key]
--        rv.dependencies[key] = w.from || w.version
--      })
--      log.verbose([rv.dependencies], "readDependencies: returned deps")
--      return cb(null, rv, wrap)
--    }
--
--    var wrapfile = path.resolve(where, "npm-shrinkwrap.json")
--
--    fs.readFile(wrapfile, "utf8", function (er, wrapjson) {
--      if (er) {
--        log.verbose("readDependencies: using package.json deps")
--        return cb(null, data, null)
--      }
--
--      try {
--        var newwrap = JSON.parse(wrapjson)
--      } catch (ex) {
--        return cb(ex)
--      }
--
--      log.info(wrapfile, "using shrinkwrap file")
--      var rv = {}
--      Object.keys(data).forEach(function (key) {
--        rv[key] = data[key]
--      })
--      rv.dependencies = {}
--      Object.keys(newwrap.dependencies || {}).forEach(function (key) {
--        var w = newwrap.dependencies[key]
--        rv.dependencies[key] = w.from || w.version
--      })
--      log.verbose([rv.dependencies], "readDependencies: returned deps")
--      return cb(null, rv, newwrap.dependencies)
++      fn(args, where, family, ancestors, true, data, cb)
      })
    })
  }
  // as dependencies to a package.json file.
  // This is experimental.
  function save (where, installed, tree, pretty, cb) {
--  if (!npm.config.get("save") &&
--      !npm.config.get("save-dev") &&
--      !npm.config.get("save-optional") ||
--      npm.config.get("global")) {
++  if (!npm.config.get("save") || npm.config.get("global")) {
      return cb(null, installed, tree, pretty)
    }
--
    // each item in the tree is a top-level thing that should be saved
    // to the package.json file.
    // The relevant tree shape is { <folder>: {what:<pkg>} }
    var saveTarget = path.resolve(where, "package.json")
      , things = Object.keys(tree).map(function (k) {
--        // if "what" was a url, then save that instead.
--        var t = tree[k]
--          , u = url.parse(t.from)
--          , w = t.what.split("@")
--        if (u && u.protocol) w[1] = t.from
--        return w
++        return tree[k].what.split("@")
        }).reduce(function (set, k) {
--        var rangeDescriptor = semver.valid(k[1]) &&
--                              semver.gte(k[1], "0.1.0")
--                            ? "~" : ""
++        var rangeDescriptor = semver.gte(k[1], "0.1.0") ? "~" : ""
          set[k[0]] = rangeDescriptor + k[1]
          return set
        }, {})
      } catch (ex) {
        er = ex
      }
--    if (er) {
--      return cb(null, installed, tree, pretty)
++    if (er) return cb(null, installed, tree, pretty)
  
--    }
--
--    var deps = npm.config.get("save-optional") ? "optionalDependencies"
--             : npm.config.get("save-dev") ? "devDependencies"
--             : "dependencies"
++    var deps = npm.config.get("dev") ? "devDependencies" : "dependencies"
++    deps = data[deps] = data[deps] || {}
  
--    data[deps] = data[deps] || {}
      Object.keys(things).forEach(function (t) {
--      data[deps][t] = things[t]
++      deps[t] = things[t]
      })
      data = JSON.stringify(data, null, 2) + "\n"
      fs.writeFile(saveTarget, data, function (er) {
  // Outputting *all* the installed modules is a bit confusing,
  // because the length of the path does not make it clear
  // that the submodules are not immediately require()able.
--// TODO: Show the complete tree, ls-style, but only if --long is provided
++// TODO: Show the complete tree, ls-style.
  function prettify (tree, installed) {
--  if (npm.config.get("json")) {
--    function red (set, kv) {
--      set[kv[0]] = kv[1]
--      return set
--    }
--
--    tree = Object.keys(tree).map(function (p) {
--      if (!tree[p]) return null
--      var what = tree[p].what.split("@")
--        , name = what.shift()
--        , version = what.join("@")
--        , o = { name: name, version: version, from: tree[p].from }
--      o.dependencies = tree[p].children.map(function P (dep) {
--         var what = dep.what.split("@")
--           , name = what.shift()
--           , version = what.join("@")
--           , o = { version: version, from: dep.from }
--         o.dependencies = dep.children.map(P).reduce(red, {})
--         return [name, o]
--       }).reduce(red, {})
--       return o
--    })
--
--    return JSON.stringify(tree, null, 2)
--  }
    if (npm.config.get("parseable")) return parseable(installed)
--
    return Object.keys(tree).map(function (p) {
--    return archy({ label: tree[p].what + " " + p
--                 , nodes: (tree[p].children || []).map(function P (c) {
--                     if (npm.config.get("long")) {
--                       return { label: c.what, nodes: c.children.map(P) }
--                     }
--                     var g = c.children.map(function (g) {
--                       return g.what
--                     }).join(", ")
--                     if (g) g = " (" + g + ")"
--                     return c.what + g
--                   })
--                 })
++    p = tree[p]
++    var c = ""
++    if (p.children && p.children.length) {
++      pref = "\n"
++      var l = p.children.pop()
++      c = p.children.map(function (c) {
++        var gc = c.children && c.children.length
++               ? " (" + c.children.map(function (gc) {
++                   return gc.what
++                 }).join(" ") + ")"
++               : ""
++        return "\n├── " + c.what + gc
++      }).join("") + "\n└── " + l.what
++    }
++    return [p.what, p.where, c].join(" ")
++
    }).join("\n")
  }
  
@@@ -348,13 -348,13 +226,11 @@@ function treeify (installed) 
        , parent = r[2]
        , where = r[1]
        , what = r[0]
--      , from = r[4]
      l[where] = { parentDir: parentDir
                 , parent: parent
                 , children: []
                 , where: where
--               , what: what
--               , from: from }
++               , what: what }
      return l
    }, {})
  
  
  // just like installMany, but also add the existing packages in
  // where/node_modules to the family object.
--function installManyTop (what, where, context, cb_) {
++function installManyTop (what, where, family, ancestors, explicit, parent, cb_) {
++
    function cb (er, d) {
--    if (context.explicit || er) return cb_(er, d)
++    if (explicit || er) return cb_(er, d)
      // since this wasn't an explicit install, let's build the top
      // folder, so that `npm install` also runs the lifecycle scripts.
      npm.commands.build([where], false, true, function (er) {
      })
    }
  
--  if (context.explicit) return next()
++  if (explicit) return next()
  
    readJson(path.join(where, "package.json"), function (er, data) {
      if (er) return next(er)
  
    function next (er) {
      if (er) return cb(er)
--    installManyTop_(what, where, context, cb)
++    installManyTop_(what, where, family, ancestors, explicit, parent, cb)
    }
  }
  
--function installManyTop_ (what, where, context, cb) {
++function installManyTop_ (what, where, family, ancestors, explicit, parent, cb) {
    var nm = path.resolve(where, "node_modules")
--    , names = context.explicit
++    , names = explicit
              ? what.map(function (w) { return w.split(/@/).shift() })
              : []
  
    fs.readdir(nm, function (er, pkgs) {
--    if (er) return installMany(what, where, context, cb)
++    if (er) return installMany(what, where, family, ancestors, explicit, parent, cb)
      pkgs = pkgs.filter(function (p) {
        return !p.match(/^[\._-]/)
++          && (!explicit || names.indexOf(p) === -1)
      })
      asyncMap(pkgs.map(function (p) {
        return path.resolve(nm, p, "package.json")
        // add all the existing packages to the family list.
        // however, do not add to the ancestors list.
        packages.forEach(function (p) {
--        context.family[p[0]] = p[1]
++        family[p[0]] = p[1]
        })
--      return installMany(what, where, context, cb)
++      return installMany(what, where, family, ancestors, explicit, parent, cb)
      })
    })
  }
  
--function installMany (what, where, context, cb) {
--  // readDependencies takes care of figuring out whether the list of
--  // dependencies we'll iterate below comes from an existing shrinkwrap from a
--  // parent level, a new shrinkwrap at this level, or package.json at this
--  // level, as well as which shrinkwrap (if any) our dependencies should use.
--  readDependencies(context, where, {}, function (er, data, wrap) {
++function installMany (what, where, family, ancestors, explicit, parent, cb) {
++  // 'npm install foo' should install the version of foo
++  // that satisfies the dep in the current folder.
++  // This will typically return immediately, since we already read
++  // this file family, and it'll be cached.
++  readJson(path.resolve(where, "package.json"), function (er, data) {
      if (er) data = {}
  
++    d = data.dependencies || {}
      var parent = data
  
--    var d = data.dependencies || {}
--
--    // if we're explicitly installing "what" into "where", then the shrinkwrap
--    // for "where" doesn't apply. This would be the case if someone were adding
--    // a new package to a shrinkwrapped package. (data.dependencies will not be
--    // used here except to indicate what packages are already present, so
--    // there's no harm in using that.)
--    if (context.explicit) wrap = null
--
      // what is a list of things.
      // resolve each one.
      asyncMap( what
--            , targetResolver(where, context, d)
++            , targetResolver(where, family, ancestors, explicit, d, parent)
              , function (er, targets) {
  
        if (er) return cb(er)
  
        // each target will be a data object corresponding
        // to a package, folder, or whatever that is in the cache now.
--      var newPrev = Object.create(context.family)
--        , newAnc = Object.create(context.ancestors)
++      var newPrev = Object.create(family)
++        , newAnc = Object.create(ancestors)
  
        newAnc[data.name] = data.version
        targets.forEach(function (t) {
          log.info(t._id, "into "+where)
        })
        asyncMap(targets, function (target, cb) {
--        log.info(target._id, "installOne")
--        var newWrap = wrap ? wrap[target.name].dependencies || {} : null
--        var newContext = { family: newPrev
--                         , ancestors: newAnc
--                         , parent: parent
--                         , explicit: false
--                         , wrap: newWrap }
--        installOne(target, where, newContext, cb)
++        log(target._id, "installOne")
++        installOne(target, where, newPrev, newAnc, parent, cb)
        }, cb)
      })
    })
  }
  
--function targetResolver (where, context, deps) {
--  var alreadyInstalledManually = context.explicit ? [] : null
++function targetResolver (where, family, ancestors, explicit, deps, parent) {
++  var alreadyInstalledManually = explicit ? [] : null
      , nm = path.resolve(where, "node_modules")
--    , parent = context.parent
--    , wrap = context.wrap
  
--  if (!context.explicit) fs.readdir(nm, function (er, inst) {
++  if (!explicit) fs.readdir(nm, function (er, inst) {
      if (er) return alreadyInstalledManually = []
      asyncMap(inst, function (pkg, cb) {
        readJson(path.resolve(nm, pkg, "package.json"), function (er, d) {
--        // error means it's not a package, most likely.
          if (er) return cb(null, [])
--
--        // if it's a bundled dep, then assume that anything there is valid.
--        // otherwise, make sure that it's a semver match with what we want.
--        var bd = parent.bundleDependencies
--        if (bd && bd.indexOf(d.name) !== -1 ||
--            semver.satisfies(d.version, deps[d.name] || "*")) {
++        if (semver.satisfies(d.version, deps[d.name] || "*")) {
            return cb(null, d.name)
          }
--
--        // something is there, but it's not satisfactory.  Clobber it.
          return cb(null, [])
        })
      }, function (er, inst) {
      if (!alreadyInstalledManually) return setTimeout(function () {
        resolver(what, cb)
      }, to++)
--
      // now we know what's been installed here manually,
      // or tampered with in some way that npm doesn't want to overwrite.
      if (alreadyInstalledManually.indexOf(what.split("@").shift()) !== -1) {
        return cb(null, [])
      }
  
--    // check for a version installed higher in the tree.
--    // If installing from a shrinkwrap, it must match exactly.
--    if (context.family[what]) {
--      if (wrap && wrap[what].version === context.family[what]) {
--        log.verbose(what, "using existing (matches shrinkwrap)")
--        return cb(null, [])
--      }
--    }
--
--    // if it's identical to its parent, then it's probably someone
--    // doing `npm install foo` inside of the foo project.  Print
--    // a warning, and skip it.
--    if (parent && parent.name === what && !npm.config.get("force")) {
--      log.warn("Refusing to install "+what+" as a dependency of itself"
--              ,"install")
++    if (family[what] && semver.satisfies(family[what], deps[what] || "")) {
        return cb(null, [])
      }
  
--    if (wrap) {
--      name = what.split(/@/).shift()
--      if (wrap[name]) {
--        var wrapTarget = wrap[name].from || wrap[name].version
--        log.verbose("resolving "+what+" to "+wrapTarget, "shrinkwrap")
--        what = name + "@" + wrapTarget
--      } else {
--        log.verbose("skipping "+what+" (not in shrinkwrap)", "shrinkwrap")
--      }
--    } else if (deps[what]) {
++    if (deps[what]) {
        what = what + "@" + deps[what]
      }
  
      cache.add(what, function (er, data) {
        if (er && parent && parent.optionalDependencies &&
--          parent.optionalDependencies.hasOwnProperty(what.split("@")[0])) {
++          parent.optionalDependencies.hasOwnProperty(what.split("@").shift())) {
          log.warn(what, "optional dependency failed, continuing")
--        log.verbose([what, er], "optional dependency failed, continuing")
          return cb(null, [])
        }
--
--      if (!er &&
--          data &&
--          !context.explicit &&
--          context.family[data.name] === data.version &&
--          !npm.config.get("force")) {
--        log.info(data.name + "@" + data.version, "already installed")
++      if (!er && data && family[data.name] === data.version) {
          return cb(null, [])
        }
--
--      if (data) data._from = what
--
        return cb(er, data)
      })
    }
  
  // we've already decided to install this.  if anything's in the way,
  // then uninstall it first.
--function installOne (target, where, context, cb) {
++function installOne (target, where, family, ancestors, parent, cb) {
    // the --link flag makes this a "link" command if it's at the
    // the top level.
    if (where === npm.prefix && npm.config.get("link")
        && !npm.config.get("global")) {
--    return localLink(target, where, context, cb)
++    return localLink(target, where, family, ancestors, parent, cb)
    }
--  installOne_(target, where, context, function (er, installedWhat) {
--
--    // check if this one is optional to its parent.
--    if (er && context.parent && context.parent.optionalDependencies &&
--        context.parent.optionalDependencies.hasOwnProperty(target.name)) {
--      log.warn(target._id, "optional dependency failed, continuing")
--      log.verbose([target._id, er], "optional dependency failed, continuing")
--      er = null
--    }
--
--    cb(er, installedWhat)
--  })
--
++  installOne_(target, where, family, ancestors, parent, cb)
  }
  
--function localLink (target, where, context, cb) {
++function localLink (target, where, family, ancestors, parent, cb) {
    log.verbose(target._id, "try to link")
    var jsonFile = path.resolve( npm.dir, target.name
                               , "package.json" )
--    , parent = context.parent
  
    readJson(jsonFile, function (er, data) {
      if (er || data._id === target._id) {
  
      } else {
        log.verbose(target._id, "install locally (no link)")
--      installOne_(target, where, context, cb)
++      installOne_(target, where, family, ancestors, parent, cb)
      }
    })
  }
@@@ -651,25 -651,25 +458,23 @@@ function resultList (target, where, par
    return [ target._id
           , targetFolder
           , prettyWhere && parentId
--         , parentId && prettyWhere
--         , target._from ]
++         , parentId && prettyWhere ]
  }
  
--function installOne_ (target, where, context, cb) {
++function installOne_ (target, where, family, ancestors, parent, cb) {
    var nm = path.resolve(where, "node_modules")
      , targetFolder = path.resolve(nm, target.name)
      , prettyWhere = relativize(where, process.cwd() + "/x")
--    , parent = context.parent
  
    if (prettyWhere === ".") prettyWhere = null
  
    chain
      ( [ [checkEngine, target]
--      , [checkPlatform, target]
--      , [checkCycle, target, context.ancestors]
++      , [checkCycle, target, ancestors]
        , [checkGit, targetFolder]
--      , [write, target, targetFolder, context] ]
++      , [write, target, targetFolder, family, ancestors] ]
      , function (er, d) {
++        log.verbose(target._id, "installOne cb")
          if (er) return cb(er)
          d.push(resultList(target, where, parent && parent._id))
          cb(er, d)
@@@ -694,58 -694,58 +499,6 @@@ function checkEngine (target, cb) 
    return cb()
  }
  
--function checkPlatform (target, cb) {
--  var platform = process.platform
--    , arch = process.arch
--    , osOk = true
--    , cpuOk = true
--    , force = npm.config.get("force")
--
--  if (force) {
--    return cb()
--  }
--
--  if (target.os) {
--    osOk = checkList(platform, target.os)
--  }
--  if (target.cpu) {
--    cpuOk = checkList(arch, target.cpu)
--  }
--  if (!osOk || !cpuOk) {
--    var er = new Error("Unsupported")
--    er.errno = npm.EBADPLATFORM
--    er.os = target.os || ['any']
--    er.cpu = target.cpu || ['any']
--    er.pkgid = target._id
--    return cb(er)
--  }
--  return cb()
--}
--
--function checkList (value, list) {
--  var tmp
--    , match = false
--    , blc = 0
--  if (typeof list === "string") {
--    list = [list]
--  }
--  if (list.length === 1 && list[0] === "any") {
--    return true;
--  }
--  for (var i = 0; i < list.length; ++i) {
--    tmp = list[i]
--    if (tmp[0] === '!') {
--      tmp = tmp.slice(1)
--      if (tmp === value) {
--        return false;
--      }
--      ++blc
--    } else {
--      match = match || tmp === value
--    }
--  }
--  return match || blc === list.length
--}
  
  function checkCycle (target, ancestors, cb) {
    // there are some very rare and pathological edge-cases where
    // A more correct, but more complex, solution would be to symlink
    // the deeper thing into the new location.
    // Will do that if anyone whines about this irl.
--  //
--  // Note: `npm install foo` inside of the `foo` package will abort
--  // earlier if `--force` is not set.  However, if it IS set, then
--  // we need to still fail here, but just skip the first level. Of
--  // course, it'll still fail eventually if it's a true cycle, and
--  // leave things in an undefined state, but that's what is to be
--  // expected when `--force` is used.  That is why getPrototypeOf
--  // is used *twice* here: to skip the first level of repetition.
--
--  var p = Object.getPrototypeOf(Object.getPrototypeOf(ancestors))
++
++  var p = Object.getPrototypeOf(ancestors)
      , name = target.name
      , version = target.version
    while (p && p !== Object.prototype && p[name] !== version) {
@@@ -811,17 -811,17 +556,16 @@@ function checkGit_ (folder, cb) 
    })
  }
  
--function write (target, targetFolder, context, cb_) {
++function write (target, targetFolder, family, ancestors, cb_) {
    var up = npm.config.get("unsafe-perm")
      , user = up ? null : npm.config.get("user")
      , group = up ? null : npm.config.get("group")
--    , family = context.family
  
    function cb (er, data) {
      // cache.unpack returns the data object, and all we care about
      // is the list of installed packages from that last thing.
      if (!er) return cb_(er, data)
--
++    log.error(target._id,"error installing")
      if (false === npm.config.get("rollback")) return cb_(er)
      npm.commands.unbuild([targetFolder], function (er2) {
        if (er2) log.error(er2, "error rolling back "+target._id)
      })
    }
  
--  var bundled = []
--
    chain
--    ( [ [ cache.unpack, target.name, target.version, targetFolder
++    ( [ [ npm.commands.unbuild, [targetFolder] ]
++      , [ cache.unpack, target.name, target.version, targetFolder
          , null, null, user, group ]
--      , [ fs, "writeFile"
--        , path.resolve(targetFolder, "package.json")
--        , JSON.stringify(target, null, 2) + "\n" ]
--      , [ lifecycle, target, "preinstall", targetFolder ]
--      , function (cb) {
--          if (!target.bundleDependencies) return cb()
--
--          var bd = path.resolve(targetFolder, "node_modules")
--          fs.readdir(bd, function (er, b) {
--            // nothing bundled, maybe
--            if (er) return cb()
--            bundled = b || []
--            cb()
--          })
--        } ]
++      , [ lifecycle, target, "preinstall", targetFolder ] ]
  
      // nest the chain so that we can throw away the results returned
      // up until this point, since we really don't care about it.
--    , function (er) {
++    , function (er) {
        if (er) return cb(er)
--
--      // before continuing to installing dependencies, check for a shrinkwrap.
--      readDependencies(context, targetFolder, {}, function (er, data, wrap) {
--        var deps = Object.keys(data.dependencies || {})
--
--        // don't install bundleDependencies, unless they're missing.
--        if (data.bundleDependencies) {
--          deps = deps.filter(function (d) {
--            return data.bundleDependencies.indexOf(d) === -1 ||
--                   bundled.indexOf(d) === -1
--          })
--        }
--
--        var newcontext = { family: family
--                         , ancestors: context.ancestors
--                         , parent: target
--                         , explicit: false
--                         , wrap: wrap }
--        installMany(deps.filter(function (d) {
--          // prefer to not install things that are satisfied by
--          // something in the "family" list, unless we're installing
--          // from a shrinkwrap.
--          return wrap || !semver.satisfies(family[d], data.dependencies[d])
--        }).map(function (d) {
--          var t = data.dependencies[d]
--            , parsed = url.parse(t.replace(/^git\+/, "git"))
--          t = d + "@" + t
--          return t
--        }), targetFolder, newcontext, function (er, d) {
--          log.verbose(targetFolder, "about to build")
--          if (er) return cb(er)
--          npm.commands.build( [targetFolder]
--                            , npm.config.get("global")
--                            , true
--                            , function (er) { return cb(er, d) })
--        })
++      var deps = Object.keys(target.dependencies || {})
++      installMany(deps.filter(function (d) {
++        // prefer to not install things that are satisfied by
++        // something in the "family" list.
++        return !semver.satisfies(family[d], target.dependencies[d])
++      }).map(function (d) {
++        var t = target.dependencies[d]
++          , parsed = url.parse(t.replace(/^git\+/, "git"))
++        t = d + "@" + t
++        return t
++      }), targetFolder, family, ancestors, false, target, function (er, d) {
++        log.verbose(targetFolder, "about to build")
++        if (er) return cb(er)
++        npm.commands.build( [targetFolder]
++                          , npm.config.get("global")
++                          , true
++                          , function (er) { return cb(er, d) })
        })
--    })
++    } )
  }
@@@ -141,7 -141,7 +141,6 @@@ function resultPrinter (pkg, src, dest
    var where = relativize(dest, path.resolve(process.cwd(),"x"))
    rp = (rp || "").trim()
    src = (src || "").trim()
--  // XXX If --json is set, then look up the data from the package.json
    if (npm.config.get("parseable")) {
      return parseableOutput(dest, rp || src, cb)
    }
  }
  
  function parseableOutput (dest, rp, cb) {
--  // XXX this should match ls --parseable and install --parseable
--  // look up the data from package.json, format it the same way.
--  //
    // link is always effectively "long", since it doesn't help much to
    // *just* print the target folder.
    // However, we don't actually ever read the version number, so
@@@ -13,7 -13,7 +13,6 @@@ var npm = require("./npm.js"
    , log = require("./utils/log.js")
    , relativize = require("./utils/relativize.js")
    , path = require("path")
--  , archy = require("archy")
  
  ls.usage = "npm ls"
  
@@@ -27,102 -27,102 +26,13 @@@ function ls (args, silent, cb) 
    var dir = path.resolve(npm.dir, "..")
  
    readInstalled(dir, function (er, data) {
--    var lite = getLite(bfsify(data))
--    if (er || silent) return cb(er, data, lite)
--
++    if (er || silent) return cb(er, data)
      var long = npm.config.get("long")
--      , json = npm.config.get("json")
--      , out
--    if (json) {
--      var seen = []
--      var d = long ? bfsify(data) : lite
--      // the raw data can be circular
--      out = JSON.stringify(d, function (k, o) {
--        if (typeof o === "object") {
--          if (-1 !== seen.indexOf(o)) return "[Circular]"
--          seen.push(o)
--        }
--        return o
--      }, 2)
--    } else if (npm.config.get("parseable")) {
--      out = makeParseable(bfsify(data), long, dir)
--    } else if (data) {
--      out = makeArchy(bfsify(data), long, dir)
--    }
--    output.write(out, function (er) { cb(er, data, lite) })
++    var out = makePretty(bfsify(data), long, dir).join("\n")
++    output.write(out, function (er) { cb(er, data) })
    })
  }
  
--function alphasort (a, b) {
--  a = a.toLowerCase()
--  b = b.toLowerCase()
--  return a > b ? 1
--       : a < b ? -1 : 0
--}
--
--function getLite (data, noname) {
--  var lite = {}
--    , maxDepth = npm.config.get("depth")
--    , url = require("url")
--
--  if (!noname && data.name) lite.name = data.name
--  if (data.version) lite.version = data.version
--  if (data.extraneous) {
--    lite.extraneous = true
--    lite.problems = lite.problems || []
--    lite.problems.push( "extraneous: "
--                      + data.name + "@" + data.version
--                      + " " + (data.path || "") )
--  }
--
--  if (data._from) {
--    var from = data._from
--    if (from.indexOf(data.name + "@") === 0) {
--      from = from.substr(data.name.length + 1)
--    }
--    var u = url.parse(from)
--    if (u.protocol) lite.from = from
--  }
--
--  if (data.invalid) {
--    lite.invalid = true
--    lite.problems = lite.problems || []
--    lite.problems.push( "invalid: "
--                      + data.name + "@" + data.version
--                      + " " + (data.path || "") )
--  }
--
--  if (data.dependencies) {
--    var deps = Object.keys(data.dependencies)
--    if (deps.length) lite.dependencies = deps.map(function (d) {
--      var dep = data.dependencies[d]
--      if (typeof dep === "string") {
--        lite.problems = lite.problems || []
--        var p
--        if (data.depth >= maxDepth) {
--          p = "max depth reached: "
--        } else {
--          p = "missing: "
--        }
--        p += d + "@" + dep
--          + ", required by "
--          + data.name + "@" + data.version
--        lite.problems.push(p)
--        return [d, { required: dep, missing: true }]
--      }
--      return [d, getLite(dep, true)]
--    }).reduce(function (deps, d) {
--      if (d[1].problems) {
--        lite.problems = lite.problems || []
--        lite.problems.push.apply(lite.problems, d[1].problems)
--      }
--      deps[d[0]] = d[1]
--      return deps
--    }, {})
--  }
--  return lite
--}
--
  function bfsify (root, current, queue, seen) {
    // walk over the data, and turn it from this:
    // +-- a
    // which looks nicer
    current = current || root
    queue = queue || []
--  seen = seen || [root]
++  seen = seen || []
    var deps = current.dependencies = current.dependencies || {}
    Object.keys(deps).forEach(function (d) {
      var dep = deps[d]
  }
  
  
--function makeArchy (data, long, dir) {
--  var out = makeArchy_(data, long, dir, 0)
--  return archy(out, "", { unicode: npm.config.get("unicode") })
--}
--
--function makeArchy_ (data, long, dir, depth, parent, d) {
--  if (typeof data === "string") {
--    if (depth < npm.config.get("depth")) {
--      // just missing
--      var p = parent.link || parent.path
--      log.warn("Unmet dependency in "+p, d+" "+data)
--      data = "\033[31;40mUNMET DEPENDENCY\033[0m " + d + " " + data
--    } else {
--      data = d+"@'"+ data +"' (max depth reached)"
--    }
--    return data
--  }
--
--  var out = {}
--  // the top level is a bit special.
--  out.label = data._id ? data._id + " " : ""
--  if (data.link) out.label += "-> " + data.link
--
--  if (data.invalid) {
--    if (data.realName !== data.name) out.label += " ("+data.realName+")"
--    out.label += " \033[31;40minvalid\033[0m"
--  }
--
--  if (data.extraneous && data.path !== dir) {
--    out.label += " \033[32;40mextraneous\033[0m"
--  }
--
--  if (long) {
--    if (dir === data.path) out.label += "\n" + dir
--    out.label += "\n" + getExtras(data, dir)
--  } else if (dir === data.path) {
--    out.label += dir
--  }
--
--  // now all the children.
--  out.nodes = Object.keys(data.dependencies || {})
--    .sort(alphasort).map(function (d) {
--      return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d)
--    })
--
--  if (out.nodes.length === 0 && data.path === dir) {
--    out.nodes = ["(empty)"]
--  }
--
--  return out
--}
--
--function getExtras (data, dir) {
--  var extras = []
--    , rel = relativize(data.path || "", dir)
--    , url = require("url")
--
--  if (data.description) extras.push(data.description)
--  if (data.repository) extras.push(data.repository.url)
--  if (data.homepage) extras.push(data.homepage)
--  if (data._from) {
--    var from = data._from
--    if (from.indexOf(data.name + "@") === 0) {
--      from = from.substr(data.name.length + 1)
++function makePretty (data, long, dir, prefix, list) {
++  var top = !list
++  list = list || []
++  prefix = prefix || ""
++  list.push(format(data, long, prefix, dir))
++  var deps = data.dependencies || {}
++    , childPref = prefix.split("├─").join("│ ")
++                        .split("└─").join("  ")
++    , depList = Object.keys(deps)
++    , depLast = depList.length - 1
++    , maxDepth = npm.config.get("depth")
++  Object.keys(deps).sort(function (a, b) {
++    return a > b ? 1 : -1
++  }).forEach(function (d, i) {
++    var depData = deps[d]
++    if (typeof depData === "string") {
++      if (data.depth < maxDepth) {
++        var p = data.link || data.path
++        log.warn("Unmet dependency in "+p, d+" "+deps[d])
++        depData = npm.config.get("parseable")
++                ? ( npm.config.get("long")
++                    ? path.resolve(data.path, "node_modules", d)
++                    + ":"+d+"@"+JSON.stringify(depData)+":INVALID:MISSING"
++                    : "" )
++                : "─ \033[31;40mUNMET DEPENDENCY\033[0m "+d+" "+depData
++      } else {
++        if (npm.config.get("parseable")) {
++          depData = path.resolve(data.path, "node_modules", d)
++                  + (npm.config.get("long")
++                    ? ":" + d + "@" + JSON.stringify(depData)
++                    + ":" // no realpath resolved
++                    + ":MAXDEPTH"
++                    : "")
++        } else {
++          depData = "─ "+d+"@'"+depData +"' (max depth reached)"
++        }
++      }
      }
--    var u = url.parse(from)
--    if (u.protocol) extras.push(from)
++    var c = i === depLast ? "└─" : "├─"
++    makePretty(depData, long, dir, childPref + c, list)
++  })
++  if (top && list.length === 1 && !data._id) {
++    if (!npm.config.get("parseable")) {
++      list.push("(empty)")
++    } else if (npm.config.get("long")) list[0] += ":EMPTY"
    }
--  return extras.join("\n")
--}
--
--
--function makeParseable (data, long, dir, depth, parent, d) {
--  depth = depth || 0
--
--  return [ makeParseable_(data, long, dir, depth, parent, d) ]
--  .concat(Object.keys(data.dependencies || {})
--    .sort(alphasort).map(function (d) {
--      return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d)
--    }))
--  .join("\n")
++  return list.filter(function (l) { return l && l.trim() })
  }
  
--function makeParseable_ (data, long, dir, depth, parent, d) {
++function ugly (data) {
    if (typeof data === "string") {
--    if (data.depth < npm.config.get("depth")) {
--      var p = parent.link || parent.path
--      log.warn("Unmet dependency in "+p, d+" "+data)
--      data = npm.config.get("long")
--           ? path.resolve(parent.path, "node_modules", d)
--           + ":"+d+"@"+JSON.stringify(data)+":INVALID:MISSING"
--           : ""
--    } else {
--      data = path.resolve(data.path, "node_modules", d)
--           + (npm.config.get("long")
--             ? ":" + d + "@" + JSON.stringify(data)
--             + ":" // no realpath resolved
--             + ":MAXDEPTH"
--             : "")
--    }
--
      return data
    }
--
    if (!npm.config.get("long")) return data.path
  
    return data.path
         + (data.extraneous ? ":EXTRANEOUS" : "")
         + (data.invalid ? ":INVALID" : "")
  }
++
++function format (data, long, prefix, dir) {
++  if (npm.config.get("parseable")) return ugly(data)
++  if (typeof data === "string") {
++    return prefix + data
++  }
++//  console.log([data.path, dir], "relativize")
++  var depLen = Object.keys(data.dependencies).length
++    , space = prefix.split("├─").join("│ ")
++                    .split("└─").join("  ")
++            + (depLen ? "" : " ")
++    , rel = relativize(data.path || "", dir)
++    , l = prefix
++        + (rel === "." ? "" : depLen ? "┬ " : "─ ")
++        + (data._id ? data._id + " " : "")
++        + (data.link ? "-> " + data.link : "") + ""
++        + (rel === "." && !(long && data._id) ? dir : "")
++  if (data.invalid) {
++    if (data.realName !== data.name) l += " ("+data.realName+")"
++    l += " \033[31;40minvalid\033[0m"
++  }
++  if (data.extraneous && rel !== ".") {
++    l += " \033[32;40mextraneous\033[0m"
++  }
++  if (!long || !data._id) return l
++  var extras = []
++  if (rel !== ".") extras.push(rel)
++  else extras.push(dir)
++  if (data.description) extras.push(data.description)
++  if (data.repository) extras.push(data.repository.url)
++  if (data.homepage) extras.push(data.homepage)
++  extras = extras.filter(function (e) { return e })
++  var lastExtra = !depLen && extras.length - 1
++  l += extras.map(function (e, i) {
++    var indent = !depLen ? " " : "│ "
++    return "\n" + space + indent + e
++  }).join("")
++  return l
++}
@@@ -17,6 -17,6 +17,8 @@@ require("path").SPLIT_CHAR = process.pl
  var EventEmitter = require("events").EventEmitter
    , npm = module.exports = new EventEmitter
    , config = require("./config.js")
++  , set = require("./utils/set.js")
++  , get = require("./utils/get.js")
    , ini = require("./utils/ini.js")
    , log = require("./utils/log.js")
    , fs = require("graceful-fs")
    , which = require("which")
    , semver = require("semver")
    , findPrefix = require("./utils/find-prefix.js")
--  , getUid = require("uid-number")
--  , mkdirp = require("mkdirp")
++  , getUid = require("./utils/uid-number.js")
++  , mkdir = require("./utils/mkdir-p.js")
    , slide = require("slide")
    , chain = slide.chain
  
--// /usr/local is often a read-only fs, which is not
--// well handled by node or mkdirp.  Just double-check
--// in the case of errors when making the prefix dirs.
--function mkdir (p, cb) {
--  mkdirp(p, function (er, made) {
--    // it could be that we couldn't create it, because it
--    // already exists, and is on a read-only fs.
--    if (er) {
--      return fs.stat(p, function (er2, st) {
--        if (er2 || !st.isDirectory()) return cb(er)
--        return cb(null, made)
--      })
--    }
--    return cb(er, made)
--  })
--}
--
  npm.commands = {}
  npm.ELIFECYCLE = {}
  npm.E404 = {}
@@@ -55,7 -55,7 +40,30 @@@ npm.EJSONPARSE = {
  npm.EISGIT = {}
  npm.ECYCLE = {}
  npm.ENOTSUP = {}
--npm.EBADPLATFORM = {}
++
++// HACK for windows
++if (process.platform === "win32") {
++  // stub in unavailable methods from process and fs binding
++  if (!process.getuid) process.getuid = function() {}
++  if (!process.getgid) process.getgid = function() {}
++  var fsBinding = process.binding("fs")
++  if (!fsBinding.chown) fsBinding.chown = function() {
++    var cb = arguments[arguments.length - 1]
++    if (typeof cb == "function") cb()
++  }
++
++  // patch rename/renameSync, but this should really be fixed in node
++  var _fsRename = fs.rename
++    , _fsPathPatch
++  _fsPathPatch = function(p) {
++    return p && p.replace(/\\/g, "/") || p;
++  }
++  fs.rename = function(p1, p2) {
++    arguments[0] = _fsPathPatch(p1)
++    arguments[1] = _fsPathPatch(p2)
++    return _fsRename.apply(fs, arguments);
++  }
++}
  
  try {
    // startup, ok to do this synchronously
@@@ -104,7 -104,7 +112,6 @@@ var commandCache = {
                , "unstar": "star" // same function
                , "apihelp" : "help"
                , "login": "adduser"
--              , "add-user": "adduser"
                }
  
    , aliasNames = Object.keys(aliases)
                , "unpublish"
                , "owner"
                , "deprecate"
--              , "shrinkwrap"
  
                , "help"
                , "help-search"
@@@ -303,7 -303,7 +309,7 @@@ function loadPrefix (npm, conf, cb) 
        })
      // the prefix MUST exist, or else nothing works.
      if (!npm.config.get("global")) {
--      mkdir(p, next)
++      mkdir(p, npm.modes.exec, null, null, true, next)
      } else {
        next(er)
      }
        , enumerable : true
        })
      // the prefix MUST exist, or else nothing works.
--    mkdir(gp, next)
++    mkdir(gp, npm.modes.exec, null, null, true, next)
    })
  
    var i = 2
@@@ -48,10 -48,10 +48,6 @@@ function makePretty (p) 
      , dir = path.resolve(p[0], "node_modules", dep)
      , has = p[2]
      , want = p[3]
--
--  // XXX add --json support
--  // Should match (more or less) the output of ls --json
--
    if (parseable) {
      var str = dir
      if (npm.config.get("long")) {
@@@ -31,6 -31,6 +31,7 @@@ function rebuild (args, cb) 
  
  function cleanBuild (folders, set, cb) {
    // https://github.com/isaacs/npm/issues/1872
++  // If there's a makefile, try 'make clean'
    // If there's a wscript, try 'node-waf clean'
    // But don't die on either of those if they fail.
    // Just a best-effort kind of deal.
@@@ -40,6 -40,6 +41,8 @@@
        if (er) return cb(er)
        if (files.indexOf("wscript") !== -1) {
          exec("node-waf", ["clean"], null, false, f, thenBuild)
++      } else if (files.indexOf("Makefile") !== -1) {
++        exec("make", ["clean"], null, false, f, thenBuild)
        } else thenBuild()
      })
      function thenBuild (er) {
@@@ -137,8 -137,8 +137,7 @@@ function prettify (data, args) 
        , stdout = process.stdout
        , cols = !tty.isatty(stdout.fd) ? Infinity
               : stdout._handle ? stdout._handle.getWindowSize()[0]
--             : process.stdout.getWindowSize()[0]
--      cols = (cols == 0) ? Infinity : cols
++             : tty.getWindowSize()[1]
    } catch (ex) { cols = Infinity }
  
    // name, desc, author, keywords
@@@ -8,6 -8,6 +8,5 @@@ var npm = require("./npm.js"
  set.completion = npm.commands.config.completion
  
  function set (args, cb) {
--  if (!args.length) return cb(set.usage)
    npm.commands.config(["set"].concat(args), cb)
  }
@@@ -3,7 -3,7 +3,6 @@@ unbuild.usage = "npm unbuild <folder>\n
  
  var readJson = require("./utils/read-json.js")
    , rm = require("rimraf")
--  , gentlyRm = require("./utils/gently-rm.js")
    , npm = require("./npm.js")
    , path = require("path")
    , fs = require("graceful-fs")
@@@ -57,20 -57,20 +56,15 @@@ function rmBins (pkg, folder, parent, t
      if (process.platform === "win32") {
        rm(path.resolve(binRoot, b) + ".cmd", cb)
      } else {
--      gentlyRm( path.resolve(binRoot, b)
--              , !npm.config.get("force") && folder
--              , cb )
++      rm( path.resolve(binRoot, b)
++        , { gently: !npm.config.get("force") && folder }
++        , cb )
      }
    }, cb)
  }
  
  function rmMans (pkg, folder, parent, top, cb) {
--  if (!pkg.man
--      || !top
--      || process.platform === "win32"
--      || !npm.config.get("global")) {
--    return cb()
--  }
++  if (!pkg.man || !top || process.platform === "win32") return cb()
    var manRoot = path.resolve(npm.config.get("prefix"), "share", "man")
    asyncMap(pkg.man, function (man, cb) {
      var parseMan = man.match(/(.*)\.([0-9]+)(\.gz)?$/)
@@@ -84,8 -84,8 +78,8 @@@
                               : pkg.name + "-" + bn)
                               + "." + sxn + gz
                             )
--    gentlyRm( manDest
--            , !npm.config.get("force") && folder
--            , cb )
++    rm( manDest
++      , { gently: !npm.config.get("force") && folder }
++      , cb )
    }, cb)
  }
@@@ -40,12 -40,12 +40,7 @@@ function uninstall (args, cb) 
  
  function uninstall_ (args, nm, cb) {
    asyncMap(args, function (arg, cb) {
--    // uninstall .. should not delete /usr/local/lib/node_modules/..
--    var p = path.join(path.resolve(nm), path.join("/", arg))
--    if (path.resolve(p) === nm) {
--      log.warn(arg, "uninstall: invalid argument")
--      return cb(null, [])
--    }
++    var p = path.resolve(nm, arg)
      fs.lstat(p, function (er) {
        if (er) {
          log.warn(arg, "Not installed in "+nm)
@@@ -14,7 -14,7 +14,7 @@@ cmdShim.ifExists = cmdShimIfExist
  
  var fs = require("graceful-fs")
    , chain = require("slide").chain
--  , mkdir = require("mkdirp")
++  , mkdir = require("./mkdir-p.js")
    , rm = require("rimraf")
    , log = require("./log.js")
    , path = require("path")
@@@ -73,16 -73,16 +73,16 @@@ function writeShim_ (from, to, prog, ar
      target = ""
      shTarget = ""
    } else {
--    longProg = "\"%~dp0\\" + prog + ".exe\""
++    longProg = "\"%~dp0\"\\\"" + prog + ".exe\""
      shLongProg = "\"`dirname \"$0\"`/" + prog + "\""
      target = "\"%~dp0\\" + target + "\""
      shTarget = "\"`dirname \"$0\"`/" + shTarget + "\""
    }
  
--  // @IF EXIST "%~dp0\node.exe" (
++  // @IF EXIST "%~dp0"\"node.exe" (
    //   "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
    // ) ELSE (
--  //   node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
++  //   node  "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
    // )
    var cmd
    if (longProg) {
@@@ -1,7 -1,7 +1,7 @@@
  module.exports = fileCompletion
  
  var find = require("../find.js")
--  , mkdir = require("mkdirp")
++  , mkdir = require("../mkdir-p.js")
    , path = require("path")
  
  function fileCompletion (root, req, depth, cb) {
@@@ -9,7 -9,7 +9,6 @@@ var path = require("path"
    , os = require("os")
    , nopt = require("nopt")
    , log = require("./log.js")
--  , npm = require("../npm.js")
  
  function Octal () {}
  function validateOctal (data, k, val) {
@@@ -140,8 -140,8 +139,6 @@@ Object.defineProperty(exports, "default
      , cache : process.platform === "win32"
              ? path.resolve(process.env.APPDATA || home || temp, "npm-cache")
              : path.resolve( home || temp, ".npm")
--    , "cache-max": Infinity
--    , "cache-min": 0
  
      , color : process.platform !== "win32" || winColor
      , coverage: false
      , "init.author.name" : ""
      , "init.author.email" : ""
      , "init.author.url" : ""
--    , json: false
      , link: false
      , logfd : 2
      , loglevel : "http"
      , proxy : process.env.HTTP_PROXY || process.env.http_proxy || null
      , "https-proxy" : process.env.HTTPS_PROXY || process.env.https_proxy ||
                        process.env.HTTP_PROXY || process.env.http_proxy || null
--    , "user-agent" : "npm/" + npm.version + " node/" + process.version
      , "rebuild-bundle" : true
      , registry : "http" + (httpsOk ? "s" : "") + "://registry.npmjs.org/"
      , rollback : true
      , save : false
--    , "save-dev" : false
--    , "save-optional" : false
      , searchopts: ""
      , searchexclude: null
      , searchsort: "name"
      , userignorefile : path.resolve(home, ".npmignore")
      , umask: 022
      , version : false
--    , versions : false
      , viewer: process.platform === "win32" ? "browser" : "man"
      , yes: null
  
@@@ -228,8 -228,8 +220,6 @@@ exports.types 
    , browser : String
    , ca: [null, String]
    , cache : path
--  , "cache-max": Number
--  , "cache-min": Number
    , color : ["always", Boolean]
    , coverage: Boolean
    , depth : Number
    , globalignorefile: path
    , group : [Number, String]
    , "https-proxy" : [null, url]
--  , "user-agent" : String
    , ignore : String
    , "init.version" : [null, semver]
    , "init.author.name" : String
    , "init.author.email" : String
    , "init.author.url" : ["", url]
--  , json: Boolean
    , link: Boolean
    , logfd : [Number, Stream]
    , loglevel : ["silent","win","error","warn","http","info","verbose","silly"]
    , registry : [null, url]
    , rollback : Boolean
    , save : Boolean
--  , "save-dev" : Boolean
--  , "save-optional" : Boolean
    , searchopts : String
    , searchexclude: [null, String]
    , searchsort: [ "name", "-name"
    , userignorefile : path
    , umask: Octal
    , version : Boolean
--  , versions : Boolean
    , viewer: String
    , yes: [false, null, Boolean]
    , _exit : Boolean
@@@ -328,8 -328,8 +313,6 @@@ exports.shorthands 
    , porcelain : ["--parseable"]
    , g : ["--global"]
    , S : ["--save"]
--  , D : ["--save-dev"]
--  , O : ["--save-optional"]
    , y : ["--yes"]
    , n : ["--no-yes"]
    }
@@@ -159,17 -159,17 +159,6 @@@ function errorHandler (er) 
                ].join("\n"))
      break
  
--  case npm.EBADPLATFORM:
--    er.code = "EBADPLATFORM"
--    log.error([er.message
--              ,"Not compatible with your operating system or architecture: "+er.pkgid
--              ,"Valid OS:    "+er.os.join(",")
--              ,"Valid Arch:  "+er.cpu.join(",")
--              ,"Actual OS:   "+process.platform
--              ,"Actual Arch: "+process.arch
--              ].join("\n"))
--    break
--
    case "EEXIST":
    case constants.EEXIST:
      log.error([er.message
index 0000000,0000000..75fe41c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,157 @@@
++// build up a set of exclude lists in order of precedence:
++// [ ["!foo", "bar"]
++// , ["foo", "!bar"] ]
++// being *included* will override a previous exclusion,
++// and being excluded will override a previous inclusion.
++//
++// Each time the tar file-list generator thingie enters a new directory,
++// it calls "addIgnoreFile(dir, list, cb)".  If an ignore file is found,
++// then it is added to the list and the cb() is called with an
++// child of the original list, so that we don't have
++// to worry about popping it off at the right time, since other
++// directories will continue to use the original parent list.
++//
++// If no ignore file is found, then the original list is returned.
++//
++// To start off with, ~/.{npm,git}ignore is added, as is
++// prefix/{npm,git}ignore, effectively treated as if they were in the
++// base package directory.
++
++exports.addIgnoreFile = addIgnoreFile
++exports.readIgnoreFile = readIgnoreFile
++exports.parseIgnoreFile = parseIgnoreFile
++exports.test = test
++exports.filter = filter
++
++var path = require("path")
++  , fs = require("graceful-fs")
++  , minimatch = require("minimatch")
++  , relativize = require("./relativize.js")
++  , log = require("./log.js")
++
++// todo: memoize
++
++// read an ignore file, or fall back to the
++// "gitBase" file in the same directory.
++function readIgnoreFile (file, gitBase, cb) {
++  //log.warn(file, "ignoreFile")
++  if (!file) return cb(null, "")
++  fs.readFile(file, function (er, data) {
++    if (!er || !gitBase) return cb(null, data || "")
++    var gitFile = path.resolve(path.dirname(file), gitBase)
++    fs.readFile(gitFile, function (er, data) {
++      return cb(null, data || "")
++    })
++  })
++}
++
++// read a file, and then return the list of patterns
++function parseIgnoreFile (file, gitBase, dir, cb) {
++  readIgnoreFile(file, gitBase, function (er, data) {
++    data = data ? data.toString("utf8") : ""
++
++    data = data.split(/[\r\n]+/).map(function (p) {
++      return p.trim()
++    }).filter(function (p) {
++      return p.length && p.charAt(0) !== "#"
++    })
++    data.dir = dir
++    return cb(er, data)
++  })
++}
++
++// add an ignore file to an existing list which can
++// then be passed to the test() function. If the ignore
++// file doesn't exist, then the list is unmodified. If
++// it is, then a concat-child of the original is returned,
++// so that this is suitable for walking a directory tree.
++function addIgnoreFile (file, gitBase, list, dir, cb) {
++  if (typeof cb !== "function") cb = dir, dir = path.dirname(file)
++  if (typeof cb !== "function") cb = list, list = []
++  parseIgnoreFile(file, gitBase, dir, function (er, data) {
++    if (!er && data) {
++      // package.json "files" array trumps everything
++      // Make sure it's always last.
++      if (list.length && list[list.length-1].packageFiles) {
++        list = list.concat([data, list.pop()])
++      } else {
++        list = list.concat([data])
++      }
++    }
++    cb(er, list)
++  })
++}
++
++
++// no IO
++// loop through the lists created in the functions above, and test to
++// see if a file should be included or not, given those exclude lists.
++function test (file, excludeList) {
++  if (path.basename(file) === "package.json") return true
++  // log.warn(file, "test file")
++  // log.warn(excludeList, "test list")
++  var incRe = /^\!(\!\!)*/
++    , excluded = false
++  for (var i = 0, l = excludeList.length; i < l; i ++) {
++    var excludes = excludeList[i]
++      , dir = excludes.dir
++
++    // chop the filename down to be relative to excludeDir
++    var rf = relativize(file, dir, true)
++    rf = rf.replace(/^\.?\//, "")
++    if (file.slice(-1) === "/") rf += "/"
++
++    // log.warn([file, rf], "rf")
++
++    for (var ii = 0, ll = excludes.length; ii < ll; ii ++) {
++      var ex = excludes[ii].replace(/^(!*)\//, "$1")
++        , inc = !!ex.match(incRe)
++
++      // log.warn([ex, rf], "ex, rf")
++      // excluding/including a dir excludes/includes all the files in it.
++      if (ex.slice(-1) === "/") ex += "**"
++
++      // if this is not an inclusion attempt, and someone else
++      // excluded it, then just continue, because there's nothing
++      // that can be done here to change the exclusion.
++      if (!inc && excluded) continue
++
++      // if it's an inclusion attempt, and the file has not been
++      // excluded, then skip it, because there's no need to try again.
++      if (inc && !excluded) continue
++
++      // if it matches the pattern, then it should be excluded.
++      excluded = !!minimatch(rf, ex, { matchBase: true })
++      // log.error([rf, ex, excluded], "rf, ex, excluded")
++
++      // if you include foo, then it also includes foo/bar.js
++      if (inc && excluded && ex.slice(-3) !== "/**") {
++        excluded = minimatch(rf, ex + "/**", { matchBase: true })
++        // log.warn([rf, ex + "/**", inc, excluded], "dir without /")
++      }
++
++      // if you exclude foo, then it also excludes foo/bar.js
++      if (!inc
++          && excluded
++          && ex.slice(-3) !== "/**"
++          && rf.slice(-1) === "/"
++          && excludes.indexOf(ex + "/**") === -1) {
++        // log.warn(ex + "/**", "adding dir-matching exclude pattern")
++        excludes.splice(ii, 1, ex, ex + "/**")
++        ll ++
++      }
++    }
++    // log.warn([rf, excluded, excludes], "rf, excluded, excludes")
++  }
++  // true if it *should* be included
++  // log.warn([file, excludeList, excluded], "file, excluded")
++  return !excluded
++}
++
++// returns a function suitable for Array#filter
++function filter (dir, list) { return function (file) {
++  file = file.trim()
++  var testFile = path.resolve(dir, file)
++  if (file.slice(-1) === "/") testFile += "/"
++  return file && test(testFile, list)
++}}
@@@ -8,16 -8,16 +8,16 @@@ var request = require("request"
    , url = require("url")
    , log = require("./log.js")
    , path = require("path")
--  , mkdir = require("mkdirp")
--  , chownr = require("chownr")
++  , mkdir = require("./mkdir-p.js")
    , regHost
++  , getAgent = require("./get-agent.js")
  
  module.exports = fetch
  
  function fetch (remote, local, headers, cb) {
    if (typeof cb !== "function") cb = headers, headers = {}
    log.verbose(local, "fetch to")
--  mkdir(path.dirname(local), function (er, made) {
++  mkdir(path.dirname(local), function (er) {
      if (er) return cb(er)
      fetch_(remote, local, headers, cb)
    })
@@@ -57,9 -57,9 +57,8 @@@ function makeRequest (remote, fstr, hea
  
    request({ url: remote
            , proxy: proxy
++          , agent: getAgent(remote)
            , strictSSL: npm.config.get("strict-ssl")
--          , ca: remote.host === regHost ? npm.config.get("ca") : undefined
--          , headers: { "user-agent": npm.config.get("user-agent") }
            , onResponse: onResponse }).pipe(fstr)
    function onResponse (er, res) {
      if (er) return fstr.emit("error", er)
@@@ -45,9 -45,9 +45,6 @@@ function findPrefix_ (p, original, cb) 
        return cb(null, p)
      }
  
--    var d = path.dirname(p)
--    if (d === p) return cb(null, original)
--
--    return findPrefix_(d, original, cb)
++    return findPrefix_(path.dirname(p), original, cb)
    })
  }
index 0000000,0000000..4bc074f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,62 @@@
++// get an http/https agent
++// This is necessary for the custom CA certs in http2,
++// especially while juggling multiple different registries.
++//
++// When using http2, the agent key is just the CA setting,
++// since it can manage socket pooling across different host:port
++// options.  When using the older implementation, the
++// key is ca:host:port combination.
++
++module.exports = getAgent
++
++var npm = require("../npm.js")
++  , url = require("url")
++  , agents = {}
++  , isHttp2 = !!require("http").globalAgent
++  , registry = url.parse(npm.config.get("registry") || "")
++  , regCA = npm.config.get("ca")
++
++function getAgent (remote) {
++  // If not doing https, then there's no CA cert to manage.
++  // on http2, this will use the default global agent.
++  // on http1, this is undefined, so it'll spawn based on
++  // host:port if necessary.
++  if (remote.protocol !== "https:") {
++    return require("http").globalAgent
++  }
++
++  if (typeof remote === "string") {
++    remote = url.parse(remote)
++  }
++
++  var ca
++  // if this is the registry, then use the configuration ca.
++  // otherwise, just use the built-in CAs that node has.
++  // todo: multi-registry support.
++  if (remote.hostname === registry.hostname
++      && remote.port === registry.port) {
++    ca = regCA
++  }
++
++  // no CA, just use the default agent.
++  if (!ca) {
++    return require("https").globalAgent
++  }
++
++  var hostname = remote.hostname
++    , port = remote.port
++    , key = agentKey(hostname, port, ca)
++
++  return agents[key] = agents[key] || getAgent_(hostname, port, ca)
++}
++
++function getAgent_ (hostname, port, ca) {
++  var Agent = require("https").Agent
++  return new Agent({ host: hostname
++                   , port: port
++                   , ca: ca })
++}
++
++function agentKey (hostname, port, ca) {
++  return JSON.stringify(isHttp2 ? ca : [hostname, port, ca])
++}
index 0000000,0000000..3c5e4f0
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++
++module.exports = get
++function get (obj, key) {
++  for (var i in obj) if (i.toLowerCase() === key.toLowerCase()) return obj[i]
++  return undefined
++}
@@@ -323,14 -323,14 +323,8 @@@ function envReplace (f) 
    if (typeof f !== "string" || !f) return f
  
    // replace any ${ENV} values with the appropriate environ.
--  var envExpr = /(\\*)\$\{([^}]+)\}/g
--  return f.replace(envExpr, function (orig, esc, name, i, s) {
--    esc = esc.length && esc.length % 2
--    if (esc) return orig
--    if (undefined === process.env[name]) {
--      throw new Error("Failed to replace env in config: "+orig)
--    }
--    return process.env[name]
++  return f.replace(/\$\{([^}]+)\}/g, function (orig, name, i, s) {
++    return process.env[name] || orig
    })
  }
  
@@@ -11,17 -11,17 +11,6 @@@ var log = require("./log.js"
    , chain = require("slide").chain
    , constants = require("constants")
    , output = require("./output.js")
--  , PATH = "PATH"
--
--// windows calls it's path "Path" usually, but this is not guaranteed.
--if (process.platform === "win32") {
--  PATH = "Path"
--  Object.keys(process.env).forEach(function (e) {
--    if (e.match(/^PATH$/i)) {
--      PATH = e
--    }
--  })
--}
  
  function lifecycle (pkg, stage, wd, unsafe, failOk, cb) {
    if (typeof cb !== "function") cb = failOk, failOk = false
@@@ -65,21 -65,21 +54,16 @@@ function checkForLink (pkg, cb) 
  }
  
  function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) {
--  var pathArr = []
++  var PATH = []
      , p = wd.split("node_modules")
      , acc = path.resolve(p.shift())
    p.forEach(function (pp) {
--    pathArr.unshift(path.join(acc, "node_modules", ".bin"))
++    PATH.unshift(path.join(acc, "node_modules", ".bin"))
      acc = path.join(acc, "node_modules", pp)
    })
--  pathArr.unshift(path.join(acc, "node_modules", ".bin"))
--
--  // we also unshift the bundled node-gyp-bin folder so that
--  // the bundled one will be used for installing things.
--  pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin"))
--
--  if (env[PATH]) pathArr.push(env[PATH])
--  env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":")
++  PATH.unshift(path.join(acc, "node_modules", ".bin"))
++  if (env.PATH) PATH.push(env.PATH)
++  env.PATH = PATH.join(process.platform === "win32" ? ";" : ":")
  
    var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage)
  
@@@ -129,7 -129,7 +113,7 @@@ function runPackageLifecycle (pkg, env
      , cmd = env.npm_lifecycle_script
      , sh = "sh"
      , shFlag = "-c"
--
++  
    if (process.platform === "win32") {
      sh = "cmd"
      shFlag = "/c"
  
    log.verbose(unsafe, "unsafe-perm in lifecycle")
  
--  var note = "\n> " + pkg._id + " " + stage + " " + wd
--           + "\n> " + cmd + "\n"
--
--  output.write(note, function (er) {
++  output.write("\n> "+pkg._id+" " + stage+" "+wd+"\n> "+cmd+"\n", function (er) {
      if (er) return cb(er)
--
++    
      exec( sh, [shFlag, cmd], env, true, wd
          , user, group
          , function (er, code, stdout, stderr) {
@@@ -252,10 -252,10 +233,6 @@@ function makeEnv (data, prefix, env) 
        return
      }
      var value = ini.get(i)
--    if (/^(log|out)fd$/.test(i) && typeof value === "object") {
--      // not an fd, a stream
--      return
--    }
      if (!value) value = ""
      else if (typeof value !== "string") value = JSON.stringify(value)
  
@@@ -4,8 -4,8 +4,8 @@@ link.ifExists = linkIfExist
  
  var fs = require("graceful-fs")
    , chain = require("slide").chain
--  , mkdir = require("mkdirp")
--  , rm = require("./gently-rm.js")
++  , mkdir = require("./mkdir-p.js")
++  , rm = require("rimraf")
    , log = require("./log.js")
    , path = require("path")
    , relativize = require("./relativize.js")
@@@ -23,7 -23,7 +23,7 @@@ function link (from, to, gently, cb) 
    if (npm.config.get("force")) gently = false
    chain
      ( [ [fs, "stat", from]
--      , [rm, to, gently]
++      , [rm, to, { gently: gently }]
        , [mkdir, path.dirname(to)]
        , [fs, "symlink", relativize(from, to), to] ]
      , cb)
index 0000000,0000000..cc2b465
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,191 @@@
++
++var log = require("./log.js")
++  , fs = require("graceful-fs")
++  , path = require("path")
++  , npm = require("../npm.js")
++  , exec = require("./exec.js")
++  , uidNumber = require("./uid-number.js")
++  , umask = process.umask()
++  , umaskOrig = umask
++  , addedUmaskExit = false
++  , mkdirCache = {}
++
++module.exports = mkdir
++function mkdir (ensure, mode, uid, gid, noChmod, cb_) {
++  if (typeof cb_ !== "function") cb_ = noChmod, noChmod = null
++  if (typeof cb_ !== "function") cb_ = gid, gid = null
++  if (typeof cb_ !== "function") cb_ = uid, uid = null
++  if (typeof cb_ !== "function") cb_ = mode, mode = npm.modes.exec
++
++  if (mode & umask) {
++    log.verbose(mode.toString(8), "umasking from "+umask.toString(8))
++    process.umask(umask = 0)
++    if (!addedUmaskExit) {
++      addedUmaskExit = true
++      process.on("exit", function () { process.umask(umask = umaskOrig) })
++    }
++  }
++
++  ensure = path.resolve(ensure).replace(/\/+$/, '')
++
++  // mkdir("/") should not do anything, since that always exists.
++  if (!ensure
++      || ( process.platform === "win32"
++         && ensure.match(/^[a-zA-Z]:(\\|\/)?$/))) {
++    return cb_()
++  }
++
++  if (mkdirCache.hasOwnProperty(ensure)) {
++    return mkdirCache[ensure].push(cb_)
++  }
++  mkdirCache[ensure] = [cb_]
++
++  function cb (er) {
++    var cbs = mkdirCache[ensure]
++    delete mkdirCache[ensure]
++    cbs.forEach(function (c) { c(er) })
++  }
++
++  if (uid === null && gid === null) {
++    return mkdir_(ensure, mode, uid, gid, noChmod, cb)
++  }
++
++  uidNumber(uid, gid, function (er, uid, gid) {
++    if (er) return cb(er)
++    mkdir_(ensure, mode, uid, gid, noChmod, cb)
++  })
++}
++
++function mkdir_ (ensure, mode, uid, gid, noChmod, cb) {
++  // if it's already a dir, then just check the bits and owner.
++  fs.stat(ensure, function (er, s) {
++    if (s && s.isDirectory()) {
++      // check mode, uid, and gid.
++      if ((noChmod || (s.mode & mode) === mode)
++          && (typeof uid !== "number" || s.uid === uid)
++          && (typeof gid !== "number" || s.gid === gid)) return cb()
++      return done(ensure, mode, uid, gid, noChmod, cb)
++    }
++    return walkDirs(ensure, mode, uid, gid, noChmod, cb)
++  })
++}
++
++function done (ensure, mode, uid, gid, noChmod, cb) {
++  // now the directory has been created.
++  // chown it to the desired uid/gid
++  // Don't chown the npm.root dir, though, in case we're
++  // in unsafe-perm mode.
++  log.verbose("done: "+ensure+" "+mode.toString(8), "mkdir")
++
++  // only chmod if noChmod isn't set.
++  var d = done_(ensure, mode, uid, gid, cb)
++  if (noChmod) return d()
++  fs.chmod(ensure, mode, d)
++}
++
++function done_ (ensure, mode, uid, gid, cb) {
++  return function (er) {
++    if (er
++        || ensure === npm.dir
++        || typeof uid !== "number"
++        || typeof gid !== "number"
++        || npm.config.get("unsafe-perm")) return cb(er)
++    uid = Math.floor(uid)
++    gid = Math.floor(gid)
++    fs.chown(ensure, uid, gid, cb)
++  }
++}
++
++var pathSplit = process.platform === "win32" ? /\/|\\/ : "/"
++function walkDirs (ensure, mode, uid, gid, noChmod, cb) {
++  var dirs = ensure.split(pathSplit)
++    , walker = []
++    , foundUID = null
++    , foundGID = null
++
++  // gobble the "/" or C: first
++  walker.push(dirs.shift())
++
++  // The loop that goes through and stats each dir.
++  ;(function S (d) {
++    // no more directory steps left.
++    if (d === undefined) {
++      // do the chown stuff
++      return done(ensure, mode, uid, gid, noChmod, cb)
++    }
++
++    // get the absolute dir for the next piece being stat'd
++    walker.push(d)
++    var dir = walker.join(path.SPLIT_CHAR)
++
++    // stat callback lambda
++    fs.stat(dir, function STATCB (er, s) {
++      if (er) {
++        // the stat failed - directory does not exist.
++
++        log.verbose(er.message, "mkdir (expected) error")
++
++        // use the same uid/gid as the nearest parent, if not set.
++        if (foundUID !== null) uid = foundUID
++        if (foundGID !== null) gid = foundGID
++
++        // make the directory
++        fs.mkdir(dir, mode, function MKDIRCB (er) {
++          // since stat and mkdir are done as two separate syscalls,
++          // operating on a path rather than a file descriptor, it's
++          // possible that the directory didn't exist when we did
++          // the stat, but then *did* exist when we go to to the mkdir.
++          // If we didn't care about uid/gid, we could just mkdir
++          // repeatedly, failing on any error other than "EEXIST".
++          if (er && er.message.indexOf("EEXIST") === 0) {
++            return fs.stat(dir, STATCB)
++          }
++
++          // any other kind of error is not saveable.
++          if (er) return cb(er)
++
++          // at this point, we've just created a new directory successfully.
++
++          // if we care about permissions
++          if (!npm.config.get("unsafe-perm") // care about permissions
++              // specified a uid and gid
++              && uid !== null
++              && gid !== null ) {
++            // set the proper ownership
++            return fs.chown(dir, uid, gid, function (er) {
++              if (er) return cb(er)
++              // attack the next portion of the path.
++              S(dirs.shift())
++            })
++          } else {
++            // either we don't care about ownership, or it's already right.
++            S(dirs.shift())
++          }
++        }) // mkdir
++
++      } else {
++        // the stat succeeded.
++        if (s.isDirectory()) {
++          // if it's a directory, that's good.
++          // if the uid and gid aren't already set, then try to preserve
++          // the ownership on up the tree.  Things in ~ remain owned by
++          // the user, things in / remain owned by root, etc.
++          if (uid === null && typeof s.uid === "number") foundUID = s.uid
++          if (gid === null && typeof s.gid === "number") foundGID = s.gid
++
++          // move onto next portion of path
++          S(dirs.shift())
++
++        } else {
++          // the stat succeeded, but it's not a directory
++          log.verbose(dir, "mkdir exists")
++          log.silly(s, "stat("+dir+")")
++          log.verbose(s.isDirectory(), "isDirectory()")
++          cb(new Error("Failed to mkdir "+dir+": File exists"))
++        }// if (isDirectory) else
++      } // if (stat failed) else
++    }) // stat
++
++  // start the S function with the first item in the list of directories.
++  })(dirs.shift())
++}
@@@ -6,9 -6,9 +6,8 @@@ var GET = require("./request.js").GE
    , npm = require("../../npm.js")
    , path = require("path")
    , log = require("../log.js")
--  , mkdir = require("mkdirp")
++  , mkdir = require("../mkdir-p.js")
    , cacheStat = null
--  , chownr = require("chownr")
  
  function get (project, version, timeout, nofollow, staleOk, cb) {
    if (typeof cb !== "function") cb = staleOk, staleOk = false
@@@ -20,9 -20,9 +19,6 @@@
      throw new Error("No callback provided to registry.get")
    }
  
--  timeout = Math.min(timeout, npm.config.get("cache-max"))
--  timeout = Math.max(timeout, npm.config.get("cache-min"))
--
    if ( process.env.COMP_CWORD !== undefined
      && process.env.COMP_LINE !== undefined
      && process.env.COMP_POINT !== undefined
@@@ -140,7 -140,7 +136,7 @@@ function get_ (uri, timeout, cache, sta
  
      data = remoteData
      if (!data) {
--      er = er || new Error("failed to fetch from registry: " + uri)
++      er = new Error("failed to fetch from registry: " + uri)
      }
  
      if (er) return cb(er, data, raw, response)
@@@ -174,13 -174,13 +170,13 @@@ function saveToCache (cache, data, save
  }
  
  function saveToCache_ (cache, data, uid, gid, saved) {
--  mkdir(path.dirname(cache), function (er, made) {
++  mkdir(path.dirname(cache), npm.modes.exec, uid, gid, function (er) {
      if (er) return saved()
      fs.writeFile(cache, JSON.stringify(data), function (er) {
        if (er || uid === null || gid === null) {
          return saved()
        }
--      chownr(made || cache, uid, gid, saved)
++      fs.chown(cache, uid, gid, saved)
      })
    })
  }
@@@ -16,6 -16,6 +16,7 @@@ var npm = require("../../npm.js"
    , stream = require("stream")
    , Stream = stream.Stream
    , request = require("request")
++  , getAgent = require("../get-agent.js")
  
  function regRequest (method, where, what, etag, nofollow, cb_) {
    if (typeof cb_ !== "function") cb_ = nofollow, nofollow = false
@@@ -84,7 -84,7 +85,7 @@@
  function makeRequest (method, remote, where, what, etag, nofollow, cb) {
    var opts = { url: remote
               , method: method
--             , ca: npm.config.get("ca")
++             , agent: getAgent(remote)
               , strictSSL: npm.config.get("strict-ssl") }
      , headers = opts.headers = {}
    if (etag) {
@@@ -94,8 -94,8 +95,6 @@@
  
    headers.accept = "application/json"
  
--  headers["user-agent"] = npm.config.get("user-agent")
--
    opts.proxy = npm.config.get( remote.protocol === "https:"
                               ? "https-proxy" : "proxy" )
  
@@@ -58,7 -58,7 +58,6 @@@ function write (args, stream, lf, cb) 
      if (!npm.config.get("unicode")) {
        arg = arg.replace(/└/g, "`")
                 .replace(/─/g, "-")
--               .replace(/│/g, "|")
                 .replace(/├/g, "+")
                 .replace(/┬/g, "-")
      }
@@@ -94,7 -94,7 +94,6 @@@ var npm = require("../npm.js"
    , semver = require("semver")
    , readJson = require("./read-json.js")
    , log = require("./log.js")
--  , url = require("url")
  
  module.exports = readInstalled
  
@@@ -126,8 -126,8 +125,7 @@@ function readInstalled_ (folder, parent
    })
  
    readJson(path.resolve(folder, "package.json"), function (er, data) {
--    obj = copy(data)
--
++    obj = data
      if (!parent) {
        obj = obj || true
        er = null
@@@ -255,8 -255,8 +253,6 @@@ function findUnmet (obj) 
            continue
          }
          if ( typeof deps[d] === "string"
--            // url deps presumed innocent.
--            && !url.parse(deps[d]).protocol
              && !semver.satisfies(found.version, deps[d])) {
            // the bad thing will happen
            log.warn(obj.path + " requires "+d+"@'"+deps[d]
    return obj
  }
  
--function copy (obj) {
--  if (!obj || typeof obj !== 'object') return obj
--  if (Array.isArray(obj)) return obj.map(copy)
--
--  var o = {}
--  for (var i in obj) o[i] = copy(obj[i])
--  return o
--}
--
  if (module === require.main) {
    var util = require("util")
    console.error("testing")
@@@ -34,33 -34,33 +34,8 @@@ function readJson (jsonFile, opts, cb) 
    var wscript = null
      , contributors = null
      , serverjs = null
--    , gypfile = null
  
--  if (opts.gypfile !== null && opts.gypfile !== undefined) {
--    gypfile = opts.gypfile
--    next()
--  } else {
--    var pkgdir = path.dirname(jsonFile)
--
--    function hasGyp (has) {
--      gypfile = opts.gypfile = has
--      next()
--    }
--
--    fs.readdir(pkgdir, function (er, gf) {
--      // this would be weird.
--      if (er) return hasGyp(false)
--
--      // see if there are any *.gyp files in there.
--      gf = gf.filter(function (f) {
--        return f.match(/\.gyp$/)
--      })
--      gf = gf[0]
--      return hasGyp(!!gf)
--    })
--  }
--
--  if (opts.wscript !== null && opts.wscript !== undefined) {
++  if (opts.wscript != null) {
      wscript = opts.wscript
      next()
    } else fs.readFile( path.join(path.dirname(jsonFile), "wscript")
@@@ -72,7 -72,7 +47,7 @@@
      next()
    })
  
--  if (opts.contributors !== null && opts.contributors !== undefined) {
++  if (opts.contributors != null) {
      contributors = opts.contributors
      next()
    } else fs.readFile( path.join(path.dirname(jsonFile), "AUTHORS")
@@@ -89,7 -89,7 +64,7 @@@
      next()
    })
  
--  if (opts.serverjs !== null && opts.serverjs !== undefined) {
++  if (opts.serverjs != null) {
      serverjs = opts.serverjs
      next()
    } else fs.stat( path.join(path.dirname(jsonFile), "server.js")
    })
  
    function next () {
--    if (wscript === null ||
--        contributors === null ||
--        gypfile === null ||
--        serverjs === null) {
++    if (wscript === null
++        || contributors === null
++        || serverjs === null) {
        return
      }
  
--    // XXX this api here is insane.  being internal is no excuse.
--    // please refactor.
--    var thenLoad = processJson(opts, function (er, data) {
++    fs.readFile(jsonFile, processJson(opts, function (er, data) {
        if (er) return cb(er)
        var doLoad = !(jsonFile.indexOf(npm.cache) === 0 &&
                       path.basename(path.dirname(jsonFile)) !== "package")
        if (!doLoad) return cb(er, data)
        loadPackageDefaults(data, path.dirname(jsonFile), cb)
--    })
--
--    fs.readFile(jsonFile, function (er, data) {
--      if (er && er.code === "ENOENT") {
--        // single-file module, maybe?
--        // check index.js for a /**package { ... } **/ section.
--        var indexFile = path.resolve(path.dirname(jsonFile), "index.js")
--        return fs.readFile(indexFile, function (er2, data) {
--          // if this doesn't work, then die with the original error.
--          if (er2) return cb(er)
--          data = parseIndex(data)
--          if (!data) return cb(er)
--          thenLoad(null, data)
--        })
--      }
--      thenLoad(er, data)
--    })
++    }))
    }
  }
  
--// sync. no io.
--// /**package { "name": "foo", "version": "1.2.3", ... } **/
--function parseIndex (data) {
--  data = data.toString()
--  data = data.split(/^\/\*\*package(?:\s|$)/m)
--  if (data.length < 2) return null
--  data = data[1]
--  data = data.split(/\*\*\/$/m)
--  if (data.length < 2) return null
--  data = data[0]
--  data = data.replace(/^\s*\*/mg, "")
--  return data
--}
--
  function processJson (opts, cb) {
    if (typeof cb !== "function") cb = opts, opts = {}
    if (typeof cb !== "function") {
  }
  
  function processJsonString (opts, cb) { return function (er, jsonString) {
--  if (er) return cb(er, jsonString)
    jsonString += ""
++  if (er) return cb(er, jsonString)
    var json
    try {
      json = JSON.parse(jsonString)
@@@ -246,12 -246,12 +188,11 @@@ function typoWarn (json) 
                    }
  
    if (typeof json.bugs === "object") {
--    // just go ahead and correct these.
      Object.keys(bugsTypos).forEach(function (d) {
        if (json.bugs.hasOwnProperty(d)) {
--        json.bugs[ bugsTypos[d] ] = json.bugs[d]
--        delete json.bugs[d]
--      }
++        log.warn( "package.json: bugs['" + d + "'] should probably be "
++                + "bugs['" + bugsTypos[d] + "']", json._id)
++        }
      })
    }
  
@@@ -359,15 -359,15 +300,6 @@@ function processObject (opts, cb) { ret
  
    var scripts = json.scripts || {}
  
--  // if it has a bindings.gyp, then build with node-gyp
--  if (opts.gypfile && !json.prebuilt) {
--    log.verbose([json.prebuilt, opts], "has bindings.gyp")
--    if (!scripts.install && !scripts.preinstall) {
--      scripts.install = "node-gyp rebuild"
--      json.scripts = scripts
--    }
--  }
--
    // if it has a wscript, then build it.
    if (opts.wscript && !json.prebuilt) {
      log.verbose([json.prebuilt, opts], "has wscript")
    if (opts.dev
        || npm.config.get("dev")
        || npm.config.get("npat")) {
++    // log.warn(json._id, "Adding devdeps")
      Object.keys(json.devDependencies || {}).forEach(function (d) {
        json.dependencies[d] = json.devDependencies[d]
      })
++    // log.warn(json.dependencies, "Added devdeps")
    }
  
    typoWarn(json)
  
  var depObjectifyWarn = {}
  function depObjectify (deps, d, id) {
++  if ((!deps || typeof deps !== "object" || Array.isArray(deps))
++      && !depObjectifyWarn[id+d]) {
++    log.warn( d + " field should be hash of <name>:<version-range> pairs"
++            , id )
++    depObjectifyWarn[id + d] = true
++  }
++
    if (!deps) return {}
    if (typeof deps === "string") {
      deps = deps.trim().split(/[\n\r\s\t ,]+/)
index 0000000,0000000..4d9241a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++
++module.exports = set
++var get = require("./get.js")
++  , processJson = require("./read-json.js").processJson
++function set (obj, key, val) {
++  for (var i in obj) {
++    if (i.toLowerCase() === key.toLowerCase()) return obj[i] = val
++  }
++  obj[key] = val
++  if (!val) return
++  // if it's a package set, then assign all the versions.
++  if (val.versions) return Object.keys(val.versions).forEach(function (v) {
++    if (typeof val.versions[v] !== "object") return
++    set(obj, key+"@"+v, val.versions[v])
++  })
++  // Note that this doesn't put the dist-tags there, only updates the versions
++  if (key === val.name+"@"+val.version) {
++    processJson(val)
++    var reg = get(obj, val.name) || {}
++    reg.name = reg._id = val.name
++    set(obj, val.name, reg)
++    reg.versions = get(reg, "versions") || {}
++    if (!get(reg.versions, val.version)) set(reg.versions, val.version, val)
++  }
++}
++// XXX lib/cache.js and this file need to be rewritten.
++
  // commands for packing and unpacking tarballs
  // this file is used by lib/cache.js
  
  var npm = require("../npm.js")
    , fs = require("graceful-fs")
++  , exec = require("./exec.js")
++  , find = require("./find.js")
++  , mkdir = require("./mkdir-p.js")
++  , asyncMap = require("slide").asyncMap
    , path = require("path")
    , log = require("./log.js")
--  , uidNumber = require("uid-number")
++  , uidNumber = require("./uid-number.js")
    , rm = require("rimraf")
    , readJson = require("./read-json.js")
    , relativize = require("./relativize.js")
    , cache = require("../cache.js")
++  , excludes = require("./excludes.js")
    , myUid = process.getuid && process.getuid()
    , myGid = process.getgid && process.getgid()
    , tar = require("tar")
    , zlib = require("zlib")
    , fstream = require("fstream")
--  , Packer = require("fstream-npm")
--
--if (process.env.SUDO_UID && myUid === 0) {
--  if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID
--  if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID
--}
  
  exports.pack = pack
  exports.unpack = unpack
++exports.makeList = makeList
  
  function pack (targetTarball, folder, pkg, dfc, cb) {
--  log.verbose([targetTarball, folder], "tar.pack")
    if (typeof cb !== "function") cb = dfc, dfc = true
++  folder = path.resolve(folder)
++
++  log.verbose(folder, "pack")
++
++  if (typeof pkg === "function") {
++    cb = pkg, pkg = null
++    return readJson(path.resolve(folder, "package.json"), function (er, pkg) {
++      if (er) return log.er(cb, "Couldn't find package.json in "+folder)(er)
++      pack(targetTarball, folder, pkg, dfc, cb)
++    })
++  }
++  log.verbose(folder+" "+targetTarball, "pack")
++  var parent = path.dirname(folder)
++    , addFolder = path.basename(folder)
++
++  var confEx = npm.config.get("ignore")
++  log.silly(folder, "makeList")
++  makeList(folder, pkg, dfc, function (er, files, cleanup) {
++    if (er) return cb(er)
++    // log.silly(files, "files")
++    return packFiles(targetTarball, parent, files, pkg, function (er) {
++      if (!cleanup || !cleanup.length) return cb(er)
++      // try to be a good citizen, even/especially in the event of failure.
++      cleanupResolveLinkDep(cleanup, function (er2) {
++        if (er || er2) {
++          if (er) log(er, "packing tarball")
++          if (er2) log(er2, "while cleaning up resolved deps")
++        }
++        return cb(er || er2)
++      })
++    })
++  })
++}
++
++function packFiles (targetTarball, parent, files, pkg, cb_) {
++
++  var p
++
++  files = files.map(function (f) {
++    p = f.split(/\/|\\/)[0]
++    return path.resolve(parent, f)
++  })
++
++  parent = path.resolve(parent, p)
++
++  var called = false
++  function cb (er) {
++    if (called) return
++    called = true
++    cb_(er)
++  }
  
    log.verbose(targetTarball, "tarball")
--  log.verbose(folder, "folder")
--  new Packer({ path: folder, type: "Directory", isDirectory: true })
--    .on("error", log.er(cb, "error reading "+folder))
++  log.verbose(parent, "parent")
++  fstream.Reader({ type: "Directory"
++                 , path: parent
++                 , filter: function () {
++                     // files should *always* get into tarballs
++                     // in a user-writable state, even if they're
++                     // being installed from some wackey vm-mounted
++                     // read-only filesystem.
++                     this.props.mode = this.props.mode | 0200
++                     var inc = -1 !== files.indexOf(this.path)
  
++                     // WARNING! Hackety hack!
++                     // XXX Fix this in a better way.
++                     // Rename .gitignore to .npmignore if there is not a
++                     // .npmignore file there already, the better to lock
++                     // down installed packages with git for deployment.
++                     if (this.basename === ".gitignore") {
++                       if (this.parent._entries.indexOf(".npmignore") !== -1) {
++                         return false
++                       }
++                       var d = path.dirname(this.path)
++                       this.basename = ".npmignore"
++                       this.path = path.join(d, ".npmignore")
++                     }
++                     return inc
++                   }
++                 })
++    .on("error", log.er(cb, "error reading "+parent))
      // By default, npm includes some proprietary attributes in the
      // package tarball.  This is sane, and allowed by the spec.
      // However, npm *itself* excludes these from its own package,
      .on("error", log.er(cb, "gzip error "+targetTarball))
      .pipe(fstream.Writer({ type: "File", path: targetTarball }))
      .on("error", log.er(cb, "Could not write "+targetTarball))
--    .on("close", function () {
--      cb()
--    })
++    .on("close", cb)
  }
  
  
  function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) {
--  log.verbose(tarball, "unpack")
    if (typeof cb !== "function") cb = gid, gid = null
    if (typeof cb !== "function") cb = uid, uid = null
    if (typeof cb !== "function") cb = fMode, fMode = npm.modes.file
  }
  
  function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb ) {
++  // If the desired target is /path/to/foo,
++  // then unpack into /path/to/.foo.npm/{something}
++  // rename that to /path/to/foo, and delete /path/to/.foo.npm
    var parent = path.dirname(unpackTarget)
      , base = path.basename(unpackTarget)
++    , tmp = path.resolve(parent, "___" + base + ".npm")
  
--  rm(unpackTarget, function (er) {
--    if (er) return cb(er)
--
++  mkdir(tmp, dMode || npm.modes.exec, uid, gid, function (er) {
++    log.verbose([uid, gid], "unpack_ uid, gid")
++    log.verbose(unpackTarget, "unpackTarget")
++    if (er) return log.er(cb, "Could not create "+tmp)(er)
++    // cp the gzip of the tarball, pipe the stdout into tar's stdin
      // gzip {tarball} --decompress --stdout \
      //   | tar -mvxpf - --strip-components=1 -C {unpackTarget}
--    gunzTarPerm( tarball, unpackTarget
++    gunzTarPerm( tarball, tmp
                 , dMode, fMode
                 , uid, gid
                 , function (er, folder) {
        if (er) return cb(er)
--      readJson(path.resolve(folder, "package.json"), cb)
++      log.verbose(folder, "gunzed")
++
++      rm(unpackTarget, function (er) {
++        if (er) return cb(er)
++        log.verbose(unpackTarget, "rm'ed")
++
++        moveIntoPlace(folder, unpackTarget, function (er) {
++          if (er) return cb(er)
++          log.verbose([folder, unpackTarget], "renamed")
++          // curse you, nfs!  It will lie and tell you that the
++          // mv is done, when in fact, it isn't.  In theory,
++          // reading the file should cause it to wait until it's done.
++          readJson( path.resolve(unpackTarget, "package.json")
++                  , function (er, data) {
++            // now we read the json, so we know it's there.
++            rm(tmp, function (er2) { cb(er || er2, data) })
++          })
++        })
++      })
      })
    })
  }
  
++// on Windows, A/V software can lock the directory, causing this
++// to fail with an EACCES.  Try again on failure, for up to 1 second.
++// XXX Fix this by not unpacking into a temp directory, instead just
++// renaming things on the way out of the tarball.
++function moveIntoPlace (folder, unpackTarget, cb) {
++  var start = Date.now()
++  fs.rename(folder, unpackTarget, function CB (er) {
++    if (er
++        && process.platform === "win32"
++        && er.code === "EACCES"
++        && Date.now() - start < 1000) {
++      return fs.rename(folder, unpackTarget, CB)
++    }
++    cb(er)
++  })
++}
  
--function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) {
++
++function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {
    if (!dMode) dMode = npm.modes.exec
    if (!fMode) fMode = npm.modes.file
    log.silly([dMode.toString(8), fMode.toString(8)], "gunzTarPerm modes")
  
--  var cbCalled = false
--  function cb (er) {
--    if (cbCalled) return
--    cbCalled = true
--    cb_(er, target)
--  }
--
--  var fst = fs.createReadStream(tarball)
++  fs.createReadStream(tarball)
++    .on("error", log.er(cb, "error reading "+tarball))
++    .pipe(zlib.Unzip())
++    .on("error", log.er(cb, "unzip error "+tarball))
++    .pipe(tar.Extract({ type: "Directory", path: tmp }))
++    .on("error", log.er(cb, "Failed unpacking "+tarball))
++    .on("close", afterUntar)
  
--  // figure out who we're supposed to be, if we're not pretending
--  // to be a specific user.
--  if (npm.config.get("unsafe-perm") && process.platform !== "win32") {
--    uid = myUid
--    gid = myGid
--  }
++  //
++  // XXX Do all this in an Extract filter.
++  //
++  function afterUntar (er) {
++    log.silly(er, "afterUntar")
++    // if we're not doing ownership management,
++    // then we're done now.
++    if (er) return log.er(cb, "Failed unpacking "+tarball)(er)
  
--  function extractEntry (entry) {
--    log.silly(entry.path, "extracting entry")
--    // never create things that are user-unreadable,
--    // or dirs that are user-un-listable. Only leads to headaches.
--    var originalMode = entry.mode = entry.mode || entry.props.mode
--    entry.mode = entry.mode | (entry.type === "Directory" ? dMode : fMode)
--    entry.mode = entry.mode & (~npm.modes.umask)
--    entry.props.mode = entry.mode
--    if (originalMode !== entry.mode) {
--      log.silly([entry.path, originalMode, entry.mode], "modified mode")
++    // HACK skip on windows
++    if (npm.config.get("unsafe-perm") && process.platform !== "win32") {
++      uid = process.getuid()
++      gid = process.getgid()
++      if (uid === 0) {
++        if (process.env.SUDO_UID) uid = +process.env.SUDO_UID
++        if (process.env.SUDO_GID) gid = +process.env.SUDO_GID
++      }
      }
  
--    // if there's a specific owner uid/gid that we want, then set that
--    if (process.platform !== "win32" &&
--        typeof uid === "number" &&
--        typeof gid === "number") {
--      entry.props.uid = entry.uid = uid
--      entry.props.gid = entry.gid = gid
++    if (process.platform === "win32") {
++      return fs.readdir(tmp, function (er, files) {
++        files = files.filter(function (f) {
++          return f && f.indexOf("\0") === -1
++        })
++        cb(er, files && path.resolve(tmp, files[0]))
++      })
      }
++
++    find(tmp, function (f) {
++      return f !== tmp
++    }, function (er, files) {
++      if (er) return cb(er)
++      asyncMap(files, function (f, cb) {
++        f = path.resolve(f)
++        log.silly(f, "asyncMap in gTP")
++        fs.lstat(f, function (er, stat) {
++
++          if (er || stat.isSymbolicLink()) return cb(er)
++          if (typeof uid === "number" && typeof gid === "number") {
++            fs.chown(f, uid, gid, chown)
++          } else chown()
++
++          function chown (er) {
++            if (er) return cb(er)
++            var mode = stat.isDirectory() ? dMode : fMode
++              , oldMode = stat.mode & 0777
++              , newMode = (oldMode | mode) & (~npm.modes.umask)
++            if (mode && newMode !== oldMode) {
++              log.silly(newMode.toString(8), "chmod "+path.basename(f))
++              fs.chmod(f, newMode, cb)
++            } else cb()
++          }
++        })
++      }, function (er) {
++
++        if (er) return cb(er)
++        if (typeof myUid === "number" && typeof myGid === "number") {
++          fs.chown(tmp, myUid, myGid, chown)
++        } else chown()
++
++        function chown (er) {
++          if (er) return cb(er)
++          fs.readdir(tmp, function (er, folder) {
++            folder = folder && folder.filter(function (f) {
++              return f && !f.match(/^\._/)
++            })
++            cb(er, folder && path.resolve(tmp, folder[0]))
++          })
++        }
++      })
++    })
++  }
++}
++
++function makeList (dir, pkg, dfc, cb) {
++  if (typeof cb !== "function") cb = dfc, dfc = true
++  if (typeof cb !== "function") cb = pkg, pkg = null
++  dir = path.resolve(dir)
++
++  if (!pkg.path) pkg.path = dir
++
++  var name = path.basename(dir)
++
++  // since this is a top-level traversal, get the user and global
++  // exclude files, as well as the "ignore" config setting.
++  var confIgnore = npm.config.get("ignore").trim()
++        .split(/[\n\r\s\t]+/)
++        .filter(function (i) { return i.trim() })
++    , userIgnore = npm.config.get("userignorefile")
++    , globalIgnore = npm.config.get("globalignorefile")
++    , userExclude
++    , globalExclude
++
++  confIgnore.dir = dir
++  confIgnore.name = "confIgnore"
++
++  var defIgnore = ["build/"]
++  defIgnore.dir = dir
++
++  // TODO: only look these up once, and cache outside this function
++  excludes.parseIgnoreFile( userIgnore, null, dir
++                          , function (er, uex) {
++    if (er) return cb(er)
++    userExclude = uex
++    next()
++  })
++
++  excludes.parseIgnoreFile( globalIgnore, null, dir
++                          , function (er, gex) {
++    if (er) return cb(er)
++    globalExclude = gex
++    next()
++  })
++
++  function next () {
++    if (!globalExclude || !userExclude) return
++    var exList = [ defIgnore, confIgnore, globalExclude, userExclude ]
++
++    makeList_(dir, pkg, exList, dfc, function (er, files, cleanup) {
++      if (er) return cb(er)
++      var dirLen = dir.replace(/(\/|\\)$/, "").length + 1
++      log.silly([dir, dirLen], "dir, dirLen")
++      files = files.map(function (file) {
++        return path.join(name, file.substr(dirLen))
++      })
++      return cb(null, files, cleanup)
++    })
    }
++}
++
++// Patterns ending in slashes will only match targets
++// ending in slashes.  To implement this, add a / to
++// the filename iff it lstats isDirectory()
++function readDir (dir, pkg, dfc, cb) {
++  fs.readdir(dir, function (er, files) {
++    if (er) return cb(er)
++    files = files.filter(function (f) {
++      return f && f.charAt(0) !== "/" && f.indexOf("\0") === -1
++    })
++    asyncMap(files, function (file, cb) {
++      fs.lstat(path.resolve(dir, file), function (er, st) {
++        if (er) return cb(null, [])
++        // if it's a directory, then tack "/" onto the name
++        // so that it can match dir-only patterns in the
++        // include/exclude logic later.
++        if (st.isDirectory()) return cb(null, file + "/")
++
++        // if it's a symlink, then we need to do some more
++        // complex stuff for GH-691
++        if (st.isSymbolicLink()) return readSymlink(dir, file, pkg, dfc, cb)
++
++        // otherwise, just let it on through.
++        return cb(null, file)
++      })
++    }, cb)
++  })
++}
++
++// just see where this link is pointing, and resolve relative paths.
++function shallowReal (link, cb) {
++  link = path.resolve(link)
++  fs.readlink(link, function (er, t) {
++    if (er) return cb(er)
++    return cb(null, path.resolve(path.dirname(link), t), t)
++  })
++}
++
++function readSymlink (dir, file, pkg, dfc, cb) {
++  var isNM = dfc
++           && path.basename(dir) === "node_modules"
++           && path.dirname(dir) === pkg.path
++  // see if this thing is pointing outside of the package.
++  // external symlinks are resolved for deps, ignored for other things.
++  // internal symlinks are allowed through.
++  var df = path.resolve(dir, file)
++  shallowReal(df, function (er, r, target) {
++    if (er) return cb(null, []) // wtf? exclude file.
++    if (r.indexOf(dir) === 0) return cb(null, file) // internal
++    if (!isNM) return cb(null, []) // external non-dep
++    // now the fun stuff!
++    fs.realpath(df, function (er, resolved) {
++      if (er) return cb(null, []) // can't add it.
++      readJson(path.resolve(resolved, "package.json"), function (er) {
++        if (er) return cb(null, []) // not a package
++        resolveLinkDep(dir, file, resolved, target, pkg, function (er, f, c) {
++          cb(er, f, c)
++        })
++      })
++    })
++  })
++}
  
--  var extractOpts = { type: "Directory", path: target, strip: 1 }
++// put the link back the way it was.
++function cleanupResolveLinkDep (cleanup, cb) {
++  // cut it out of the list, so that cycles will be broken.
++  if (!cleanup) return cb()
  
--  if (process.platform !== "win32" &&
--      typeof uid === "number" &&
--      typeof gid === "number") {
--    extractOpts.uid = uid
--    extractOpts.gid = gid
++  asyncMap(cleanup, function (d, cb) {
++    rm(d[1], function (er) {
++      if (er) return cb(er)
++      fs.symlink(d[0], d[1], cb)
++    })
++  }, cb)
++}
++
++function resolveLinkDep (dir, file, resolved, target, pkg, cb) {
++  // we've already decided that this is a dep that will be bundled.
++  // make sure the data reflects this.
++  var bd = pkg.bundleDependencies || pkg.bundledDependencies || []
++  delete pkg.bundledDependencies
++  pkg.bundleDependencies = bd
++  var f = path.resolve(dir, file)
++    , cleanup = [[target, f, resolved]]
++
++  if (bd.indexOf(file) === -1) {
++    // then we don't do this one.
++    // just move the symlink out of the way.
++    return rm(f, function (er) {
++      cb(er, file, cleanup)
++    })
    }
  
--  extractOpts.filter = function () {
--    // symbolic links are not allowed in packages.
--    if (this.type.match(/^.*Link$/)) {
--      log.warn( this.path.substr(target.length + 1)
--              + ' -> ' + this.linkpath
--              , "excluding symbolic link")
--      return false
++  rm(f, function (er) {
++    if (er) return cb(er)
++    cache.add(resolved, function (er, data) {
++      if (er) return cb(er)
++      cache.unpack(data.name, data.version, f, function (er, data) {
++        if (er) return cb(er)
++        // now clear out the cache entry, since it's weird, probably.
++        // pass the cleanup object along so that the thing getting the
++        // list of files knows what to clean up afterwards.
++        cache.clean([data._id], function (er) { cb(er, file, cleanup) })
++      })
++    })
++  })
++}
++
++// exList is a list of ignore lists.
++// Each exList item is an array of patterns of files to ignore
++//
++function makeList_ (dir, pkg, exList, dfc, cb) {
++  var files = null
++    , cleanup = null
++
++  readDir(dir, pkg, dfc, function (er, f, c) {
++    if (er) return cb(er)
++    cleanup = c
++    files = f.map(function (f) {
++      // no nulls in paths!
++      return f.split(/\0/)[0]
++    }).filter(function (f) {
++      // always remove all source control folders and
++      // waf/vim/OSX garbage.  this is a firm requirement.
++      return !( f === ".git/"
++             || f === ".lock-wscript"
++             || f === "CVS/"
++             || f === ".svn/"
++             || f === ".hg/"
++             || f.match(/^\..*\.swp/)
++             || f === ".DS_Store"
++             || f.match(/^\._/)
++             || f === "npm-debug.log"
++             || f === ""
++             || f.charAt(0) === "/"
++              )
++    })
++
++    // if (files.length > 0) files.push(".")
++
++    if (files.indexOf("package.json") !== -1 && dir !== pkg.path) {
++      // a package.json file starts the whole exclude/include
++      // logic all over.  Otherwise, a parent could break its
++      // deps with its files list or .npmignore file.
++      readJson(path.resolve(dir, "package.json"), function (er, data) {
++        if (!er && typeof data === "object") {
++          data.path = dir
++          return makeList(dir, data, dfc, function (er, files) {
++            // these need to be mounted onto the directory now.
++            cb(er, files && files.map(function (f) {
++              return path.resolve(path.dirname(dir), f)
++            }))
++          })
++        }
++        next()
++      })
++      //next()
++    } else next()
++
++    // add a local ignore file, if found.
++    if (files.indexOf(".npmignore") === -1
++        && files.indexOf(".gitignore") === -1) next()
++    else {
++      excludes.addIgnoreFile( path.resolve(dir, ".npmignore")
++                            , ".gitignore"
++                            , exList
++                            , dir
++                            , function (er, list) {
++        if (!er) exList = list
++        next(er)
++      })
      }
--    return true
--  }
++  })
  
++  var n = 2
++    , errState = null
++  function next (er) {
++    if (errState) return
++    if (er) return cb(errState = er, [], cleanup)
++    if (-- n > 0) return
  
--  fst.on("error", log.er(cb, "error reading "+tarball))
--  fst.on("data", function OD (c) {
--    // detect what it is.
--    // Then, depending on that, we'll figure out whether it's
--    // a single-file module, gzipped tarball, or naked tarball.
--    // gzipped files all start with 1f8b08
--    if (c[0] === 0x1F &&
--        c[1] === 0x8B &&
--        c[2] === 0x08) {
--      fst
--        .pipe(zlib.Unzip())
--        .on("error", log.er(cb, "unzip error "+tarball))
--        .pipe(tar.Extract(extractOpts))
--        .on("entry", extractEntry)
--        .on("error", log.er(cb, "untar error "+tarball))
--        .on("close", cb)
--    } else if (c.toString().match(/^package\//)) {
--      // naked tar
--      fst
--        .pipe(tar.Extract(extractOpts))
--        .on("entry", extractEntry)
--        .on("error", log.er(cb, "untar error "+tarball))
--        .on("close", cb)
++    if (!pkg) return cb(new Error("No package.json file in "+dir))
++    if (pkg.path === dir && pkg.files) {
++      pkg.files = pkg.files.filter(function (f) {
++        f = f.trim()
++        return f && f.charAt(0) !== "#"
++      })
++      if (!pkg.files.length) pkg.files = null
++    }
++    if (pkg.path === dir && pkg.files) {
++      // stuff on the files list MUST be there.
++      // ignore everything, then include the stuff on the files list.
++      var pkgFiles = ["*"].concat(pkg.files.map(function (f) {
++        return "!" + f
++      }))
++      pkgFiles.dir = dir
++      pkgFiles.packageFiles = true
++      exList.push(pkgFiles)
++    }
++
++    if (path.basename(dir) === "node_modules"
++        && pkg.path === path.dirname(dir)
++        && dfc) { // do fancy crap
++      files = filterNodeModules(files, pkg)
      } else {
--      // naked js file
--      var jsOpts = { path: path.resolve(target, "index.js") }
--
--      if (process.platform !== "win32" &&
--          typeof uid === "number" &&
--          typeof gid === "number") {
--        jsOpts.uid = uid
--        jsOpts.gid = gid
++      // If a directory is excluded, we still need to be
++      // able to *include* a file within it, and have that override
++      // the prior exclusion.
++      //
++      // This whole makeList thing probably needs to be rewritten
++      files = files.filter(function (f) {
++        return excludes.filter(dir, exList)(f) || f.slice(-1) === "/"
++      })
++    }
++
++
++    asyncMap(files, function (file, cb) {
++      // if this is a dir, then dive into it.
++      // otherwise, don't.
++      file = path.resolve(dir, file)
++
++      // in 0.6.0, fs.readdir can produce some really odd results.
++      // XXX: remove this and make the engines hash exclude 0.6.0
++      if (file.indexOf(dir) !== 0) {
++        return cb(null, [])
        }
  
--      fst
--        .pipe(fstream.Writer(jsOpts))
--        .on("error", log.er(cb, "copy error "+tarball))
--        .on("close", function () {
--          var j = path.resolve(target, "package.json")
--          readJson(j, function (er, d) {
--            if (er) {
--              log.error(tarball, "Not a package")
--              return cb(er)
--            }
--            fs.writeFile(j, JSON.stringify(d) + "\n", cb)
--          })
--        })
--    }
++      fs.lstat(file, function (er, st) {
++        if (er) return cb(er)
++        if (st.isDirectory()) {
++          return makeList_(file, pkg, exList, dfc, cb)
++        }
++        return cb(null, file)
++      })
++    }, function (er, files, c) {
++      if (c) cleanup = (cleanup || []).concat(c)
++      if (files.length > 0) files.push(dir)
++      return cb(er, files, cleanup)
++    })
++  }
++}
++
++// only include node_modules folder that are:
++// 1. not on the dependencies list or
++// 2. on the "bundleDependencies" list.
++function filterNodeModules (files, pkg) {
++  var bd = pkg.bundleDependencies || pkg.bundledDependencies || []
++    , deps = Object.keys(pkg.dependencies || {})
++             .filter(function (key) { return !pkg.dependencies[key].extraneous })
++             .concat(Object.keys(pkg.devDependencies || {}))
++
++  delete pkg.bundledDependencies
++  pkg.bundleDependencies = bd
  
--    // now un-hook, and re-emit the chunk
--    fst.removeListener("data", OD)
--    fst.emit("data", c)
++  return files.filter(function (f) {
++    f = f.replace(/\/$/, "")
++    return f.charAt(0) !== "."
++           && f.charAt(0) !== "_"
++           && bd.indexOf(f) !== -1
    })
  }
index 0000000,0000000..3756275
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,55 @@@
++module.exports = uidNumber
++
++// This module calls into bin/npm-get-uid-gid.js, which sets the
++// uid and gid to the supplied argument, in order to find out their
++// numeric value.  This can't be done in the main node process,
++// because otherwise npm would be running as that user.
++
++var exec = require("./exec.js")
++  , path = require("path")
++  , log = require("./log.js")
++  , constants = require("constants")
++  , npm = require("../npm.js")
++  , uidSupport = process.getuid && process.setuid
++  , uidCache = {}
++  , gidCache = {}
++
++function uidNumber (uid, gid, cb) {
++  if (!uidSupport || npm.config.get("unsafe-perm")) return cb()
++  if (typeof cb !== "function") cb = gid, gid = null
++  if (typeof cb !== "function") cb = uid, uid = null
++  if (gid == null) gid = process.getgid()
++  if (uid == null) uid = process.getuid()
++  if (!isNaN(gid)) gid = +gid
++  if (!isNaN(uid)) uid = +uid
++
++  if (uidCache[uid]) uid = uidCache[uid]
++  if (gidCache[gid]) gid = gidCache[gid]
++
++  if (typeof gid === "number" && typeof uid === "number") {
++    return cb(null, uid, gid)
++  }
++
++  var getter = path.join(__dirname, "..", "..", "bin", "npm-get-uid-gid.js")
++  return exec( process.execPath, [getter, uid, gid], process.env, false
++             , null, process.getuid(), process.getgid()
++             , function (er, code, out, err) {
++    if (er) return log.er(cb, "Could not get uid/gid "+err)(er)
++    log.silly(out, "output from getuid/gid")
++    out = JSON.parse(out+"")
++    if (out.error) {
++      if (!npm.config.get("unsafe-perm")) {
++        var er = new Error(out.error)
++        er.errno = out.errno
++        return cb(er)
++      } else {
++        return cb(null, +process.getuid(), +process.getgid())
++      }
++    }
++    if (isNaN(out.uid) || isNaN(out.gid)) return cb(new Error(
++      "Could not get uid/gid: "+JSON.stringify(out)))
++    uidCache[uid] = out.uid
++    uidCache[gid] = out.gid
++    cb(null, out.uid, out.gid)
++  })
++}
@@@ -63,6 -63,6 +63,6 @@@ function checkGit (data, cb) 
  }
  function write (data, cb) {
    fs.writeFile( path.join(process.cwd(), "package.json")
--              , new Buffer(JSON.stringify(data, null, 2) + "\n")
++              , new Buffer(JSON.stringify(data, null, 2))
                , cb )
  }
@@@ -70,7 -70,7 +70,6 @@@ function view (args, silent, cb) 
      data.versions = Object.keys(data.versions).sort(semver.compare)
      if (!args.length) args = [""]
  
--    // remove readme unless we asked for it
      if (-1 === args.indexOf("readme")) {
        delete data.readme
      }
          delete versions[v]
        }
        if (semver.satisfies(v, version)) args.forEach(function (args) {
--        // remove readme unless we asked for it
--        if (-1 === args.indexOf("readme")) {
--          delete versions[v].readme
--        }
          results.push(showFields(data, versions[v], args))
        })
      })
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM" "1" "April 2012" "" ""
 -.TH "NPM" "1" "May 2012" "" ""
++.TH "NPM" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm\fR \-\- node package manager
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-ADDUSER" "1" "April 2012" "" ""
 -.TH "NPM\-ADDUSER" "1" "May 2012" "" ""
++.TH "NPM\-ADDUSER" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-adduser\fR \-\- Add a registry user account
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-BIN" "1" "April 2012" "" ""
 -.TH "NPM\-BIN" "1" "May 2012" "" ""
++.TH "NPM\-BIN" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-bin\fR \-\- Display npm bin folder
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-BUGS" "1" "April 2012" "" ""
 -.TH "NPM\-BUGS" "1" "May 2012" "" ""
++.TH "NPM\-BUGS" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-BUILD" "1" "April 2012" "" ""
 -.TH "NPM\-BUILD" "1" "May 2012" "" ""
++.TH "NPM\-BUILD" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-build\fR \-\- Build a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-BUNDLE" "1" "April 2012" "" ""
 -.TH "NPM\-BUNDLE" "1" "May 2012" "" ""
++.TH "NPM\-BUNDLE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-bundle\fR \-\- REMOVED
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-CACHE" "1" "April 2012" "" ""
 -.TH "NPM\-CACHE" "1" "May 2012" "" ""
++.TH "NPM\-CACHE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-cache\fR \-\- Manipulates packages cache
@@@ -1,95 -1,95 +1,13 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-CHANGELOG" "1" "April 2012" "" ""
 -.TH "NPM\-CHANGELOG" "1" "May 2012" "" ""
++.TH "NPM\-CHANGELOG" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-changelog\fR \-\- Changes
  .
  .SH "HISTORY"
  .
--.SS "1\.1\.3, 1\.1\.4"
--.
--.IP "\(bu" 4
--Update request to support HTTPS\-over\-HTTP proxy tunneling
--.
--.IP "\(bu" 4
--Throw on undefined envs in config settings
--.
--.IP "\(bu" 4
--Update which to 1\.0\.5
--.
--.IP "\(bu" 4
--Fix windows UNC busyloop in findPrefix
--.
--.IP "\(bu" 4
--Bundle nested bundleDependencies properly
--.
--.IP "\(bu" 4
--Alias adduser to add\-user
--.
--.IP "\(bu" 4
--Doc updates  (Christian Howe, Henrik Hodne, Andrew Lunny)
--.
--.IP "\(bu" 4
--ignore logfd/outfd streams in makeEnv() (Rod Vagg)
--.
--.IP "\(bu" 4
--shrinkwrap: Behave properly with url\-installed deps
--.
--.IP "\(bu" 4
--install: Support \-\-save with url install targets
--.
--.IP "\(bu" 4
--Support installing naked tars or single\-file modules from urls etc\.
--.
--.IP "\(bu" 4
--init: Don\'t add engines section
--.
--.IP "\(bu" 4
--Don\'t run make clean on rebuild
--.
--.IP "\(bu" 4
--Added missing unicode replacement (atomizer)
--.
--.IP "" 0
--.
--.SS "1\.1\.2"
--Dave Pacheco (2):
--      add "npm shrinkwrap"
--.
--.P
--Martin Cooper (1):
--      Fix #1753 Make a copy of the cached objects we\'ll modify\.
--.
--.P
--Tim Oxley (1):
--      correctly remove readme from default npm view command\.
--.
--.P
--Tyler Green (1):
--      fix #2187 set terminal columns to Infinity if 0
--.
--.P
--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
--.
--.SS "1\.1"
--.
--.IP "\(bu" 4
--Replace system tar dependency with a JS tar
--.
--.IP "\(bu" 4
--Continue to refine
--.
--.IP "" 0
--.
  .SS "1\.0"
  .
  .IP "\(bu" 4
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-CODING\-STYLE" "1" "April 2012" "" ""
 -.TH "NPM\-CODING\-STYLE" "1" "May 2012" "" ""
++.TH "NPM\-CODING\-STYLE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-coding-style\fR \-\- npm\'s "funny" coding style
@@@ -99,10 -99,10 +99,10 @@@ null loops like: \fBwhile (something) ;
  reason for doing that\.)
  .
  .IP "\(bu" 4
--\fBcase "foo": doSomething(); break\fR
++case "foo": doSomething(); break
  .
  .IP "\(bu" 4
--In front of a leading \fB(\fR or \fB[\fR at the start of the line\.
++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\.
  .
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-COMPLETION" "1" "April 2012" "" ""
 -.TH "NPM\-COMPLETION" "1" "May 2012" "" ""
++.TH "NPM\-COMPLETION" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-completion\fR \-\- Tab Completion for npm
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-CONFIG" "1" "April 2012" "" ""
 -.TH "NPM\-CONFIG" "1" "May 2012" "" ""
++.TH "NPM\-CONFIG" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-config\fR \-\- Manage the npm configuration file
@@@ -171,12 -171,12 +171,6 @@@ The following shorthands are parsed on 
  \fB\-S\fR: \fB\-\-save\fR
  .
  .IP "\(bu" 4
--\fB\-D\fR: \fB\-\-save\-dev\fR
--.
--.IP "\(bu" 4
--\fB\-O\fR: \fB\-\-save\-optional\fR
--.
--.IP "\(bu" 4
  \fB\-y\fR: \fB\-\-yes\fR
  .
  .IP "\(bu" 4
@@@ -363,42 -363,42 +357,6 @@@ Type: pat
  .P
  The location of npm\'s cache directory\.  See \fBnpm help cache\fR
  .
--.SS "cache\-max"
--.
--.IP "\(bu" 4
--Default: Infinity
--.
--.IP "\(bu" 4
--Type: Number
--.
--.IP "" 0
--.
--.P
--The maximum time (in seconds) to keep items in the registry cache before
--re\-checking against the registry\.
--.
--.P
--Note that no purging is done unless the \fBnpm cache clean\fR command is
--explicitly used, and that only GET requests use the cache\.
--.
--.SS "cache\-min"
--.
--.IP "\(bu" 4
--Default: 0
--.
--.IP "\(bu" 4
--Type: Number
--.
--.IP "" 0
--.
--.P
--The minimum time (in seconds) to keep items in the registry cache before
--re\-checking against the registry\.
--.
--.P
--Note that no purging is done unless the \fBnpm cache clean\fR command is
--explicitly used, and that only GET requests use the cache\.
--.
  .SS "color"
  .
  .IP "\(bu" 4
@@@ -609,19 -609,19 +567,6 @@@ Type: ur
  .P
  A proxy to use for outgoing https requests\.
  .
--.SS "user\-agent"
--.
--.IP "\(bu" 4
--Default: npm/{npm\.version} node/{process\.version}
--.
--.IP "\(bu" 4
--Type: String
--.
--.IP "" 0
--.
--.P
--Sets a User\-Agent to the request header
--.
  .SS "ignore"
  .
  .IP "\(bu" 4
@@@ -652,7 -652,7 +597,7 @@@ The value \fBnpm init\fR should use by 
  .SS "init\.author\.name"
  .
  .IP "\(bu" 4
--Default: ""
++Default: "0\.0\.0"
  .
  .IP "\(bu" 4
  Type: String
@@@ -688,24 -688,24 +633,6 @@@ Type: Strin
  .P
  The value \fBnpm init\fR should use by default for the package author\'s homepage\.
  .
--.SS "json"
--.
--.IP "\(bu" 4
--Default: false
--.
--.IP "\(bu" 4
--Type: Boolean
--.
--.IP "" 0
--.
--.P
--Whether or not to output JSON data, rather than the normal output\.
--.
--.P
--This feature is currently experimental, and the output data structures
--for many commands is either not implemented in JSON yet, or subject to
--change\.  Only the output from \fBnpm ls \-\-json\fR is currently valid\.
--.
  .SS "link"
  .
  .IP "\(bu" 4
@@@ -1013,38 -1013,38 +940,6 @@@ Save installed packages to a package\.j
  .P
  Only works if there is already a package\.json file present\.
  .
--.SS "save\-dev"
--.
--.IP "\(bu" 4
--Default: false
--.
--.IP "\(bu" 4
--Type: Boolean
--.
--.IP "" 0
--.
--.P
--Save installed packages to a package\.json file as devDependencies\.
--.
--.P
--Only works if there is already a package\.json file present\.
--.
--.SS "save\-optional"
--.
--.IP "\(bu" 4
--Default: false
--.
--.IP "\(bu" 4
--Type: Boolean
--.
--.IP "" 0
--.
--.P
--Save installed packages to a package\.json file as optionalDependencies\.
--.
--.P
--Only works if there is already a package\.json file present\.
--.
  .SS "searchopts"
  .
  .IP "\(bu" 4
@@@ -1286,23 -1286,23 +1181,6 @@@ If true, output the npm version and exi
  .P
  Only relevant when specified explicitly on the command line\.
  .
--.SS "versions"
--.
--.IP "\(bu" 4
--Default: false
--.
--.IP "\(bu" 4
--Type: boolean
--.
--.IP "" 0
--.
--.P
--If true, output the npm version as well as node\'s \fBprocess\.versions\fR
--hash, and exit successfully\.
--.
--.P
--Only relevant when specified explicitly on the command line\.
--.
  .SS "viewer"
  .
  .IP "\(bu" 4
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-DEPRECATE" "1" "April 2012" "" ""
 -.TH "NPM\-DEPRECATE" "1" "May 2012" "" ""
++.TH "NPM\-DEPRECATE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-deprecate\fR \-\- Deprecate a version of a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-DEVELOPERS" "1" "April 2012" "" ""
 -.TH "NPM\-DEVELOPERS" "1" "May 2012" "" ""
++.TH "NPM\-DEVELOPERS" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-developers\fR \-\- Developer Guide
@@@ -43,9 -43,9 +43,6 @@@ e) a \fB<name>@<tag>\fR that points to 
  .IP "\(bu" 4
  f) a \fB<name>\fR that has a "latest" tag satisfying (e)
  .
--.IP "\(bu" 4
--g) a \fBgit\fR url that, when cloned, results in (a)\.
--.
  .IP "" 0
  .
  .P
@@@ -54,25 -54,25 +51,6 @@@ benefits of using npm if you just want 
  perhaps if you also want to be able to easily install it elsewhere
  after packing it up into a tarball (b)\.
  .
--.P
--Git urls can be of the form:
--.
--.IP "" 4
--.
--.nf
--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
--.
--.fi
--.
--.IP "" 0
--.
--.P
--The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
--an argument to \fBgit checkout\fR\|\.  The default is \fBmaster\fR\|\.
--.
  .SH "The package\.json File"
  You need to have a \fBpackage\.json\fR file in the root of your project to do
  much of anything with npm\.  That is basically the whole interface\.
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-DISPUTES" "1" "April 2012" "" ""
 -.TH "NPM\-DISPUTES" "1" "May 2012" "" ""
++.TH "NPM\-DISPUTES" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-disputes\fR \-\- Handling Module Name Disputes
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-DOCS" "1" "April 2012" "" ""
 -.TH "NPM\-DOCS" "1" "May 2012" "" ""
++.TH "NPM\-DOCS" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-EDIT" "1" "April 2012" "" ""
 -.TH "NPM\-EDIT" "1" "May 2012" "" ""
++.TH "NPM\-EDIT" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-edit\fR \-\- Edit an installed package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-EXPLORE" "1" "April 2012" "" ""
 -.TH "NPM\-EXPLORE" "1" "May 2012" "" ""
++.TH "NPM\-EXPLORE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-explore\fR \-\- Browse an installed package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-FAQ" "1" "April 2012" "" ""
 -.TH "NPM\-FAQ" "1" "May 2012" "" ""
++.TH "NPM\-FAQ" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-faq\fR \-\- Frequently Asked Questions
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-FOLDERS" "1" "April 2012" "" ""
 -.TH "NPM\-FOLDERS" "1" "May 2012" "" ""
++.TH "NPM\-FOLDERS" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-folders\fR \-\- Folder Structures Used by npm
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-HELP\-SEARCH" "1" "April 2012" "" ""
 -.TH "NPM\-HELP\-SEARCH" "1" "May 2012" "" ""
++.TH "NPM\-HELP\-SEARCH" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-help-search\fR \-\- Search npm help documentation
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-HELP" "1" "April 2012" "" ""
 -.TH "NPM\-HELP" "1" "May 2012" "" ""
++.TH "NPM\-HELP" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-help\fR \-\- Get help on npm
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-INDEX" "1" "April 2012" "" ""
 -.TH "NPM\-INDEX" "1" "May 2012" "" ""
++.TH "NPM\-INDEX" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-index\fR \-\- Index of all npm documentation
  .SH "npm help semver"
   The semantic versioner for npm
  .
--.SH "npm help shrinkwrap"
-- Lock down dependency versions
--.
  .SH "npm help star"
   Mark your favorite packages
  .
  .SH "npm apihelp search"
   Search for packages
  .
--.SH "npm apihelp shrinkwrap"
-- programmatically generate package shrinkwrap file
--.
  .SH "npm apihelp start"
   Start a package
  .
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-INIT" "1" "April 2012" "" ""
 -.TH "NPM\-INIT" "1" "May 2012" "" ""
++.TH "NPM\-INIT" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-init\fR \-\- Interactively create a package\.json file
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-INSTALL" "1" "April 2012" "" ""
 -.TH "NPM\-INSTALL" "1" "May 2012" "" ""
++.TH "NPM\-INSTALL" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-install\fR \-\- Install a package
@@@ -13,18 -13,18 +13,15 @@@ npm install (with no args in a package 
  npm install <tarball file>
  npm install <tarball url>
  npm install <folder>
--npm install <name> [\-\-save|\-\-save\-dev|\-\-save\-optional]
++npm install <name>
  npm install <name>@<tag>
  npm install <name>@<version>
  npm install <name>@<version range>
--npm install <name>@<version range>
  .
  .fi
  .
  .SH "DESCRIPTION"
--This command installs a package, and any packages that it depends on\. If the
--package has a shrinkwrap file, the installation of dependencies will be driven
--by that\. See npm help shrinkwrap\.
++This command installs a package, and any packages that it depends on\.
  .
  .P
  A \fBpackage\fR is:
@@@ -60,8 -60,8 +57,6 @@@ after packing it up into a tarball (b)\
  .
  .IP "\(bu" 4
  \fBnpm install\fR (in package directory, no arguments):
--.
--.IP
  Install the dependencies in the local node_modules folder\.
  .
  .IP
@@@ -71,14 -71,14 +66,10 @@@ directory) as a global package\
  .
  .IP "\(bu" 4
  \fBnpm install <folder>\fR:
--.
--.IP
  Install a package that is sitting in a folder on the filesystem\.
  .
  .IP "\(bu" 4
  \fBnpm install <tarball file>\fR:
--.
--.IP
  Install a package that is sitting on the filesystem\.  Note: if you just want
  to link a dev directory into your npm root, you can do this more easily by
  using \fBnpm link\fR\|\.
@@@ -89,7 -89,7 +80,7 @@@ Example
  .IP "" 4
  .
  .nf
--  npm install \./package\.tgz
++npm install \./package\.tgz
  .
  .fi
  .
@@@ -98,8 -98,8 +89,6 @@@
  .
  .IP "\(bu" 4
  \fBnpm install <tarball url>\fR:
--.
--.IP
  Fetch the tarball url, and then install it\.  In order to distinguish between
  this and other options, the argument must start with "http://" or "https://"
  .
@@@ -109,7 -109,7 +98,7 @@@ Example
  .IP "" 4
  .
  .nf
--  npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6
++npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6
  .
  .fi
  .
  
  .
  .IP "\(bu" 4
--\fBnpm install <name> [\-\-save|\-\-save\-dev|\-\-save\-optional]\fR:
--.
--.IP
--Do a \fB<name>@<tag>\fR install, where \fB<tag>\fR is the "tag" config\. (See \fBnpm help config\fR\|\.)
--.
--.IP
--In most cases, this will install the latest version
--of the module published on npm\.
++\fBnpm install <name>\fR:
++Do a \fB<name>@<tag>\fR install, where \fB<tag>\fR is the "tag" config\. (See \fBnpm help config\fR)
  .
  .IP
  Example:
  .
--.IP
--      npm install sax
--.
--.IP
--\fBnpm install\fR takes 3 exclusive, optional flags which save or update
--the package version in your main package\.json:
--.
--.IP "\(bu" 4
--\fB\-\-save\fR: Package will appear in your \fBdependencies\fR\|\.
--.
--.IP "\(bu" 4
--\fB\-\-save\-dev\fR: Package will appear in your \fBdevDependencies\fR\|\.
++.IP "" 4
  .
--.IP "\(bu" 4
--\fB\-\-save\-optional\fR: Package will appear in your \fBoptionalDependencies\fR\|\.
++.nf
++npm install sax
  .
--.IP
--Examples:
++.fi
  .
--.IP
--  npm install sax \-\-save
--  npm install node\-tap \-\-save\-dev
--  npm install dtrace\-provider \-\-save\-optional
++.IP "" 0
  .
  .IP
  \fBNote\fR: If there is a file or folder named \fB<name>\fR in the current
  working directory, then it will try to install that, and only try to
  fetch the package by name if it is not valid\.
  .
--.IP "" 0
--
--.
  .IP "\(bu" 4
  \fBnpm install <name>@<tag>\fR:
--.
--.IP
  Install the version of the package that is referenced by the specified tag\.
  If the tag does not exist in the registry data for that package, then this
  will fail\.
@@@ -175,7 -175,7 +138,7 @@@ Example
  .IP "" 4
  .
  .nf
--  npm install sax@latest
++npm install sax@latest
  .
  .fi
  .
  .
  .IP "\(bu" 4
  \fBnpm install <name>@<version>\fR:
--.
--.IP
  Install the specified version of the package\.  This will fail if the version
  has not been published to the registry\.
  .
@@@ -195,7 -195,7 +156,7 @@@ Example
  .IP "" 4
  .
  .nf
--  npm install sax@0\.1\.1
++npm install sax@0\.1\.1
  .
  .fi
  .
  .
  .IP "\(bu" 4
  \fBnpm install <name>@<version range>\fR:
--.
--.IP
  Install a version of the package matching the specified version range\.  This
  will follow the same rules for resolving dependencies described in \fBnpm help json\fR\|\.
  .
@@@ -216,8 -216,8 +175,15 @@@ treat it as a single argument\
  .IP
  Example:
  .
--.IP
--      npm install sax@">=0\.1\.0 <0\.2\.0"
++.IP "" 4
++.
++.nf
++npm install sax@">=0\.1\.0 <0\.2\.0"
++.
++.fi
++.
++.IP "" 0
++
  .
  .IP "\(bu" 4
  \fBnpm install <git remote url>\fR:
  Install a package by cloning a git remote url\.  The format of the git
  url is:
  .
--.IP
--      <protocol>://[<user>@]<hostname><separator><path>[#<commit\-ish>]
++.IP "" 4
++.
++.nf
++<protocol>://[<user>@]<hostname><separator><path>[#<commit\-ish>]
++.
++.fi
++.
++.IP "" 0
  .
  .IP
  \fB<protocol>\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, or \fBgit+https\fR\|\.  If no \fB<commit\-ish>\fR is specified, then \fBmaster\fR is
@@@ -239,9 -239,9 +211,9 @@@ Examples
  .IP "" 4
  .
  .nf
--  git+ssh://git@github\.com:isaacs/npm\.git#v1\.0\.27
--  git+https://isaacs@github\.com/isaacs/npm\.git
--  git://github\.com/isaacs/npm\.git#v1\.0\.27
++git+ssh://git@github\.com:isaacs/npm\.git#v1\.0\.27
++git+https://isaacs@github\.com/isaacs/npm\.git
++git://github\.com/isaacs/npm\.git#v1\.0\.27
  .
  .fi
  .
@@@ -398,8 -398,8 +370,5 @@@ npm help ta
  .IP "\(bu" 4
  npm help rm
  .
--.IP "\(bu" 4
--npm help shrinkwrap
--.
  .IP "" 0
  
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-JSON" "1" "April 2012" "" ""
 -.TH "NPM\-JSON" "1" "May 2012" "" ""
++.TH "NPM\-JSON" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling
@@@ -466,9 -466,9 +466,6 @@@ is a semver compatible version identifi
  .IP "\(bu" 4
  \fBrange1 || range2\fR Passes if either range1 or range2 are satisfied\.
  .
--.IP "\(bu" 4
--\fBgit\.\.\.\fR See \'Git URLs as Dependencies\' below
--.
  .IP "" 0
  .
  .P
@@@ -557,25 -557,25 +554,6 @@@ of a version range\
  This tarball will be downloaded and installed locally to your package at
  install time\.
  .
--.SS "Git URLs as Dependencies"
--Git urls can be of the form:
--.
--.IP "" 4
--.
--.nf
--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
--.
--.fi
--.
--.IP "" 0
--.
--.P
--The \fBcommit\-ish\fR can be any tag, sha, or branch which can be supplied as
--an argument to \fBgit checkout\fR\|\.  The default is \fBmaster\fR\|\.
--.
  .SH "devDependencies"
  If someone is planning on downloading and using your module in their
  program, then they probably don\'t want or need to download and build
@@@ -631,67 -631,67 +609,6 @@@ are capable of properly installing you
  .
  .IP "" 0
  .
--.SH "os"
--You can specify which operating systems your
--module will run on:
--.
--.IP "" 4
--.
--.nf
--"os" : [ "darwin", "linux" ]
--.
--.fi
--.
--.IP "" 0
--.
--.P
--You can also blacklist instead of whitelist operating systems,
--just prepend the blacklisted os with a \'!\':
--.
--.IP "" 4
--.
--.nf
--"os" : [ "!win32" ]
--.
--.fi
--.
--.IP "" 0
--.
--.P
--The host operating system is determined by \fBprocess\.platform\fR
--.
--.P
--It is allowed to both blacklist, and whitelist, although there isn\'t any
--good reason to do this\.
--.
--.SH "cpu"
--If your code only runs on certain cpu architectures,
--you can specify which ones\.
--.
--.IP "" 4
--.
--.nf
--"cpu" : [ "x64", "ia32" ]
--.
--.fi
--.
--.IP "" 0
--.
--.P
--Like the \fBos\fR option, you can also blacklist architectures:
--.
--.IP "" 4
--.
--.nf
--"cpu" : [ "!arm", "!mips" ]
--.
--.fi
--.
--.IP "" 0
--.
--.P
--The host architecture is determined by \fBprocess\.arch\fR
--.
  .SH "preferGlobal"
  If your package is primarily a command\-line application that should be
  installed globally, then set this value to \fBtrue\fR to provide a warning
@@@ -708,7 -708,7 +625,7 @@@ to publish it\
  .P
  This is a way to prevent accidental publication of private repositories\.
  If you would like to ensure that a given package is only ever published
--to a specific registry (for example, an internal registry),
++to a speciic registry (for example, an internal registry),
  then use the \fBpublishConfig\fR hash described below
  to override the \fBregistry\fR config param at publish\-time\.
  .
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-LINK" "1" "April 2012" "" ""
 -.TH "NPM\-LINK" "1" "May 2012" "" ""
++.TH "NPM\-LINK" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-link\fR \-\- Symlink a package folder
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-LS" "1" "April 2012" "" ""
 -.TH "NPM\-LS" "1" "May 2012" "" ""
++.TH "NPM\-LS" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-ls\fR \-\- List installed packages
@@@ -32,19 -32,19 +32,6 @@@ When run as \fBll\fR or \fBla\fR, it sh
  .
  .SH "CONFIGURATION"
  .
--.SS "json"
--.
--.IP "\(bu" 4
--Default: false
--.
--.IP "\(bu" 4
--Type: Boolean
--.
--.IP "" 0
--.
--.P
--Show information in JSON format\.
--.
  .SS "long"
  .
  .IP "\(bu" 4
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM" "1" "April 2012" "" ""
 -.TH "NPM" "1" "May 2012" "" ""
++.TH "NPM" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm\fR \-\- node package manager
@@@ -14,7 -14,7 +14,7 @@@ npm <command> [args
  .fi
  .
  .SH "VERSION"
- 1.1.18
 -1.1.21
++1.1.0-2
  .
  .SH "DESCRIPTION"
  npm is the package manager for the Node JavaScript platform\.  It puts
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-OUTDATED" "1" "April 2012" "" ""
 -.TH "NPM\-OUTDATED" "1" "May 2012" "" ""
++.TH "NPM\-OUTDATED" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-outdated\fR \-\- Check for outdated packages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-OWNER" "1" "April 2012" "" ""
 -.TH "NPM\-OWNER" "1" "May 2012" "" ""
++.TH "NPM\-OWNER" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-owner\fR \-\- Manage package owners
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PACK" "1" "April 2012" "" ""
 -.TH "NPM\-PACK" "1" "May 2012" "" ""
++.TH "NPM\-PACK" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-pack\fR \-\- Create a tarball from a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PREFIX" "1" "April 2012" "" ""
 -.TH "NPM\-PREFIX" "1" "May 2012" "" ""
++.TH "NPM\-PREFIX" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-prefix\fR \-\- Display prefix
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PRUNE" "1" "April 2012" "" ""
 -.TH "NPM\-PRUNE" "1" "May 2012" "" ""
++.TH "NPM\-PRUNE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-prune\fR \-\- Remove extraneous packages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PUBLISH" "1" "April 2012" "" ""
 -.TH "NPM\-PUBLISH" "1" "May 2012" "" ""
++.TH "NPM\-PUBLISH" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-publish\fR \-\- Publish a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-REBUILD" "1" "April 2012" "" ""
 -.TH "NPM\-REBUILD" "1" "May 2012" "" ""
++.TH "NPM\-REBUILD" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-rebuild\fR \-\- Rebuild a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-REGISTRY" "1" "April 2012" "" ""
 -.TH "NPM\-REGISTRY" "1" "May 2012" "" ""
++.TH "NPM\-REGISTRY" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-registry\fR \-\- The JavaScript Package Registry
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-REMOVAL" "1" "April 2012" "" ""
 -.TH "NPM\-REMOVAL" "1" "May 2012" "" ""
++.TH "NPM\-REMOVAL" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-removal\fR \-\- Cleaning the Slate
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-RESTART" "1" "April 2012" "" ""
 -.TH "NPM\-RESTART" "1" "May 2012" "" ""
++.TH "NPM\-RESTART" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-restart\fR \-\- Start a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-ROOT" "1" "April 2012" "" ""
 -.TH "NPM\-ROOT" "1" "May 2012" "" ""
++.TH "NPM\-ROOT" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-root\fR \-\- Display npm root
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-RUN\-SCRIPT" "1" "April 2012" "" ""
 -.TH "NPM\-RUN\-SCRIPT" "1" "May 2012" "" ""
++.TH "NPM\-RUN\-SCRIPT" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-run-script\fR \-\- Run arbitrary package scripts
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-SCRIPTS" "1" "April 2012" "" ""
 -.TH "NPM\-SCRIPTS" "1" "May 2012" "" ""
++.TH "NPM\-SCRIPTS" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-scripts\fR \-\- How npm handles the "scripts" field
@@@ -94,26 -94,26 +94,6 @@@ Package scripts run in an environment w
  made available regarding the setup of npm and the current state of the
  process\.
  .
--.SS "path"
--If you depend on modules that define executable scripts, like test suites,
--then those executables will be added to the \fBPATH\fR for executing the scripts\.
--So, if your package\.json has this:
--.
--.IP "" 4
--.
--.nf
--{ "name" : "foo"
--, "dependencies" : { "bar" : "0\.1\.x" }
--, "scripts": { "start" : "bar \./test" } }
--.
--.fi
--.
--.IP "" 0
--.
--.P
--then you could run \fBnpm start\fR to execute the \fBbar\fR script, which is exported
--into the \fBnode_modules/\.bin\fR directory on \fBnpm install\fR\|\.
--.
  .SS "package\.json vars"
  The package\.json fields are tacked onto the \fBnpm_package_\fR prefix\. So, for
  instance, if you had \fB{"name":"foo", "version":"1\.2\.5"}\fR in your package\.json
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-SEARCH" "1" "April 2012" "" ""
 -.TH "NPM\-SEARCH" "1" "May 2012" "" ""
++.TH "NPM\-SEARCH" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-search\fR \-\- Search for packages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-SEMVER" "1" "April 2012" "" ""
 -.TH "NPM\-SEMVER" "1" "May 2012" "" ""
++.TH "NPM\-SEMVER" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-semver\fR \-\- The semantic versioner for npm
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-STAR" "1" "April 2012" "" ""
 -.TH "NPM\-STAR" "1" "May 2012" "" ""
++.TH "NPM\-STAR" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-star\fR \-\- Mark your favorite packages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-START" "1" "April 2012" "" ""
 -.TH "NPM\-START" "1" "May 2012" "" ""
++.TH "NPM\-START" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-start\fR \-\- Start a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-STOP" "1" "April 2012" "" ""
 -.TH "NPM\-STOP" "1" "May 2012" "" ""
++.TH "NPM\-STOP" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-stop\fR \-\- Stop a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-SUBMODULE" "1" "April 2012" "" ""
 -.TH "NPM\-SUBMODULE" "1" "May 2012" "" ""
++.TH "NPM\-SUBMODULE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-submodule\fR \-\- Add a package as a git submodule
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-TAG" "1" "April 2012" "" ""
 -.TH "NPM\-TAG" "1" "May 2012" "" ""
++.TH "NPM\-TAG" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-tag\fR \-\- Tag a published version
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-TEST" "1" "April 2012" "" ""
 -.TH "NPM\-TEST" "1" "May 2012" "" ""
++.TH "NPM\-TEST" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-test\fR \-\- Test a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-RM" "1" "April 2012" "" ""
 -.TH "NPM\-RM" "1" "May 2012" "" ""
++.TH "NPM\-RM" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-rm\fR \-\- Remove a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-UNPUBLISH" "1" "April 2012" "" ""
 -.TH "NPM\-UNPUBLISH" "1" "May 2012" "" ""
++.TH "NPM\-UNPUBLISH" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-unpublish\fR \-\- Remove a package from the registry
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-UPDATE" "1" "April 2012" "" ""
 -.TH "NPM\-UPDATE" "1" "May 2012" "" ""
++.TH "NPM\-UPDATE" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-update\fR \-\- Update a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-VERSION" "1" "April 2012" "" ""
 -.TH "NPM\-VERSION" "1" "May 2012" "" ""
++.TH "NPM\-VERSION" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-version\fR \-\- Bump a package version
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-VIEW" "1" "April 2012" "" ""
 -.TH "NPM\-VIEW" "1" "May 2012" "" ""
++.TH "NPM\-VIEW" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-view\fR \-\- View registry info
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-WHOAMI" "1" "April 2012" "" ""
 -.TH "NPM\-WHOAMI" "1" "May 2012" "" ""
++.TH "NPM\-WHOAMI" "1" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-whoami\fR \-\- Display npm username
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-BIN" "3" "April 2012" "" ""
 -.TH "NPM\-BIN" "3" "May 2012" "" ""
++.TH "NPM\-BIN" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-bin\fR \-\- Display npm bin folder
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-BUGS" "3" "April 2012" "" ""
 -.TH "NPM\-BUGS" "3" "May 2012" "" ""
++.TH "NPM\-BUGS" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-COMMANDS" "3" "April 2012" "" ""
 -.TH "NPM\-COMMANDS" "3" "May 2012" "" ""
++.TH "NPM\-COMMANDS" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-commands\fR \-\- npm commands
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-CONFIG" "3" "April 2012" "" ""
 -.TH "NPM\-CONFIG" "3" "May 2012" "" ""
++.TH "NPM\-CONFIG" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-config\fR \-\- Manage the npm configuration files
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-DEPRECATE" "3" "April 2012" "" ""
 -.TH "NPM\-DEPRECATE" "3" "May 2012" "" ""
++.TH "NPM\-DEPRECATE" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-deprecate\fR \-\- Deprecate a version of a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-DOCS" "3" "April 2012" "" ""
 -.TH "NPM\-DOCS" "3" "May 2012" "" ""
++.TH "NPM\-DOCS" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-EDIT" "3" "April 2012" "" ""
 -.TH "NPM\-EDIT" "3" "May 2012" "" ""
++.TH "NPM\-EDIT" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-edit\fR \-\- Edit an installed package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-EXPLORE" "3" "April 2012" "" ""
 -.TH "NPM\-EXPLORE" "3" "May 2012" "" ""
++.TH "NPM\-EXPLORE" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-explore\fR \-\- Browse an installed package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-HELP\-SEARCH" "3" "April 2012" "" ""
 -.TH "NPM\-HELP\-SEARCH" "3" "May 2012" "" ""
++.TH "NPM\-HELP\-SEARCH" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-help-search\fR \-\- Search the help pages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "INIT" "3" "April 2012" "" ""
 -.TH "INIT" "3" "May 2012" "" ""
++.TH "INIT" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBinit\fR \-\- Interactively create a package\.json file
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-INSTALL" "3" "April 2012" "" ""
 -.TH "NPM\-INSTALL" "3" "May 2012" "" ""
++.TH "NPM\-INSTALL" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-install\fR \-\- install a package programmatically
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-LINK" "3" "April 2012" "" ""
 -.TH "NPM\-LINK" "3" "May 2012" "" ""
++.TH "NPM\-LINK" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-link\fR \-\- Symlink a package folder
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-LOAD" "3" "April 2012" "" ""
 -.TH "NPM\-LOAD" "3" "May 2012" "" ""
++.TH "NPM\-LOAD" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-load\fR \-\- Load config settings
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-LS" "3" "April 2012" "" ""
 -.TH "NPM\-LS" "3" "May 2012" "" ""
++.TH "NPM\-LS" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-ls\fR \-\- List installed packages
@@@ -31,13 -31,13 +31,6 @@@ It will print out extraneous, missing, 
  If the silent parameter is set to true, nothing will be output to the screen,
  but the data will still be returned\.
  .
--.P
--Callback is provided an error if one occurred, the full data about which
--packages are installed and which dependencies they will receive, and a
--"lite" data object which just shows which versions are installed where\.
--Note that the full data object is a circular structure, so care must be
--taken if it is serialized to JSON\.
--.
  .SH "CONFIGURATION"
  .
  .SS "long"
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM" "3" "April 2012" "" ""
 -.TH "NPM" "3" "May 2012" "" ""
++.TH "NPM" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm\fR \-\- node package manager
@@@ -21,7 -21,7 +21,7 @@@ npm\.load(configObject, function (er, n
  .fi
  .
  .SH "VERSION"
- 1.1.18
 -1.1.21
++1.1.0-2
  .
  .SH "DESCRIPTION"
  This is the API documentation for npm\.
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-OUTDATED" "3" "April 2012" "" ""
 -.TH "NPM\-OUTDATED" "3" "May 2012" "" ""
++.TH "NPM\-OUTDATED" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-outdated\fR \-\- Check for outdated packages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-OWNER" "3" "April 2012" "" ""
 -.TH "NPM\-OWNER" "3" "May 2012" "" ""
++.TH "NPM\-OWNER" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-owner\fR \-\- Manage package owners
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PACK" "3" "April 2012" "" ""
 -.TH "NPM\-PACK" "3" "May 2012" "" ""
++.TH "NPM\-PACK" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-pack\fR \-\- Create a tarball from a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PREFIX" "3" "April 2012" "" ""
 -.TH "NPM\-PREFIX" "3" "May 2012" "" ""
++.TH "NPM\-PREFIX" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-prefix\fR \-\- Display prefix
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PRUNE" "3" "April 2012" "" ""
 -.TH "NPM\-PRUNE" "3" "May 2012" "" ""
++.TH "NPM\-PRUNE" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-prune\fR \-\- Remove extraneous packages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-PUBLISH" "3" "April 2012" "" ""
 -.TH "NPM\-PUBLISH" "3" "May 2012" "" ""
++.TH "NPM\-PUBLISH" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-publish\fR \-\- Publish a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-REBUILD" "3" "April 2012" "" ""
 -.TH "NPM\-REBUILD" "3" "May 2012" "" ""
++.TH "NPM\-REBUILD" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-rebuild\fR \-\- Rebuild a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-RESTART" "3" "April 2012" "" ""
 -.TH "NPM\-RESTART" "3" "May 2012" "" ""
++.TH "NPM\-RESTART" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-restart\fR \-\- Start a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-ROOT" "3" "April 2012" "" ""
 -.TH "NPM\-ROOT" "3" "May 2012" "" ""
++.TH "NPM\-ROOT" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-root\fR \-\- Display npm root
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-RUN\-SCRIPT" "3" "April 2012" "" ""
 -.TH "NPM\-RUN\-SCRIPT" "3" "May 2012" "" ""
++.TH "NPM\-RUN\-SCRIPT" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-run-script\fR \-\- Run arbitrary package scripts
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-SEARCH" "3" "April 2012" "" ""
 -.TH "NPM\-SEARCH" "3" "May 2012" "" ""
++.TH "NPM\-SEARCH" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-search\fR \-\- Search for packages
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-START" "3" "April 2012" "" ""
 -.TH "NPM\-START" "3" "May 2012" "" ""
++.TH "NPM\-START" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-start\fR \-\- Start a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-STOP" "3" "April 2012" "" ""
 -.TH "NPM\-STOP" "3" "May 2012" "" ""
++.TH "NPM\-STOP" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-stop\fR \-\- Stop a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-SUBMODULE" "3" "April 2012" "" ""
 -.TH "NPM\-SUBMODULE" "3" "May 2012" "" ""
++.TH "NPM\-SUBMODULE" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-submodule\fR \-\- Add a package as a git submodule
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-TAG" "3" "April 2012" "" ""
 -.TH "NPM\-TAG" "3" "May 2012" "" ""
++.TH "NPM\-TAG" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-tag\fR \-\- Tag a published version
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-TEST" "3" "April 2012" "" ""
 -.TH "NPM\-TEST" "3" "May 2012" "" ""
++.TH "NPM\-TEST" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-test\fR \-\- Test a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-UNINSTALL" "3" "April 2012" "" ""
 -.TH "NPM\-UNINSTALL" "3" "May 2012" "" ""
++.TH "NPM\-UNINSTALL" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-uninstall\fR \-\- uninstall a package programmatically
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-UNPUBLISH" "3" "April 2012" "" ""
 -.TH "NPM\-UNPUBLISH" "3" "May 2012" "" ""
++.TH "NPM\-UNPUBLISH" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-unpublish\fR \-\- Remove a package from the registry
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-UPDATE" "3" "April 2012" "" ""
 -.TH "NPM\-UPDATE" "3" "May 2012" "" ""
++.TH "NPM\-UPDATE" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-update\fR \-\- Update a package
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-VERSION" "3" "April 2012" "" ""
 -.TH "NPM\-VERSION" "3" "May 2012" "" ""
++.TH "NPM\-VERSION" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-version\fR \-\- Bump a package version
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-VIEW" "3" "April 2012" "" ""
 -.TH "NPM\-VIEW" "3" "May 2012" "" ""
++.TH "NPM\-VIEW" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-view\fR \-\- View registry info
@@@ -1,7 -1,7 +1,7 @@@
  .\" Generated with Ronnjs/v0.1
  .\" http://github.com/kapouer/ronnjs/
  .
- .TH "NPM\-WHOAMI" "3" "April 2012" "" ""
 -.TH "NPM\-WHOAMI" "3" "May 2012" "" ""
++.TH "NPM\-WHOAMI" "3" "January 2012" "" ""
  .
  .SH "NAME"
  \fBnpm-whoami\fR \-\- Display npm username
@@@ -2,13 -2,13 +2,13 @@@
    "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
    "name": "block-stream",
    "description": "a stream of blocks",
--  "version": "0.0.5",
++  "version": "0.0.4",
    "repository": {
      "type": "git",
      "url": "git://github.com/isaacs/block-stream.git"
    },
    "engines": {
--    "node": "0.4 || ~0.5.8 || 0.6 || 0.7"
++    "node": "0.4 || ~0.5.8 || 0.6"
    },
    "main": "block-stream.js",
    "dependencies": {
index 0000000,0000000..c2658d7
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,1 @@@
++node_modules/
index 0000000,0000000..f1d0f13
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++language: node_js
++node_js:
++  - 0.4
++  - 0.6
index 0000000,0000000..88a842e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,116 @@@
++# The Problem
++
++You've got some thing where you need to push a bunch of stuff into a
++queue and then shift it out.  Or, maybe it's a stack, and you're just
++pushing and popping it.
++
++Arrays work for this, but are a bit costly performance-wise.
++
++# The Solution
++
++A linked-list implementation that takes advantage of what v8 is good at:
++creating objects with a known shape.
++
++This is faster for this use case.  How much faster?  About 50%.
++
++    $ node bench.js
++    benchmarking /Users/isaacs/dev-src/js/fast-list/bench.js
++    Please be patient.
++    { node: '0.6.2-pre',
++      v8: '3.6.6.8',
++      ares: '1.7.5-DEV',
++      uv: '0.1',
++      openssl: '0.9.8l' }
++    Scores: (bigger is better)
++
++    new FastList()
++    Raw:
++     > 22556.39097744361
++     > 23054.755043227666
++     > 22770.398481973436
++     > 23414.634146341465
++     > 23099.133782483157
++    Average (mean) 22979.062486293868
++
++    []
++    Raw:
++     > 12195.121951219513
++     > 12184.508268059182
++     > 12173.91304347826
++     > 12216.404886561955
++     > 12184.508268059182
++    Average (mean) 12190.891283475617
++
++    new Array()
++    Raw:
++     > 12131.715771230503
++     > 12184.508268059182
++     > 12216.404886561955
++     > 12195.121951219513
++     > 11940.298507462687
++    Average (mean) 12133.609876906768
++
++    Winner: new FastList()
++    Compared with next highest ([]), it's:
++    46.95% faster
++    1.88 times as fast
++    0.28 order(s) of magnitude faster
++
++    Compared with the slowest (new Array()), it's:
++    47.2% faster
++    1.89 times as fast
++    0.28 order(s) of magnitude faster
++
++This lacks a lot of features that arrays have:
++
++1. You can't specify the size at the outset.
++2. It's not indexable.
++3. There's no join, concat, etc.
++
++If any of this matters for your use case, you're probably better off
++using an Array object.
++
++## Installing
++
++```
++npm install fast-list
++```
++
++## API
++
++```javascript
++var FastList = require("fast-list")
++var list = new FastList()
++list.push("foo")
++list.unshift("bar")
++list.push("baz")
++console.log(list.length) // 2
++console.log(list.pop()) // baz
++console.log(list.shift()) // bar
++console.log(list.shift()) // foo
++```
++
++### Methods
++
++* `push`: Just like Array.push, but only can take a single entry
++* `pop`: Just like Array.pop
++* `shift`: Just like Array.shift
++* `unshift`: Just like Array.unshift, but only can take a single entry
++* `drop`: Drop all entries
++* `item(n)`: Retrieve the nth item in the list.  This involves a walk
++  every time.  It's very slow.  If you find yourself using this,
++  consider using a normal Array instead.
++* `map(fn, thisp)`: Like `Array.prototype.map`.  Returns a new FastList.
++* `reduce(fn, startValue, thisp)`: Like `Array.prototype.reduce`
++* `forEach(fn, this)`: Like `Array.prototype.forEach`
++* `filter(fn, thisp)`: Like `Array.prototype.filter`. Returns a new
++  FastList.
++* `slice(start, end)`: Retrieve an array of the items at this position.
++  This involves a walk every time.  It's very slow.  If you find
++  yourself using this, consider using a normal Array instead.
++
++### Members
++
++* `length`: The number of things in the list.  Note that, unlike
++  Array.length, this is not a getter/setter, but rather a counter that
++  is internally managed.  Setting it can only cause harm.
index 0000000,0000000..692db0d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,144 @@@
++;(function() { // closure for web browsers
++
++function Item (data, prev, next) {
++  this.next = next
++  if (next) next.prev = this
++  this.prev = prev
++  if (prev) prev.next = this
++  this.data = data
++}
++
++function FastList () {
++  if (!(this instanceof FastList)) return new FastList
++  this._head = null
++  this._tail = null
++  this.length = 0
++}
++
++FastList.prototype =
++{ push: function (data) {
++    this._tail = new Item(data, this._tail, null)
++    if (!this._head) this._head = this._tail
++    this.length ++
++  }
++
++, pop: function () {
++    if (this.length === 0) return undefined
++    var t = this._tail
++    this._tail = t.prev
++    if (t.prev) {
++      t.prev = this._tail.next = null
++    }
++    this.length --
++    if (this.length === 1) this._head = this._tail
++    else if (this.length === 0) this._head = this._tail = null
++    return t.data
++  }
++
++, unshift: function (data) {
++    this._head = new Item(data, null, this._head)
++    if (!this._tail) this._tail = this._head
++    this.length ++
++  }
++
++, shift: function () {
++    if (this.length === 0) return undefined
++    var h = this._head
++    this._head = h.next
++    if (h.next) {
++      h.next = this._head.prev = null
++    }
++    this.length --
++    if (this.length === 1) this._tail = this._head
++    else if (this.length === 0) this._head = this._tail = null
++    return h.data
++  }
++
++, item: function (n) {
++    if (n < 0) n = this.length + n
++    var h = this._head
++    while (n-- > 0 && h) h = h.next
++    return h ? h.data : undefined
++  }
++
++, slice: function (n, m) {
++    if (!n) n = 0
++    if (!m) m = this.length
++    if (m < 0) m = this.length + m
++    if (n < 0) n = this.length + n
++
++    if (m === n) {
++      return []
++    }
++
++    if (m < n) {
++      throw new Error("invalid offset: "+n+","+m+" (length="+this.length+")")
++    }
++
++    var len = m - n
++      , ret = new Array(len)
++      , i = 0
++      , h = this._head
++    while (n-- > 0 && h) h = h.next
++    while (i < len && h) {
++      ret[i++] = h.data
++      h = h.next
++    }
++    return ret
++  }
++
++, drop: function () {
++    FastList.call(this)
++  }
++
++, forEach: function (fn, thisp) {
++    var p = this._head
++      , i = 0
++      , len = this.length
++    while (i < len && p) {
++      fn.call(thisp || this, p.data, i, this)
++      p = p.next
++      i ++
++    }
++  }
++
++, map: function (fn, thisp) {
++    var n = new FastList()
++    this.forEach(function (v, i, me) {
++      n.push(fn.call(thisp || me, v, i, me))
++    })
++    return n
++  }
++
++, filter: function (fn, thisp) {
++    var n = new FastList()
++    this.forEach(function (v, i, me) {
++      if (fn.call(thisp || me, v, i, me)) n.push(v)
++    })
++    return n
++  }
++
++, reduce: function (fn, val, thisp) {
++    var i = 0
++      , p = this._head
++      , len = this.length
++    if (!val) {
++      i = 1
++      val = p && p.data
++      p = p && p.next
++    }
++    while (i < len && p) {
++      val = fn.call(thisp || this, val, p.data, this)
++      i ++
++      p = p.next
++    }
++    return val
++  }
++}
++
++if ("undefined" !== typeof(exports)) module.exports = FastList
++else if ("function" === typeof(define) && define.amd) {
++  define("FastList", function() { return FastList })
++} else (function () { return this })().FastList = FastList
++
++})()
index 0000000,0000000..9bcc6b4
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++{
++  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
++  "name": "fast-list",
++  "description": "A fast linked list (good for queues, stacks, etc.)",
++  "version": "1.0.2",
++  "repository": {
++    "type": "git",
++    "url": "git://github.com/isaacs/fast-list.git"
++  },
++  "main": "fast-list.js",
++  "dependencies": {},
++  "devDependencies": {
++    "bench": "~0.3.2",
++    "tap": "~0.1.0"
++  },
++  "scripts": {
++    "test": "tap test.js",
++    "bench": "node bench.js"
++  }
++}
@@@ -1,5 -1,5 +1,3 @@@
  .*.swp
++examples/deep-copy
  node_modules/
--examples/deep-copy/
--examples/path/
--examples/filter-copy/
@@@ -20,11 -20,11 +20,6 @@@ Abstract.prototype.on = function (ev, f
    return this
  }
  
--Abstract.prototype.abort = function () {
--  this._aborted = true
--  this.emit("abort")
--}
--
  Abstract.prototype.destroy = function () {}
  
  Abstract.prototype.warn = function (msg, code) {
@@@ -11,7 -11,7 +11,6 @@@ var fs = require("graceful-fs"
    , mkdir = require("mkdirp")
    , path = require("path")
    , Reader = require("./reader.js")
--  , assert = require("assert").ok
  
  inherits(DirReader, Reader)
  
@@@ -25,42 -25,42 +24,25 @@@ function DirReader (props) 
      throw new Error("Non-directory type "+ props.type)
    }
  
--  me.entries = null
++  me._entries = null
    me._index = -1
    me._paused = false
    me._length = -1
  
--  if (props.sort) {
--    this.sort = props.sort
--  }
--
    Reader.call(this, props)
  }
  
  DirReader.prototype._getEntries = function () {
    var me = this
--
--  // race condition.  might pause() before calling _getEntries,
--  // and then resume, and try to get them a second time.
--  if (me._gotEntries) return
--  me._gotEntries = true
--
    fs.readdir(me._path, function (er, entries) {
      if (er) return me.error(er)
--
--    me.entries = entries
--
--    me.emit("entries", entries)
--    if (me._paused) me.once("resume", processEntries)
--    else processEntries()
--
--    function processEntries () {
--      me._length = me.entries.length
--      if (typeof me.sort === "function") {
--        me.entries = me.entries.sort(me.sort.bind(me))
--      }
--      me._read()
++    me._entries = entries
++    me._length = entries.length
++    // console.error("DR %s sort =", me.path, me.props.sort)
++    if (typeof me.props.sort === "function") {
++      me._entries.sort(me.props.sort)
      }
++    me._read()
    })
  }
  
@@@ -68,7 -68,7 +50,7 @@@
  DirReader.prototype._read = function () {
    var me = this
  
--  if (!me.entries) return me._getEntries()
++  if (!me._entries) return me._getEntries()
  
    if (me._paused || me._currentEntry || me._aborted) {
      // console.error("DR paused=%j, current=%j, aborted=%j", me._paused, !!me._currentEntry, me._aborted)
@@@ -76,7 -76,7 +58,7 @@@
    }
  
    me._index ++
--  if (me._index >= me.entries.length) {
++  if (me._index >= me._length) {
      if (!me._ended) {
        me._ended = true
        me.emit("end")
    // ok, handle this one, then.
  
    // save creating a proxy, by stat'ing the thing now.
--  var p = path.resolve(me._path, me.entries[me._index])
--  assert(p !== me._path)
--  assert(me.entries[me._index])
--
++  var p = path.resolve(me._path, me._entries[me._index])
    // set this to prevent trying to _read() again in the stat time.
    me._currentEntry = p
    fs[ me.props.follow ? "stat" : "lstat" ](p, function (er, stat) {
      if (er) return me.error(er)
  
--    var who = me._proxy || me
--
--    stat.path = p
--    stat.basename = path.basename(p)
--    stat.dirname = path.dirname(p)
--    var childProps = me.getChildProps.call(who, stat)
--    childProps.path = p
--    childProps.basename = path.basename(p)
--    childProps.dirname = path.dirname(p)
--
--    var entry = Reader(childProps, stat)
++    var entry = Reader({ path: p
++                       , depth: me.depth + 1
++                       , root: me.root || me._proxy || me
++                       , parent: me._proxy || me
++                       , follow: me.follow
++                       , filter: me.filter
++                       , sort: me.props.sort
++                       }, stat)
  
      // console.error("DR Entry", p, stat.size)
  
      // This nomenclature is not completely final.
  
      entry.on("pause", function (who) {
--      if (!me._paused && !entry._disowned) {
++      if (!me._paused) {
          me.pause(who)
        }
      })
  
      entry.on("resume", function (who) {
--      if (me._paused && !entry._disowned) {
++      if (me._paused) {
          me.resume(who)
        }
      })
  
--    entry.on("stat", function (props) {
--      me.emit("_entryStat", entry, props)
--      if (entry._aborted) return
--      if (entry._paused) entry.once("resume", function () {
--        me.emit("entryStat", entry, props)
--      })
--    })
--
      entry.on("ready", function EMITCHILD () {
        // console.error("DR emit child", entry._path)
        if (me._paused) {
        if (entry.type === "Socket") {
          me.emit("socket", entry)
        } else {
--        me.emitEntry(entry)
++        me.emit("entry", entry)
++        me.emit("child", entry)
        }
      })
  
      var ended = false
      entry.on("close", onend)
--    entry.on("disown", onend)
      function onend () {
        if (ended) return
        ended = true
        me.emit("childEnd", entry)
        me.emit("entryEnd", entry)
        me._currentEntry = null
--      if (!me._paused) {
--        me._read()
--      }
++      me._read()
      }
  
--    // XXX Remove this.  Works in node as of 0.6.2 or so.
++    // XXX Make this work in node.
      // Long filenames should not break stuff.
      entry.on("error", function (er) {
        if (entry._swallowErrors) {
    })
  }
  
--DirReader.prototype.disown = function (entry) {
--  entry.emit("beforeDisown")
--  entry._disowned = true
--  entry.parent = entry.root = null
--  if (entry === this._currentEntry) {
--    this._currentEntry = null
--  }
--  entry.emit("disown")
--}
--
--DirReader.prototype.getChildProps = function (stat) {
--  return { depth: this.depth + 1
--         , root: this.root || this
--         , parent: this
--         , follow: this.follow
--         , filter: this.filter
--         , sort: this.props.sort
--         }
--}
--
  DirReader.prototype.pause = function (who) {
    var me = this
    if (me._paused) return
@@@ -239,11 -239,11 +185,8 @@@ DirReader.prototype.resume = function (
    }
  
    if (me._currentEntry) {
--    if (me._currentEntry.resume) me._currentEntry.resume(who)
++    if (me._currentEntry.resume) {
++      me._currentEntry.resume(who)
++    }
    } else me._read()
  }
--
--DirReader.prototype.emitEntry = function (entry) {
--  this.emit("entry", entry)
--  this.emit("child", entry)
--}
@@@ -37,7 -37,7 +37,6 @@@ DirWriter.prototype._create = function 
      // ready to start getting entries!
      me.ready = true
      me.emit("ready")
--    me._process()
    })
  }
  
@@@ -100,9 -100,9 +99,7 @@@ DirWriter.prototype._process = functio
    // don't allow recursive copying
    var p = entry
    do {
--    var pp = p._path || p.path
--    if (pp === me.root._path || pp === me._path ||
--        (pp && pp.indexOf(me._path) === 0)) {
++    if (p._path === me.root._path || p._path === me._path) {
        // console.error("DW Exit (recursive)", entry.basename, me._path)
        me._processing = false
        if (entry._collected) entry.pipe()
    // get rid of any ../../ shenanigans
    props.path = path.join(me.path, path.join("/", p))
  
--  // if i have a filter, the child should inherit it.
--  props.filter = me.filter
--
    // all the rest of the stuff, copy over from the source.
    Object.keys(entry.props).forEach(function (k) {
      if (!props.hasOwnProperty(k)) {
@@@ -4,6 -4,6 +4,7 @@@ module.exports = LinkWrite
  var fs = require("graceful-fs")
    , Writer = require("./writer.js")
    , inherits = require("inherits")
++  , collect = require("./collect.js")
    , path = require("path")
    , rimraf = require("rimraf")
  
@@@ -59,11 -59,11 +59,7 @@@ ProxyReader.prototype._addProxy = funct
      , "close"
      , "linkpath"
      , "entry"
--    , "entryEnd"
--    , "child"
--    , "childEnd"
      , "warn"
--    , "stat"
      ].forEach(function (ev) {
        // console.error("~~ proxy event", ev, me.path)
        proxy.on(ev, me.emit.bind(me, ev))
@@@ -187,38 -187,38 +187,19 @@@ Reader.prototype._stat = function (curr
      // if the filter doesn't pass, then just skip over this one.
      // still have to emit end so that dir-walking can move on.
      if (me.filter) {
--      var who = me._proxy || me
        // special handling for ProxyReaders
--      if (!me.filter.call(who, who, props)) {
--        if (!me._disowned) {
--          me.abort()
--          me.emit("end")
--          me.emit("close")
--        }
--        return
--      }
--    }
--
--    // last chance to abort or disown before the flow starts!
--    var events = ["_stat", "stat", "ready"]
--    var e = 0
--    ;(function go () {
--      if (me._aborted) {
++      if (!me.filter.call(me._proxy || me)) {
++        me._aborted = true
          me.emit("end")
          me.emit("close")
          return
        }
++    }
  
--      if (me._paused) {
--        me.once("resume", go)
--        return
--      }
++    me.emit("ready", props)
  
--      var ev = events[e ++]
--      if (!ev) return me._read()
--      me.emit(ev, props)
--      go()
--    })()
++    // if it's a directory, then we'll be emitting "entry" events.
++    me._read()
    }
  }
  
@@@ -98,8 -98,8 +98,6 @@@ function Writer (props, current) 
    me._buffer = []
    me.ready = false
  
--  me.filter = typeof props.filter === "function" ? props.filter: null
--
    // start the ball rolling.
    // this checks what's there already, and then calls
    // me._create() to call the impl-specific creation stuff.
@@@ -123,19 -123,19 +121,11 @@@ Writer.prototype._stat = function (curr
    var me = this
      , props = me.props
      , stat = props.follow ? "stat" : "lstat"
--    , who = me._proxy || me
  
    if (current) statCb(null, current)
    else fs[stat](me._path, statCb)
  
    function statCb (er, current) {
--    if (me.filter && !me.filter.call(who, who, current)) {
--      me._aborted = true
--      me.emit("end")
--      me.emit("close")
--      return
--    }
--
      // if it's not there, great.  We'll just create it.
      // if it is there, then we'll need to change whatever differs
      if (er || !current) {
@@@ -166,83 -166,83 +156,13 @@@ function create (me) 
  
    // XXX Need to clobber non-dirs that are in the way,
    // unless { clobber: false } in the props.
--  mkdir(path.dirname(me._path), Writer.dirmode, function (er, made) {
++  mkdir(path.dirname(me._path), Writer.dirmode, function (er) {
      // console.error("W created", path.dirname(me._path), er)
      if (er) return me.error(er)
--
--    // later on, we have to set the mode and owner for these
--    me._madeDir = made
--    return me._create()
++    me._create()
    })
  }
  
--function endChmod (me, want, current, path, cb) {
--    var wantMode = want.mode
--      , chmod = want.follow || me.type !== "SymbolicLink"
--              ? "chmod" : "lchmod"
--
--  if (!fs[chmod]) return cb()
--  if (typeof wantMode !== "number") return cb()
--
--  var curMode = current.mode & 0777
--  wantMode = wantMode & 0777
--  if (wantMode === curMode) return cb()
--
--  fs[chmod](path, wantMode, cb)
--}
--
--
--function endChown (me, want, current, path, cb) {
--  // Don't even try it unless root.  Too easy to EPERM.
--  if (process.platform === "win32") return cb()
--  if (!process.getuid || !process.getuid() === 0) return cb()
--  if (typeof want.uid !== "number" &&
--      typeof want.gid !== "number" ) return cb()
--
--  if (current.uid === want.uid &&
--      current.gid === want.gid) return cb()
--
--  var chown = (me.props.follow || me.type !== "SymbolicLink")
--            ? "chown" : "lchown"
--  if (!fs[chown]) return cb()
--
--  if (typeof want.uid !== "number") want.uid = current.uid
--  if (typeof want.gid !== "number") want.gid = current.gid
--
--  fs[chown](path, want.uid, want.gid, cb)
--}
--
--function endUtimes (me, want, current, path, cb) {
--  if (!fs.utimes || process.platform === "win32") return cb()
--
--  var utimes = (want.follow || me.type !== "SymbolicLink")
--             ? "utimes" : "lutimes"
--
--  if (utimes === "lutimes" && !fs[utimes]) {
--    utimes = "utimes"
--  }
--
--  if (!fs[utimes]) return cb()
--
--  var curA = current.atime
--    , curM = current.mtime
--    , meA = want.atime
--    , meM = want.mtime
--
--  if (meA === undefined) meA = curA
--  if (meM === undefined) meM = curM
--
--  if (!isDate(meA)) meA = new Date(meA)
--  if (!isDate(meM)) meA = new Date(meM)
--
--  if (meA.getTime() === curA.getTime() &&
--      meM.getTime() === curM.getTime()) return cb()
--
--  fs[utimes](path, meA, meM, cb)
--}
--
--
--// XXX This function is beastly.  Break it up!
  Writer.prototype._finish = function () {
    var me = this
  
    return
  
    function setProps (current) {
--    endChmod(me, me.props, current, me._path, next("chmod"))
--    endChown(me, me.props, current, me._path, next("chown"))
--    endUtimes(me, me.props, current, me._path, next("chown"))
--  }
++    // console.error(" W setprops", me._path)
++    // mode
++    var wantMode = me.props.mode
++      , chmod = me.props.follow || me.type !== "SymbolicLink"
++              ? "chmod" : "lchmod"
  
--  function next (what) {
--    todo ++
--    return function (er) {
--      // console.error("   W Finish", what, todo)
--      if (errState) return
--      if (er) {
--        er.fstream_finish_call = what
--        return me.error(errState = er)
--      }
--      if (--todo > 0) return
--      if (done) return
--      done = true
--
--      // we may still need to set the mode/etc. on some parent dirs
--      // that were created previously.  delay end/close until then.
--      if (!me._madeDir) return end()
--      else endMadeDir(me, me._path, end)
--
--      function end (er) {
--        if (er) {
--          er.fstream_finish_call = "setupMadeDir"
--          return me.error(er)
++    if (fs[chmod] && typeof wantMode === "number") {
++      wantMode = wantMode & 0777
++      todo ++
++      // console.error(" W chmod", wantMode.toString(8), me.basename, "\r")
++      fs[chmod](me._path, wantMode, next(chmod))
++    }
++
++    // uid, gid
++    // Don't even try it unless root.  Too easy to EPERM.
++    if (process.platform !== "win32" &&
++        process.getuid && process.getuid() === 0 &&
++        ( typeof me.props.uid === "number" ||
++          typeof me.props.gid === "number" )) {
++      var chown = (me.props.follow || me.type !== "SymbolicLink")
++                ? "chown" : "lchown"
++      if (fs[chown]) {
++        if (typeof me.props.uid !== "number") me.props.uid = current.uid
++        if (typeof me.props.gid !== "number") me.props.gid = current.gid
++        if (me.props.uid !== current.uid || me.props.gid !== current.gid) {
++          todo ++
++          // console.error(" W chown", me.props.uid, me.props.gid, me.basename)
++          fs[chown](me._path, me.props.uid, me.props.gid, next("chown"))
          }
--        // all the props have been set, so we're completely done.
--        me.emit("end")
--        me.emit("close")
        }
      }
--  }
--}
  
--function endMadeDir (me, p, cb) {
--  var made = me._madeDir
--  // everything *between* made and path.dirname(me._path)
--  // needs to be set up.  Note that this may just be one dir.
--  var d = path.dirname(p)
++    // atime, mtime.
++    if (fs.utimes && process.platform !== "win32") {
++      var utimes = (me.props.follow || me.type !== "SymbolicLink")
++                 ? "utimes" : "lutimes"
  
--  endMadeDir_(me, d, function (er) {
--    if (er) return cb(er)
--    if (d === made) {
--      return cb()
--    }
--    endMadeDir(me, d, cb)
--  })
--}
++      if (utimes === "lutimes" && !fs[utimes]) {
++        utimes = "utimes"
++      }
++
++      var curA = current.atime
++        , curM = current.mtime
++        , meA = me.props.atime
++        , meM = me.props.mtime
  
--function endMadeDir_ (me, p, cb) {
--  var dirProps = {}
--  Object.keys(me.props).forEach(function (k) {
--    dirProps[k] = me.props[k]
++      if (meA === undefined) meA = curA
++      if (meM === undefined) meM = curM
  
--    // only make non-readable dirs if explicitly requested.
--    if (k === "mode" && me.type !== "Directory") {
--      dirProps[k] = dirProps[k] | 0111
++      if (!isDate(meA)) meA = new Date(meA)
++      if (!isDate(meM)) meA = new Date(meM)
++
++      if (meA.getTime() !== curA.getTime() ||
++          meM.getTime() !== curM.getTime()) {
++        todo ++
++        // console.error(" W utimes", meA, meM, me.basename)
++        fs[utimes](me._path, meA, meM, next("utimes"))
++      }
      }
--  })
  
--  var todo = 3
--  , errState = null
--  fs.stat(p, function (er, current) {
--    if (er) return cb(errState = er)
--    endChmod(me, dirProps, current, p, next)
--    endChown(me, dirProps, current, p, next)
--    endUtimes(me, dirProps, current, p, next)
--  })
++    // finally, handle the case if there was nothing to do.
++    if (todo === 0) {
++      // console.error(" W nothing to do", me.basename)
++      next("nothing to do")()
++    }
++  }
  
--  function next (er) {
++  function next (what) { return function (er) {
++    // console.error("   W Finish", what, todo)
      if (errState) return
--    if (er) return cb(errState = er)
--    if (-- todo === 0) return cb()
--  }
++    if (er) {
++      er.fstream_finish_call = what
++      return me.error(errState = er)
++    }
++    if (--todo > 0) return
++    if (done) return
++    done = true
++
++    // all the props have been set, so we're completely done.
++    me.emit("end")
++    me.emit("close")
++  }}
  }
  
  Writer.prototype.pipe = function () {
@@@ -1,42 -1,42 +1,26 @@@
  {
--  "author": {
--    "name": "Isaac Z. Schlueter",
--    "email": "i@izs.me",
--    "url": "http://blog.izs.me/"
--  },
++  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
    "name": "fstream",
    "description": "Advanced file system stream things",
--  "version": "0.1.18",
++  "version": "0.1.11",
    "repository": {
      "type": "git",
      "url": "git://github.com/isaacs/fstream.git"
    },
    "main": "fstream.js",
    "engines": {
--    "node": ">=0.6"
++    "node": "0.5 || 0.6 || 0.7"
    },
    "dependencies": {
--    "rimraf": "2",
--    "mkdirp": "0.3",
++    "rimraf": "~1.0.8",
++    "mkdirp": "~0.1.0",
      "graceful-fs": "~1.1.2",
      "inherits": "~1.0.0"
    },
    "devDependencies": {
--    "tap": ""
++    "tap": "0.1"
    },
    "scripts": {
      "test": "tap examples/*.js"
--  },
--  "license": "BSD",
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
--  },
--  "_id": "fstream@0.1.18",
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.13",
--  "_nodeVersion": "v0.7.7-pre",
--  "_defaultsLoaded": true,
--  "_from": "fstream@~0.1.17"
++  }
  }
@@@ -6,7 -6,7 +6,8 @@@ var fs = require("fs"
  // there is such a thing as TOO graceful.
  if (fs.open === gracefulOpen) return
  
--var queue = []
++var FastList = require("fast-list")
++  , queue = new FastList()
    , curOpen = 0
    , constants = require("constants")
  
@@@ -209,67 -209,67 +210,3 @@@ if (!fs.lutimes) 
      fs.lutimesSync = function () {}
    }
  }
--
--
--// https://github.com/isaacs/node-graceful-fs/issues/4
--// Chown should not fail on einval or eperm if non-root.
--
--fs.chown = chownFix(fs.chown)
--fs.fchown = chownFix(fs.fchown)
--fs.lchown = chownFix(fs.lchown)
--
--fs.chownSync = chownFixSync(fs.chownSync)
--fs.fchownSync = chownFixSync(fs.fchownSync)
--fs.lchownSync = chownFixSync(fs.lchownSync)
--
--function chownFix (orig) {
--  if (!orig) return orig
--  return function (target, uid, gid, cb) {
--    return orig.call(fs, target, uid, gid, function (er, res) {
--      if (chownErOk(er)) er = null
--      cb(er, res)
--    })
--  }
--}
--
--function chownFixSync (orig) {
--  if (!orig) return orig
--  return function (target, uid, gid) {
--    try {
--      return orig.call(fs, target, uid, gid)
--    } catch (er) {
--      if (!chownErOk(er)) throw er
--    }
--  }
--}
--
--function chownErOk (er) {
--  // if there's no getuid, or if getuid() is something other than 0,
--  // and the error is EINVAL or EPERM, then just ignore it.
--  // This specific case is a silent failure in cp, install, tar,
--  // and most other unix tools that manage permissions.
--  // When running as root, or if other types of errors are encountered,
--  // then it's strict.
--  if (!er || (!process.getuid || process.getuid() !== 0)
--      && (er.code === "EINVAL" || er.code === "EPERM")) return true
--}
--
--
--
--// on Windows, A/V software can lock the directory, causing this
--// to fail with an EACCES or EPERM if the directory contains newly
--// created files.  Try again on failure, for up to 1 second.
--if (process.platform === "win32") {
--  var rename_ = fs.rename
--  fs.rename = function rename (from, to, cb) {
--    var start = Date.now()
--    rename_(from, to, function CB (er) {
--      if (er
--          && (er.code === "EACCES" || er.code === "EPERM")
--          && Date.now() - start < 1000) {
--        return rename_(from, to, CB)
--      }
--      cb(er)
--    })
--  }
--}
@@@ -1,31 -1,31 +1,18 @@@
  {
--  "author": {
--    "name": "Isaac Z. Schlueter",
--    "email": "i@izs.me",
--    "url": "http://blog.izs.me"
--  },
++  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
    "name": "graceful-fs",
    "description": "fs monkey-patching to avoid EMFILE and other problems",
--  "version": "1.1.8",
++  "version": "1.1.2",
    "repository": {
      "type": "git",
      "url": "git://github.com/isaacs/node-graceful-fs.git"
    },
    "main": "graceful-fs.js",
    "engines": {
--    "node": ">=0.4.0"
++    "node": "0.4 || 0.5 || 0.6"
    },
--  "devDependencies": {},
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
++  "dependencies": {
++    "fast-list": "1"
    },
--  "_id": "graceful-fs@1.1.8",
--  "dependencies": {},
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.10",
--  "_nodeVersion": "v0.7.7-pre",
--  "_defaultsLoaded": true,
--  "_from": "graceful-fs@~1.1.1"
++  "devDependencies": {}
  }
@@@ -1,14 -1,14 +1,26 @@@
--            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
--                    Version 2, December 2004
++Copyright 2011 Isaac Z. Schlueter (the "Author")
++All rights reserved.
  
-- Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
++General Public Obviousness License
  
-- Everyone is permitted to copy and distribute verbatim or modified
-- copies of this license document, and changing it is allowed as long
-- as the name is changed.
++The Author asserts that this software and associated documentation
++files (the "Software"), while the Author's original creation, is
++nonetheless obvious, trivial, unpatentable, and implied by the
++context in which the software was created.  If you sat down and
++thought about the problem for an hour or less, you'd probably
++come up with exactly this solution.
  
--            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
--   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
++Permission is granted to use this software in any way
++whatsoever, with the following restriction:
  
--  0. You just DO WHAT THE FUCK YOU WANT TO.
++You may not release the Software under a more restrictive license
++than this one.
  
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++OTHER DEALINGS IN THE SOFTWARE.
@@@ -1,44 -1,44 +1,8 @@@
--{
--  "name": "inherits",
--  "description": "A tiny simple way to do classic inheritance in js",
--  "version": "1.0.0",
--  "keywords": [
--    "inheritance",
--    "class",
--    "klass",
--    "oop",
--    "object-oriented"
--  ],
--  "main": "./inherits.js",
--  "repository": {
--    "type": "git",
--    "url": "git://github.com/isaacs/inherits.git"
--  },
--  "license": {
--    "type": "WTFPL2"
--  },
--  "author": {
--    "name": "Isaac Z. Schlueter",
--    "email": "i@izs.me",
--    "url": "http://blog.izs.me/"
--  },
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
--  },
--  "_id": "inherits@1.0.0",
--  "dependencies": {},
--  "devDependencies": {},
--  "optionalDependencies": {},
--  "engines": {
--    "node": "*"
--  },
--  "_engineSupported": true,
--  "_npmVersion": "1.1.10",
--  "_nodeVersion": "v0.7.7-pre",
--  "_defaultsLoaded": true,
--  "dist": {
--    "shasum": "12dbc03c9f7c203289234b214a7d05a311d71450"
--  },
--  "_from": "git://github.com/isaacs/inherits"
--}
++{ "name" : "inherits"
++, "description": "A tiny simple way to do classic inheritance in js"
++, "version" : "1.0.0"
++, "keywords" : ["inheritance", "class", "klass", "oop", "object-oriented"]
++, "main" : "./inherits.js"
++, "repository" : "https://github.com/isaacs/inherits"
++, "license": { "type": "GPOL", "url": "https://raw.github.com/isaacs/inherits/master/LICENSE" }
++, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)" }
@@@ -60,12 -60,12 +60,11 @@@ thing in a path part.  That is, `a/**/b
  `a/**b` will not.  **Note that this is different from the way that `**` is
  handled by ruby's `Dir` class.**
  
--If an escaped pattern has no matches, and the `nonull` flag is set,
++If an escaped pattern has no matches, and the `null` flag is not set,
  then minimatch.match returns the pattern as-provided, rather than
  interpreting the character escapes.  For example,
  `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
--`"*a?"`.  This is akin to setting the `nullglob` option in bash, except
--that it does not resolve escaped pattern characters.
++`"*a?"`.
  
  If brace expansion is not disabled, then it is performed before any
  other interpretation of the glob pattern.  Thus, a pattern like
@@@ -148,8 -148,8 +147,8 @@@ var javascripts = fileList.filter(minim
  ### minimatch.match(list, pattern, options)
  
  Match against the list of
--files, in the style of fnmatch or glob.  If nothing is matched, and
--options.nonull is set, then return a list containing the pattern itself.
++files, in the style of fnmatch or glob.  If nothing is matched, then
++return the pattern (unless `{ null: true }` in the options.)
  
  ```javascript
  var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
@@@ -211,8 -211,8 +210,3 @@@ comment
  ### nonegate
  
  Suppress the behavior of treating a leading `!` character as negation.
--
--### flipNegate
--
--Returns from negate expressions the same as if they were not negated.
--(Ie, true on a hit, false on a miss.)
@@@ -4,6 -4,6 +4,7 @@@ minimatch.Minimatch = Minimatc
  var LRU = require("lru-cache")
    , cache = minimatch.cache = new LRU(100)
    , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
++  , pathSplit = process.platform === "win32" ? /\\|\// : "/"
  
  var path = require("path")
    // any single thing other than /
@@@ -129,7 -129,7 +130,7 @@@ function make () 
    this.parseNegate()
  
    // step 2: expand braces
--  var set = this.globSet = this.braceExpand()
++  var set = this.braceExpand()
  
    if (options.debug) console.error(this.pattern, set)
  
    // These will be regexps, except in the case of "**", which is
    // set to the GLOBSTAR object for globstar behavior,
    // and will not contain any / characters
--  set = this.globParts = set.map(function (s) {
++  set = set.map(function (s) {
      return s.split(slashSplit)
    })
  
++  // step 4: if we have a defined root, then patterns starting with ""
++  // get attached to that.  If we have a defined cwd, then patterns
++  // *not* starting with "" get attached to that.
++  // Exception 1: on windows, a pattern like //\?/c:/ or c:/ will
++  // not get anything prefixed to it.
++  // Exception 2: If matchBase is set, and it's just a filename,
++  // then don't prefix anything onto it, since it'll only match
++  // files with that basename anyhow.
++  set = set.map(function (p) {
++    if (process.platform === "win32" &&
++        ( (p[0] === "" && p[1] === "" && p[2] === "\\?") // unc
++        || (p[0].match(/^[a-zA-Z]:$/)) )) {
++      return p
++    }
++    if (options.matchBase && p.length === 1) return p
++    // do prefixing.
++    if (options.root && p[0] === "") {
++      return options.root.split(pathSplit).concat(p)
++    }
++    if (options.cwd && p[0] !== "") {
++      return options.cwd.split(pathSplit).concat(p)
++    }
++    return p
++  })
++
++
    if (options.debug) console.error(this.pattern, set)
  
    // glob --> regexps
@@@ -518,8 -518,8 +545,7 @@@ function parse (pattern, isSub) 
          patternListStack.push({ type: plType
                                , start: i - 1
                                , reStart: re.length })
--        // negation is (?:(?!js)[^/]*)
--        re += stateChar === "!" ? "(?:(?!" : "(?:"
++        re += stateChar === "!" ? "(?!" : "(?:"
          stateChar = false
          continue
  
          hasMagic = true
          re += ")"
          plType = patternListStack.pop().type
--        // negation is (?:(?!js)[^/]*)
--        // The others are (?:<pattern>)<type>
          switch (plType) {
--          case "!":
--            re += "[^/]*?)"
--            break
            case "?":
            case "+":
            case "*": re += plType
++          case "!": // already handled by the start
            case "@": break // the default anyway
          }
          continue
@@@ -764,12 -764,12 +786,13 @@@ function match (f, partial) 
    if (this.comment) return false
    if (this.empty) return f === ""
  
--  if (f === "/" && partial) return true
--
    var options = this.options
  
    // first, normalize any slash-separated path parts.
    // f = path.normalize(f)
++  var absolute = isAbsolute(f)
++
++  // console.error(this.pattern, f, absolute)
  
    // windows: need to use /, not \
    // On other platforms, \ is a valid (albeit bad) filename char.
  
    // treat the test path as a set of pathparts.
    f = f.split(slashSplit)
--  if (options.debug) {
--    console.error(this.pattern, "split", f)
--  }
++  // console.error(this.pattern, "split", f)
  
    // just ONE of the pattern sets in this.set needs to match
    // in order for it to be valid.  If negating, then just one
      var pattern = set[i]
      var hit = this.matchOne(f, pattern, partial)
      if (hit) {
--      if (options.flipNegate) return true
        return !this.negate
      }
    }
  
    // didn't get any hits.  this is success if it's a negative
    // pattern, failure otherwise.
--  if (options.flipNegate) return false
    return this.negate
  }
  
@@@ -984,3 -984,3 +1003,19 @@@ function globUnescape (s) 
  function regExpEscape (s) {
    return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
  }
++
++
++function isAbsolute (p) {
++  if (process.platform !== "win32") return p.charAt(0) === "/"
++
++  // yanked from node/lib/path.js
++  var splitDeviceRe =
++    /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?([\s\S]*?)$/
++
++  var result = p.match(splitDeviceRe)
++    , device = result[1] || ""
++    , isUnc = device && device.charAt(1) !== ":"
++    , isAbs = !!result[2] || isUnc // UNC always absolute
++
++  return isAbs
++}
@@@ -1,12 -1,12 +1,8 @@@
  {
--  "author": {
--    "name": "Isaac Z. Schlueter",
--    "email": "i@izs.me",
--    "url": "http://blog.izs.me"
--  },
++  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
    "name": "minimatch",
    "description": "a glob matcher in javascript",
--  "version": "0.2.2",
++  "version": "0.1.3",
    "repository": {
      "type": "git",
      "url": "git://github.com/isaacs/minimatch.git"
      "lru-cache": "~1.0.5"
    },
    "devDependencies": {
--    "tap": ""
++    "tap": "~0.1.3"
    },
--  "licenses": [
++  "licenses" : [
      {
--      "type": "MIT",
--      "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
++      "type" : "MIT",
++      "url" : "http://github.com/isaacs/minimatch/raw/master/LICENSE"
      }
--  ],
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
--  },
--  "_id": "minimatch@0.2.2",
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.12",
--  "_nodeVersion": "v0.7.7-pre",
--  "_defaultsLoaded": true,
--  "_from": "minimatch@0"
++  ]
  }
@@@ -3,14 -3,14 +3,14 @@@ mkdir
  
  Like `mkdir -p`, but in node.js!
  
--example
++Example
  =======
  
  pow.js
  ------
      var mkdirp = require('mkdirp');
      
--    mkdirp('/tmp/foo/bar/baz', function (err) {
++    mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
          if (err) console.error(err)
          else console.log('pow!')
      });
@@@ -19,36 -19,36 +19,3 @@@ Outpu
      pow!
  
  And now /tmp/foo/bar/baz exists, huzzah!
--
--methods
--=======
--
--var mkdirp = require('mkdirp');
--
--mkdirp(dir, mode, cb)
-----------------------
--
--Create a new directory and any necessary subdirectories at `dir` with octal
--permission string `mode`.
--
--If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
--
--mkdirp.sync(dir, mode)
------------------------
--
--Synchronously create a new directory and any necessary subdirectories at `dir`
--with octal permission string `mode`.
--
--If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
--
--install
--=======
--
--With [npm](http://npmjs.org) do:
--
--    npm install mkdirp
--
--license
--=======
--
--MIT/X11
@@@ -4,28 -4,28 +4,17 @@@ var fs = require('fs')
  module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
  
  function mkdirP (p, mode, f) {
--    if (typeof mode === 'function' || mode === undefined) {
--        f = mode;
--        mode = 0777 & (~process.umask());
--    }
--
--    // secret passalong argument.
--    var made = arguments[3] || null;
--
      var cb = f || function () {};
      if (typeof mode === 'string') mode = parseInt(mode, 8);
      p = path.resolve(p);
  
      fs.mkdir(p, mode, function (er) {
--        if (!er) {
--            made = made || p;
--            return cb(null, made);
--        }
++        if (!er) return cb();
          switch (er.code) {
              case 'ENOENT':
--                mkdirP(path.dirname(p), mode, function (er, made) {
--                    if (er) cb(er, made);
--                    else mkdirP(p, mode, cb, made);
++                mkdirP(path.dirname(p), mode, function (er) {
++                    if (er) cb(er);
++                    else mkdirP(p, mode, cb);
                  });
                  break;
  
                  fs.stat(p, function (er2, stat) {
                      // if the stat fails, then that's super weird.
                      // let the original EEXIST be the failure reason.
--                    if (er2 || !stat.isDirectory()) cb(er, made)
--                    else cb(null, made);
++                    if (er2 || !stat.isDirectory()) cb(er)
++                    else if ((stat.mode & 0777) !== mode) fs.chmod(p, mode, cb);
++                    else cb();
                  });
                  break;
  
              default:
--                cb(er, made);
++                cb(er);
                  break;
          }
      });
  }
--
--mkdirP.sync = function sync (p, mode) {
--    if (mode === undefined) {
--        mode = 0777 & (~process.umask());
--    }
--
--    // secret passalong argument
--    var made = arguments[2] || null;
--
--    if (typeof mode === 'string') mode = parseInt(mode, 8);
--    p = path.resolve(p);
--
--    try {
--        fs.mkdirSync(p, mode);
--        made = made || p;
--    }
--    catch (err0) {
--        switch (err0.code) {
--            case 'ENOENT' :
--                made = sync(path.dirname(p), mode, made);
--                sync(p, mode, made);
--                break;
--
--            case 'EEXIST' :
--                var stat;
--                try {
--                    stat = fs.statSync(p);
--                }
--                catch (err1) {
--                    throw err0;
--                }
--                if (!stat.isDirectory()) throw err0;
--                break;
--            default :
--                throw err0
--                break;
--        }
--    }
--
--    return made;
--};
@@@ -1,44 -1,44 +1,23 @@@
  {
--  "name": "mkdirp",
--  "description": "Recursively mkdir, like `mkdir -p`",
--  "version": "0.3.0",
--  "author": {
--    "name": "James Halliday",
--    "email": "mail@substack.net",
--    "url": "http://substack.net"
--  },
--  "main": "./index",
--  "keywords": [
--    "mkdir",
--    "directory"
--  ],
--  "repository": {
--    "type": "git",
--    "url": "git://github.com/substack/node-mkdirp.git"
--  },
--  "scripts": {
--    "test": "tap test/*.js"
--  },
--  "devDependencies": {
--    "tap": "0.2"
--  },
--  "license": "MIT/X11",
--  "engines": {
--    "node": "*"
--  },
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
--  },
--  "_id": "mkdirp@0.3.0",
--  "dependencies": {},
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.13",
--  "_nodeVersion": "v0.7.7-pre",
--  "_defaultsLoaded": true,
--  "dist": {
--    "shasum": "a3cc6816e78b84f570caf9d95cb7368dc5d0bab8"
--  },
--  "_from": "../mkdirp"
++    "name" : "mkdirp",
++    "description" : "Recursively mkdir, like `mkdir -p`",
++    "version" : "0.1.0",
++    "author" : "James Halliday <mail@substack.net> (http://substack.net)",
++    "main" : "./index",
++    "keywords" : [
++        "mkdir",
++        "directory"
++    ],
++    "repository" : {
++        "type" : "git",
++        "url" : "http://github.com/substack/node-mkdirp.git"
++    },
++    "scripts" : {
++        "test" : "tap test/*.js"
++    },
++    "devDependencies" : {
++        "tap" : "0.0.x"
++    },
++    "license" : "MIT/X11",
++    "engines": { "node": "*" }
  }
@@@ -5,14 -5,14 +5,6 @@@ var buffer = "
    , tty = require("tty")
    , StringDecoder = require("string_decoder").StringDecoder
  
--function raw (mode) {
--  try {
--    process.stdin.setRawMode(mode)
--  } catch (e) {
--    tty.setRawMode(mode)
--  }
--}
--
  function read (opts, cb) {
    if (!cb) cb = opts, opts = {}
  
@@@ -33,7 -33,7 +25,7 @@@
      cb = (function (cb) {
        var called = false
        var t = setTimeout(function () {
--        raw(false)
++        tty.setRawMode(false)
          process.stdout.write("\n")
          if (def) done(null, def)
          else done(new Error("timeout"))
@@@ -117,7 -117,7 +109,7 @@@ function rawRead (def, timeout, delim, 
      , val = ""
      , decoder = new StringDecoder
  
--  raw(true)
++  tty.setRawMode(true)
    stdin.resume()
    stdin.on("error", cb)
    stdin.on("data", function D (c) {
  
        case "\u0004": // EOF
        case delim:
--        raw(false)
++        tty.setRawMode(false)
          stdin.removeListener("data", D)
          stdin.removeListener("error", cb)
          val = val.trim() || def
          return cb(null, val)
  
        case "\u0003": case "\0": // ^C or other signal abort
--        raw(false)
++        tty.setRawMode(false)
          stdin.removeListener("data", D)
          stdin.removeListener("error", cb)
          stdin.pause()
@@@ -1,28 -1,28 +1,16 @@@
  {
    "name": "read",
--  "version": "0.0.2",
++  "version": "0.0.1",
    "main": "lib/read.js",
    "dependencies": {},
    "devDependencies": {},
    "engines": {
      "node": ">=0.6"
    },
--  "author": {
--    "name": "Isaac Z. Schlueter",
--    "email": "i@izs.me",
--    "url": "http://blog.izs.me/"
--  },
++  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
    "description": "read(1) for node programs",
    "repository": {
      "type": "git",
      "url": "git://github.com/isaacs/read.git"
--  },
--  "license": "BSD",
--  "_id": "read@0.0.2",
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.15",
--  "_nodeVersion": "v0.7.7",
--  "_defaultsLoaded": true,
--  "_from": "read@0"
++  }
  }
@@@ -38,7 -38,7 +38,7 @@@ request('http://google.com/doodle.png')
  You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.
  
  ```javascript
--fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
++fs.readStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
  ```
  
  Request can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.
@@@ -146,7 -146,7 +146,6 @@@ request.post({url:url, oauth:oauth}, fu
  The first argument can be either a url or an options object. The only required option is uri, all others are optional.
  
  * `uri` || `url` - fully qualified uri or a parsed url object from url.parse()
--* `qs` - object containing querystring values to be appended to the uri
  * `method` - http method, defaults to GET
  * `headers` - http headers, defaults to {}
  * `body` - entity body for POST and PUT requests. Must be buffer or string.
  * `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header.
  * `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.
  * `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.
--* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.
  * `maxRedirects` - the maximum number of redirects to follow, defaults to 10.
  * `onResponse` - If true the callback will be fired on the "response" event instead of "end". If a function it will be called on "response" and not effect the regular semantics of the main callback on "end".
  * `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.
@@@ -1,11 -1,11 +1,8 @@@
  module.exports = ForeverAgent
--ForeverAgent.SSL = ForeverAgentSSL
  
  var util = require('util')
    , Agent = require('http').Agent
    , net = require('net')
--  , tls = require('tls')
--  , AgentSSL = require('https').Agent
  
  function ForeverAgent(options) {
    var self = this
        socket.destroy();
      }
    })
--
++  self.createConnection = net.createConnection
  }
  util.inherits(ForeverAgent, Agent)
  
  ForeverAgent.defaultMinSockets = 5
  
--
--ForeverAgent.prototype.createConnection = net.createConnection
  ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
  ForeverAgent.prototype.addRequest = function(req, host, port) {
    var name = host + ':' + port
@@@ -87,17 -87,17 +82,3 @@@ ForeverAgent.prototype.removeSocket = f
      this.createSocket(name, host, port).emit('free');
    }
  }
--
--function ForeverAgentSSL (options) {
--  ForeverAgent.call(this, options)
--}
--util.inherits(ForeverAgentSSL, ForeverAgent)
--
--ForeverAgentSSL.prototype.createConnection = createConnectionSSL
--ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
--
--function createConnectionSSL (port, host, options) {
--  options.port = port
--  options.host = host
--  return tls.connect(options)
--}
@@@ -1,4 -1,4 +1,4 @@@
--// Copyright 2010-2012 Mikeal Rogers
++// Copyright 2010-2011 Mikeal Rogers
  //
  //    Licensed under the Apache License, Version 2.0 (the "License");
  //    you may not use this file except in compliance with the License.
@@@ -26,7 -26,7 +26,6 @@@ var http = require('http'
    , Cookie = require('./vendor/cookie')
    , CookieJar = require('./vendor/cookie/jar')
    , cookieJar = new CookieJar
--  , tunnel = require('./tunnel')
    ;
    
  if (process.logging) {
@@@ -68,9 -68,9 +67,7 @@@ function isReadStream (rs) 
  
  function copy (obj) {
    var o = {}
--  Object.keys(obj).forEach(function (i) {
--    o[i] = obj[i]
--  })
++  for (var i in obj) o[i] = obj[i]
    return o
  }
  
@@@ -86,31 -86,31 +83,24 @@@ function Request (options) 
    if (typeof options === 'string') {
      options = {uri:options}
    }
--  
--  var reserved = Object.keys(Request.prototype)
++
    for (var i in options) {
--    if (reserved.indexOf(i) === -1) {
--      this[i] = options[i]
--    } else {
--      if (typeof options[i] === 'function') {
--        delete options[i]
--      }
--    }
++    this[i] = options[i]
    }
--  options = copy(options)
--  
--  this.init(options)
++  if (!this.pool) this.pool = globalPool
++  this.dests = []
++  this.__isRequestRequest = true
  }
  util.inherits(Request, stream.Stream)
--Request.prototype.init = function (options) {
++Request.prototype.getAgent = function (host, port) {
++  if (!this.pool[host+':'+port]) {
++    this.pool[host+':'+port] = new this.httpModule.Agent({host:host, port:port})
++  }
++  return this.pool[host+':'+port]
++}
++Request.prototype.request = function () {
    var self = this
--  
--  if (!options) options = {}
--  
--  if (!self.pool) self.pool = globalPool
--  self.dests = []
--  self.__isRequestRequest = true
--  
++
    // Protect against double callback
    if (!self._callback && self.callback) {
      self._callback = self.callback
    }
    if (self.proxy) {
      if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy)
--
--    // do the HTTP CONNECT dance using koichik/node-tunnel
--    if (http.globalAgent && self.uri.protocol === "https:") {
--      var tunnelFn = self.proxy.protocol === "http:"
--                   ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
--
--      var tunnelOptions = { proxy: { host: self.proxy.hostname
--                                   , port: +self.proxy.port
--                                   , proxyAuth: self.proxy.auth }
--                          , ca: this.ca }
--
--      self.agent = tunnelFn(tunnelOptions)
--      self.tunnel = true
--    }
    }
  
    self._redirectsFollowed = self._redirectsFollowed || 0
    self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
    self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true
--  self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false;
--  if (self.followRedirect || self.followAllRedirects)
++  if (self.followRedirect)
      self.redirects = self.redirects || []
  
    self.headers = self.headers ? copy(self.headers) : {}
  
--  self.setHost = false
++  var setHost = false
    if (!self.headers.host) {
      self.headers.host = self.uri.hostname
      if (self.uri.port) {
             !(self.uri.port === 443 && self.uri.protocol === 'https:') )
        self.headers.host += (':'+self.uri.port)
      }
--    self.setHost = true
++    setHost = true
++  }
++
++  if (self.jar === false) {
++    // disable cookies
++    var cookies = false;
++    self._disableCookies = true;
++  } else if (self.jar) {
++    // fetch cookie from the user defined cookie jar
++    var cookies = self.jar.get({ url: self.uri.href })
++  } else {
++    // fetch cookie from the global cookie jar
++    var cookies = cookieJar.get({ url: self.uri.href })
++  }
++  if (cookies) {
++    var cookieString = cookies.map(function (c) {
++      return c.name + "=" + c.value;
++    }).join("; ");
++    
++    self.headers.Cookie = cookieString;
    }
--  
--  self.jar(self._jar || options.jar)
  
    if (!self.uri.pathname) {self.uri.pathname = '/'}
    if (!self.uri.port) {
      else if (self.uri.protocol == 'https:') {self.uri.port = 443}
    }
  
--  if (self.proxy && !self.tunnel) {
++  if (self.proxy) {
      self.port = self.proxy.port
      self.host = self.proxy.hostname
    } else {
      delete self.callback
    }
  
--  self.clientErrorHandler = function (error) {
--    if (self._aborted) return
--    
--    if (self.setHost) delete self.headers.host
--    if (self.req._reusedSocket && error.code === 'ECONNRESET'
--        && self.agent.addRequestNoreuse) {
--      self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
++  var clientErrorHandler = function (error) {
++    if (setHost) delete self.headers.host
++    if (self.req._reusedSocket && error.code === 'ECONNRESET') {
++      self.agent = {addRequest: ForeverAgent.prototype.addRequestNoreuse.bind(self.agent)}
        self.start()
        self.req.end()
        return
      }
--    if (self.timeout && self.timeoutTimer) {
--        clearTimeout(self.timeoutTimer);
--        self.timeoutTimer = null;
--    }
++    if (self.timeout && self.timeoutTimer) clearTimeout(self.timeoutTimer)
      self.emit('error', error)
    }
    if (self.onResponse) self.on('error', function (e) {self.onResponse(e)})
    if (self.callback) self.on('error', function (e) {self.callback(e)})
  
--  if (options.form) {
--    self.form(options.form)
--  }
--
--  if (options.oauth) {
--    self.oauth(options.oauth)
++  if (self.form) {
++    self.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8'
++    self.body = qs.stringify(self.form).toString('utf8')
++  }
++
++  if (self.oauth) {
++    var form
++    if (self.headers['content-type'] && 
++        self.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) ===
++          'application/x-www-form-urlencoded' 
++       ) {
++      form = qs.parse(self.body)
++    } 
++    if (self.uri.query) {
++      form = qs.parse(self.uri.query)
++    } 
++    if (!form) form = {}
++    var oa = {}
++    for (var i in form) oa[i] = form[i]
++    for (var i in self.oauth) oa['oauth_'+i] = self.oauth[i]
++    if (!oa.oauth_version) oa.oauth_version = '1.0'
++    if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( (new Date()).getTime() / 1000 ).toString()
++    if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
++    
++    oa.oauth_signature_method = 'HMAC-SHA1'
++    
++    var consumer_secret = oa.oauth_consumer_secret
++    delete oa.oauth_consumer_secret
++    var token_secret = oa.oauth_token_secret
++    delete oa.oauth_token_secret
++    
++    var baseurl = self.uri.protocol + '//' + self.uri.host + self.uri.pathname
++    var signature = oauth.hmacsign(self.method, baseurl, oa, consumer_secret, token_secret)
++    
++    // oa.oauth_signature = signature
++    for (var i in form) {
++      if ( i.slice(0, 'oauth_') in self.oauth) {
++        // skip 
++      } else {
++        delete oa['oauth_'+i]
++      }
++    }
++    self.headers.authorization = 
++      'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
++    self.headers.authorization += ',oauth_signature="'+oauth.rfc3986(signature)+'"'  
    }
  
    if (self.uri.auth && !self.headers.authorization) {
      self.headers.authorization = "Basic " + toBase64(self.uri.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
    }
--  if (self.proxy && self.proxy.auth && !self.headers['proxy-authorization'] && !self.tunnel) {
++  if (self.proxy && self.proxy.auth && !self.headers['proxy-authorization']) {
      self.headers['proxy-authorization'] = "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
    }
  
--  if (options.qs) self.qs(options.qs)
--
    if (self.uri.path) {
      self.path = self.uri.path
    } else {
  
    if (self.path.length === 0) self.path = '/'
  
--  if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
++  if (self.proxy) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
++
++  if (self.json) {
++    self.headers['content-type'] = 'application/json'
++    if (typeof self.json === 'boolean') {
++      if (typeof self.body === 'object') self.body = JSON.stringify(self.body)
++    } else {
++      self.body = JSON.stringify(self.json)
++    }
++
++  } else if (self.multipart) {
++    self.body = []
++
++    if (!self.headers['content-type']) {
++      self.headers['content-type'] = 'multipart/related;boundary="frontier"';
++    } else {
++      self.headers['content-type'] = self.headers['content-type'].split(';')[0] + ';boundary="frontier"';
++    }
++
++    if (!self.multipart.forEach) throw new Error('Argument error, options.multipart.')
  
--  if (options.json) {
--    self.json(options.json)
--  } else if (options.multipart) {
--    self.multipart(options.multipart)
++    self.multipart.forEach(function (part) {
++      var body = part.body
++      if(!body) throw Error('Body attribute missing in multipart.')
++      delete part.body
++      var preamble = '--frontier\r\n'
++      Object.keys(part).forEach(function(key){
++        preamble += key + ': ' + part[key] + '\r\n'
++      })
++      preamble += '\r\n'
++      self.body.push(new Buffer(preamble))
++      self.body.push(new Buffer(body))
++      self.body.push(new Buffer('\r\n'))
++    })
++    self.body.push(new Buffer('--frontier--'))
    }
  
    if (self.body) {
      }
    }
  
--  var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
++  var protocol = self.proxy ? self.proxy.protocol : self.uri.protocol
      , defaultModules = {'http:':http, 'https:':https}
      , httpModules = self.httpModules || {}
      ;
  
    if (!self.httpModule) throw new Error("Invalid protocol")
  
--  if (options.ca) self.ca = options.ca
--
--  if (!self.agent) {
--    if (options.agentOptions) self.agentOptions = options.agentOptions
--
--    if (options.agentClass) {
--      self.agentClass = options.agentClass
--    } else if (options.forever) {
--      self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
--    } else {
--      self.agentClass = self.httpModule.Agent
--    }
--  }
--
    if (self.pool === false) {
      self.agent = false
    } else {
--    self.agent = self.agent || self.getAgent()
      if (self.maxSockets) {
        // Don't use our pooling if node has the refactored client
++      self.agent = self.agent || self.httpModule.globalAgent || self.getAgent(self.host, self.port)
        self.agent.maxSockets = self.maxSockets
      }
      if (self.pool.maxSockets) {
        // Don't use our pooling if node has the refactored client
++      self.agent = self.agent || self.httpModule.globalAgent || self.getAgent(self.host, self.port)
        self.agent.maxSockets = self.pool.maxSockets
      }
    }
  
++  self.start = function () {
++    self._started = true
++    self.method = self.method || 'GET'
++    self.href = self.uri.href
++    if (log) log('%method %href', self)
++    self.req = self.httpModule.request(self, function (response) {
++      self.response = response
++      response.request = self
++
++      if (self.httpModule === https &&
++          self.strictSSL &&
++          !response.client.authorized) {
++        var sslErr = response.client.authorizationError
++        self.emit('error', new Error('SSL Error: '+ sslErr))
++        return
++      }
++
++      if (setHost) delete self.headers.host
++      if (self.timeout && self.timeoutTimer) clearTimeout(self.timeoutTimer)
++      
++      if (response.headers['set-cookie'] && (!self._disableCookies)) {
++        response.headers['set-cookie'].forEach(function(cookie) {
++          if (self.jar) self.jar.add(new Cookie(cookie))
++          else cookieJar.add(new Cookie(cookie))
++        })
++      }
++
++      if (response.statusCode >= 300 &&
++          response.statusCode < 400  &&
++          self.followRedirect     &&
++          self.method !== 'PUT' &&
++          self.method !== 'POST' &&
++          response.headers.location) {
++        if (self._redirectsFollowed >= self.maxRedirects) {
++          self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
++          return
++        }
++        self._redirectsFollowed += 1
++
++        if (!isUrl.test(response.headers.location)) {
++          response.headers.location = url.resolve(self.uri.href, response.headers.location)
++        }
++        self.uri = response.headers.location
++        self.redirects.push(
++          { statusCode : response.statusCode
++          , redirectUri: response.headers.location 
++          }
++        )
++        delete self.req
++        delete self.agent
++        delete self._started
++        if (self.headers) {
++          delete self.headers.host
++        }
++        if (log) log('Redirect to %uri', self)
++        request(self, self.callback)
++        return // Ignore the rest of the response
++      } else {
++        self._redirectsFollowed = self._redirectsFollowed || 0
++        // Be a good stream and emit end when the response is finished.
++        // Hack to emit end on close because of a core bug that never fires end
++        response.on('close', function () {
++          if (!self._ended) self.response.emit('end')
++        })
++
++        if (self.encoding) {
++          if (self.dests.length !== 0) {
++            console.error("Ingoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
++          } else {
++            response.setEncoding(self.encoding)
++          }
++        }
++
++        self.pipeDest = function (dest) {
++          if (dest.headers) {
++            dest.headers['content-type'] = response.headers['content-type']
++            if (response.headers['content-length']) {
++              dest.headers['content-length'] = response.headers['content-length']
++            }
++          }
++          if (dest.setHeader) {
++            for (var i in response.headers) {
++              dest.setHeader(i, response.headers[i])
++            }
++            dest.statusCode = response.statusCode
++          }
++          if (self.pipefilter) self.pipefilter(response, dest)
++        }
++
++        self.dests.forEach(function (dest) {
++          self.pipeDest(dest)
++        })
++
++        response.on("data", function (chunk) {
++          self._destdata = true
++          self.emit("data", chunk)
++        })
++        response.on("end", function (chunk) {
++          self._ended = true
++          self.emit("end", chunk)
++        })
++        response.on("close", function () {self.emit("close")})
++
++        self.emit('response', response)
++
++        if (self.onResponse) {
++          self.onResponse(null, response)
++        }
++        if (self.callback) {
++          var buffer = []
++          var bodyLen = 0
++          self.on("data", function (chunk) {
++            buffer.push(chunk)
++            bodyLen += chunk.length
++          })
++          self.on("end", function () {
++            if (buffer.length && Buffer.isBuffer(buffer[0])) {
++              var body = new Buffer(bodyLen)
++              var i = 0
++              buffer.forEach(function (chunk) {
++                chunk.copy(body, i, 0, chunk.length)
++                i += chunk.length
++              })
++              if (self.encoding === null) {
++                response.body = body
++              } else {
++                response.body = body.toString()
++              }
++            } else if (buffer.length) {
++              response.body = buffer.join('')
++            }
++
++            if (self.json) {
++              try {
++                response.body = JSON.parse(response.body)
++              } catch (e) {}
++            }
++
++            self.callback(null, response, response.body)
++          })
++        }
++      }
++    })
++
++    if (self.timeout && !self.timeoutTimer) {
++      self.timeoutTimer = setTimeout(function() {
++        self.req.abort()
++        var e = new Error("ETIMEDOUT")
++        e.code = "ETIMEDOUT"
++        self.emit("error", e)
++      }, self.timeout)
++    }
++    
++    self.req.on('error', clientErrorHandler)
++  }
++
    self.once('pipe', function (src) {
      if (self.ntick) throw new Error("You cannot pipe to this stream after the first nextTick() after creation of the request stream.")
      self.src = src
    })
  
    process.nextTick(function () {
--    if (self._aborted) return
--    
      if (self.body) {
        if (Array.isArray(self.body)) {
          self.body.forEach(function(part) {
      self.ntick = true
    })
  }
--
--// Must call this when following a redirect from https to http or vice versa
--// Attempts to keep everything as identical as possible, but update the
--// httpModule, Tunneling agent, and/or Forever Agent in use.
--Request.prototype._updateProtocol = function () {
--  var self = this
--  var protocol = self.uri.protocol
--
--  if (protocol === 'https:') {
--    // previously was doing http, now doing https
--    // if it's https, then we might need to tunnel now.
--    if (self.proxy) {
--      self.tunnel = true
--      var tunnelFn = self.proxy.protocol === 'http:'
--                   ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
--      var tunnelOptions = { proxy: { host: self.proxy.hostname
--                                   , post: +self.proxy.port
--                                   , proxyAuth: self.proxy.auth }
--                          , ca: self.ca }
--      self.agent = tunnelFn(tunnelOptions)
--      return
--    }
--
--    self.httpModule = https
--    switch (self.agentClass) {
--      case ForeverAgent:
--        self.agentClass = ForeverAgent.SSL
--        break
--      case http.Agent:
--        self.agentClass = https.Agent
--        break
--      default:
--        // nothing we can do.  Just hope for the best.
--        return
--    }
--
--    // if there's an agent, we need to get a new one.
--    if (self.agent) self.agent = self.getAgent()
--
--  } else {
--    if (log) log('previously https, now http')
--    // previously was doing https, now doing http
--    // stop any tunneling.
--    if (self.tunnel) self.tunnel = false
--    self.httpModule = http
--    switch (self.agentClass) {
--      case ForeverAgent.SSL:
--        self.agentClass = ForeverAgent
--        break
--      case https.Agent:
--        self.agentClass = http.Agent
--        break
--      default:
--        // nothing we can do.  just hope for the best
--        return
--    }
--
--    // if there's an agent, then get a new one.
--    if (self.agent) {
--      self.agent = null
--      self.agent = self.getAgent()
--    }
--  }
--}
--
--Request.prototype.getAgent = function () {
--  var Agent = this.agentClass
--  var options = {}
--  if (this.agentOptions) {
--    for (var i in this.agentOptions) {
--      options[i] = this.agentOptions[i]
--    }
--  }
--  if (this.ca) options.ca = this.ca
--
--  var poolKey = ''
--
--  // different types of agents are in different pools
--  if (Agent !== this.httpModule.Agent) {
--    poolKey += Agent.name
--  }
--
--  if (!this.httpModule.globalAgent) {
--    // node 0.4.x
--    options.host = this.host
--    options.port = this.port
--    if (poolKey) poolKey += ':'
--    poolKey += this.host + ':' + this.port
--  }
--
--  // ca option is only relevant if proxy or destination are https
--  var proxy = this.proxy
--  if (typeof proxy === 'string') proxy = url.parse(proxy)
--  var caRelevant = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
--  if (options.ca && caRelevant) {
--    if (poolKey) poolKey += ':'
--    poolKey += options.ca
--  }
--
--  if (!poolKey && Agent === this.httpModule.Agent && this.httpModule.globalAgent) {
--    // not doing anything special.  Use the globalAgent
--    return this.httpModule.globalAgent
--  }
--
--  // we're using a stored agent.  Make sure it's protocol-specific
--  poolKey = this.uri.protocol + poolKey
--
--  // already generated an agent for this setting
--  if (this.pool[poolKey]) return this.pool[poolKey]
--
--  return this.pool[poolKey] = new Agent(options)
--}
--
--Request.prototype.start = function () {
--  var self = this
--  
--  if (self._aborted) return
--  
--  self._started = true
--  self.method = self.method || 'GET'
--  self.href = self.uri.href
--  if (log) log('%method %href', self)
--  self.req = self.httpModule.request(self, function (response) {
--    if (self._aborted) return
--    if (self._paused) response.pause()
--    
--    self.response = response
--    response.request = self
--
--    if (self.httpModule === https &&
--        self.strictSSL &&
--        !response.client.authorized) {
--      var sslErr = response.client.authorizationError
--      self.emit('error', new Error('SSL Error: '+ sslErr))
--      return
--    }
--
--    if (self.setHost) delete self.headers.host
--    if (self.timeout && self.timeoutTimer) {
--        clearTimeout(self.timeoutTimer);
--        self.timeoutTimer = null;
--    }  
--    
--    if (response.headers['set-cookie'] && (!self._disableCookies)) {
--      response.headers['set-cookie'].forEach(function(cookie) {
--        if (self._jar) self._jar.add(new Cookie(cookie))
--        else cookieJar.add(new Cookie(cookie))
--      })
--    }
--
--    if (response.statusCode >= 300 && response.statusCode < 400  &&
--        (self.followAllRedirects ||
--         (self.followRedirect && (self.method !== 'PUT' && self.method !== 'POST' && self.method !== 'DELETE'))) &&
--        response.headers.location) {
--      if (self._redirectsFollowed >= self.maxRedirects) {
--        self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
--        return
--      }
--      self._redirectsFollowed += 1
--
--      if (!isUrl.test(response.headers.location)) {
--        response.headers.location = url.resolve(self.uri.href, response.headers.location)
--      }
--
--      var uriPrev = self.uri
--      self.uri = url.parse(response.headers.location)
--
--      // handle the case where we change protocol from https to http or vice versa
--      if (self.uri.protocol !== uriPrev.protocol) {
--        self._updateProtocol()
--      }
--
--      self.redirects.push(
--        { statusCode : response.statusCode
--        , redirectUri: response.headers.location 
--        }
--      )
--      self.method = 'GET'; // Force all redirects to use GET
--      delete self.req
--      delete self.agent
--      delete self._started
--      delete self.body
--      if (self.headers) {
--        delete self.headers.host
--      }
--      if (log) log('Redirect to %uri', self)
--      self.init()
--      return // Ignore the rest of the response
--    } else {
--      self._redirectsFollowed = self._redirectsFollowed || 0
--      // Be a good stream and emit end when the response is finished.
--      // Hack to emit end on close because of a core bug that never fires end
--      response.on('close', function () {
--        if (!self._ended) self.response.emit('end')
--      })
--
--      if (self.encoding) {
--        if (self.dests.length !== 0) {
--          console.error("Ingoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
--        } else {
--          response.setEncoding(self.encoding)
--        }
--      }
--
--      self.dests.forEach(function (dest) {
--        self.pipeDest(dest)
--      })
--
--      response.on("data", function (chunk) {
--        self._destdata = true
--        self.emit("data", chunk)
--      })
--      response.on("end", function (chunk) {
--        self._ended = true
--        self.emit("end", chunk)
--      })
--      response.on("close", function () {self.emit("close")})
--
--      self.emit('response', response)
--
--      if (self.onResponse) {
--        self.onResponse(null, response)
--      }
--      if (self.callback) {
--        var buffer = []
--        var bodyLen = 0
--        self.on("data", function (chunk) {
--          buffer.push(chunk)
--          bodyLen += chunk.length
--        })
--        self.on("end", function () {
--          if (self._aborted) return
--          
--          if (buffer.length && Buffer.isBuffer(buffer[0])) {
--            var body = new Buffer(bodyLen)
--            var i = 0
--            buffer.forEach(function (chunk) {
--              chunk.copy(body, i, 0, chunk.length)
--              i += chunk.length
--            })
--            if (self.encoding === null) {
--              response.body = body
--            } else {
--              response.body = body.toString()
--            }
--          } else if (buffer.length) {
--            response.body = buffer.join('')
--          }
--
--          if (self._json) {
--            try {
--              response.body = JSON.parse(response.body)
--            } catch (e) {}
--          }
--
--          self.callback(null, response, response.body)
--        })
--      }
--    }
--  })
--
--  if (self.timeout && !self.timeoutTimer) {
--    self.timeoutTimer = setTimeout(function() {
--      self.req.abort()
--      var e = new Error("ETIMEDOUT")
--      e.code = "ETIMEDOUT"
--      self.emit("error", e)
--    }, self.timeout)
--    
--    // Set additional timeout on socket - in case if remote
--    // server freeze after sending headers
--    if (self.req.setTimeout) { // only works on node 0.6+
--      self.req.setTimeout(self.timeout, function(){
--          if (self.req) {
--              self.req.abort()
--              var e = new Error("ESOCKETTIMEDOUT")
--              e.code = "ESOCKETTIMEDOUT"
--              self.emit("error", e)
--          }
--      })
--    }
--  }
--  
--  self.req.on('error', self.clientErrorHandler)
--  
--  self.emit('request', self.req)
--}
--
--Request.prototype.abort = function() {
--  this._aborted = true;
--  
--  if (this.req) {
--    this.req.abort()
--  }
--  else if (this.response) {
--    this.response.abort()
--  }
--  
--  this.emit("abort")
--}
--
--Request.prototype.pipeDest = function (dest) {
--  var response = this.response
--  // Called after the response is received
--  if (dest.headers) {
--    dest.headers['content-type'] = response.headers['content-type']
--    if (response.headers['content-length']) {
--      dest.headers['content-length'] = response.headers['content-length']
--    }
--  }
--  if (dest.setHeader) {
--    for (var i in response.headers) {
--      dest.setHeader(i, response.headers[i])
--    }
--    dest.statusCode = response.statusCode
--  }
--  if (this.pipefilter) this.pipefilter(response, dest)
--}
--
--// Composable API
--Request.prototype.setHeader = function (name, value, clobber) {
--  if (clobber === undefined) clobber = true
--  if (clobber || !this.headers.hasOwnProperty(name)) this.headers[name] = value
--  else this.headers[name] += ',' + value
--  return this
--}
--Request.prototype.setHeaders = function (headers) {
--  for (i in headers) {this.setHeader(i, headers[i])}
--  return this
--}
--Request.prototype.qs = function (q, clobber) {
--  var base
--  if (!clobber && this.uri.query) base = qs.parse(this.uri.query)
--  else base = {}
--  
--  for (var i in q) {
--    base[i] = q[i]
--  }
--  
--  this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base))
--  this.url = this.uri
--  
--  return this
--}
--Request.prototype.form = function (form) {
--  this.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8'
--  this.body = qs.stringify(form).toString('utf8')
--  return this
--}
--Request.prototype.multipart = function (multipart) {
--  var self = this
--  self.body = []
--
--  if (!self.headers['content-type']) {
--    self.headers['content-type'] = 'multipart/related;boundary="frontier"';
--  } else {
--    self.headers['content-type'] = self.headers['content-type'].split(';')[0] + ';boundary="frontier"';
--  }
--
--  if (!multipart.forEach) throw new Error('Argument error, options.multipart.')
--
--  multipart.forEach(function (part) {
--    var body = part.body
--    if(!body) throw Error('Body attribute missing in multipart.')
--    delete part.body
--    var preamble = '--frontier\r\n'
--    Object.keys(part).forEach(function(key){
--      preamble += key + ': ' + part[key] + '\r\n'
--    })
--    preamble += '\r\n'
--    self.body.push(new Buffer(preamble))
--    self.body.push(new Buffer(body))
--    self.body.push(new Buffer('\r\n'))
--  })
--  self.body.push(new Buffer('--frontier--'))
--  return self
--}
--Request.prototype.json = function (val) {
--  this.setHeader('content-type', 'application/json')
--  this.setHeader('accept', 'application/json')
--  this._json = true
--  if (typeof val === 'boolean') {
--    if (typeof this.body === 'object') this.body = JSON.stringify(this.body)
--  } else {
--    this.body = JSON.stringify(val)
--  }
--  return this
--}
--Request.prototype.oauth = function (_oauth) {
--  var form
--  if (this.headers['content-type'] && 
--      this.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) ===
--        'application/x-www-form-urlencoded' 
--     ) {
--    form = qs.parse(this.body)
--  }
--  if (this.uri.query) {
--    form = qs.parse(this.uri.query)
--  } 
--  if (!form) form = {}
--  var oa = {}
--  for (var i in form) oa[i] = form[i]
--  for (var i in _oauth) oa['oauth_'+i] = _oauth[i]
--  if (!oa.oauth_version) oa.oauth_version = '1.0'
--  if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( (new Date()).getTime() / 1000 ).toString()
--  if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
--  
--  oa.oauth_signature_method = 'HMAC-SHA1'
--  
--  var consumer_secret = oa.oauth_consumer_secret
--  delete oa.oauth_consumer_secret
--  var token_secret = oa.oauth_token_secret
--  delete oa.oauth_token_secret
--  
--  var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname
--  var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret)
--  
--  // oa.oauth_signature = signature
--  for (var i in form) {
--    if ( i.slice(0, 'oauth_') in _oauth) {
--      // skip 
--    } else {
--      delete oa['oauth_'+i]
--    }
--  }
--  this.headers.authorization = 
--    'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
--  this.headers.authorization += ',oauth_signature="'+oauth.rfc3986(signature)+'"'
--  return this
--}
--Request.prototype.jar = function (jar) {
--  var cookies
--  
--  if (this._redirectsFollowed === 0) {
--    this.originalCookieHeader = this.headers.cookie
--  }
--  
--  if (jar === false) {
--    // disable cookies
--    cookies = false;
--    this._disableCookies = true;
--  } else if (jar) {
--    // fetch cookie from the user defined cookie jar
--    cookies = jar.get({ url: this.uri.href })
--  } else {
--    // fetch cookie from the global cookie jar
--    cookies = cookieJar.get({ url: this.uri.href })
--  }
--  
--  if (cookies && cookies.length) {
--    var cookieString = cookies.map(function (c) {
--      return c.name + "=" + c.value
--    }).join("; ")
--
--    if (this.originalCookieHeader) {
--      // Don't overwrite existing Cookie header
--      this.headers.cookie = this.originalCookieHeader + '; ' + cookieString
--    } else {
--      this.headers.cookie = cookieString
--    }
--  }
--  this._jar = jar
--  return this
--}
--
--
--// Stream API
--Request.prototype.pipe = function (dest, opts) {
++Request.prototype.pipe = function (dest) {
    if (this.response) {
      if (this._destdata) {
        throw new Error("You cannot pipe after data has been emitted from the response.")
      } else if (this._ended) {
        throw new Error("You cannot pipe after the response has been ended.")
      } else {
--      stream.Stream.prototype.pipe.call(this, dest, opts)
++      stream.Stream.prototype.pipe.call(this, dest)
        this.pipeDest(dest)
        return dest
      }
    } else {
      this.dests.push(dest)
--    stream.Stream.prototype.pipe.call(this, dest, opts)
++    stream.Stream.prototype.pipe.call(this, dest)
      return dest
    }
  }
  Request.prototype.write = function () {
    if (!this._started) this.start()
++  if (!this.req) throw new Error("This request has been piped before http.request() was called.")
    this.req.write.apply(this.req, arguments)
  }
--Request.prototype.end = function (chunk) {
--  if (chunk) this.write(chunk)
++Request.prototype.end = function () {
    if (!this._started) this.start()
--  this.req.end()
++  if (!this.req) throw new Error("This request has been piped before http.request() was called.")
++  this.req.end.apply(this.req, arguments)
  }
  Request.prototype.pause = function () {
--  if (!this.response) this._paused = true
--  else this.response.pause.apply(this.response, arguments)
++  if (!this.response) throw new Error("This request has been piped before http.request() was called.")
++  this.response.pause.apply(this.response, arguments)
  }
  Request.prototype.resume = function () {
--  if (!this.response) this._paused = false
--  else this.response.resume.apply(this.response, arguments)
--}
--Request.prototype.destroy = function () {
--  if (!this._ended) this.end()
++  if (!this.response) throw new Error("This request has been piped before http.request() was called.")
++  this.response.resume.apply(this.response, arguments)
  }
  
--// organize params for post, put, head, del
--function initParams(uri, options, callback) {
--  if ((typeof options === 'function') && !callback) callback = options;
--  if (typeof options === 'object') {
--    options.uri = uri;
--  } else if (typeof uri === 'string') {
--    options = {uri:uri};
--  } else {
--    options = uri;
--    uri = options.uri;
--  }
--  return { uri: uri, options: options, callback: callback };
--}
--
--function request (uri, options, callback) {
--  if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.')
--  if ((typeof options === 'function') && !callback) callback = options;
--  if (typeof options === 'object') {
--    options.uri = uri;
--  } else if (typeof uri === 'string') {
--    options = {uri:uri};
--  } else {
--    options = uri;
--  }
--
--  if (callback) options.callback = callback;
++function request (options, callback) {
++  if (typeof options === 'string') options = {uri:options}
++  if (callback) options.callback = callback
    var r = new Request(options)
++  r.request()
    return r
  }
  
@@@ -886,12 -886,12 +588,12 @@@ module.exports = reques
  
  request.defaults = function (options) {
    var def = function (method) {
--    var d = function (uri, opts, callback) {
--      var params = initParams(uri, opts, callback);
++    var d = function (opts, callback) {
++      if (typeof opts === 'string') opts = {uri:opts}
        for (var i in options) {
--        if (params.options[i] === undefined) params.options[i] = options[i]
++        if (opts[i] === undefined) opts[i] = options[i]
        }
--      return method(params.uri, params.options, params.callback)
++      return method(opts, callback)
      }
      return d
    }
  
  request.forever = function (agentOptions, optionsArg) {
    var options = {}
--  if (optionsArg) {
++  if (agentOptions) {
      for (option in optionsArg) {
        options[option] = optionsArg[option]
      }
    }
--  if (agentOptions) options.agentOptions = agentOptions
--  options.forever = true
++  options.agent = new ForeverAgent(agentOptions)
    return request.defaults(options)
  }
  
  request.get = request
--request.post = function (uri, options, callback) {
--  var params = initParams(uri, options, callback);
--  params.options.method = 'POST';
--  return request(params.uri || null, params.options, params.callback)
--}
--request.put = function (uri, options, callback) {
--  var params = initParams(uri, options, callback);
--  params.options.method = 'PUT'
--  return request(params.uri || null, params.options, params.callback)
--}
--request.head = function (uri, options, callback) {
--  var params = initParams(uri, options, callback);
--  params.options.method = 'HEAD'
--  if (params.options.body || 
--      params.options.requestBodyStream || 
--      (params.options.json && typeof params.options.json !== 'boolean') || 
--      params.options.multipart) {
++request.post = function (options, callback) {
++  if (typeof options === 'string') options = {uri:options}
++  options.method = 'POST'
++  return request(options, callback)
++}
++request.put = function (options, callback) {
++  if (typeof options === 'string') options = {uri:options}
++  options.method = 'PUT'
++  return request(options, callback)
++}
++request.head = function (options, callback) {
++  if (typeof options === 'string') options = {uri:options}
++  options.method = 'HEAD'
++  if (options.body || options.requestBodyStream || options.json || options.multipart) {
      throw new Error("HTTP HEAD requests MUST NOT include a request body.")
    }
--  return request(params.uri || null, params.options, params.callback)
++  return request(options, callback)
  }
--request.del = function (uri, options, callback) {
--  var params = initParams(uri, options, callback);
--  params.options.method = 'DELETE'
--  return request(params.uri || null, params.options, params.callback)
++request.del = function (options, callback) {
++  if (typeof options === 'string') options = {uri:options}
++  options.method = 'DELETE'
++  return request(options, callback)
  }
  request.jar = function () {
    return new CookieJar
  }
  request.cookie = function (str) {
--  if (str && str.uri) str = str.uri
    if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
    return new Cookie(str)
  }
@@@ -1,6 -1,6 +1,5 @@@
  // from http://github.com/felixge/node-paperboy
  exports.types = {
--  "3gp":"video/3gpp",
    "aiff":"audio/x-aiff",
    "arj":"application/x-arj-compressed",
    "asf":"video/x-ms-asf",
    "lzh":"application/octet-stream",
    "m":"text/plain",
    "m3u":"audio/x-mpegurl",
--  "m4v":"video/mp4",
    "man":"application/x-troff-man",
    "me":"application/x-troff-me",
    "midi":"audio/midi",
    "mif":"application/x-mif",
    "mime":"www/mime",
--  "mkv":"  video/x-matrosk",
    "movie":"video/x-sgi-movie",
++  "mustache":"text/plain",
    "mp4":"video/mp4",
--  "mp41":"video/mp4",
--  "mp42":"video/mp4",
    "mpg":"video/mpeg",
    "mpga":"audio/mpeg",
    "ms":"application/x-troff-ms",
--  "mustache":"text/plain",
    "nc":"application/x-netcdf",
    "oda":"application/oda",
    "ogm":"application/ogg",
    "vrm":"x-world/x-vrml",
    "wav":"audio/x-wav",
    "wax":"audio/x-ms-wax",
--  "webm":"video/webm",
    "wma":"audio/x-ms-wma",
    "wmv":"video/x-ms-wmv",
    "wmx":"video/x-ms-wmx",
    "xpm":"image/x-xpixmap",
    "xwd":"image/x-xwindowdump",
    "xyz":"chemical/x-pdb",
--  "zip":"application/zip"
++  "zip":"application/zip",
  };
  
  exports.lookup = function(ext, defaultType) {
@@@ -19,7 -19,7 +19,7 @@@ function rfc3986 (str) 
  function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret, body) {
    // adapted from https://dev.twitter.com/docs/auth/oauth
    var base = 
--    (httpMethod || 'GET') + "&" +
++    httpMethod + "&" +
      encodeURIComponent(  base_uri ) + "&" +
      Object.keys(params).sort().map(function (i) {
        // big WTF here with the escape + encoding but it's what twitter wants
@@@ -1,45 -1,45 +1,15 @@@
--{
--  "name": "request",
--  "description": "Simplified HTTP request client.",
--  "tags": [
--    "http",
--    "simple",
--    "util",
--    "utility"
--  ],
--  "version": "2.9.153",
--  "author": {
--    "name": "Mikeal Rogers",
--    "email": "mikeal.rogers@gmail.com"
--  },
--  "repository": {
--    "type": "git",
--    "url": "git://github.com/mikeal/request.git"
--  },
--  "bugs": {
--    "url": "http://github.com/mikeal/request/issues"
--  },
--  "engines": [
--    "node >= 0.3.6"
--  ],
--  "main": "./main",
--  "scripts": {
--    "test": "node tests/run.js"
--  },
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
--  },
--  "_id": "request@2.9.153",
--  "dependencies": {},
--  "devDependencies": {},
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.8",
--  "_nodeVersion": "v0.6.12",
--  "_defaultsLoaded": true,
--  "dist": {
--    "shasum": "6f07c2ba3acfbe0cfe941f43647102740f05ff73"
--  },
--  "_from": "../request"
++{ "name" : "request"
++, "description" : "Simplified HTTP request client."
++, "tags" : ["http", "simple", "util", "utility"]
++, "version" : "2.9.3"
++, "author" : "Mikeal Rogers <mikeal.rogers@gmail.com>"
++, "repository" :
++  { "type" : "git"
++  , "url" : "http://github.com/mikeal/request.git"
++  }
++, "bugs" :
++  { "url" : "http://github.com/mikeal/request/issues" }
++, "engines" : ["node >= 0.3.6"]
++, "main" : "./main"
++, "scripts": { "test": "bash tests/run.sh" }
  }
@@@ -21,27 -21,27 +21,22 @@@ var url = require('url')
  var Cookie = exports = module.exports = function Cookie(str, req) {
    this.str = str;
  
++  // First key is the name
++  this.name = str.substr(0, str.indexOf('=')).trim();
++
    // Map the key/val pairs
    str.split(/ *; */).reduce(function(obj, pair){
     var p = pair.indexOf('=');
--   var key = p > 0 ? pair.substring(0, p).trim() : pair.trim();
--   var lowerCasedKey = key.toLowerCase();
--   var value = p > 0 ? pair.substring(p + 1).trim() : true;
--
--   if (!obj.name) {
--    // First key is the name
--    obj.name = key;
--    obj.value = value;
--   }
--   else if (lowerCasedKey === 'httponly') {
--    obj.httpOnly = value;
--   }
--   else {
--    obj[lowerCasedKey] = value;
--   }
++   if(p > 0)
++    obj[pair.substring(0, p).trim()] = pair.substring(p + 1).trim();
++   else
++    obj[pair.trim()] = true;
     return obj;
    }, this);
  
++  // Assign value
++  this.value = this[this.name];
++
    // Expires
    this.expires = this.expires
      ? new Date(this.expires)
@@@ -3,4 -3,4 +3,3 @@@ Isaac Z. Schlueter <i@izs.me> (http://b
  Wayne Larsen <wayne@larsen.st> (http://github.com/wvl)
  ritch <skawful@gmail.com>
  Marcel Laverdet
--Yosef Dinerstein <yosefd@microsoft.com>
@@@ -4,7 -4,7 +4,7 @@@ Install with `npm install rimraf`, or j
  
  ## API
  
--`rimraf(f, callback)`
++`rimraf(f, [options,] callback)`
  
  The callback will be called with an error if there is one.  Certain
  errors are handled for you:
  * `EMFILE` - If too many file descriptors get opened, rimraf will
    patiently wait until more become available.
  
++## Options
++
++The options object is optional.  These fields are respected:
++
++* `maxBusyTries` -  The number of times to retry a file or folder in the
++  event of an `EBUSY` error.  The default is 3.
++* `gently` - If provided a `gently` path, then rimraf will only delete
++  files and folders that are beneath this path, and only delete symbolic
++  links that point to a place within this path.  (This is very important
++  to npm's use-case, and shows rimraf's pedigree.)
++
  
  ## rimraf.sync
  
index 0000000,0000000..8812a6b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,86 @@@
++// fiber/future port originally written by Marcel Laverdet
++// https://gist.github.com/1131093
++// I updated it to bring to feature parity with cb version.
++// The bugs are probably mine, not Marcel's.
++// -- isaacs
++
++var path = require('path')
++  , fs = require('fs')
++  , Future = require('fibers/future')
++
++// Create future-returning fs functions
++var fs2 = {}
++for (var ii in fs) {
++  fs2[ii] = Future.wrap(fs[ii])
++}
++
++// Return a future which just pauses for a certain amount of time
++
++function timer (ms) {
++  var future = new Future
++  setTimeout(function () {
++    future.return()
++  }, ms)
++  return future
++}
++
++function realish (p) {
++  return path.resolve(path.dirname(fs2.readlink(p)))
++}
++
++// for EMFILE backoff.
++var timeout = 0
++  , EMFILE_MAX = 1000
++
++function rimraf_ (p, opts) {
++  opts = opts || {}
++  opts.maxBusyTries = opts.maxBusyTries || 3
++  if (opts.gently) opts.gently = path.resolve(opts.gently)
++  var busyTries = 0
++
++  // exits by throwing or returning.
++  // loops on handled errors.
++  while (true) {
++    try {
++      var stat = fs2.lstat(p).wait()
++
++      // check to make sure that symlinks are ours.
++      if (opts.gently) {
++        var rp = stat.isSymbolicLink() ? realish(p) : path.resolve(p)
++        if (rp.indexOf(opts.gently) !== 0) {
++          var er = new Error("Refusing to delete: "+p+" not in "+opts.gently)
++          er.errno = require("constants").EEXIST
++          er.code = "EEXIST"
++          er.path = p
++          throw er
++        }
++      }
++
++      if (!stat.isDirectory()) return fs2.unlink(p).wait()
++
++      var rimrafs = fs2.readdir(p).wait().map(function (file) {
++        return rimraf(path.join(p, file), opts)
++      })
++
++      Future.wait(rimrafs)
++      fs2.rmdir(p).wait()
++      timeout = 0
++      return
++
++    } catch (er) {
++      if (er.message.match(/^EMFILE/) && timeout < EMFILE_MAX) {
++        timer(timeout++).wait()
++      } else if (er.message.match(/^EBUSY/)
++                 && busyTries < opt.maxBusyTries) {
++        timer(++busyTries * 100).wait()
++      } else if (er.message.match(/^ENOENT/)) {
++        // already gone
++        return
++      } else {
++        throw er
++      }
++    }
++  }
++}
++
++var rimraf = module.exports = rimraf_.future()
@@@ -1,10 -1,10 +1,9 @@@
  {"name":"rimraf"
--,"version":"2.0.1"
++,"version":"1.0.9"
  ,"main":"rimraf.js"
  ,"description":"A deep deletion module for node (like `rm -rf`)"
  ,"author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
  ,"license":
    {"type":"MIT", "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE"}
--,"optionalDependencies":{"graceful-fs":"~1.1"}
  ,"repository":"git://github.com/isaacs/rimraf.git"
  ,"scripts":{"test":"cd test && bash run.sh"}}
@@@ -16,30 -16,30 +16,34 @@@ var lstat = process.platform === "win32
  
  // for EMFILE handling
  var timeout = 0
--exports.EMFILE_MAX = 1000
--exports.BUSYTRIES_MAX = 3
++  , EMFILE_MAX = 1000
  
--function rimraf (p, cb) {
++function rimraf (p, opts, cb) {
++  if (typeof opts === "function") cb = opts, opts = {}
  
    if (!cb) throw new Error("No callback passed to rimraf()")
++  if (!opts) opts = {}
  
    var busyTries = 0
++  opts.maxBusyTries = opts.maxBusyTries || 3
  
--  rimraf_(p, function CB (er) {
++  if (opts.gently) opts.gently = path.resolve(opts.gently)
++
++  rimraf_(p, opts, function CB (er) {
      if (er) {
--      if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) {
--        var time = (exports.BUSYTRIES_MAX - busyTries) * 100
++      if (er.code === "EBUSY" && busyTries < opts.maxBusyTries) {
++        var time = (opts.maxBusyTries - busyTries) * 100
          busyTries ++
          // try again, with the same exact callback as this one.
          return setTimeout(function () {
--          rimraf_(p, CB)
++          rimraf_(p, opts, CB)
          })
        }
  
        // this one won't happen if graceful-fs is used.
--      if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) {
++      if (er.code === "EMFILE" && timeout < EMFILE_MAX) {
          return setTimeout(function () {
--          rimraf_(p, CB)
++          rimraf_(p, opts, CB)
          }, timeout ++)
        }
  
@@@ -52,8 -52,8 +56,9 @@@
    })
  }
  
--function rimraf_ (p, cb) {
++function rimraf_ (p, opts, cb) {
    fs[lstat](p, function (er, s) {
++    // if the stat fails, then assume it's already gone.
      if (er) {
        // already gone
        if (er.code === "ENOENT") return cb()
        return cb(er)
      }
  
--    return rm_(p, s, false, cb)
++    // don't delete that don't point actually live in the "gently" path
++    if (opts.gently) return clobberTest(p, s, opts, cb)
++    return rm_(p, s, opts, cb)
    })
  }
  
--
--var myGid = function myGid () {
--  var g = process.getuid && process.getgid()
--  myGid = function myGid () { return g }
--  return g
--}
--
--var myUid = function myUid () {
--  var u = process.getuid && process.getuid()
--  myUid = function myUid () { return u }
--  return u
--}
--
--
--function writable (s) {
--  var mode = s.mode || 0777
--    , uid = myUid()
--    , gid = myGid()
--  return (mode & 0002)
--      || (gid === s.gid && (mode & 0020))
--      || (uid === s.uid && (mode & 0200))
--}
--
--function rm_ (p, s, didWritableCheck, cb) {
--  if (!didWritableCheck && !writable(s)) {
--    // make file writable
--    // user/group/world, doesn't matter at this point
--    // since it's about to get nuked.
--    return fs.chmod(p, s.mode | 0222, function (er) {
--      if (er) return cb(er)
--      rm_(p, s, true, cb)
--    })
--  }
--
--  if (!s.isDirectory()) {
--    return fs.unlink(p, cb)
--  }
--
--  // directory
++function rm_ (p, s, opts, cb) {
++  if (!s.isDirectory()) return fs.unlink(p, cb)
    fs.readdir(p, function (er, files) {
      if (er) return cb(er)
      asyncForEach(files.map(function (f) {
        return path.join(p, f)
      }), function (file, cb) {
--      rimraf(file, cb)
++      rimraf(file, opts, cb)
      }, function (er) {
        if (er) return cb(er)
        fs.rmdir(p, cb)
    })
  }
  
++function clobberTest (p, s, opts, cb) {
++  var gently = opts.gently
++  if (!s.isSymbolicLink()) next(null, path.resolve(p))
++  else realish(p, next)
++
++  function next (er, rp) {
++    if (er) return rm_(p, s, cb)
++    if (rp.indexOf(gently) !== 0) return clobberFail(p, gently, cb)
++    else return rm_(p, s, opts, cb)
++  }
++}
++
++function realish (p, cb) {
++  fs.readlink(p, function (er, r) {
++    if (er) return cb(er)
++    return cb(null, path.resolve(path.dirname(p), r))
++  })
++}
++
++function clobberFail (p, g, cb) {
++  var er = new Error("Refusing to delete: "+p+" not in "+g)
++    , constants = require("constants")
++  er.errno = constants.EEXIST
++  er.code = "EEXIST"
++  er.path = p
++  return cb(er)
++}
++
  function asyncForEach (list, fn, cb) {
    if (!list.length) cb()
    var c = list.length
@@@ -139,13 -139,13 +137,7 @@@ function rimrafSync (p) 
      if (er.code === "ENOENT") return
      throw er
    }
--
--  if (!writable(s)) {
--    fs.chmodSync(p, s.mode | 0222)
--  }
--
    if (!s.isDirectory()) return fs.unlinkSync(p)
--
    fs.readdirSync(p).forEach(function (f) {
      rimrafSync(path.join(p, f))
    })
@@@ -24,10 -24,10 +24,6 @@@ function Extract (opts) 
    opts.type = "Directory"
    opts.Directory = true
  
--  // similar to --strip or --strip-components
--  opts.strip = +opts.strip
--  if (!opts.strip || opts.strip <= 0) opts.strip = 0
--
    this._fst = fstream.Writer(opts)
  
    this.pause()
    // of the tarball.  So, they need to be resolved against
    // the target directory in order to be created properly.
    me.on("entry", function (entry) {
--    // if there's a "strip" argument, then strip off that many
--    // path components.
--    if (opts.strip) {
--      var p = entry.path.split("/").slice(opts.strip).join("/")
--      entry.path = entry.props.path = p
--      if (entry.linkpath) {
--        var lp = entry.linkpath.split("/").slice(opts.strip).join("/")
--        entry.linkpath = entry.props.linkpath = lp
--      }
--    }
      if (entry.type !== "Link") return
      entry.linkpath = entry.props.linkpath =
        path.join(opts.path, path.join("/", entry.props.linkpath))
@@@ -1,12 -1,12 +1,8 @@@
  {
--  "author": {
--    "name": "Isaac Z. Schlueter",
--    "email": "i@izs.me",
--    "url": "http://blog.izs.me/"
--  },
++  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
    "name": "tar",
    "description": "tar for node",
--  "version": "0.1.13",
++  "version": "0.1.12",
    "repository": {
      "type": "git",
      "url": "git://github.com/isaacs/node-tar.git"
    "devDependencies": {
      "tap": "0.x",
      "rimraf": "1.x"
--  },
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
--  },
--  "_id": "tar@0.1.13",
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.4",
--  "_nodeVersion": "v0.7.6-pre",
--  "_defaultsLoaded": true,
--  "dist": {
--    "shasum": "804bdaaacaab928ec1c9bbd8b848a042c3adacb2"
--  },
--  "_from": "tar@0.1.13"
++  }
  }
@@@ -1,34 -1,34 +1,17 @@@
  {
--  "author": {
--    "name": "Isaac Z. Schlueter",
--    "email": "i@izs.me",
--    "url": "http://blog.izs.me"
--  },
++  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
    "name": "which",
    "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
--  "version": "1.0.5",
++  "version": "1.0.2",
    "repository": {
      "type": "git",
      "url": "git://github.com/isaacs/node-which.git"
    },
    "main": "which.js",
--  "bin": {
--    "which": "./bin/which"
--  },
++  "bin": "./bin/which",
    "engines": {
      "node": "*"
    },
    "dependencies": {},
--  "devDependencies": {},
--  "_npmUser": {
--    "name": "isaacs",
--    "email": "i@izs.me"
--  },
--  "_id": "which@1.0.5",
--  "optionalDependencies": {},
--  "_engineSupported": true,
--  "_npmVersion": "1.1.2",
--  "_nodeVersion": "v0.7.6-pre",
--  "_defaultsLoaded": true,
--  "_from": "which@1"
++  "devDependencies": {}
  }
@@@ -4,7 -4,7 +4,6 @@@ which.sync = whichSyn
  var path = require("path")
    , fs
    , COLON = process.platform === "win32" ? ";" : ":"
--  , isExe
  
  try {
    fs = require("graceful-fs")
    fs = require("fs")
  }
  
--if (process.platform == "win32") {
--  // On windows, there is no good way to check that a file is executable
--  isExe = function isExe () { return true }
--} else {
--  isExe = function isExe (mod, uid, gid) {
--    //console.error(mod, uid, gid);
--    //console.error("isExe?", (mod & 0111).toString(8))
--    var ret = (mod & 0001)
--        || (mod & 0010) && process.getgid && gid === process.getgid()
--        || (mod & 0100) && process.getuid && uid === process.getuid()
--    //console.error("isExe?", ret)
--    return ret
--  }
--}
--
--
++// console.log(process.execPath)
++// console.log(process.argv)
  
++function isExe (mod, uid, gid) {
++  //console.error("isExe?", (mod & 0111).toString(8))
++  var ret = (mod & 0001)
++      || (mod & 0010) && process.getgid && gid === process.getgid()
++      || (mod & 0100) && process.getuid && uid === process.getuid()
++  //console.error("isExe?", ret)
++  return ret
++}
  function which (cmd, cb) {
--  if (isAbsolute(cmd)) return cb(null, cmd)
++  if (cmd.charAt(0) === "/") return cb(null, cmd)
    var pathEnv = (process.env.PATH || "").split(COLON)
      , pathExt = [""]
    if (process.platform === "win32") {
      pathEnv.push(process.cwd())
      pathExt = (process.env.PATHEXT || ".EXE").split(COLON)
--    if (cmd.indexOf(".") !== -1) pathExt.unshift("")
    }
    //console.error("pathEnv", pathEnv)
    ;(function F (i, l) {
    })(0, pathEnv.length)
  }
  
++
  function whichSync (cmd) {
--  if (isAbsolute(cmd)) return cmd
++  if (cmd.charAt(0) === "/") return cmd
    var pathEnv = (process.env.PATH || "").split(COLON)
--    , pathExt = [""]
--  if (process.platform === "win32") {
--    pathEnv.push(process.cwd())
--    pathExt = (process.env.PATHEXT || ".EXE").split(COLON)
--    if (cmd.indexOf(".") !== -1) pathExt.unshift("")
--  }
    for (var i = 0, l = pathEnv.length; i < l; i ++) {
      var p = path.join(pathEnv[i], cmd)
--    for (var j = 0, ll = pathExt.length; j < ll; j ++) {
--      var cur = p + pathExt[j]
--      var stat
--      try { stat = fs.statSync(cur) } catch (ex) {}
--      if (stat &&
--          stat.isFile() &&
--          isExe(stat.mode, stat.uid, stat.gid)) return cur
--    }
++    if (p === process.execPath) return p
++    var stat
++    try { stat = fs.statSync(p) } catch (ex) {}
++    if (stat && isExe(stat.mode, stat.uid, stat.gid)) return p
    }
    throw new Error("not found: "+cmd)
  }
--
--var isAbsolute = process.platform === "win32" ? absWin : absUnix
--
--function absWin (p) {
--  if (absUnix(p)) return true
--  // pull off the device/UNC bit from a windows path.
--  // from node's lib/path.js
--  var splitDeviceRe =
--        /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/
--    , result = splitDeviceRe.exec(p)
--    , device = result[1] || ''
--    , isUnc = device && device.charAt(1) !== ':'
--    , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
--
--  return isAbsolute
--}
--
--function absUnix (p) {
--  return p.charAt(0) === "/" || p === ""
--}
@@@ -10,7 -10,7 +10,7 @@@
      "install",
      "package.json"
    ],
-   "version": "1.1.18",
 -  "version": "1.1.21",
++  "version": "1.1.0-2",
    "preferGlobal": true,
    "config": {
      "publishtest": false
      "slide": "1",
      "abbrev": "1",
      "graceful-fs": "~1.1.1",
--    "minimatch": "~0.2",
++    "minimatch": "0",
      "nopt": "1",
      "node-uuid": "~1.3",
      "proto-list": "1",
--    "rimraf": "2",
++    "rimraf": "1",
      "request": "~2.9",
      "which": "1",
      "tar": "~0.1.12",
--    "fstream": "~0.1.17",
++    "fstream": "~0.1.5",
      "block-stream": "*",
      "inherits": "1",
--    "mkdirp": "0.3",
++    "mkdirp": "0.1",
++    "fast-list": "~1.0.1",
      "read": "0",
--    "lru-cache": "1",
--    "node-gyp": "~0.4.1",
--    "fstream-npm": "0 >=0.0.5",
--    "uid-number": "0",
--    "archy": "0",
--    "chownr": "0"
++    "lru-cache": "1"
    },
    "bundleDependencies": [
      "slide",
      "block-stream",
      "inherits",
      "mkdirp",
++    "fast-list",
      "read",
--    "lru-cache",
--    "node-gyp",
--    "fstream-npm",
--    "uid-number",
--    "archy",
--    "chownr"
++    "lru-cache"
    ],
    "devDependencies": {
      "ronn": "https://github.com/isaacs/ronnjs/tarball/master"
@@@ -12,7 -12,7 +12,6 @@@ fs.readdir(api, done("api")
  
  function done (which) { return function (er, docs) {
    if (er) throw er
--  docs.sort()
    if (which === "api") apidocs = docs
    else clidocs = docs
  
@@@ -1,14 -1,14 +1,14 @@@
  { "name":"npm-test-env-reader"
  , "version" : "1.2.3"
  , "scripts" :
--  { "install"       : "node test.js"
--  , "preinstall"    : "node test.js"
--  , "preuninstall"  : "node test.js"
--  , "postuninstall" : "node test.js"
--  , "test"          : "node test.js"
--  , "stop"          : "node test.js"
--  , "start"         : "node test.js"
--  , "restart"       : "node test.js"
--  , "foo"           : "node test.js"
++  { "install"       : "./test.sh"
++  , "preinstall"    : "./test.sh"
++  , "preuninstall"  : "./test.sh"
++  , "postuninstall" : "./test.sh"
++  , "test"          : "./test.sh"
++  , "stop"          : "./test.sh"
++  , "start"         : "./test.sh"
++  , "restart"       : "./test.sh"
++  , "foo"           : "./test.sh"
    }
  }
index 0000000,0000000..b4ca437
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,3 @@@
++#!/usr/bin/env sh
++env | grep npm | sort | uniq
++echo PATH=$PATH
@@@ -5,6 -5,6 +5,5 @@@
    , "sub/include"
    , "sub/include2"
    , "sub/include4"
--  , "test.sh"
--  , ".npmignore" ]
++  , "test.sh" ]
  , "scripts":{"test":"bash test.sh"}}
@@@ -1,12 -1,12 +1,10 @@@
  { "name": "npm-test-optional-deps"
  , "version": "1.2.5"
--, "scripts": { "test": "node test.js" }
  , "optionalDependencies":
    { "npm-test-foobarzaaakakaka": "http://example.com/"
    , "dnode": "10.999.14234"
--  , "sax": "0.3.5"
++  , "sax": "*"
    , "999 invalid name": "1.2.3"
    , "glob": "some invalid version 99 #! $$ x y z"
--  , "npm-test-failer":"*"
    }
  }
Simple merge
Simple merge
@@@ -65,12 -79,14 +79,14 @@@ Take a parsed URL object, and return a 
  
  * `href` will be ignored.
  * `protocol`is treated the same with or without the trailing `:` (colon).
-   * The protocols `http`, `https`, `ftp`, `gopher`, `file` will be postfixed with `://` (colon-slash-slash).
-   * All other protocols `mailto`, `xmpp`, `aim`, `sftp`, `foo`, etc will be postfixed with `:` (colon)
- * `auth` will only be used if `host` is absent.
+   * The protocols `http`, `https`, `ftp`, `gopher`, `file` will be
+     postfixed with `://` (colon-slash-slash).
+   * All other protocols `mailto`, `xmpp`, `aim`, `sftp`, `foo`, etc will
+     be postfixed with `:` (colon)
+ * `auth` will be used if present.
  * `hostname` will only be used if `host` is absent.
  * `port` will only be used if `host` is absent.
 -* `host` will be used in place of `auth`, `hostname`, and `port`
 +* `host` will be used in place of `hostname` and `port`
  * `pathname` is treated the same with or without the leading `/` (slash)
  * `search` will be used in place of `query`
  * `query` (object; see `querystring`) will only be used if `search` is absent.
diff --cc lib/fs.js
Simple merge
index 0000000,0000000..34e951a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,79 @@@
++// Copyright Joyent, Inc. and other Node contributors.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a
++// copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to permit
++// persons to whom the Software is furnished to do so, subject to the
++// following conditions:
++//
++// The above copyright notice and this permission notice shall be included
++// in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
++// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
++// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
++// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
++// USE OR OTHER DEALINGS IN THE SOFTWARE.
++
++
++// Simple tests of most basic domain functionality.
++
++var common = require('../common');
++var assert = require('assert');
++var domain = require('domain');
++var events = require('events');
++var caught = 0;
++var expectCaught = 1;
++
++var d = new domain.Domain();
++var e = new events.EventEmitter();
++
++d.on('error', function(er) {
++  console.error('caught', er);
++  switch (er.message) {
++    case "ENOENT, open 'this file does not exist'":
++      assert.equal(er.domain, d);
++      assert.equal(er.domain_thrown, true);
++      assert.ok(!er.domain_emitter);
++      assert.equal(er.code, 'ENOENT');
++      assert.equal(er.path, 'this file does not exist');
++      assert.equal(typeof er.errno, 'number');
++      break;
++
++    default:
++      console.error('unexpected error, throwing %j', er.message);
++      throw er;
++  }
++
++  caught++;
++});
++
++process.on('exit', function() {
++  console.error('exit');
++  assert.equal(caught, expectCaught);
++  console.log('ok');
++});
++
++
++// implicit handling of thrown errors while in a domain, via the
++// single entry points of ReqWrap and MakeCallback.  Even if
++// we try very hard to escape, there should be no way to, even if
++// we go many levels deep through timeouts and multiple IO calls.
++// Everything that happens between the domain.enter() and domain.exit()
++// calls will be bound to the domain, even if multiple levels of
++// handles are created.
++d.run(function() {
++  setTimeout(function() {
++    var fs = require('fs');
++    fs.readdir(__dirname, function() {
++      fs.open('this file does not exist', 'r', function(er) {
++        if (er) throw er;
++        throw new Error('should not get here!');
++      });
++    });
++  }, 100);
++});