Upgrade npm to 1.1.26
authorisaacs <i@izs.me>
Fri, 15 Jun 2012 17:00:30 +0000 (10:00 -0700)
committerisaacs <i@izs.me>
Fri, 15 Jun 2012 17:00:30 +0000 (10:00 -0700)
182 files changed:
deps/npm/bin/read-package-json.js
deps/npm/doc/cli/install.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/lib/build.js
deps/npm/lib/cache.js
deps/npm/lib/init.js
deps/npm/lib/install.js
deps/npm/lib/link.js
deps/npm/lib/ls.js
deps/npm/lib/outdated.js
deps/npm/lib/owner.js
deps/npm/lib/pack.js
deps/npm/lib/prune.js
deps/npm/lib/publish.js
deps/npm/lib/rebuild.js
deps/npm/lib/run-script.js
deps/npm/lib/submodule.js
deps/npm/lib/unbuild.js
deps/npm/lib/uninstall.js
deps/npm/lib/unpublish.js
deps/npm/lib/utils/cmd-shim.js
deps/npm/lib/utils/completion/file-completion.js
deps/npm/lib/utils/completion/installed-deep.js
deps/npm/lib/utils/completion/installed-shallow.js
deps/npm/lib/utils/find.js [deleted file]
deps/npm/lib/utils/lifecycle.js
deps/npm/lib/utils/link.js
deps/npm/lib/utils/load-package-defaults.js [deleted file]
deps/npm/lib/utils/read-json.js [deleted file]
deps/npm/lib/utils/relativize.js [deleted file]
deps/npm/lib/utils/tar.js
deps/npm/lib/version.js
deps/npm/lib/view.js
deps/npm/man/man1/install.1
deps/npm/man/man1/npm.1
deps/npm/man/man3/npm.3
deps/npm/node_modules/glob/.npmignore [moved from deps/npm/node_modules/node-gyp/node_modules/glob/.npmignore with 100% similarity]
deps/npm/node_modules/glob/.travis.yml [moved from deps/npm/node_modules/node-gyp/node_modules/glob/.travis.yml with 100% similarity]
deps/npm/node_modules/glob/LICENCE [moved from deps/npm/node_modules/node-gyp/node_modules/glob/LICENCE with 100% similarity]
deps/npm/node_modules/glob/README.md [moved from deps/npm/node_modules/node-gyp/node_modules/glob/README.md with 100% similarity]
deps/npm/node_modules/glob/glob.js [moved from deps/npm/node_modules/node-gyp/node_modules/glob/glob.js with 99% similarity]
deps/npm/node_modules/glob/package.json [new file with mode: 0644]
deps/npm/node_modules/lru-cache/AUTHORS [new file with mode: 0644]
deps/npm/node_modules/lru-cache/README.md
deps/npm/node_modules/lru-cache/lib/lru-cache.js
deps/npm/node_modules/lru-cache/package.json
deps/npm/node_modules/minimatch/minimatch.js
deps/npm/node_modules/minimatch/package.json
deps/npm/node_modules/node-gyp/README.md
deps/npm/node_modules/node-gyp/bin/node-gyp.js
deps/npm/node_modules/node-gyp/legacy/common.gypi
deps/npm/node_modules/node-gyp/lib/build.js
deps/npm/node_modules/node-gyp/lib/clean.js
deps/npm/node_modules/node-gyp/lib/configure.js
deps/npm/node_modules/node-gyp/lib/install.js
deps/npm/node_modules/node-gyp/lib/list.js
deps/npm/node_modules/node-gyp/lib/node-gyp.js
deps/npm/node_modules/node-gyp/lib/rebuild.js
deps/npm/node_modules/node-gyp/lib/remove.js
deps/npm/node_modules/node-gyp/lib/util/mkdirp.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/.npmignore [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/README.md [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/examples/imgcat.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/examples/yoshi.png [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/lib/ansi.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/nodejs.png [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/package.json [deleted file]
deps/npm/node_modules/node-gyp/node_modules/ansi/server.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/examples/g.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/examples/usr-local.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/package.json [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/test/00-setup.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/test/bash-comparison.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/test/cwd-test.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/test/pause-resume.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/test/root-nomount.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/test/root.js [deleted file]
deps/npm/node_modules/node-gyp/node_modules/glob/test/zz-cleanup.js [deleted file]
deps/npm/node_modules/node-gyp/package.json
deps/npm/node_modules/npm-registry-client/lib/get.js
deps/npm/node_modules/npm-registry-client/package.json
deps/npm/node_modules/read-installed/README.md [new file with mode: 0644]
deps/npm/node_modules/read-installed/package.json [new file with mode: 0644]
deps/npm/node_modules/read-installed/read-installed.js [moved from deps/npm/lib/utils/read-installed.js with 86% similarity]
deps/npm/node_modules/read-package-json/README.md [new file with mode: 0644]
deps/npm/node_modules/read-package-json/package.json [new file with mode: 0644]
deps/npm/node_modules/read-package-json/read-json.js [new file with mode: 0644]
deps/npm/package.json
deps/npm/test/packages/npm-test-ignore-nested-nm/lib/node_modules/foo [new file with mode: 0644]

index 8c95d86..3e5a0c7 100755 (executable)
@@ -6,7 +6,7 @@ if (argv.length < 3) {
 
 var fs = require("fs")
   , file = argv[2]
-  , readJson = require("../lib/utils/read-json")
+  , readJson = require("read-package-json")
 
 readJson(file, function (er, data) {
   if (er) throw er
index cfa95e7..1d2f6ec 100644 (file)
@@ -160,7 +160,7 @@ local copy exists on disk.
     npm install sax --force
 
 The `--global` argument will cause npm to install the package globally
-rather than locally.  See `npm-global(1)`.
+rather than locally.  See `npm-folders(1)`.
 
 The `--link` argument will cause npm to link global installs into the
 local space in some cases.
index cca295e..fe25d03 100644 (file)
@@ -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.25</p>
+<p id="footer">bin &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 1fe13e9..63dfcbf 100644 (file)
@@ -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.25</p>
+<p id="footer">bugs &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c99a3de..f6f190d 100644 (file)
@@ -28,7 +28,7 @@ usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
 
 <ul><li><a href="../doc/index.html">index(1)</a></li></ul>
 </div>
-<p id="footer">commands &mdash; npm@1.1.25</p>
+<p id="footer">commands &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 31abdf2..aa3fb91 100644 (file)
@@ -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.25</p>
+<p id="footer">config &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 09ffb2a..07975d3 100644 (file)
@@ -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.25</p>
+<p id="footer">deprecate &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f037531..d2af78c 100644 (file)
@@ -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.25</p>
+<p id="footer">docs &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 45a2ddd..be35b30 100644 (file)
@@ -30,7 +30,7 @@ to open. The package can optionally have a version number attached.</p>
 <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.25</p>
+<p id="footer">edit &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 37178a4..3ce7d9f 100644 (file)
@@ -24,7 +24,7 @@ sure to use <code>npm rebuild &lt;pkg&gt;</code> if you make any changes.</p>
 
 <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.25</p>
+<p id="footer">explore &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index cdc5954..012076a 100644 (file)
@@ -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.25</p>
+<p id="footer">help-search &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 949acb1..f738daf 100644 (file)
@@ -35,7 +35,7 @@ then go ahead and use this programmatically.</p>
 
 <p><a href="../doc/json.html">json(1)</a></p>
 </div>
-<p id="footer">init &mdash; npm@1.1.25</p>
+<p id="footer">init &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3603633..da07c6b 100644 (file)
@@ -25,7 +25,7 @@ the name of a package to be installed.</p>
 <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.25</p>
+<p id="footer">install &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f9eeffe..4c73e22 100644 (file)
@@ -39,7 +39,7 @@ npm.commands.link('redis', cb)  # link-install the package</code></pre>
 <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.25</p>
+<p id="footer">link &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4b0b8e3..63e70df 100644 (file)
@@ -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.25</p>
+<p id="footer">load &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d9c3751..ff138cc 100644 (file)
@@ -59,7 +59,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.25</p>
+<p id="footer">ls &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d3002ef..50cab6b 100644 (file)
@@ -24,7 +24,7 @@ npm.load(configObject, function (er, npm) {
 
 <h2 id="VERSION">VERSION</h2>
 
-<p>1.1.25</p>
+<p>1.1.26</p>
 
 <h2 id="DESCRIPTION">DESCRIPTION</h2>
 
@@ -91,7 +91,7 @@ method names.  Use the <code>npm.deref</code> method to find the real name.</p>
 
 <pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
 </div>
-<p id="footer">npm &mdash; npm@1.1.25</p>
+<p id="footer">npm &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a08afd8..398ac9a 100644 (file)
@@ -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.25</p>
+<p id="footer">outdated &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f943a63..76e6316 100644 (file)
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
 
 <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.25</p>
+<p id="footer">owner &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index de159b4..16ba9ed 100644 (file)
@@ -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.25</p>
+<p id="footer">pack &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 391a728..b7fea1e 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically</p>
 </div>
-<p id="footer">prefix &mdash; npm@1.1.25</p>
+<p id="footer">prefix &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b32fe39..5a890f0 100644 (file)
@@ -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.25</p>
+<p id="footer">prune &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d77130b..a7f3109 100644 (file)
@@ -32,7 +32,7 @@ the registry.  Overwrites when the "force" environment variable is set.</p>
 
 <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.25</p>
+<p id="footer">publish &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 500ec15..036b30d 100644 (file)
@@ -22,7 +22,7 @@ the new binary. If no 'packages' parameter is specify, every package will be reb
 
 <p>See <code>npm help build</code></p>
 </div>
-<p id="footer">rebuild &mdash; npm@1.1.25</p>
+<p id="footer">rebuild &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dd02b57..0b16972 100644 (file)
@@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p>
 
 <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.25</p>
+<p id="footer">restart &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d3670d4..62fe979 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically.</p>
 </div>
-<p id="footer">root &mdash; npm@1.1.25</p>
+<p id="footer">root &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 553a623..acbd9dd 100644 (file)
@@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p>
 
 <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.25</p>
+<p id="footer">run-script &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 7b85536..ecf69d0 100644 (file)
@@ -32,7 +32,7 @@ excluded term (the "searchexclude" config). The search is case insensitive
 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.25</p>
+<p id="footer">search &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4f2751d..5f5ed48 100644 (file)
@@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.</p>
 <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.25</p>
+<p id="footer">shrinkwrap &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f4f6325..d74261e 100644 (file)
@@ -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.25</p>
+<p id="footer">start &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c7ea121..8b5ae42 100644 (file)
@@ -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.25</p>
+<p id="footer">stop &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dd34cb1..dbdfa66 100644 (file)
@@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
 
 <ul><li>npm help json</li><li>git help submodule</li></ul>
 </div>
-<p id="footer">submodule &mdash; npm@1.1.25</p>
+<p id="footer">submodule &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2f94563..b5b08e6 100644 (file)
@@ -29,7 +29,7 @@ parameter is missing or falsey (empty), the default froom the config will be
 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.25</p>
+<p id="footer">tag &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index ca25173..83a1775 100644 (file)
@@ -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.25</p>
+<p id="footer">test &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 05ee40a..20e37c0 100644 (file)
@@ -22,7 +22,7 @@ the name of a package to be uninstalled.</p>
 <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.25</p>
+<p id="footer">uninstall &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 934a9cd..8a7766e 100644 (file)
@@ -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.25</p>
+<p id="footer">unpublish &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 57fbbff..4841739 100644 (file)
@@ -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.25</p>
+<p id="footer">update &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e0d5134..4d104af 100644 (file)
@@ -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.25</p>
+<p id="footer">version &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2280dd3..850b08f 100644 (file)
@@ -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.25</p>
+<p id="footer">view &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index ac813e2..546f976 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically</p>
 </div>
-<p id="footer">whoami &mdash; npm@1.1.25</p>
+<p id="footer">whoami &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 87b7101..e7a6264 100644 (file)
@@ -267,7 +267,7 @@ will no doubt tell you to put the output in a gist or email.</p>
 
 <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.25</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3e10674..96aa94f 100644 (file)
@@ -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.25</p>
+<p id="footer">adduser &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index bfcbf71..712f88f 100644 (file)
@@ -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.25</p>
+<p id="footer">bin &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 477c791..5fa63a1 100644 (file)
@@ -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.25</p>
+<p id="footer">bugs &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9cee884..24d35d5 100644 (file)
@@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul>
 
 <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.25</p>
+<p id="footer">build &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 8d4a701..eb832c8 100644 (file)
@@ -20,7 +20,7 @@ install packages into the local space.</p>
 
 <ul><li><a href="../doc/install.html">install(1)</a></li></ul>
 </div>
-<p id="footer">bundle &mdash; npm@1.1.25</p>
+<p id="footer">bundle &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 13fc18c..661e918 100644 (file)
@@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p>
 
 <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.25</p>
+<p id="footer">cache &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index ffddf46..a9ee075 100644 (file)
@@ -65,7 +65,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.25</p>
+<p id="footer">changelog &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2f5f091..d66f898 100644 (file)
@@ -180,7 +180,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.25</p>
+<p id="footer">coding-style &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6036c66..d36f2f7 100644 (file)
@@ -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.25</p>
+<p id="footer">completion &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 43c680d..090edd9 100644 (file)
@@ -665,7 +665,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.25</p>
+<p id="footer">config &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 01230f4..affaaed 100644 (file)
@@ -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.25</p>
+<p id="footer">deprecate &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 39cf2f1..bf1b24e 100644 (file)
@@ -160,7 +160,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.25</p>
+<p id="footer">developers &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 213779d..5b865c4 100644 (file)
@@ -80,7 +80,7 @@ license statement)</li><li>Illegal content.</li></ol>
 
 <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.25</p>
+<p id="footer">disputes &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 57b002d..20ca100 100644 (file)
@@ -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.25</p>
+<p id="footer">docs &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index ce4a5d7..2938b9f 100644 (file)
@@ -37,7 +37,7 @@ or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul>
 
 <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.25</p>
+<p id="footer">edit &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9cb6b28..e3d2133 100644 (file)
@@ -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.25</p>
+<p id="footer">explore &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f1c9a60..178b825 100644 (file)
@@ -241,7 +241,7 @@ We'll have someone kick it or something.</p>
 
 <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.25</p>
+<p id="footer">faq &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 14b9c69..b6c9837 100644 (file)
@@ -205,7 +205,7 @@ cannot be found elsewhere.  See <code><a href="../doc/json.html">json(1)</a></co
 
 <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.25</p>
+<p id="footer">folders &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 1fca39d..f33ad03 100644 (file)
@@ -38,7 +38,7 @@ where the terms were found in the documentation.</p>
 
 <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.25</p>
+<p id="footer">help-search &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2991e1b..c25da8c 100644 (file)
@@ -36,7 +36,7 @@ matches are equivalent to specifying a topic name.</p>
 
 <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.25</p>
+<p id="footer">help &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 7aa0f11..1db180e 100644 (file)
 
 <p> Display npm username</p>
 </div>
-<p id="footer">index &mdash; npm@1.1.25</p>
+<p id="footer">index &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4ff20f0..8198ed6 100644 (file)
@@ -29,7 +29,7 @@ without a really good reason to do so.</p>
 
 <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.25</p>
+<p id="footer">init &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 1f89403..aba2a17 100644 (file)
@@ -72,7 +72,7 @@ local copy exists on disk.</p>
 <pre><code>npm install sax --force</code></pre>
 
 <p>The <code>--global</code> argument will cause npm to install the package globally
-rather than locally.  See <code><a href="../doc/global.html">global(1)</a></code>.</p>
+rather than locally.  See <code><a href="../doc/folders.html">folders(1)</a></code>.</p>
 
 <p>The <code>--link</code> argument will cause npm to link global installs into the
 local space in some cases.</p>
@@ -133,7 +133,7 @@ affects a real use-case, it will be investigated.</p>
 
 <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>
 </div>
-<p id="footer">install &mdash; npm@1.1.25</p>
+<p id="footer">install &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2e712e1..c087abe 100644 (file)
@@ -509,7 +509,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.25</p>
+<p id="footer">json &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 30e3ad7..4624adb 100644 (file)
@@ -58,7 +58,7 @@ installation target into your project's <code>node_modules</code> folder.</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/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.25</p>
+<p id="footer">link &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6376e0d..b861f93 100644 (file)
@@ -58,7 +58,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.25</p>
+<p id="footer">list &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 12b1d03..ba7e803 100644 (file)
@@ -14,7 +14,7 @@
 
 <h2 id="VERSION">VERSION</h2>
 
-<p>1.1.25</p>
+<p>1.1.26</p>
 
 <h2 id="DESCRIPTION">DESCRIPTION</h2>
 
@@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.</p>
 
 <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.25</p>
+<p id="footer">npm &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 7b5cf26..c284b3b 100644 (file)
@@ -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.25</p>
+<p id="footer">outdated &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 65766a9..341e99b 100644 (file)
@@ -34,7 +34,7 @@ that is not implemented at this time.</p>
 
 <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.25</p>
+<p id="footer">owner &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index be1c3d5..4c7995c 100644 (file)
@@ -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.25</p>
+<p id="footer">pack &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 57a7ccb..c58193b 100644 (file)
@@ -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.25</p>
+<p id="footer">prefix &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2100a88..c436cd1 100644 (file)
@@ -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.25</p>
+<p id="footer">prune &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 974d8e4..3565e1f 100644 (file)
@@ -29,7 +29,7 @@ the registry.  Overwrites when the "--force" flag is set.</p>
 
 <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.25</p>
+<p id="footer">publish &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dcd6a71..056e709 100644 (file)
@@ -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.25</p>
+<p id="footer">rebuild &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index bb57262..a403e9f 100644 (file)
@@ -97,7 +97,7 @@ ask for help on the <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com
 
 <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.25</p>
+<p id="footer">registry &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6da3d3b..29f9ec4 100644 (file)
@@ -58,7 +58,7 @@ modules.  To track those down, you can do the following:</p>
 
 <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.25</p>
+<p id="footer">removing-npm &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 595f10b..915398f 100644 (file)
@@ -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.25</p>
+<p id="footer">restart &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b78f7cf..02aa8e0 100644 (file)
@@ -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.25</p>
+<p id="footer">root &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9e93c06..8120324 100644 (file)
@@ -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.25</p>
+<p id="footer">run-script &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c8b0b5b..b083ef5 100644 (file)
@@ -177,7 +177,7 @@ will sudo the npm command in question.</li></ul>
 
 <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.25</p>
+<p id="footer">scripts &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index bf8d54a..4c08465 100644 (file)
@@ -24,7 +24,7 @@ expression characters must be escaped or quoted in most shells.)</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/view.html">view(1)</a></li></ul>
 </div>
-<p id="footer">search &mdash; npm@1.1.25</p>
+<p id="footer">search &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f4a6ab2..1eebd12 100644 (file)
@@ -104,7 +104,7 @@ that satisfies the range, or null if none of them do.</li></ul>
 
 <ul><li><a href="../doc/json.html">json(1)</a></li></ul>
 </div>
-<p id="footer">semver &mdash; npm@1.1.25</p>
+<p id="footer">semver &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9e2f9b4..61a208e 100644 (file)
@@ -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.25</p>
+<p id="footer">shrinkwrap &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e259d2c..44e0027 100644 (file)
@@ -26,7 +26,7 @@ a vaguely positive way to show that you care.</p>
 
 <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.25</p>
+<p id="footer">star &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b8403fd..bacd9bd 100644 (file)
@@ -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.25</p>
+<p id="footer">start &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index aa3ff03..afe6f45 100644 (file)
@@ -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.25</p>
+<p id="footer">stop &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 0867ff8..31d5146 100644 (file)
@@ -33,7 +33,7 @@ dependencies into the submodule folder.</p>
 
 <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.25</p>
+<p id="footer">submodule &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e5abdce..2987f07 100644 (file)
@@ -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.25</p>
+<p id="footer">tag &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4d5ce46..fba5fce 100644 (file)
@@ -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.25</p>
+<p id="footer">test &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b003d7c..5f89522 100644 (file)
@@ -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.25</p>
+<p id="footer">uninstall &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d9d28c6..625b87b 100644 (file)
@@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p>
 
 <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.25</p>
+<p id="footer">unpublish &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 61edb21..99cbf44 100644 (file)
@@ -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.25</p>
+<p id="footer">update &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dc0ade8..917c26b 100644 (file)
@@ -31,7 +31,7 @@ will use it as a commit message when creating a version commit.</p>
 
 <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.25</p>
+<p id="footer">version &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4f89345..69dc2f6 100644 (file)
@@ -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.25</p>
+<p id="footer">view &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c3ce70c..97fc327 100644 (file)
@@ -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.25</p>
+<p id="footer">whoami &mdash; npm@1.1.26</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c0dcbf7..9d1a991 100644 (file)
@@ -14,7 +14,7 @@ var npm = require("./npm.js")
   , fs = require("graceful-fs")
   , path = require("path")
   , lifecycle = require("./utils/lifecycle.js")
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , link = require("./utils/link.js")
   , linkIfExists = link.ifExists
   , cmdShim = require("./utils/cmd-shim.js")
index e2e037e..95b7993 100644 (file)
@@ -37,13 +37,12 @@ var mkdir = require("mkdirp")
   , npm = require("./npm.js")
   , fs = require("graceful-fs")
   , rm = require("rimraf")
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , registry = npm.registry
   , log = require("npmlog")
   , path = require("path")
   , output
   , sha = require("./utils/sha.js")
-  , find = require("./utils/find.js")
   , asyncMap = require("slide").asyncMap
   , semver = require("semver")
   , tar = require("./utils/tar.js")
index 0d96e07..868b4b8 100644 (file)
@@ -5,7 +5,6 @@ module.exports = init
 
 var read = require("read")
   , path = require("path")
-  , readJson = require("./utils/read-json.js")
   , fs = require("graceful-fs")
   , promiseChain = require("./utils/promise-chain.js")
   , exec = require("./utils/exec.js")
@@ -21,8 +20,15 @@ function init (args, cb) {
   log.pause()
   if (folder.charAt(0) !== "/") folder = path.join(process.cwd(), folder)
 
-  readJson(path.join(folder, "package.json"), function (er, data) {
+  fs.readFile(path.join(folder, "package.json"), "utf8", function (er, data) {
     if (er) data = {}
+    else try {
+      data = JSON.parse(data)
+    } catch (_) {
+      data = {}
+    }
+
+    if (data.author) data.author = parseAuthor(data.author)
 
     data.author = data.author ||
       { name: npm.config.get("init.author.name")
@@ -150,12 +156,8 @@ function init_ (data, folder, cb) {
     )
     (cleanupPaths, [data, folder])
     (function (cb) {
-      try { data = readJson.processJson(data) }
-      catch (er) { return cb(er) }
-      Object.keys(data)
-        .filter(function (k) { return k.match(/^_/) })
-        .forEach(function (k) { delete data[k] })
-      readJson.unParsePeople(data)
+      if (data.author) data.author = unparseAuthor(data.author)
+
       var str = JSON.stringify(data, null, 2)
         , msg = "About to write to "
               + path.join(folder, "package.json")
@@ -236,3 +238,24 @@ function cleanupPath (m, folder) {
   if (m.indexOf(folder) === 0) m = path.join(".", m.substr(folder.length))
   return m
 }
+
+function parseAuthor (person) {
+  if (typeof person !== "string") return person
+  var name = person.match(/^([^\(<]+)/)
+  var url = person.match(/\(([^\)]+)\)/)
+  var email = person.match(/<([^>]+)>/)
+  var obj = {}
+  if (name && name[0].trim()) obj.name = name[0].trim()
+  if (email) obj.email = email[1];
+  if (url) obj.url = url[1];
+  return obj
+}
+
+function unparseAuthor (a) {
+  if (!a) return ""
+  if (typeof a === "string") return a
+  var s = a.name
+  if (a.email) s += " <" + a.email + ">"
+  if (a.url) s += " (" + a.url + ")"
+  return s
+}
index 26a5a63..575ceca 100644 (file)
@@ -57,14 +57,13 @@ install.completion = function (opts, cb) {
 
 var npm = require("./npm.js")
   , semver = require("semver")
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , log = require("npmlog")
   , path = require("path")
   , fs = require("graceful-fs")
   , cache = require("./cache.js")
   , asyncMap = require("slide").asyncMap
   , chain = require("slide").chain
-  , relativize = require("./utils/relativize.js")
   , output
   , url = require("url")
   , mkdir = require("mkdirp")
@@ -174,10 +173,15 @@ 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 (opts && opts.dev) {
+      Object.keys(data.devDependencies || {}).forEach(function (k) {
+        data.dependencies[k] = data.devDependencies[k]
+      })
+    }
+
     if (wrap) {
       log.verbose("readDependencies: using existing wrap", [where, wrap])
       var rv = {}
@@ -641,14 +645,13 @@ function localLink (target, where, context, cb) {
 function resultList (target, where, parentId) {
   var nm = path.resolve(where, "node_modules")
     , targetFolder = path.resolve(nm, target.name)
-    , prettyWhere = relativize(where, process.cwd() + "/x")
+    , prettyWhere = path.relative(process.cwd(), where)
 
   if (prettyWhere === ".") prettyWhere = null
 
   if (!npm.config.get("global")) {
     // print out the folder relative to where we are right now.
-    // relativize isn't really made for dirs, so you need this hack
-    targetFolder = relativize(targetFolder, process.cwd()+"/x")
+    targetFolder = path.relative(process.cwd(), targetFolder)
   }
 
   return [ target._id
@@ -661,7 +664,7 @@ function resultList (target, where, parentId) {
 function installOne_ (target, where, context, cb) {
   var nm = path.resolve(where, "node_modules")
     , targetFolder = path.resolve(nm, target.name)
-    , prettyWhere = relativize(where, process.cwd() + "/x")
+    , prettyWhere = path.relative(process.cwd, where)
     , parent = context.parent
 
   if (prettyWhere === ".") prettyWhere = null
index de3d09c..1e99974 100644 (file)
@@ -8,7 +8,6 @@ var npm = require("./npm.js")
   , asyncMap = require("slide").asyncMap
   , chain = require("slide").chain
   , path = require("path")
-  , relativize = require("./utils/relativize.js")
   , rm = require("rimraf")
   , output = require("./utils/output.js")
   , build = require("./build.js")
@@ -114,13 +113,11 @@ function linkInstall (pkgs, cb) {
 
 function linkPkg (folder, cb_) {
   var me = folder || npm.prefix
-    , readJson = require("./utils/read-json.js")
+    , readJson = require("read-package-json")
 
   log.verbose("linkPkg", folder)
 
-  readJson( path.resolve(me, "package.json")
-          , { dev: true }
-          , function (er, d) {
+  readJson(path.resolve(me, "package.json"), function (er, d) {
     function cb (er) {
       return cb_(er, [[d && d._id, target, null, null]])
     }
@@ -148,7 +145,7 @@ function linkPkg (folder, cb_) {
 
 function resultPrinter (pkg, src, dest, rp, cb) {
   if (typeof cb !== "function") cb = rp, rp = null
-  var where = relativize(dest, path.resolve(process.cwd(),"x"))
+  var where = dest
   rp = (rp || "").trim()
   src = (src || "").trim()
   // XXX If --json is set, then look up the data from the package.json
index 29e65ad..02e7fe2 100644 (file)
@@ -8,10 +8,9 @@
 module.exports = exports = ls
 
 var npm = require("./npm.js")
-  , readInstalled = require("./utils/read-installed.js")
+  , readInstalled = require("read-installed")
   , output = require("./utils/output.js")
   , log = require("npmlog")
-  , relativize = require("./utils/relativize.js")
   , path = require("path")
   , archy = require("archy")
 
@@ -28,7 +27,7 @@ function ls (args, silent, cb) {
 
   var dir = path.resolve(npm.dir, "..")
 
-  readInstalled(dir, function (er, data) {
+  readInstalled(dir, npm.config.get("depth"), function (er, data) {
     var lite = getLite(bfsify(data))
     if (er || silent) return cb(er, data, lite)
 
@@ -213,7 +212,6 @@ function makeArchy_ (data, long, dir, depth, parent, d) {
 
 function getExtras (data, dir) {
   var extras = []
-    , rel = relativize(data.path || "", dir)
     , url = require("url")
 
   if (data.description) extras.push(data.description)
index d87dc9a..787f3c7 100644 (file)
@@ -20,12 +20,11 @@ outdated.completion = require("./utils/completion/installed-deep.js")
 
 var path = require("path")
   , fs = require("graceful-fs")
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , cache = require("./cache.js")
   , asyncMap = require("slide").asyncMap
   , npm = require("./npm.js")
   , semver = require("semver")
-  , relativize = require("./utils/relativize.js")
 
 function outdated (args, silent, cb) {
   if (typeof cb !== "function") cb = silent, silent = false
@@ -61,7 +60,7 @@ function makePretty (p) {
   }
 
   if (!npm.config.get("global")) {
-    dir = relativize(dir, process.cwd()+"/x")
+    dir = path.relative(process.cwd(), dir)
   }
   return dep + "@" + want + " " + dir
        + " current=" + (has || "MISSING")
@@ -89,8 +88,8 @@ function outdated_ (args, dir, parentHas, cb) {
       return next()
     }
     asyncMap(pkgs, function (pkg, cb) {
-      readJson( path.resolve(dir, "node_modules", pkg, "package.json")
-              , function (er, d) {
+      var jsonFile = path.resolve(dir, "node_modules", pkg, "package.json")
+      readJson(jsonFile, function (er, d) {
         cb(null, er ? [] : [[d.name, d.version]])
       })
     }, function (er, pvs) {
index 6a38625..a7cc5bd 100644 (file)
@@ -68,6 +68,7 @@ var npm = require("./npm.js")
   , registry = npm.registry
   , log = require("npmlog")
   , output
+  , readJson = require("read-package-json")
 
 function owner (args, cb) {
   var action = args.shift()
@@ -189,7 +190,6 @@ function mutate (pkg, user, mutation, cb) {
 function readLocalPkg (cb) {
   if (npm.config.get("global")) return cb()
   var path = require("path")
-    , readJson = require("./utils/read-json.js")
   readJson(path.resolve(npm.prefix, "package.json"), function (er, d) {
     return cb(er, d && d.name)
   })
index 3475c4a..1e3bd0c 100644 (file)
@@ -11,7 +11,6 @@ var npm = require("./npm.js")
   , fs = require("graceful-fs")
   , chain = require("slide").chain
   , path = require("path")
-  , relativize = require("./utils/relativize.js")
   , cwd = process.cwd()
 
 pack.usage = "npm pack <pkg>"
@@ -34,7 +33,7 @@ function pack (args, silent, cb) {
 
 function printFiles (files, cb) {
   files = files.map(function (file) {
-    return relativize(file, cwd)
+    return path.relative(cwd, file)
   })
   output.write(files.join("\n"), cb)
 }
index 4a02dc1..2afb2b9 100644 (file)
@@ -4,13 +4,13 @@ module.exports = prune
 
 prune.usage = "npm prune"
 
-var readInstalled = require("./utils/read-installed.js")
+var readInstalled = require("read-installed")
   , npm = require("./npm.js")
 
 prune.completion = require("./utils/completion/installed-deep.js")
 
 function prune (args, cb) {
-  readInstalled(npm.prefix, function (er, data) {
+  readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) {
     if (er) return cb(er)
     prune_(args, data, cb)
   })
index dfe21c2..348862d 100644 (file)
@@ -5,9 +5,8 @@ var npm = require("./npm.js")
   , registry = npm.registry
   , log = require("npmlog")
   , tar = require("./utils/tar.js")
-  , sha = require("./utils/sha.js")
   , path = require("path")
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , fs = require("graceful-fs")
   , lifecycle = require("./utils/lifecycle.js")
   , chain = require("slide").chain
@@ -39,6 +38,8 @@ function publish (args, isRetry, cb) {
     // to the cache.
     if (er) return cacheAddPublish(arg, false, isRetry, cb)
 
+    data._npmUser = { name: npm.config.get("username")
+                    , email: npm.config.get("email") }
     cacheAddPublish(arg, true, isRetry, cb)
   })
 }
@@ -76,77 +77,10 @@ function publish_ (arg, data, isRetry, cachedir, cb) {
     ("This package has been marked as private\n"
     +"Remove the 'private' field from the package.json to publish it."))
 
-  // pre-build
-  var bd = data.scripts
-           && ( data.scripts.preinstall
-             || data.scripts.install
-             || data.scripts.postinstall )
-           && npm.config.get("bindist")
-           && npm.config.get("bin-publish")
-  preBuild(data, bd, function (er, tb) {
-    if (er) return cb(er)
-    return regPublish(data, tb, isRetry, arg, cachedir, cb)
-  })
-}
-
-
-function preBuild (data, bd, cb) {
-  if (!bd) return cb()
-  // unpack to cache/n/v/build
-  // build there
-  // pack to cache/package-<bd>.tgz
-  var cf = path.resolve(npm.cache, data.name, data.version)
-  var pb = path.resolve(cf, "build")
-    , buildTarget = path.resolve(pb, "node_modules", data.name)
-    , tb = path.resolve(cf, "package-"+bd+".tgz")
-    , sourceBall = path.resolve(cf, "package.tgz")
-
-  log.verbose("preBuild", "about to cache unpack")
-  log.verbose("preBuild", "tarball = %s", sourceBall)
-  npm.commands.install(pb, sourceBall, function (er) {
-    log.info("preBuild", "done", data._id)
-    // build failure just means that we can't prebuild
-    if (er) {
-      log.warn("preBuild", "failed (continuing without prebuild)", bd, er)
-      return cb()
-    }
-    // now strip the preinstall/install scripts
-    // they've already been run.
-    var pbj = path.resolve(buildTarget, "package.json")
-    readJson(pbj, function (er, pbo) {
-      if (er) return cb(er)
-      if (pbo.scripts) {
-        delete pbo.scripts.preinstall
-        delete pbo.scripts.install
-        delete pbo.scripts.postinstall
-      }
-      pbo.prebuilt = bd
-      pbo.files = pbo.files || []
-      pbo.files.push("build")
-      pbo.files.push("build/")
-      pbo.files.push("*.node")
-      pbo.files.push("*.js")
-      fs.writeFile(pbj, JSON.stringify(pbo, null, 2), function (er) {
-        if (er) return cb(er)
-        tar.pack(tb, buildTarget, pbo, true, function (er) {
-          if (er) return cb(er)
-          // try to validate the shasum, too
-          sha.get(tb, function (er, shasum) {
-            if (er) return cb(er)
-            // binary distribution requires shasum checking.
-            if (!shasum) return cb()
-            data.dist.bin = data.dist.bin || {}
-            data.dist.bin[bd] = data.dist.bin[bd] || {}
-            data.dist.bin[bd].shasum = shasum
-            return cb(null, tb)
-          })
-        })
-      })
-    })
-  })
+  regPublish(data, isRetry, arg, cachedir, cb)
 }
 
-function regPublish (data, prebuilt, isRetry, arg, cachedir, cb) {
+function regPublish (data, isRetry, arg, cachedir, cb) {
   // check to see if there's a README.md in there.
   var readme = path.resolve(cachedir, "README.md")
     , tarball = cachedir + ".tgz"
index a4a39f7..c9f623d 100644 (file)
@@ -1,7 +1,7 @@
 
 module.exports = rebuild
 
-var readInstalled = require("./utils/read-installed.js")
+var readInstalled = require("read-installed")
   , semver = require("semver")
   , log = require("npmlog")
   , path = require("path")
@@ -16,7 +16,7 @@ rebuild.usage = "npm rebuild [<name>[@<version>] [name[@<version>] ...]]"
 rebuild.completion = require("./utils/completion/installed-deep.js")
 
 function rebuild (args, cb) {
-  readInstalled(npm.prefix, function (er, data) {
+  readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) {
     log.info("readInstalled", typeof data)
     if (er) return cb(er)
     var set = filter(data, args)
index 17b48ab..3291ae5 100644 (file)
@@ -4,7 +4,7 @@ module.exports = runScript
 var lifecycle = require("./utils/lifecycle.js")
   , npm = require("./npm.js")
   , path = require("path")
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , log = require("npmlog")
   , chain = require("slide").chain
   , fs = require("graceful-fs")
@@ -34,8 +34,6 @@ runScript.completion = function (opts, cb) {
                : npm.prefix
       var pkgDir = path.resolve( pref, "node_modules"
                                , argv[2], "package.json" )
-      console.error("global?", npm.config.get("global"))
-      console.error(pkgDir, "package dir")
       readJson(pkgDir, function (er, d) {
         if (er) d = {}
         var scripts = Object.keys(d.scripts || {})
index 9a2cffa..a0d2159 100644 (file)
@@ -5,7 +5,6 @@
 module.exports = submodule
 
 var npm = require("./npm.js")
-  , readJson = require("./utils/read-json.js")
   , exec = require("./utils/exec.js")
   , output = require("./utils/output.js")
   , cache = require("./cache.js")
index dd0293b..a7dc217 100644 (file)
@@ -1,7 +1,7 @@
 module.exports = unbuild
 unbuild.usage = "npm unbuild <folder>\n(this is plumbing)"
 
-var readJson = require("./utils/read-json.js")
+var readJson = require("read-package-json")
   , rm = require("rimraf")
   , gentlyRm = require("./utils/gently-rm.js")
   , npm = require("./npm.js")
@@ -24,7 +24,7 @@ function unbuild_ (folder, cb) {
   readJson(path.resolve(folder, "package.json"), function (er, pkg) {
     // if no json, then just trash it, but no scripts or whatever.
     if (er) return rm(folder, cb)
-    readJson.clearCache(folder)
+    readJson.cache.del(folder)
     chain
       ( [ [lifecycle, pkg, "preuninstall", folder, false, true]
         , [lifecycle, pkg, "uninstall", folder, false, true]
index a1998e7..ca9d0ed 100644 (file)
@@ -10,7 +10,7 @@ uninstall.completion = require("./utils/completion/installed-shallow.js")
 
 var fs = require("graceful-fs")
   , log = require("npmlog")
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , path = require("path")
   , npm = require("./npm.js")
   , semver = require("semver")
index 8aae12c..9d0c955 100644 (file)
@@ -4,7 +4,7 @@ module.exports = unpublish
 var log = require("npmlog")
   , npm = require("./npm.js")
   , registry = npm.registry
-  , readJson = require("./utils/read-json.js")
+  , readJson = require("read-package-json")
   , path = require("path")
   , output = require("./utils/output.js")
 
index a31af68..43a2ad1 100644 (file)
@@ -18,7 +18,6 @@ var fs = require("graceful-fs")
   , rm = require("rimraf")
   , log = require("npmlog")
   , path = require("path")
-  , relativize = require("./relativize.js")
   , npm = require("../npm.js")
   , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/
 
@@ -60,7 +59,7 @@ function writeShim (from, to, cb) {
 }
 
 function writeShim_ (from, to, prog, args, cb) {
-  var shTarget = relativize(from, to)
+  var shTarget = from
     , target = shTarget.split("/").join("\\")
     , longProg
     , shProg = prog
index c1c241d..3605557 100644 (file)
@@ -1,21 +1,19 @@
 module.exports = fileCompletion
 
-var find = require("../find.js")
-  , mkdir = require("mkdirp")
+var mkdir = require("mkdirp")
   , path = require("path")
+  , fs = require("graceful-fs")
+  , glob = require("glob")
 
 function fileCompletion (root, req, depth, cb) {
   if (typeof cb !== "function") cb = depth, depth = Infinity
   mkdir(root, function (er) {
     if (er) return cb(er)
-    function dirFilter (f, type) {
-      // return anything that is a file,
-      // or not exactly the req.
-      return type !== "dir" ||
-        ( f && f !== path.join(root, req)
-         && f !== path.join(root, req) + "/" )
-    }
-    find(path.join(root, req), dirFilter, depth, function (er, files) {
+
+    // can be either exactly the req, or a descendent
+    var pattern = root + "/{" + req + "," + req + "/**/*}"
+      , opts = { mark: true, dot: true, maxDepth: depth }
+    glob(pattern, opts, function (er, files) {
       if (er) return cb(er)
       return cb(null, (files || []).map(function (f) {
         return path.join(req, f.substr(root.length + 1)
@@ -26,4 +24,3 @@ function fileCompletion (root, req, depth, cb) {
     })
   })
 }
-
index 1188f40..b49d7bb 100644 (file)
@@ -1,17 +1,17 @@
 module.exports = installedDeep
 
 var npm = require("../../npm.js")
-  , readInstalled = require("../read-installed.js")
+  , readInstalled = require("read-installed")
 
 function installedDeep (opts, cb) {
   var local
     , global
   if (npm.config.get("global")) local = [], next()
-  else readInstalled(npm.prefix, function (er, data) {
+  else readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) {
     local = getNames(data || {})
     next()
   })
-  readInstalled(npm.config.get("prefix"), function (er, data) {
+  readInstalled(npm.config.get("prefix"), npm.config.get("depth"), function (er, data) {
     global = getNames(data || {})
     next()
   })
index 1ee3cce..8d64649 100644 (file)
@@ -4,7 +4,7 @@ module.exports = installedShallow
 var npm = require("../../npm.js")
   , fs = require("graceful-fs")
   , path = require("path")
-  , readJson = require("../read-json.js")
+  , readJson = require("read-package-json")
   , asyncMap = require("slide").asyncMap
 
 function installedShallow (opts, filter, cb) {
diff --git a/deps/npm/lib/utils/find.js b/deps/npm/lib/utils/find.js
deleted file mode 100644 (file)
index 89d1c2b..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-// walks a set of directories recursively, and returns
-// the list of files that match the filter, if one is
-// provided.
-
-module.exports = find
-var fs = require("graceful-fs")
-  , asyncMap = require("slide").asyncMap
-  , path = require("path")
-
-function find (dir, filter, depth, cb) {
-  if (typeof cb !== "function") cb = depth, depth = Infinity
-  if (typeof cb !== "function") cb = filter, filter = null
-  if (filter instanceof RegExp) filter = reFilter(filter)
-  if (typeof filter === "string") filter = strFilter(filter)
-  if (!Array.isArray(dir)) dir = [dir]
-  if (!filter) filter = nullFilter
-  asyncMap(dir, findDir(filter, depth), cb)
-}
-function findDir (filter, depth) { return function (dir, cb) {
-  fs.lstat(dir, function (er, stats) {
-    // don't include missing files, but don't abort either
-    if (er) return cb()
-    if (!stats.isDirectory()) return findFile(dir, filter, depth)("", cb)
-    var found = []
-    if (!filter || filter(dir, "dir")) found.push(dir+"/")
-    if (depth <= 0) return cb(null, found)
-    cb = (function (cb) { return function (er, f) {
-      cb(er, found.concat(f))
-    }})(cb)
-    fs.readdir(dir, function (er, files) {
-      if (er) return cb(er)
-      asyncMap(files, findFile(dir, filter, depth - 1), cb)
-    })
-  })
-}}
-function findFile (dir, filter, depth) { return function (f, cb) {
-  f = path.join(dir, f)
-  fs.lstat(f, function (er, s) {
-    // don't include missing files, but don't abort either
-    if (er) return cb(null, [])
-    if (s.isDirectory()) return find(f, filter, depth, cb)
-    if (!filter || filter(f, "file")) cb(null, f)
-    else cb(null, [])
-  })
-}}
-function reFilter (re) { return function (f, type) {
-  return nullFilter(f, type) && f.match(re)
-}}
-function strFilter (s) { return function (f, type) {
-  return nullFilter(f, type) && f.indexOf(s) === 0
-}}
-function nullFilter (f, type) { return type === "file" && f }
index 2f31af0..7fc5e71 100644 (file)
@@ -6,7 +6,6 @@ var log = require("npmlog")
   , exec = require("./exec.js")
   , npm = require("../npm.js")
   , path = require("path")
-  , readJson = require("./read-json.js")
   , fs = require("graceful-fs")
   , chain = require("slide").chain
   , constants = require("constants")
index 806fe22..e8cae15 100644 (file)
@@ -7,7 +7,6 @@ var fs = require("graceful-fs")
   , mkdir = require("mkdirp")
   , rm = require("./gently-rm.js")
   , path = require("path")
-  , relativize = require("./relativize.js")
   , npm = require("../npm.js")
 
 function linkIfExists (from, to, gently, cb) {
@@ -21,13 +20,10 @@ function link (from, to, gently, cb) {
   if (typeof cb !== "function") cb = gently, gently = null
   if (npm.config.get("force")) gently = false
 
-  // junction symlinks on windows must be absolute
-  var rel = process.platform === "win32" ? from : relativize(from, to)
-
   chain
     ( [ [fs, "stat", from]
       , [rm, to, gently]
       , [mkdir, path.dirname(to)]
-      , [fs, "symlink", rel, to, "junction"] ]
+      , [fs, "symlink", from, to, "junction"] ]
     , cb)
 }
diff --git a/deps/npm/lib/utils/load-package-defaults.js b/deps/npm/lib/utils/load-package-defaults.js
deleted file mode 100644 (file)
index 8a72ade..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-
-module.exports = loadPackageDefaults
-
-var path = require("path")
-  , log = require("npmlog")
-  , find = require("./find.js")
-  , asyncMap = require("slide").asyncMap
-  , npm = require("../npm.js")
-  , fs = require("graceful-fs")
-
-function loadPackageDefaults (pkg, pkgDir, cb) {
-  if (!pkg) return cb(new Error("no package to load defaults from!"))
-  if (typeof pkgDir === "function") {
-    cb = pkgDir
-    pkgDir = path.join(npm.dir, pkg.name, pkg.version, "package")
-  }
-  if (!pkgDir) pkgDir = "."
-
-  if (pkg._defaultsLoaded) return cb(null, pkg)
-
-  pkg._defaultsLoaded = true
-  asyncMap
-    ( [pkg]
-    , function (pkg, cb) { log.verbose("loadDefaults", pkg._id); cb() }
-    , readDefaultBins(pkgDir)
-    , readDefaultMans(pkgDir)
-    , function (er) { cb(er, pkg) } )
-}
-
-function objectForEach (obj, fn) {
-  Object.keys(obj).forEach(function (k) {
-    fn(obj[k])
-  })
-}
-
-function readDefaultMans (pkgDir) { return function (pkg, cb) {
-  var man = pkg.directories && pkg.directories.man
-    , manDir = path.join(pkgDir, man)
-  if (pkg.man && !Array.isArray(pkg.man)) pkg.man = [pkg.man]
-  if (pkg.man || !man) return cb(null, pkg)
-  find(manDir, /\.[0-9]+(\.gz)?$/, function (er, filenames) {
-    if (er) return cb(er)
-    var cut = pkgDir === "." ? 0 : pkgDir.length + 1
-    pkg.man = (filenames || []).map(function (filename) {
-      return filename.substr(cut)
-    }).filter(function (f) {
-      return !f.match(/(^|\/)\./)
-    })
-    cb(null,pkg)
-  })
-}}
-
-function readDefaultBins (pkgDir) { return function (pkg, cb) {
-  var bin = pkg.directories && pkg.directories.bin
-  if (pkg.bins) pkg.bin = pkg.bins, delete pkg.bins
-  if (pkg.bin || !bin) return cb(null, pkg)
-  log.verbose("loadDefaults", pkg._id, "linking default bins")
-  var binDir = path.join(pkgDir, bin)
-  pkg.bin = {}
-  find(binDir, function (er, filenames) {
-    if (er || !filenames || !filenames.length) return cb(er, pkg)
-    var cut = pkgDir === "." ? 0 : pkgDir.length + 1
-      , binCut = pkgDir === "." ? bin.length - 1 : binDir.length + 1
-    filenames.filter(function (f) {
-      return !f.substr(binCut).match(/(^|\/)\./)
-    }).forEach(function (filename) {
-      var key = filename.substr(binCut)
-                        .replace(/\.(js|node)$/, '')
-        , val = filename.substr(cut)
-      if (key.length && val.length) pkg.bin[key] = val
-    })
-    log.silly("loadDefaults", pkg._id, "bin", pkg.bin)
-    cb(null, pkg)
-  })
-}}
diff --git a/deps/npm/lib/utils/read-json.js b/deps/npm/lib/utils/read-json.js
deleted file mode 100644 (file)
index 146f460..0000000
+++ /dev/null
@@ -1,570 +0,0 @@
-
-module.exports = readJson
-readJson.processJson = processJson
-readJson.unParsePeople = unParsePeople
-readJson.parsePeople = parsePeople
-readJson.clearCache = clearCache
-
-var fs = require("graceful-fs")
-  , semver = require("semver")
-  , path = require("path")
-  , log = require("npmlog")
-  , npm = require("../npm.js")
-  , cache = {}
-  , timers = {}
-  , loadPackageDefaults = require("./load-package-defaults.js")
-
-function readJson (jsonFile, opts, cb) {
-  if (typeof cb !== "function") cb = opts, opts = {}
-  if (cache.hasOwnProperty(jsonFile)) {
-    log.verbose("json from cache", jsonFile)
-    return cb(null, cache[jsonFile])
-  }
-  log.verbose("read json", jsonFile)
-
-  opts.file = jsonFile
-
-  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) {
-    wscript = opts.wscript
-    next()
-  } else fs.readFile( path.join(path.dirname(jsonFile), "wscript")
-                    , function (er, data) {
-    if (er) opts.wscript = false
-    else opts.wscript = !!(data.toString().match(/(^|\n)def build\b/)
-                           && data.toString().match(/(^|\n)def configure\b/))
-    wscript = opts.wscript
-    next()
-  })
-
-  if (opts.contributors !== null && opts.contributors !== undefined) {
-    contributors = opts.contributors
-    next()
-  } else fs.readFile( path.join(path.dirname(jsonFile), "AUTHORS")
-                    , function (er, data) {
-    if (er) opts.contributors = false
-    else {
-      data = data.toString().split(/\r?\n/).map(function (l) {
-        l = l.trim().split("#").shift()
-        return l
-      }).filter(function (l) { return l })
-      opts.contributors = data
-    }
-    contributors = opts.contributors
-    next()
-  })
-
-  if (opts.serverjs !== null && opts.serverjs !== undefined) {
-    serverjs = opts.serverjs
-    next()
-  } else fs.stat( path.join(path.dirname(jsonFile), "server.js")
-                , function (er, st) {
-    if (er) opts.serverjs = false
-    else opts.serverjs = st.isFile()
-    serverjs = opts.serverjs
-    next()
-  })
-
-  function next () {
-    if (wscript === null ||
-        contributors === null ||
-        gypfile === null ||
-        serverjs === null) {
-      return
-    }
-
-    // XXX this api here is insane.  being internal is no excuse.
-    // please refactor.
-    var thenLoad = 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") {
-    var thing = cb, cb = null
-    return P(null, thing)
-  } else return P
-
-  function P (er, thing) {
-    if (er) {
-      if (cb) return cb(er, thing)
-      throw er
-    }
-    if (typeof thing === "object" && !Buffer.isBuffer(thing)) {
-      return processObject(opts, cb)(er, thing)
-    } else {
-      return processJsonString(opts, cb)(er, thing)
-    }
-  }
-}
-
-function processJsonString (opts, cb) { return function (er, jsonString) {
-  if (er) return cb(er, jsonString)
-  jsonString += ""
-  var json
-  try {
-    json = JSON.parse(jsonString)
-  } catch (ex) {
-    if (opts.file && opts.file.indexOf(npm.dir) === 0) {
-      try {
-        json = require("vm").runInNewContext("(\n"+jsonString+"\n)")
-        log.error("Error parsing json", opts.file, ex)
-      } catch (ex2) {
-        return jsonParseFail(ex, opts.file, cb)
-      }
-    } else {
-      return jsonParseFail(ex, opts.file, cb)
-    }
-  }
-  return processObject(opts, cb)(er, json)
-}}
-
-
-function jsonParseFail (ex, file, cb) {
-  var e = new Error(
-    "Failed to parse json\n"+ex.message)
-  e.code = "EJSONPARSE"
-  e.file = file
-  if (cb) return cb(e)
-  throw e
-}
-
-// a warning for deprecated or likely-incorrect fields
-var typoWarned = {}
-function typoWarn (json) {
-  if (typoWarned[json._id]) return
-  typoWarned[json._id] = true
-
-  if (json.modules) {
-    log.verbose("package.json", "'modules' object is deprecated", json._id)
-    delete json.modules
-  }
-
-  // http://registry.npmjs.org/-/fields
-  var typos = { "dependancies": "dependencies"
-              , "dependecies": "dependencies"
-              , "depdenencies": "dependencies"
-              , "devEependencies": "devDependencies"
-              , "depends": "dependencies"
-              , "dev-dependencies": "devDependencies"
-              , "devDependences": "devDependencies"
-              , "devDepenencies": "devDependencies"
-              , "devdependencies": "devDependencies"
-              , "repostitory": "repository"
-              , "prefereGlobal": "preferGlobal"
-              , "hompage": "homepage"
-              , "hampage": "homepage" // XXX maybe not a typo, just delicious?
-              , "autohr": "author"
-              , "autor": "author"
-              , "contributers": "contributors"
-              , "publicationConfig": "publishConfig"
-              }
-
-  Object.keys(typos).forEach(function (d) {
-    if (json.hasOwnProperty(d)) {
-      log.warn( json._id, "package.json: '" + d + "' should probably be '"
-              + typos[d] + "'" )
-    }
-  })
-
-  // bugs typos
-  var bugsTypos = { "web": "url"
-                  , "name": "url"
-                  }
-
-  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]
-      }
-    })
-  }
-
-  // script typos
-  var scriptTypos = { "server": "start" }
-  if (json.scripts) Object.keys(scriptTypos).forEach(function (d) {
-    if (json.scripts.hasOwnProperty(d)) {
-      log.warn( json._id
-              , "package.json: scripts['" + d + "'] should probably be "
-              + "scripts['" + scriptTypos[d] + "']" )
-    }
-  })
-}
-
-
-function processObject (opts, cb) { return function (er, json) {
-  // json._npmJsonOpts = opts
-  if (npm.config.get("username")) {
-    json._npmUser = { name: npm.config.get("username")
-                    , email: npm.config.get("email") }
-  }
-
-  // slashes would be a security risk.
-  // anything else will just fail harmlessly.
-  if (!json.name) {
-    var e = new Error("No 'name' field found in package.json")
-    if (cb) return cb(e)
-    throw e
-  }
-  json.name = json.name.trim()
-  if (json.name.charAt(0) === "." || json.name.match(/[\/@\s\+%:]/)) {
-    var msg = "Invalid name: "
-            + JSON.stringify(json.name)
-            + " may not start with '.' or contain %/@+: or whitespace"
-      , e = new Error(msg)
-    if (cb) return cb(e)
-    throw e
-  }
-  if (json.name.toLowerCase() === "node_modules") {
-    var msg = "Invalid package name: node_modules"
-      , e = new Error(msg)
-    if (cb) return cb(e)
-    throw e
-  }
-  if (json.name.toLowerCase() === "favicon.ico") {
-    var msg = "Sorry, favicon.ico is a picture, not a package."
-      , e = new Error(msg)
-    if (cb) return cb(e)
-    throw e
-  }
-
-  if (json.repostories) {
-    var msg = "'repositories' (plural) No longer supported.\n"
-            + "Please pick one, and put it in the 'repository' field."
-      , e = new Error(msg)
-    // uncomment once this is no longer an issue.
-    // if (cb) return cb(e)
-    // throw e
-    log.error("json", "incorrect json: "+json.name, msg)
-    json.repostory = json.repositories[0]
-    delete json.repositories
-  }
-
-  if (json.repository) {
-    if (typeof json.repository === "string") {
-      json.repository = { type : "git"
-                        , url : json.repository }
-    }
-    var repo = json.repository.url || ""
-    repo = repo.replace(/^(https?|git):\/\/[^\@]+\@github.com/
-                       ,'$1://github.com')
-    if (json.repository.type === "git"
-        && ( repo.match(/^https?:\/\/github.com/)
-          || repo.match(/github.com\/[^\/]+\/[^\/]+\/?$/)
-             && !repo.match(/\.git$/)
-        )) {
-      repo = repo.replace(/^https?:\/\/github.com/, 'git://github.com')
-      if (!repo.match(/\.git$/)) {
-        repo = repo.replace(/\/?$/, '.git')
-      }
-    }
-    if (repo.match(/github\.com\/[^\/]+\/[^\/]+\/?$/)
-        && repo.match(/\.git\.git$/)) {
-      log.warn(json._id, "Probably broken git url", repo)
-    }
-    json.repository.url = repo
-  }
-
-  var files = json.files
-  if (files && !Array.isArray(files)) {
-    log.warn(json._id, "Invalid 'files' member.  See 'npm help json'", files)
-    delete json.files
-  }
-
-  var kw = json.keywords
-  if (typeof kw === "string") {
-    kw = kw.split(/,\s+/)
-    json.keywords = kw
-  }
-
-  json._id = json.name+"@"+json.version
-
-  var scripts = json.scripts || {}
-
-  // if it has a bindings.gyp, then build with node-gyp
-  if (opts.gypfile && !json.prebuilt) {
-    log.verbose(json._id, "has bindings.gyp", [json.prebuilt, opts])
-    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._id, "has wscript", [json.prebuilt, opts])
-    if (!scripts.install && !scripts.preinstall) {
-      // don't fail if it was unexpected, just try.
-      scripts.preinstall = "node-waf clean || (exit 0); node-waf configure build"
-      json.scripts = scripts
-    }
-  }
-
-  // if it has an AUTHORS, then credit them
-  if (opts.contributors && Array.isArray(opts.contributors)
-      && opts.contributors.length) {
-    json.contributors = opts.contributors
-  }
-
-  // if it has a server.js, then start it.
-  if (opts.serverjs && !scripts.start) {
-    scripts.start = "node server.js"
-    json.scripts = scripts
-  }
-
-  if (!(semver.valid(json.version))) {
-    var m
-    if (!json.version) {
-      m = "'version' field missing\n"
-    } else {
-      m = "Invalid 'version' field: "+json.version+"\n"
-    }
-
-    m += "'version' Must be X.Y.Z, with an optional trailing tag.\n"
-      + "See the section on 'version' in `npm help json`"
-
-    var e = new Error(m)
-    if (cb) return cb(e)
-    throw e
-  }
-  json.version = semver.clean(json.version)
-
-  if (json.bin && typeof json.bin === "string") {
-    var b = {}
-    b[ json.name ] = json.bin
-    json.bin = b
-  }
-
-  if (json.bundledDependencies && !json.bundleDependencies) {
-    json.bundleDependencies = json.bundledDependencies
-    delete json.bundledDependencies
-  }
-
-  if (json.bundleDependencies && !Array.isArray(json.bundleDependencies)) {
-    var e = new Error("bundleDependencies must be an array.\n"
-                     +"See `npm help json`")
-    if (cb) return cb(e)
-    throw e
-  }
-
-  if (json["dev-dependencies"] && !json.devDependencies) {
-    json.devDependencies = json["dev-dependencies"]
-    delete json["dev-dependencies"]
-  }
-
-  ; [ "dependencies"
-    , "devDependencies"
-    , "optionalDependencies"
-    ].forEach(function (d) {
-      json[d] = json.hasOwnProperty(d)
-              ? depObjectify(json[d], d, json._id)
-              : {}
-    })
-
-  // always merge optionals into deps
-  Object.keys(json.optionalDependencies).forEach(function (d) {
-    json.dependencies[d] = json.optionalDependencies[d]
-  })
-
-  if (opts.dev
-      || npm.config.get("dev")
-      || npm.config.get("npat")) {
-    Object.keys(json.devDependencies || {}).forEach(function (d) {
-      json.dependencies[d] = json.devDependencies[d]
-    })
-  }
-
-  typoWarn(json)
-
-  json = testEngine(json)
-  json = parsePeople(unParsePeople(json))
-  if ( json.bugs ) json.bugs = parsePerson(unParsePerson(json.bugs))
-  json._npmVersion = npm.version
-  json._nodeVersion = process.version
-  if (opts.file) {
-    log.verbose("caching json", opts.file)
-    cache[opts.file] = json
-    // arbitrary
-    var keys = Object.keys(cache)
-      , l = keys.length
-    if (l > 10000) for (var i = 0; i < l - 5000; i ++) {
-      delete cache[keys[i]]
-    }
-  }
-  if (cb) cb(null,json)
-  return json
-}}
-
-var depObjectifyWarn = {}
-function depObjectify (deps, d, id) {
-  if (!deps) return {}
-  if (typeof deps === "string") {
-    deps = deps.trim().split(/[\n\r\s\t ,]+/)
-  }
-  if (!Array.isArray(deps)) return deps
-  var o = {}
-  deps.forEach(function (d) {
-    d = d.trim().split(/(:?[@\s><=])/)
-    o[d.shift()] = d.join("").trim().replace(/^@/, "")
-  })
-  return o
-}
-
-function testEngine (json) {
-  // if engines is empty, then assume that node is allowed.
-  if ( !json.engines
-      || Array.isArray(json.engines)
-        && !json.engines.length
-      || typeof json.engines === "object"
-        && !Object.keys(json.engines).length
-      ) {
-    json.engines = { "node" : "*" }
-  }
-  if (typeof json.engines === "string") {
-    if (semver.validRange(json.engines) !== null) {
-      json.engines = { "node" : json.engines }
-    } else json.engines = [ json.engines ]
-  }
-
-  var nodeVer = npm.config.get("node-version")
-    , ok = false
-  if (nodeVer) nodeVer = nodeVer.replace(/\+$/, '')
-  if (Array.isArray(json.engines)) {
-    // Packages/1.0 commonjs style, with an array.
-    // hack it to just hang a "node" member with the version range,
-    // then do the npm-style check below.
-    for (var i = 0, l = json.engines.length; i < l; i ++) {
-      var e = json.engines[i].trim()
-      if (e.substr(0, 4) === "node") {
-        json.engines.node = e.substr(4)
-      } else if (e.substr(0, 3) === "npm") {
-        json.engines.npm = e.substr(3)
-      }
-    }
-  }
-  if (json.engines.node === "") json.engines.node = "*"
-  if (json.engines.node && null === semver.validRange(json.engines.node)) {
-    log.warn( json._id
-            , "Invalid range in engines.node.  Please see `npm help json`"
-            , json.engines.node )
-  }
-
-  if (nodeVer) {
-    json._engineSupported = semver.satisfies( nodeVer
-                                            , json.engines.node || "null" )
-  }
-  if (json.engines.hasOwnProperty("npm") && json._engineSupported) {
-    json._engineSupported = semver.satisfies(npm.version, json.engines.npm)
-  }
-  return json
-}
-
-function unParsePeople (json) { return parsePeople(json, true) }
-
-function parsePeople (json, un) {
-  var fn = un ? unParsePerson : parsePerson
-  if (json.author) json.author = fn(json.author)
-  ;["maintainers", "contributors"].forEach(function (set) {
-    if (Array.isArray(json[set])) json[set] = json[set].map(fn)
-  })
-  return json
-}
-
-function unParsePerson (person) {
-  if (typeof person === "string") return person
-  var name = person.name || ""
-    , u = person.url || person.web
-    , url = u ? (" ("+u+")") : ""
-    , e = person.email || person.mail
-    , email = e ? (" <"+e+">") : ""
-  return name+email+url
-}
-
-function parsePerson (person) {
-  if (typeof person !== "string") return person
-  var name = person.match(/^([^\(<]+)/)
-    , url = person.match(/\(([^\)]+)\)/)
-    , email = person.match(/<([^>]+)>/)
-    , obj = {}
-  if (name && name[0].trim()) obj.name = name[0].trim()
-  if (email) obj.email = email[1]
-  if (url) obj.url = url[1]
-  return obj
-}
-
-function clearCache (prefix) {
-  if (!prefix) {
-    cache = {}
-    return
-  }
-  Object.keys(cache).forEach(function (c) {
-    if (c.indexOf(prefix) === 0) delete cache[c]
-  })
-}
diff --git a/deps/npm/lib/utils/relativize.js b/deps/npm/lib/utils/relativize.js
deleted file mode 100644 (file)
index 70f2032..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-module.exports = relativize
-
-// return the shortest path between two folders.
-// if the original path is shorter, then use that,
-// unless forceRelative is set to true.
-var path = require("path")
-function relativize (dest, src, forceRelative) {
-  var orig = dest
-  if (!isAbsolute(src)) forceRelative = true
-  else if (!isAbsolute(dest)) return false
-  src = path.resolve(src)
-  dest = path.resolve(dest)
-  if (src === dest) return "."
-  src = src.split(split)
-  dest = dest.split(split)
-  var i = 0
-  while (src[i] === dest[i]) i++
-  if (!forceRelative && i === 1) return orig // nothing in common
-  src.splice(0, i + 1)
-  var dots = [0, i, "."]
-  for (var i = 0, l = src.length; i < l; i ++) dots.push("..")
-  dest.splice.apply(dest, dots)
-  if (dest[0] === "." && dest[1] === "..") dest.shift()
-  dest = dest.join("/")
-  return !forceRelative && orig.length < dest.length ? orig : dest
-}
-
-var split = process.platform === "win32" ? /[\/\\]/ : "/"
-
-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
-}
-
-if (module === require.main) {
-  // from, to, result, relativeForced
-  var assert = require("assert")
-
-  ; [ ["/bar"        ,"/foo"           ,"/bar"          ,"./bar"         ]
-    , ["/foo/baz"    ,"/foo/bar/baz"   ,"../baz"        ,"../baz"        ]
-    , ["/a/d"        ,"/a/b/c/d/e/f"   ,"/a/d"          ,"../../../../d" ]
-    // trailing slashes are ignored.
-    , ["/a/d"        ,"/a/b/c/d/e/"    ,"/a/d"          ,"../../../d"    ]
-    , ["./foo/bar"   ,"./foo/baz"      ,"./bar"         ,"./bar"         ]
-    // force relative when the src is relative.
-    , ["./d"         ,"./a/b/c/d/e"    ,"../../../../d" ,"../../../../d" ]
-    // if src is abs and dest is relative, then fail
-    , ["./d"        ,"/a/b"            ,false           ,false           ]
-    ].forEach(function (test) {
-      var d = test[0]
-        , s = test[1]
-        , r = test[2]
-        , rr = test[3]
-        , ra = relativize(d, s)
-        , rra = relativize(d, s, true)
-      console.log([d, s, r, rr], [ra, rra], [r === ra, rr === rra])
-      assert.equal(r, ra)
-      assert.equal(rr, rra)
-      if (!r) return
-      // contract: this is the relative path from absolute A to absolute B
-      var ad = path.resolve(d)
-        , as = path.resolve(s)
-        , dir = path.dirname(as)
-      assert.equal(path.resolve(dir, rr), ad)
-      assert.equal(path.resolve(dir, r), ad)
-    })
-
-  console.log("ok")
-}
index 22a4a85..1fdd9ba 100644 (file)
@@ -7,8 +7,7 @@ var npm = require("../npm.js")
   , log = require("npmlog")
   , uidNumber = require("uid-number")
   , rm = require("rimraf")
-  , readJson = require("./read-json.js")
-  , relativize = require("./relativize.js")
+  , readJson = require("read-package-json")
   , cache = require("../cache.js")
   , myUid = process.getuid && process.getuid()
   , myGid = process.getgid && process.getgid()
index 3532976..d1a6b56 100644 (file)
@@ -3,7 +3,6 @@
 module.exports = version
 
 var exec = require("./utils/exec.js")
-  , readJson = require("./utils/read-json.js")
   , semver = require("semver")
   , path = require("path")
   , fs = require("graceful-fs")
@@ -21,20 +20,25 @@ version.usage = "npm version <newversion> [--message commit-message]"
 
 function version (args, cb) {
   if (args.length !== 1) return cb(version.usage)
-  readJson(path.join(process.cwd(), "package.json"), function (er, data) {
+  fs.readFile(path.join(process.cwd(), "package.json"), function (er, data) {
     if (er) {
       log.error("version", "No package.json found")
       return cb(er)
     }
+
+    try {
+      data = JSON.parse(data)
+    } catch (er) {
+      log.error("version", "Bad package.json data")
+      return cb(er)
+    }
+
                var newVer = semver.valid(args[0])
                if (!newVer) newVer = semver.inc(data.version, args[0])
                if (!newVer) return cb(version.usage)
     if (data.version === newVer) return cb(new Error("Version not changed"))
     data.version = newVer
-    Object.keys(data).forEach(function (k) {
-      if (k.charAt(0) === "_") delete data[k]
-    })
-    readJson.unParsePeople(data)
+
     fs.stat(path.join(process.cwd(), ".git"), function (er, s) {
       var doGit = !er && s.isDirectory()
       if (!doGit) return write(data, cb)
@@ -42,6 +46,7 @@ function version (args, cb) {
     })
   })
 }
+
 function checkGit (data, cb) {
   exec( npm.config.get("git"), ["status", "--porcelain"], process.env, false
       , function (er, code, stdout, stderr) {
@@ -64,6 +69,7 @@ function checkGit (data, cb) {
     })
   })
 }
+
 function write (data, cb) {
   fs.writeFile( path.join(process.cwd(), "package.json")
               , new Buffer(JSON.stringify(data, null, 2) + "\n")
index 6ffde4c..e291031 100644 (file)
@@ -46,7 +46,6 @@ var npm = require("./npm.js")
   , util = require("util")
   , output
   , semver = require("semver")
-  , readJson = require("./utils/read-json.js")
 
 function view (args, silent, cb) {
   if (typeof cb !== "function") cb = silent, silent = false
@@ -76,11 +75,6 @@ function view (args, silent, cb) {
     }
 
     Object.keys(versions).forEach(function (v) {
-      try {
-        versions[v] = readJson.processJson(versions[v])
-      } catch (ex) {
-        delete versions[v]
-      }
       if (semver.satisfies(v, version)) args.forEach(function (args) {
         // remove readme unless we asked for it
         if (-1 === args.indexOf("readme")) {
index 69ae988..cd10f45 100644 (file)
@@ -281,7 +281,7 @@ npm install sax \-\-force
 .
 .P
 The \fB\-\-global\fR argument will cause npm to install the package globally
-rather than locally\.  See \fBnpm help global\fR\|\.
+rather than locally\.  See \fBnpm help folders\fR\|\.
 .
 .P
 The \fB\-\-link\fR argument will cause npm to link global installs into the
index 553b4bf..3e6eb51 100644 (file)
@@ -14,7 +14,7 @@ npm <command> [args]
 .fi
 .
 .SH "VERSION"
-1.1.25
+1.1.26
 .
 .SH "DESCRIPTION"
 npm is the package manager for the Node JavaScript platform\.  It puts
index fbb2b86..f88e36e 100644 (file)
@@ -21,7 +21,7 @@ npm\.load(configObject, function (er, npm) {
 .fi
 .
 .SH "VERSION"
-1.1.25
+1.1.26
 .
 .SH "DESCRIPTION"
 This is the API documentation for npm\.
@@ -206,7 +206,7 @@ Glob.prototype._finish = function () {
         return m.replace(/\/$/, "")
       }
       return m
-    })
+    }, this)
   }
 
   if (this.debug) console.error("emitting end", all)
diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json
new file mode 100644 (file)
index 0000000..3531e74
--- /dev/null
@@ -0,0 +1,35 @@
+{
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "name": "glob",
+  "description": "a little globber",
+  "version": "3.1.10",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/node-glob.git"
+  },
+  "main": "glob.js",
+  "engines": {
+    "node": "*"
+  },
+  "dependencies": {
+    "minimatch": "0.2",
+    "graceful-fs": "~1.1.2",
+    "inherits": "1"
+  },
+  "devDependencies": {
+    "tap": "~0.2.3",
+    "mkdirp": "0",
+    "rimraf": "1"
+  },
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "license": "BSD",
+  "readme": "# Glob\n\nThis is a glob implementation in JavaScript.  It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n  // files is an array of filenames.\n  // If the `nonull` option is set, and nothing\n  // was found, then files is [\"**/*.js\"]\n  // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n  * `err` {Error | null}\n  * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n  * `err` {Error | null}\n  * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered.  When an error is encountered, the\n  glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`.  There\n  is no way at this time to continue a glob search after aborting, but\n  you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n  matches found.  If the `nonull` option is set, and no match was found,\n  then the `matches` list contains the original pattern.  The matches\n  are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n  any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior.  Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search.  Defaults\n  to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n  onto.  Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n  systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n  \"mounted\" onto the root setting, so that a valid filesystem path is\n  returned.  Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches.  Note that this\n  requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results.  This reduces performance\n  somewhat, and is completely unnecessary, unless `readdir` is presumed\n  to be an untrustworthy indicator of file existence.  It will cause\n  ELOOP to be triggered one level sooner in the case of cyclical\n  symbolic links.\n* `silent` When an unusual error is encountered\n  when attempting to read a directory, a warning will be printed to\n  stderr.  Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n  when attempting to read a directory, the process will just continue on\n  in search of other matches.  Set the `strict` option to raise an error\n  in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n  unnecessary stat calls.  While it should not normally be necessary to\n  set this, you may pass the statCache from one glob() call to the\n  options object of another, if you know that the filesystem will not\n  change between calls.  (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n  same file showing up multiple times in the result set.  By default,\n  this implementation prevents duplicates in the result set.\n  Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n  containing the pattern itself.  This is the default in glob(3).\n* `nocase` Perform a case-insensitive match.  Note that case-insensitive\n  filesystems will sometimes result in glob returning results that are\n  case-insensitively matched anyway, since readdir and stat will not\n  raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated.  Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally.  This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything.  Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set.  This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.  **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes.  For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`.  This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern.  Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity.  Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation.  You must use\nforward-slashes **only** in glob expressions.  Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`.  On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead.  However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n",
+  "_id": "glob@3.1.10",
+  "_from": "glob@~3.1.9"
+}
diff --git a/deps/npm/node_modules/lru-cache/AUTHORS b/deps/npm/node_modules/lru-cache/AUTHORS
new file mode 100644 (file)
index 0000000..d8e2061
--- /dev/null
@@ -0,0 +1,5 @@
+# Authors, sorted by whether or not they are me
+Isaac Z. Schlueter <i@izs.me>
+Carlos Brito Lage <carlos@carloslage.net>
+Marko Mikulicic <marko.mikulicic@isti.cnr.it>
+Trent Mick <trentm@gmail.com>
index 1f5f155..f342b51 100644 (file)
@@ -5,8 +5,22 @@ A cache object that deletes the least-recently-used items.
 Usage:
 
     var LRU = require("lru-cache")
-      , cache = LRU(10) // max 10 items. default = Infinity
+      , cache = LRU(10, // max length. default = Infinity
+                    // calculate how "big" each item is
+                    //
+                    // defaults to function(){return 1}, ie, just limit
+                    // the item count, without any knowledge as to their
+                    // relative size.
+                    function (item) { return item.length })
+
     cache.set("key", "value")
     cache.get("key") // "value"
 
+    cache.reset()    // empty the cache
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
 RTFS for more info.
index ca7a2b3..1bd4e58 100644 (file)
@@ -11,15 +11,28 @@ function hOP (obj, key) {
   return Object.prototype.hasOwnProperty.call(obj, key)
 }
 
-function LRUCache (maxLength) {
+function naiveLength () { return 1 }
+
+function LRUCache (maxLength, lengthCalculator) {
   if (!(this instanceof LRUCache)) {
-    return new LRUCache(maxLength)
+    return new LRUCache(maxLength, lengthCalculator)
+  }
+
+  if (typeof lengthCalculator !== "function") {
+    lengthCalculator = naiveLength
   }
+  if (!maxLength || !(typeof maxLength === "number") || maxLength <= 0 ) {
+    maxLength = Infinity
+  }
+
+
   var cache = {} // hash of items by key
     , lruList = {} // list of items in order of use recency
     , lru = 0 // least recently used
     , mru = 0 // most recently used
     , length = 0 // number of items in the list
+    , itemCount = 0
+
 
   // resize the cache when the maxLength changes.
   Object.defineProperty(this, "maxLength",
@@ -34,35 +47,77 @@ function LRUCache (maxLength) {
     , enumerable : true
     })
 
-  this.maxLength = maxLength
+  // resize the cache when the lengthCalculator changes.
+  Object.defineProperty(this, "lengthCalculator",
+    { set : function (lC) {
+        if (typeof lC !== "function") {
+          lengthCalculator = naiveLength
+          length = itemCount
+          Object.keys(cache).forEach(function (key) {
+            cache[key].length = 1
+          })
+        } else {
+          lengthCalculator = lC
+          length = 0
+          Object.keys(cache).forEach(function (key) {
+            cache[key].length = lengthCalculator(cache[key].value)
+            length += cache[key].length
+          })
+        }
+
+        if (length > maxLength) trim()
+      }
+    , get : function () { return lengthCalculator }
+    , enumerable : true
+    })
 
   Object.defineProperty(this, "length",
     { get : function () { return length }
     , enumerable : true
     })
 
+
+  Object.defineProperty(this, "itemCount",
+    { get : function () { return itemCount }
+    , enumerable : true
+    })
+
   this.reset = function () {
     cache = {}
     lruList = {}
     lru = 0
     mru = 0
     length = 0
+    itemCount = 0
+  }
+
+  // Provided for debugging/dev purposes only. No promises whatsoever that
+  // this API stays stable.
+  this.dump = function () {
+    return cache
   }
 
   this.set = function (key, value) {
     if (hOP(cache, key)) {
       this.get(key)
       cache[key].value = value
-      return undefined
+      return
     }
-    var hit = {key:key, value:value, lu:mru++}
+
+    var hit = {key:key, value:value, lu:mru++, length:lengthCalculator(value)}
+
+    // oversized objects fall out of cache automatically.
+    if (hit.length > maxLength) return
+
+    length += hit.length
     lruList[hit.lu] = cache[key] = hit
-    length ++
+    itemCount ++
+
     if (length > maxLength) trim()
   }
 
   this.get = function (key) {
-    if (!hOP(cache, key)) return undefined
+    if (!hOP(cache, key)) return
     var hit = cache[key]
     delete lruList[hit.lu]
     if (hit.lu === lru) lruWalk()
@@ -72,27 +127,28 @@ function LRUCache (maxLength) {
   }
 
   this.del = function (key) {
-    if (!hOP(cache, key)) return undefined
+    if (!hOP(cache, key)) return
     var hit = cache[key]
     delete cache[key]
     delete lruList[hit.lu]
     if (hit.lu === lru) lruWalk()
-    length --
+    length -= hit.length
+    itemCount --
   }
 
   function lruWalk () {
     // lru has been deleted, hop up to the next hit.
-    lru = Object.keys(lruList).shift()
+    lru = Object.keys(lruList)[0]
   }
 
   function trim () {
-    if (length <= maxLength) return undefined
-    var prune = Object.keys(lruList).slice(0, length - maxLength)
-    for (var i = 0, l = (length - maxLength); i < l; i ++) {
+    if (length <= maxLength) return
+    var prune = Object.keys(lruList)
+    for (var i = 0; i < prune.length && length > maxLength; i ++) {
+      length -= lruList[prune[i]].length
       delete cache[ lruList[prune[i]].key ]
       delete lruList[prune[i]]
     }
-    length = maxLength
     lruWalk()
   }
 }
index 676ec3a..7240c92 100644 (file)
@@ -1,13 +1,57 @@
-{ "name": "lru-cache"
-, "description": "A cache object that deletes the least-recently-used items."
-, "version": "1.0.5"
-, "author": "Isaac Z. Schlueter <i@izs.me>"
-, "scripts": { "test": "tap test" }
-, "main": "lib/lru-cache.js"
-, "repository": "git://github.com/isaacs/node-lru-cache.git"
-, "devDependencies": { "tap": "0.1" }
-, "license":
-  { "type": "MIT"
-  , "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
-  }
+{
+  "name": "lru-cache",
+  "description": "A cache object that deletes the least-recently-used items.",
+  "version": "1.1.0",
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me"
+  },
+  "scripts": {
+    "test": "tap test"
+  },
+  "main": "lib/lru-cache.js",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/node-lru-cache.git"
+  },
+  "devDependencies": {
+    "tap": ""
+  },
+  "license": {
+    "type": "MIT",
+    "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
+  },
+  "_npmUser": {
+    "name": "isaacs",
+    "email": "i@izs.me"
+  },
+  "_id": "lru-cache@1.1.0",
+  "contributors": [
+    {
+      "name": "Isaac Z. Schlueter",
+      "email": "i@izs.me"
+    },
+    {
+      "name": "Carlos Brito Lage",
+      "email": "carlos@carloslage.net"
+    },
+    {
+      "name": "Marko Mikulicic",
+      "email": "marko.mikulicic@isti.cnr.it"
+    },
+    {
+      "name": "Trent Mick",
+      "email": "trentm@gmail.com"
+    }
+  ],
+  "dependencies": {},
+  "optionalDependencies": {},
+  "engines": {
+    "node": "*"
+  },
+  "_engineSupported": true,
+  "_npmVersion": "1.1.25",
+  "_nodeVersion": "v0.7.10-pre",
+  "_defaultsLoaded": true,
+  "_from": "lru-cache@1"
 }
index 1ca0810..0087359 100644 (file)
@@ -1,4 +1,32 @@
-module.exports = minimatch
+;(function (require, exports, module, platform) {
+
+if (module) module.exports = minimatch
+else exports.minimatch = minimatch
+
+if (!require) {
+  require = function (id) {
+    switch (id) {
+      case "path": return { basename: function (f) {
+        f = f.split(/[\/\\]/)
+        var e = f.pop()
+        if (!e) e = f.pop()
+        return e
+      }}
+      case "lru-cache": return function LRUCache () {
+        // not quite an LRU, but still space-limited.
+        var cache = {}
+        var cnt = 0
+        this.set = function (k, v) {
+          cnt ++
+          if (cnt >= 100) cache = {}
+          cache[k] = v
+        }
+        this.get = function (k) { return cache[k] }
+      }
+    }
+  }
+}
+
 minimatch.Minimatch = Minimatch
 
 var LRU = require("lru-cache")
@@ -55,6 +83,41 @@ function filter (pattern, options) {
   }
 }
 
+function ext (a, b) {
+  a = a || {}
+  b = b || {}
+  var t = {}
+  Object.keys(b).forEach(function (k) {
+    t[k] = b[k]
+  })
+  Object.keys(a).forEach(function (k) {
+    t[k] = a[k]
+  })
+  return t
+}
+
+minimatch.defaults = function (def) {
+  if (!def || !Object.keys(def).length) return minimatch
+
+  var orig = minimatch
+
+  var m = function minimatch (p, pattern, options) {
+    return orig.minimatch(p, pattern, ext(def, options))
+  }
+
+  m.Minimatch = function Minimatch (pattern, options) {
+    return new orig.Minimatch(pattern, ext(def, options))
+  }
+
+  return m
+}
+
+Minimatch.defaults = function (def) {
+  if (!def || !Object.keys(def).length) return Minimatch
+  return minimatch.defaults(def).Minimatch
+}
+
+
 function minimatch (p, pattern, options) {
   if (typeof pattern !== "string") {
     throw new TypeError("glob pattern string required")
@@ -768,12 +831,9 @@ function match (f, partial) {
 
   var options = this.options
 
-  // first, normalize any slash-separated path parts.
-  // f = path.normalize(f)
-
   // windows: need to use /, not \
   // On other platforms, \ is a valid (albeit bad) filename char.
-  if (process.platform === "win32") {
+  if (platform === "win32") {
     f = f.split("\\").join("/")
   }
 
@@ -984,3 +1044,9 @@ function globUnescape (s) {
 function regExpEscape (s) {
   return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
 }
+
+})( typeof require === "function" ? require : null,
+    this,
+    typeof module === "object" ? module : null,
+    typeof process === "object" ? process.platform : "win32"
+  )
index 1bcb3d4..2f24186 100644 (file)
@@ -6,7 +6,7 @@
   },
   "name": "minimatch",
   "description": "a glob matcher in javascript",
-  "version": "0.2.2",
+  "version": "0.2.5",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/minimatch.git"
@@ -19,7 +19,7 @@
     "node": "*"
   },
   "dependencies": {
-    "lru-cache": "~1.0.5"
+    "lru-cache": "~1"
   },
   "devDependencies": {
     "tap": ""
     "name": "isaacs",
     "email": "i@izs.me"
   },
-  "_id": "minimatch@0.2.2",
+  "_id": "minimatch@0.2.5",
   "optionalDependencies": {},
   "_engineSupported": true,
-  "_npmVersion": "1.1.12",
-  "_nodeVersion": "v0.7.7-pre",
+  "_npmVersion": "1.1.25",
+  "_nodeVersion": "v0.7.10-pre",
   "_defaultsLoaded": true,
-  "_from": "minimatch@0"
+  "_from": "minimatch@~0.2"
 }
index 5f27088..fc6b1e6 100644 (file)
@@ -74,13 +74,15 @@ __Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or
 `-d`) switch when running the either `configure` or `build` command.
 
 
-The "gyp" file
---------------
+The "binding.gyp" file
+----------------------
 
 Previously when node had `node-waf` you had to write a `wscript` file. The
 replacement for that is the `binding.gyp` file, which describes the configuration
-to build your module in a JSON-like format. A barebones `gyp` file appropriate for
-building a node addon looks like:
+to build your module in a JSON-like format. This file gets placed in the root of
+your package, alongside the `package.json` file.
+
+A barebones `gyp` file appropriate for building a node addon looks like:
 
 ``` json
 {
@@ -93,11 +95,12 @@ building a node addon looks like:
 }
 ```
 
-Some additional resources:
+Some additional resources for writing `gyp` files:
 
  * ["Hello World" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)
  * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)
  * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)
+ * ['"binding.gyp" files out in the wild' wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)
 
 
 Commands
index a7347cc..7b7d621 100755 (executable)
@@ -11,9 +11,7 @@ process.title = 'node-gyp'
  */
 
 var gyp = require('../')
-  , inspect = require('util').inspect
-  , ansi = require('ansi')
-  , cursor = ansi(process.stderr)
+var log = require('npmlog')
 
 /**
  * Process and execute the selected commands.
@@ -26,52 +24,10 @@ if (prog.todo.length === 0) {
   return prog.usageAndExit()
 }
 
+log.info('it worked if it ends with', 'ok')
+log.info('using', 'node-gyp@%s', prog.version)
+log.info('using', 'node@%s', process.versions.node)
 
-/**
- * Set up logging handlers.
- */
-
-prog.on('info', function () {
-  cursor.fg.green().write('info ')
-        .fg.grey().write(arguments[0] + ' ')
-        .reset()
-  for (var i=1, l=arguments.length; i<l; i++) {
-    cursor.write(arguments[i] + ' ')
-  }
-  cursor.write('\n')
-})
-
-prog.on('warn', function () {
-  cursor.fg.yellow().bg.red().write('warn')
-        .fg.reset().bg.reset().write(' ')
-        .fg.grey().write(arguments[0])
-        .write(' ')
-        .reset()
-  for (var i=1, l=arguments.length; i<l; i++) {
-    cursor.write(arguments[i] + ' ')
-  }
-  cursor.write('\n')
-})
-
-if (prog.opts.verbose) {
-  prog.on('verbose', function () {
-    cursor.fg.cyan().write('verb ')
-          .fg.grey().write(arguments[0] + ' ')
-          .reset()
-    for (var i=1, l=arguments.length; i<l; i++) {
-      cursor.write(inspect(arguments[i]) + ' ')
-    }
-    cursor.write('\n')
-  })
-}
-
-prog.on('spawn', function (command, args, proc) {
-  cursor.fg.magenta().write('spawn ')
-        .fg.grey().write(command + ' ')
-        .reset().write(inspect(args) + '\n')
-})
-
-prog.info('it worked if it ends with', 'ok')
 
 /**
  * Change dir if -C/--directory was passed.
@@ -83,13 +39,17 @@ if (dir) {
   try {
     var stat = fs.statSync(dir)
     if (stat.isDirectory()) {
-      prog.info('chdir:', dir)
+      log.info('chdir', dir)
       process.chdir(dir)
     } else {
-      prog.warn(dir + ' is not a directory')
+      log.warn('chdir', dir + ' is not a directory')
     }
   } catch (e) {
-    prog.warn('directory:', e.message)
+    if (e.code === 'ENOENT') {
+      log.warn('chdir', dir + ' is not a directory')
+    } else {
+      log.warn('chdir', 'error during chdir() "%s"', e.message)
+    }
   }
 }
 
@@ -101,16 +61,20 @@ function run () {
   if (prog.todo.length === 0) {
     // done!
     completed = true
-    prog.info('done', 'ok')
+    log.info('done', 'ok')
     return
   }
   var command = prog.todo.shift()
+
+  // is this an alias?
+  if (command in prog.aliases) {
+    command = prog.aliases[command]
+  }
+
   prog.commands[command](prog.argv.slice(), function (err) {
     if (err) {
-      cursor.fg.red().write('ERR! ')
-            .fg.reset().write(err.stack + '\n')
-      cursor.fg.red().write('ERR! ')
-            .fg.reset().write('not ok\n')
+      log.error(command + ' error', err.stack)
+      log.error('not ok')
       return process.exit(1)
     }
     if (command == 'list') {
@@ -120,39 +84,31 @@ function run () {
           console.log(version)
         })
       } else {
-        prog.info('No node development files installed. Use `node-gyp install` to install a version.')
+        console.log('No node development files installed. Use `node-gyp install` to install a version.')
       }
     } else if (arguments.length >= 2) {
       console.log.apply(console, [].slice.call(arguments, 1))
     }
+
+    // now run the next command in the queue
     process.nextTick(run)
   })
 }
 
 process.on('exit', function (code) {
   if (!completed && !code) {
-    cursor.fg.red().write('ERR! ')
-          .fg.reset().write('Completion callback never invoked!\n')
-    cursor.fg.red().write('ERR! ')
-          .fg.reset().write('This is a bug in `node-gyp`. Please open an Issue:\n')
-    cursor.fg.red().write('ERR! ')
-          .fg.reset().write('  https://github.com/TooTallNate/node-gyp/issues\n')
-    cursor.fg.red().write('ERR! ')
-          .fg.reset().write('not ok\n')
+    log.error('Completion callback never invoked!')
+    log.error('This is a bug in `node-gyp`, please file an Issue:')
+    log.error('', '    https://github.com/TooTallNate/node-gyp/issues')
+    log.error('not ok')
     process.exit(6)
   }
 })
 
 process.on('uncaughtException', function (err) {
-  cursor.fg.red().write('ERR! ')
-        .fg.reset().write('UNCAUGHT EXCEPTION:\n')
-  cursor.fg.red().write('ERR! ')
-        .fg.reset().write(err.stack + '\n')
-  cursor.fg.red().write('ERR! ')
-        .fg.reset().write('This is a bug in `node-gyp`. Please open an Issue:\n')
-  cursor.fg.red().write('ERR! ')
-        .fg.reset().write('  https://github.com/TooTallNate/node-gyp/issues\n')
-  cursor.fg.red().write('ERR! ')
-        .fg.reset().write('not ok\n')
-  process.exit(1)
+  log.error('UNCAUGHT EXCEPTION', err.stack)
+  log.error('This is a bug in `node-gyp`, please file an Issue:')
+  log.error('', '    https://github.com/TooTallNate/node-gyp/issues')
+  log.error('not ok')
+  process.exit(7)
 })
index 8b3e7c2..ca0cf9f 100644 (file)
             'cflags': [ '-m32' ],
             'ldflags': [ '-m32' ],
           }],
+          [ 'target_arch=="x64"', {
+            'cflags': [ '-m64' ],
+            'ldflags': [ '-m64' ],
+          }],
           [ 'OS=="linux"', {
             'ldflags': [ '-rdynamic' ],
           }],
index eb5e730..c29b97e 100644 (file)
@@ -8,8 +8,9 @@ module.exports = exports = build
 var fs = require('graceful-fs')
   , path = require('path')
   , glob = require('glob')
+  , log = require('npmlog')
   , which = require('which')
-  , mkdirp = require('./util/mkdirp')
+  , mkdirp = require('mkdirp')
   , win = process.platform == 'win32'
   , openbsd = process.platform == 'openbsd'
 
@@ -17,7 +18,6 @@ exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the mod
 
 function build (gyp, argv, callback) {
 
-  gyp.verbose('build args', argv)
   var makeCommand = openbsd ? 'gmake' : 'make'
   var command = win ? 'msbuild' : makeCommand
     , buildDir = path.resolve('build')
@@ -59,9 +59,9 @@ function build (gyp, argv, callback) {
         buildType = 'Release'
       }
 
-      gyp.verbose('build type:', buildType)
-      gyp.verbose('architecture:', arch)
-      gyp.verbose('node dev dir:', nodeDir)
+      log.verbose('build type:', buildType)
+      log.verbose('architecture:', arch)
+      log.verbose('node dev dir:', nodeDir)
 
       if (win) {
         findSolutionFile()
@@ -82,7 +82,7 @@ function build (gyp, argv, callback) {
         return callback(new Error('Could not find *.sln file. Did you run "configure"?'))
       }
       guessedSolution = files[0]
-      gyp.verbose('found first Solution file', guessedSolution)
+      log.verbose('found first Solution file', guessedSolution)
       doWhich()
     })
   }
@@ -104,7 +104,7 @@ function build (gyp, argv, callback) {
         }
         return
       }
-      gyp.verbose('`which` succeeded for `' + command + '`', execPath)
+      log.verbose('`which` succeeded for `' + command + '`', execPath)
       copyNodeLib()
     })
   }
@@ -114,7 +114,7 @@ function build (gyp, argv, callback) {
    */
 
   function guessMsbuild () {
-    gyp.verbose('could not find "msbuild.exe". guessing location')
+    log.verbose('could not find "msbuild.exe". guessing location')
     // This is basically just hard-coded. If this causes problems
     // then we'll think of something more clever.
     var windir = process.env.WINDIR || process.env.SYSTEMROOT || 'C:\\WINDOWS'
@@ -149,9 +149,10 @@ function build (gyp, argv, callback) {
 
     mkdirp(buildDir, function (err, isNew) {
       if (err) return callback(err)
-      gyp.verbose('"' + buildType + '" dir needed to be created?', isNew)
+      log.verbose('"' + buildType + '" dir needed to be created?', isNew)
       var rs = fs.createReadStream(archNodeLibPath)
         , ws = fs.createWriteStream(buildNodeLibPath)
+      log.verbose('copying "node.lib" for ' + arch, buildNodeLibPath)
       rs.pipe(ws)
       rs.on('error', callback)
       ws.on('error', callback)
@@ -166,10 +167,11 @@ function build (gyp, argv, callback) {
   function doBuild () {
 
     // Enable Verbose build
-    if (!win && gyp.opts.verbose) {
+    var verbose = log.levels[log.level] <= log.levels.verbose
+    if (!win && verbose) {
       argv.push('V=1')
     }
-    if (win && !gyp.opts.verbose) {
+    if (win && !verbose) {
       argv.push('/clp:Verbosity=minimal')
     }
 
index 1e56114..e69164d 100644 (file)
@@ -8,6 +8,7 @@ exports.usage = 'Removes any generated build files and the "out" dir'
  */
 
 var rm = require('rimraf')
+var log = require('npmlog')
 
 
 function clean (gyp, argv, callback) {
@@ -15,7 +16,7 @@ function clean (gyp, argv, callback) {
   // Remove the 'build' dir
   var buildDir = 'build'
 
-  gyp.verbose('removing "build" directory')
+  log.verbose('clean', 'removing "%s" directory', buildDir)
   rm(buildDir, callback)
 
 }
index ca0da39..a320f20 100644 (file)
@@ -8,9 +8,10 @@ module.exports = exports = configure
 var fs = require('graceful-fs')
   , path = require('path')
   , glob = require('glob')
+  , log = require('npmlog')
   , which = require('which')
   , semver = require('semver')
-  , mkdirp = require('./util/mkdirp')
+  , mkdirp = require('mkdirp')
   , win = process.platform == 'win32'
 
 exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module'
@@ -26,7 +27,7 @@ function configure (gyp, argv, callback) {
 
   // Make sure that Python is in the $PATH
   function checkPython () {
-    gyp.verbose('checking for Python executable "' + python + '" in the PATH')
+    log.verbose('check python', 'checking for Python executable "%s" in the PATH', python)
     which(python, function (err, execPath) {
       if (err) {
         if (win) {
@@ -36,7 +37,7 @@ function configure (gyp, argv, callback) {
         }
         return
       }
-      gyp.verbose('`which` succeeded for `' + python + '`', execPath)
+      log.verbose('`which` succeeded for `' + python + '`', execPath)
       // TODO: ensure compatible Python version
       getNodeDir()
     })
@@ -45,13 +46,13 @@ function configure (gyp, argv, callback) {
   // Called on Windows when "python" isn't available in the current $PATH.
   // We're gonna glob C:\python2*
   function guessPython () {
-    gyp.verbose('could not find "' + python + '". guessing location')
+    log.verbose('could not find "' + python + '". guessing location')
     var rootDir = process.env.HOMEDRIVE || process.env.SystemDrive || 'C:\\'
     if (rootDir[rootDir.length - 1] !== '\\') {
       rootDir += '\\'
     }
     var pythonPath = path.resolve(rootDir, 'Python27', 'python.exe')
-    gyp.verbose('ensuring that file exists:', pythonPath)
+    log.verbose('ensuring that file exists:', pythonPath)
     fs.stat(pythonPath, function (err, stat) {
       if (err) {
         if (err.code == 'ENOENT') {
@@ -87,7 +88,7 @@ function configure (gyp, argv, callback) {
         nodeDir = nodeDir.replace(/^~/, process.env.HOME)
       }
 
-      gyp.verbose('compiling against specified --nodedir dev files', nodeDir)
+      log.verbose('get node dir', 'compiling against specified --nodedir dev files: %s', nodeDir)
       createBuildDir()
 
     } else {
@@ -98,11 +99,11 @@ function configure (gyp, argv, callback) {
       if (gyp.opts.target) {
         // if --target was given, then determine a target version to compile for
         versionStr = gyp.opts.target
-        gyp.verbose('compiling against --target node version', versionStr)
+        log.verbose('get node dir', 'compiling against --target node version: %s', versionStr)
       } else {
         // if no --target was specified then use the current host node version
         versionStr = process.version
-        gyp.verbose('no --target version specified, falling back to host node version', versionStr)
+        log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', versionStr)
       }
 
       // make sure we have a valid version
@@ -115,7 +116,7 @@ function configure (gyp, argv, callback) {
       gyp.opts.ensure = true
       gyp.commands.install([ versionStr ], function (err, version) {
         if (err) return callback(err)
-        gyp.verbose('target node version installed:', version)
+        log.verbose('get node dir', 'target node version installed:', version)
         nodeDir = path.resolve(gyp.devDir, version)
         createBuildDir()
       })
@@ -123,19 +124,21 @@ function configure (gyp, argv, callback) {
   }
 
   function createBuildDir () {
-    gyp.verbose('attempting to create "build" dir', buildDir)
+    log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
     mkdirp(buildDir, function (err, isNew) {
       if (err) return callback(err)
-      gyp.verbose('"build" dir needed to be created?', isNew)
+      log.verbose('build dir', '"build" dir needed to be created?', isNew)
       createConfigFile()
     })
   }
 
   function createConfigFile (err) {
     if (err) return callback(err)
-    gyp.verbose('creating build/config.gypi file')
 
-    configPath = path.resolve(buildDir, 'config.gypi')
+    var configFilename = 'config.gypi'
+    configPath = path.resolve(buildDir, configFilename)
+
+    log.verbose(configFilename, 'creating config file')
 
     var config = process.config || {}
       , defaults = config.target_defaults
@@ -194,10 +197,12 @@ function configure (gyp, argv, callback) {
       return v
     }
 
+    log.silly(configFilename, config)
+
     // now write out the config.gypi file to the build/ dir
     var prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step'
       , json = JSON.stringify(config, boolsToString, 2)
-    gyp.verbose('writing out config file', configPath)
+    log.verbose(configFilename, 'writing out config file: %s', configPath)
     fs.writeFile(configPath, [prefix, json, ''].join('\n'), runGypAddon)
   }
 
@@ -209,11 +214,11 @@ function configure (gyp, argv, callback) {
 
     if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) {
       if (win) {
-        gyp.verbose('gyp format was not specified; forcing "msvs"')
+        log.verbose('gyp_addon', 'gyp format was not specified; forcing "msvs"')
         // force the 'make' target for non-Windows
         argv.push('-f', 'msvs')
       } else {
-        gyp.verbose('gyp format was not specified; forcing "make"')
+        log.verbose('gyp_addon', 'gyp format was not specified; forcing "make"')
         // force the 'make' target for non-Windows
         argv.push('-f', 'make')
       }
index 2cf3993..4932b8f 100644 (file)
@@ -12,11 +12,12 @@ var fs = require('graceful-fs')
   , rm = require('rimraf')
   , path = require('path')
   , zlib = require('zlib')
+  , log = require('npmlog')
   , semver = require('semver')
   , fstream = require('fstream')
   , request = require('request')
   , minimatch = require('minimatch')
-  , mkdir = require('./util/mkdirp')
+  , mkdir = require('mkdirp')
   , distUrl = 'http://nodejs.org/dist'
   , win = process.platform == 'win32'
 
@@ -27,7 +28,7 @@ function install (gyp, argv, callback) {
     if (cb.done) return
     cb.done = true
     if (err) {
-      gyp.verbose('got an error, rolling back install')
+      log.warn('install', 'got an error, rolling back install')
       // roll-back the install if anything went wrong
       gyp.commands.remove([ version ], function (err2) {
         callback(err)
@@ -40,7 +41,7 @@ function install (gyp, argv, callback) {
 
   // Determine which node dev files version we are installing
   var versionStr = argv[0] || gyp.opts.target || process.version
-  gyp.verbose('input version string', versionStr)
+  log.verbose('install', 'input version string', versionStr)
 
   // parse the version to normalize and ensure it's valid
   var version = semver.parse(versionStr)
@@ -50,7 +51,7 @@ function install (gyp, argv, callback) {
 
   // "legacy" versions are 0.7 and 0.6
   var isLegacy = semver.lt(versionStr, '0.8.0')
-  gyp.verbose('installing legacy version?', isLegacy)
+  log.verbose('installing legacy version?', isLegacy)
 
   if (semver.lt(versionStr, '0.6.0')) {
     return callback(new Error('Minimum target version is `0.6.0` or greater. Got: ' + versionStr))
@@ -60,12 +61,12 @@ function install (gyp, argv, callback) {
   if (version[5] === '-pre') {
     version[3] = +version[3] - 1
     version[5] = null
-    gyp.verbose('-pre version detected, adjusting patch version')
+    log.verbose('-pre version detected, adjusting patch version')
   }
 
   // flatten version into String
   version = version.slice(1, 4).join('.')
-  gyp.verbose('installing version', version)
+  log.verbose('install', 'installing version: %s', version)
 
   // the directory where the dev files will be installed
   var devDir = path.resolve(gyp.devDir, version)
@@ -73,31 +74,31 @@ function install (gyp, argv, callback) {
   // If '--ensure' was passed, then don't *always* install the version;
   // check if it is already installed, and only install when needed
   if (gyp.opts.ensure) {
-    gyp.verbose('--ensure was passed, so won\'t reinstall if already installed')
+    log.verbose('install', '--ensure was passed, so won\'t reinstall if already installed')
     fs.stat(devDir, function (err, stat) {
       if (err) {
         if (err.code == 'ENOENT') {
-          gyp.verbose('version not already installed, continuing with install', version)
+          log.verbose('install', 'version not already installed, continuing with install', version)
           go()
         } else {
           cb(err)
         }
         return
       }
-      gyp.verbose('version is already installed, need to check "installVersion"')
+      log.verbose('install', 'version is already installed, need to check "installVersion"')
       var installVersionFile = path.resolve(devDir, 'installVersion')
       fs.readFile(installVersionFile, 'ascii', function (err, ver) {
         if (err && err.code != 'ENOENT') {
           return cb(err)
         }
         var installVersion = parseInt(ver, 10) || 0
-        gyp.verbose('got "installVersion":', installVersion)
-        gyp.verbose('needs "installVersion":', gyp.package.installVersion)
+        log.verbose('got "installVersion"', installVersion)
+        log.verbose('needs "installVersion"', gyp.package.installVersion)
         if (installVersion < gyp.package.installVersion) {
-          gyp.verbose('version is no good; reinstalling')
+          log.verbose('install', 'version is no good; reinstalling')
           go()
         } else {
-          gyp.verbose('version is good')
+          log.verbose('install', 'version is good')
           cb()
         }
       })
@@ -107,7 +108,8 @@ function install (gyp, argv, callback) {
   }
 
   function download (url, onError) {
-    gyp.info('downloading:', url)
+    log.http('GET', url)
+
     var requestOpts = {
         uri: url
       , onResponse: true
@@ -119,22 +121,26 @@ function install (gyp, argv, callback) {
                 || process.env.HTTP_PROXY
                 || process.env.npm_config_proxy
     if (proxyUrl) {
-      gyp.verbose('using proxy:', proxyUrl)
+      log.verbose('proxy', proxyUrl)
       requestOpts.proxy = proxyUrl
     }
-    return request(requestOpts, onError)
+    var req = request(requestOpts, onError)
+    req.on('response', function (res) {
+      log.http(res.statusCode, url)
+    })
+    return req
   }
 
   function go () {
 
+  log.verbose('ensuring nodedir is created', devDir)
+
   // first create the dir for the node dev files
   mkdir(devDir, function (err, created) {
     if (err) return cb(err)
 
     if (created) {
-      gyp.verbose('created:', devDir)
-    } else {
-      gyp.verbose('directory already existed:', devDir)
+      log.verbose('created nodedir', created)
     }
 
     // now download the node tarball
@@ -148,18 +154,19 @@ function install (gyp, argv, callback) {
     // only .h header files and the gyp files get extracted
     function isValid () {
       var name = this.path.substring(devDir.length + 1)
-        , _valid = valid(name)
+      var isValid = valid(name)
       if (name === '' && this.type === 'Directory') {
         // the first directory entry is ok
         return true
       }
-      if (_valid) {
-        gyp.verbose('extracted file from tarball', name)
+      if (isValid) {
+        log.verbose('extracted file from tarball', name)
         extractCount++
       } else {
         // invalid
+        log.silly('ignoring from tarball', name)
       }
-      return _valid
+      return isValid
     }
 
     gunzip.on('error', cb)
@@ -185,7 +192,7 @@ function install (gyp, argv, callback) {
       if (extractCount === 0) {
         return cb(new Error('There was a fatal problem while downloading/extracting the tarball'))
       }
-      gyp.verbose('done parsing tarball')
+      log.verbose('tarball', 'done parsing tarball')
       var async = 0
 
       if (isLegacy) {
@@ -219,17 +226,17 @@ function install (gyp, argv, callback) {
     function copyLegacy (done) {
       // legacy versions of node (< 0.8) require the legacy files to be copied
       // over since they contain many bugfixes from the current node build system
-      gyp.verbose('copying "legacy" gyp configuration files for version', version)
+      log.verbose('legacy', 'copying "legacy" gyp configuration files for version', version)
 
       var legacyDir = path.resolve(__dirname, '..', 'legacy')
-      gyp.verbose('using "legacy" dir', legacyDir)
-      gyp.verbose('copying to "dev" dir', devDir)
+      log.verbose('legacy', 'using "legacy" dir', legacyDir)
+      log.verbose('legacy', 'copying to "dev" dir', devDir)
 
       var reader = fstream.Reader({ path: legacyDir, type: 'Directory' })
-        , writer = fstream.Writer({ path: devDir, type: 'Directory' })
+      var writer = fstream.Writer({ path: devDir, type: 'Directory' })
 
       reader.on('entry', function onEntry (entry) {
-        gyp.verbose('reading entry', entry.path)
+        log.verbose('legacy', 'reading entry:', entry.path)
         entry.on('entry', onEntry)
       })
 
@@ -243,7 +250,7 @@ function install (gyp, argv, callback) {
     }
 
     function downloadNodeLib (done) {
-      gyp.verbose('on Windows; need to download `node.lib`...')
+      log.verbose('on Windows; need to download `node.lib`...')
       var dir32 = path.resolve(devDir, 'ia32')
         , dir64 = path.resolve(devDir, 'x64')
         , nodeLibPath32 = path.resolve(dir32, 'node.lib')
@@ -251,15 +258,15 @@ function install (gyp, argv, callback) {
         , nodeLibUrl32 = distUrl + '/v' + version + '/node.lib'
         , nodeLibUrl64 = distUrl + '/v' + version + '/x64/node.lib'
 
-      gyp.verbose('32-bit node.lib dir', dir32)
-      gyp.verbose('64-bit node.lib dir', dir64)
-      gyp.verbose('`node.lib` 32-bit url', nodeLibUrl32)
-      gyp.verbose('`node.lib` 64-bit url', nodeLibUrl64)
+      log.verbose('32-bit node.lib dir', dir32)
+      log.verbose('64-bit node.lib dir', dir64)
+      log.verbose('`node.lib` 32-bit url', nodeLibUrl32)
+      log.verbose('`node.lib` 64-bit url', nodeLibUrl64)
 
       var async = 2
       mkdir(dir32, function (err) {
         if (err) return done(err)
-        gyp.verbose('streaming 32-bit node.lib to:', nodeLibPath32)
+        log.verbose('streaming 32-bit node.lib to:', nodeLibPath32)
 
         var req = download(nodeLibUrl32)
         req.on('error', done)
@@ -278,7 +285,7 @@ function install (gyp, argv, callback) {
       })
       mkdir(dir64, function (err) {
         if (err) return done(err)
-        gyp.verbose('streaming 64-bit node.lib to:', nodeLibPath64)
+        log.verbose('streaming 64-bit node.lib to:', nodeLibPath64)
 
         var req = download(nodeLibUrl64)
         req.on('error', done)
index 64c4ef7..45c2e76 100644 (file)
@@ -9,13 +9,15 @@ exports.usage = 'Prints a listing of the currently installed node development fi
 
 var fs = require('graceful-fs')
   , path = require('path')
+  , log = require('npmlog')
 
 function list (gyp, args, callback) {
 
-  gyp.verbose('using node-gyp dir', gyp.devDir)
+  var devDir = gyp.devDir
+  log.verbose('list', 'using node-gyp dir:', devDir)
 
-  // readdir the node-gyp dir
-  fs.readdir(gyp.devDir, onreaddir)
+  // readdir() the node-gyp dir
+  fs.readdir(devDir, onreaddir)
 
   function onreaddir (err, versions) {
     if (err && err.code != 'ENOENT') {
index ad92e81..85374e4 100644 (file)
@@ -8,6 +8,7 @@ module.exports = exports = gyp
 var fs = require('graceful-fs')
   , path = require('path')
   , nopt = require('nopt')
+  , log = require('npmlog')
   , child_process = require('child_process')
   , EE = require('events').EventEmitter
   , inherits = require('util').inherits
@@ -27,6 +28,8 @@ var fs = require('graceful-fs')
       , 'rm': 'remove'
     }
 
+log.heading = 'gyp'
+
 /**
  * The `gyp` function.
  */
@@ -36,10 +39,10 @@ function gyp () {
 }
 
 function Gyp () {
-  var me = this
+  var self = this
 
   // set the dir where node-gyp dev files get installed
-  // TODO: make this configurable?
+  // TODO: make this *more* configurable?
   //       see: https://github.com/TooTallNate/node-gyp/issues/21
   var homeDir = process.env.HOME || process.env.USERPROFILE
   this.devDir = path.resolve(homeDir, '.node-gyp')
@@ -47,15 +50,11 @@ function Gyp () {
   this.commands = {}
 
   commands.forEach(function (command) {
-    me.commands[command] = function (argv, callback) {
-      me.verbose('command', command, argv)
-      return require('./' + command)(me, argv, callback)
+    self.commands[command] = function (argv, callback) {
+      log.verbose('command', command, argv)
+      return require('./' + command)(self, argv, callback)
     }
   })
-
-  Object.keys(aliases).forEach(function (alias) {
-    me.commands[alias] = me.commands[aliases[alias]]
-  })
 }
 inherits(Gyp, EE)
 exports.Gyp = Gyp
@@ -78,10 +77,10 @@ proto.configDefs = {
   , directory: String // bin
   , msvs_version: String // 'configure'
   , ensure: Boolean  // 'install'
-  , verbose: Boolean // everywhere
   , solution: String // 'build' (windows only)
   , proxy: String // 'install'
   , nodedir: String // 'configure'
+  , loglevel: String // everywhere
 }
 
 /**
@@ -91,10 +90,18 @@ proto.configDefs = {
 proto.shorthands = {
     release: '--no-debug'
   , C: '--directory'
-  , d: '--debug'
+  , debug: '--debug'
+  , silly: '--loglevel=silly'
+  , verbose: '--loglevel=verbose'
 }
 
 /**
+ * expose the command aliases for the bin file to use.
+ */
+
+proto.aliases = aliases
+
+/**
  * Parses the given argv array and sets the 'opts',
  * 'argv' and 'command' properties.
  */
@@ -105,7 +112,7 @@ proto.parseArgv = function parseOpts (argv) {
 
   var commands = []
   this.argv.slice().forEach(function (arg) {
-    if (arg in this.commands) {
+    if (arg in this.commands || arg in this.aliases) {
       this.argv.splice(this.argv.indexOf(arg), 1)
       commands.push(arg)
     }
@@ -119,10 +126,7 @@ proto.parseArgv = function parseOpts (argv) {
     if (name.indexOf(npm_config_prefix) !== 0) return
     var val = process.env[name]
     if (name === npm_config_prefix + 'loglevel') {
-      // "loglevel" is a special case; check for "verbose"
-      if (val === 'verbose') {
-        this.opts.verbose = true
-      }
+      log.level = val
     } else {
       // take the config name and check if it's one that node-gyp cares about
       name = name.substring(npm_config_prefix.length)
@@ -131,6 +135,11 @@ proto.parseArgv = function parseOpts (argv) {
       }
     }
   }, this)
+
+  if (this.opts.loglevel) {
+    log.level = this.opts.loglevel
+  }
+  log.resume()
 }
 
 /**
@@ -143,31 +152,15 @@ proto.spawn = function spawn (command, args, opts) {
     opts.customFds = [ 0, 1, 2 ]
   }
   var cp = child_process.spawn(command, args, opts)
-  this.emit('spawn', command, args, cp)
+  log.info('spawn', command)
+  log.info('spawn args', args)
   return cp
 }
 
 /**
- * Logging mechanisms.
+ * Prints the usage instructions and then exits.
  */
 
-proto.info = function info () {
-  var args = Array.prototype.slice.call(arguments)
-  args.unshift('info')
-  this.emit.apply(this, args)
-}
-proto.warn = function warn () {
-  var args = Array.prototype.slice.call(arguments)
-  args.unshift('warn')
-  this.emit.apply(this, args)
-}
-
-proto.verbose = function verbose () {
-  var args = Array.prototype.slice.call(arguments)
-  args.unshift('verbose')
-  this.emit.apply(this, args)
-}
-
 proto.usageAndExit = function usageAndExit () {
   var usage = [
       ''
@@ -182,6 +175,7 @@ proto.usageAndExit = function usageAndExit () {
     , '    $ node-gyp <command> --help'
     , ''
     , 'node-gyp@' + this.version + '  ' + path.resolve(__dirname, '..')
+    , 'node@' + process.versions.node
   ].join('\n')
 
   console.log(usage)
index cb21f32..943b399 100644 (file)
@@ -3,13 +3,15 @@ module.exports = exports = rebuild
 
 exports.usage = 'Runs "clean", "configure" and "build" all at once'
 
+var log = require('npmlog')
+
 function rebuild (gyp, argv, callback) {
 
   // first "clean"
   gyp.commands.clean([], function (err) {
     if (err) {
       // don't bail
-      gyp.info(err.stack);
+      log.info('rebuild clean failed', err.stack);
     }
 
     gyp.commands.configure([], function (err) {
index 2844ec0..44f3147 100644 (file)
@@ -10,14 +10,17 @@ exports.usage = 'Removes the node development files for the specified version'
 var fs = require('fs')
   , rm = require('rimraf')
   , path = require('path')
+  , log = require('npmlog')
   , semver = require('semver')
 
 function remove (gyp, argv, callback) {
 
-  gyp.verbose('using node-gyp dir', gyp.devDir)
+  var devDir = gyp.devDir
+  log.verbose('remove', 'using node-gyp dir:', devDir)
 
   // get the user-specified version to remove
   var v = argv[0] || gyp.opts.target
+  log.verbose('remove', 'removing target version:', v)
 
   if (!v) {
     return callback(new Error('You must specify a version number to remove. Ex: "' + process.version + '"'))
@@ -34,14 +37,13 @@ function remove (gyp, argv, callback) {
   version = version.slice(1, 4).join('.')
 
   var versionPath = path.resolve(gyp.devDir, version)
-  gyp.verbose('removing development files for version', version)
+  log.verbose('remove', 'removing development files for version:', version)
 
   // first check if its even installed
   fs.stat(versionPath, function (err, stat) {
     if (err) {
       if (err.code == 'ENOENT') {
-        gyp.info('version was already not installed', version)
-        callback()
+        callback(null, 'version was already uninstalled: ' + version)
       } else {
         callback(err)
       }
diff --git a/deps/npm/node_modules/node-gyp/lib/util/mkdirp.js b/deps/npm/node_modules/node-gyp/lib/util/mkdirp.js
deleted file mode 100644 (file)
index 62095c8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-/**
- * Tiny wrapper around substack's mkdirp module, to add a return value
- * to it. `true` if any directories were created in the process, `false`
- * if the target directory already existed. The `err` is still the first
- * argument in case anything actually wrong happens.
- */
-
-var fs = require('fs')
-  , mkdirp_ = require('mkdirp')
-
-module.exports = function mkdirp (path, cb) {
-  // first stat() to see if the target exists
-  fs.stat(path, function (err) {
-    if (err) {
-      if (err.code == 'ENOENT') {
-        // doesn't exist, mkdirp it
-        mkdirp_(path, function (err) {
-          if (err) return cb(err)
-          cb(err, true)
-        })
-      } else {
-        cb(err)
-      }
-      return
-    }
-    cb(err, false)
-  })
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/ansi/.npmignore
deleted file mode 100644 (file)
index 3c3629e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/README.md b/deps/npm/node_modules/node-gyp/node_modules/ansi/README.md
deleted file mode 100644 (file)
index e8d328f..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-ansi.js
-=========
-### Advanced ANSI formatting tool for Node.js
-
-![](http://f.cl.ly/items/0D3w3d1W443f2z3X361G/Screen%20Shot%202012-01-26%20at%202.18.31%20AM.png)
-
-`ansi.js` is a module for Node.js that provides an easy-to-use API for
-writing ANSI escape codes to `Stream` instances. ANSI escape codes are used to do
-fancy things in a terminal window, like render text in colors, delete characters,
-lines, the entire window, or hide and show the cursor, and lots more!
-
-The code for the example in the screenshot above can be found in the `examples`
-directory.
-
-#### Features:
-
- * 256 color support for the terminal!
- * Works with *any* writable `Stream` instance.
- * Allows you to move the cursor anywhere on the terminal window.
- * Allows you to delete existing contents from the terminal window.
- * Allows you to hide and show the cursor.
- * Converts CSS color codes and RGB values into ANSI escape codes.
- * Low-level; you are in control of when escape codes are used, it's not abstracted.
- * Optional automatic cleanup of stream by before closing (still TODO).
-
-
-Installation
-------------
-
-Install with `npm`:
-
-``` bash
-$ npm install ansi
-```
-
-
-Example
--------
-
-``` js
-var ansi = require('ansi')
-  , cursor = ansi(process.stdout)
-
-// You can chain your calls forever:
-cursor.red()        // Set font color to red
-      .bg.blue()    // Set background color to blue
-      .write('Hello World!') // Write 'Hello World!' to stdout
-      .reset()      // When a bg color is set, call reset() before
-                    //   writing the trailing \n, to avoid Terminal glitches
-      .write('\n')  // And a final \n to wrap things up
-
-// Rendering modes are persistent:
-cursor.green().bold()
-
-// You can use the regular logging functions, text will be green
-console.log('This is green, bold text')
-
-// To reset just the foreground color:
-cursor.fg.reset()
-
-console.log('This will still be bold')
-```
-
-
-License
--------
-
-(The MIT License)
-
-Copyright (c) 2012 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
-
-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.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/examples/imgcat.js b/deps/npm/node_modules/node-gyp/node_modules/ansi/examples/imgcat.js
deleted file mode 100755 (executable)
index 0f5f1f2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env node
-
-var ansi = require('../')
-  , cursor = ansi(process.stdout)
-  , tty = require('tty')
-  , Canvas = require('canvas')
-  , imageFile = process.argv[2] || __dirname + '/yoshi.png'
-  , image = require('fs').readFileSync(imageFile)
-  , pixel = '  '
-  , alphaThreshold = 0
-
-var img = new Canvas.Image();
-img.src = image;
-
-function draw () {
-  var width = process.stdout.getWindowSize()[0] / pixel.length | 0
-    , scaleW = img.width > width ? width / img.width : 1
-    , w = Math.floor(img.width * scaleW)
-    , h = Math.floor(img.height * scaleW);
-
-  var canvas = new Canvas(w, h)
-    , ctx = canvas.getContext('2d');
-
-  ctx.drawImage(img, 0, 0, w, h);
-
-  var data = ctx.getImageData(0, 0, w, h).data;
-
-  for (var i=0, l=data.length; i<l; i+=4) {
-    var r = data[i]
-      , g = data[i+1]
-      , b = data[i+2]
-      , alpha = data[i+3];
-    if (alpha > alphaThreshold) {
-      cursor.bg.rgb(r, g, b);
-    } else {
-      cursor.bg.reset();
-    }
-    process.stdout.write(pixel);
-    if ((i/4|0) % w === (w-1)) {
-      cursor.bg.reset();
-      process.stdout.write('\n');
-    }
-  }
-}
-
-draw();
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/examples/yoshi.png b/deps/npm/node_modules/node-gyp/node_modules/ansi/examples/yoshi.png
deleted file mode 100644 (file)
index 267ede2..0000000
Binary files a/deps/npm/node_modules/node-gyp/node_modules/ansi/examples/yoshi.png and /dev/null differ
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/lib/ansi.js b/deps/npm/node_modules/node-gyp/node_modules/ansi/lib/ansi.js
deleted file mode 100644 (file)
index 701b574..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-
-/**
- * Reference: http://en.wikipedia.org/wiki/ANSI_escape_code
- */
-
-/**
- * Module dependencies.
- */
-
-var prefix = '\033[' // For all escape codes
-  , suffix = 'm'; // Only for color codes
-
-/**
- * The ANSI escape sequences.
- */
-
-var codes = {
-    up: 'A'
-  , down: 'B'
-  , forward: 'C'
-  , back: 'D'
-  , nextLine: 'E'
-  , previousLine: 'F'
-  , horizontalAbsolute: 'G'
-  , eraseData: 'J'
-  , eraseLine: 'K'
-  , scrollUp: 'S'
-  , scrollDown: 'T'
-  , savePosition: 's'
-  , restorePosition: 'u'
-  , hide: '?25l'
-  , show: '?25h'
-};
-
-/**
- * Rendering ANSI codes.
- */
-
-var styles = {
-    bold: 1
-  , italic: 3
-  , underline: 4
-  , inverse: 7
-};
-
-/**
- * The negating ANSI code for the rendering modes.
- */
-
-var reset = {
-    bold: 22
-  , italic: 23
-  , underline: 24
-  , inverse: 27
-  , foreground: 39
-  , background: 49
-};
-
-/**
- * The standard, styleable ANSI colors.
- */
-
-var colors = {
-    white: 37
-  , grey: 90
-  , black: 30
-  , blue: 34
-  , cyan: 36
-  , green: 32
-  , magenta: 35
-  , red: 31
-  , yellow: 33
-};
-
-
-/**
- * Creates a Cursor instance based off the given `writable stream` instance.
- */
-
-function ansi (stream, options) {
-  return new Cursor(stream, options);
-}
-module.exports = exports = ansi;
-
-/**
- * The `Cursor` class.
- */
-
-function Cursor (stream, options) {
-  this.stream = stream;
-  this.fg = this.foreground = new Foreground(this);
-  this.bg = this.background = new Background(this);
-}
-exports.Cursor = Cursor;
-
-/**
- * The `Foreground` class.
- */
-
-function Foreground (cursor) {
-  this.cursor = cursor;
-}
-exports.Foreground = Foreground;
-
-/**
- * The `Background` class.
- */
-
-function Background (cursor) {
-  this.cursor = cursor;
-}
-exports.Background = Background;
-
-/**
- * Helper function that calls `write()` on the underlying Stream.
- */
-
-Cursor.prototype.write = function () {
-  this.stream.write.apply(this.stream, arguments);
-  return this;
-}
-
-/**
- * Set up the positional ANSI codes.
- */
-
-Object.keys(codes).forEach(function (name) {
-  var code = String(codes[name]);
-  Cursor.prototype[name] = function () {
-    var c = code;
-    if (arguments.length > 0) {
-      c = Math.round(arguments[0]) + code;
-    }
-    this.write(prefix + c);
-    return this;
-  }
-});
-
-/**
- * Set up the functions for the rendering ANSI codes.
- */
-
-Object.keys(styles).forEach(function (style) {
-  var name = style[0].toUpperCase() + style.substring(1);
-
-  Cursor.prototype[style] = function () {
-    this.write(prefix + styles[style] + suffix);
-    return this;
-  }
-
-  Cursor.prototype['reset'+name] = function () {
-    this.write(prefix + reset[style] + suffix);
-    return this;
-  }
-});
-
-/**
- * Setup the functions for the standard colors.
- */
-
-Object.keys(colors).forEach(function (color) {
-  Foreground.prototype[color] = function () {
-    this.cursor.write(prefix + colors[color] + suffix);
-    return this.cursor;
-  }
-
-  var bgCode = colors[color] + 10;
-  Background.prototype[color] = function () {
-    this.cursor.write(prefix + bgCode + suffix);
-    return this.cursor;
-  }
-
-  Cursor.prototype[color] = function () {
-    return this.foreground[color]();
-  }
-});
-
-/**
- * Makes a beep sound!
- */
-
-Cursor.prototype.beep = function () {
-  this.write('\007');
-  return this;
-}
-
-/**
- * Moves cursor to specific position
- */
-
-Cursor.prototype.goto = function (x, y) {
-  x = ~~x;
-  y = ~~y;
-  this.write(prefix + y + ';' + x + 'H');
-  return this;
-}
-
-/**
- * Reset the foreground color.
- */
-
-Foreground.prototype.reset = function () {
-  this.cursor.write(prefix + reset.foreground + suffix);
-  return this.cursor;
-}
-
-/**
- * Reset the background color.
- */
-
-Background.prototype.reset = function () {
-  this.cursor.write(prefix + reset.background + suffix);
-  return this.cursor;
-}
-
-/**
- * Resets all ANSI formatting on the stream.
- */
-
-Cursor.prototype.reset = function () {
-  this.write(prefix + '0' + suffix);
-  return this;
-}
-
-/**
- * Sets the foreground color with the given RGB values.
- * The closest match out of the 216 colors is picked.
- */
-
-Foreground.prototype.rgb = function (r, g, b) {
-  this.cursor.write(prefix + '38;5;' + rgb(r, g, b) + suffix);
-  return this.cursor;
-}
-
-/**
- * Sets the background color with the given RGB values.
- * The closest match out of the 216 colors is picked.
- */
-
-Background.prototype.rgb = function (r, g, b) {
-  this.cursor.write(prefix + '48;5;' + rgb(r, g, b) + suffix);
-  return this.cursor;
-}
-
-/**
- * Same as `cursor.fg.rgb()`.
- */
-
-Cursor.prototype.rgb = function (r, g, b) {
-  return this.foreground.rgb(r, g, b);
-}
-
-/**
- * Accepts CSS color codes for use with ANSI escape codes.
- * For example: `#FF000` would be bright red.
- */
-
-Foreground.prototype.hex = Background.prototype.hex = function (color) {
-  var rgb = hex(color);
-  return this.rgb(rgb[0], rgb[1], rgb[2]);
-}
-
-/**
- * Same as `cursor.fg.hex()`.
- */
-
-Cursor.prototype.hex = function (color) {
-  return this.foreground.hex(color);
-}
-
-function rgb (r, g, b) {
-  var red = r / 255 * 5
-    , green = g / 255 * 5
-    , blue = b / 255 * 5;
-  return rgb5(red, green, blue);
-}
-
-function rgb5 (r, g, b) {
-  var red = Math.round(r)
-    , green = Math.round(g)
-    , blue = Math.round(b);
-  return 16 + (red*36) + (green*6) + blue;
-}
-
-function hex (color) {
-  var c = color[0] === '#' ? color.substring(1) : color
-    , r = c.substring(0, 2)
-    , g = c.substring(2, 4)
-    , b = c.substring(4, 6);
-  return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)];
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/nodejs.png b/deps/npm/node_modules/node-gyp/node_modules/ansi/nodejs.png
deleted file mode 100644 (file)
index 61f2116..0000000
Binary files a/deps/npm/node_modules/node-gyp/node_modules/ansi/nodejs.png and /dev/null differ
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/package.json b/deps/npm/node_modules/node-gyp/node_modules/ansi/package.json
deleted file mode 100644 (file)
index 5c9fca1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-  "name": "ansi",
-  "description": "Advanced ANSI formatting tool for Node.js",
-  "keywords": [
-    "ansi",
-    "formatting",
-    "cursor",
-    "color",
-    "terminal",
-    "rgb",
-    "256",
-    "stream"
-  ],
-  "version": "0.0.4",
-  "author": {
-    "name": "Nathan Rajlich",
-    "email": "nathan@tootallnate.net",
-    "url": "http://tootallnate.net"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/TooTallNate/ansi.js.git"
-  },
-  "main": "./lib/ansi.js",
-  "scripts": {
-    "test": "mocha --reporter spec",
-    "start": "node server.js"
-  },
-  "devDependencies": {
-    "mocha": "*",
-    "canvas": "*"
-  },
-  "engines": {
-    "node": ">= 0.4.0 && < 0.9.0"
-  },
-  "_npmUser": {
-    "name": "isaacs",
-    "email": "i@izs.me"
-  },
-  "_id": "ansi@0.0.4",
-  "dependencies": {},
-  "optionalDependencies": {},
-  "_engineSupported": true,
-  "_npmVersion": "1.1.24",
-  "_nodeVersion": "v0.7.10-pre",
-  "_defaultsLoaded": true,
-  "_from": "ansi@0.0.x"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/ansi/server.js b/deps/npm/node_modules/node-gyp/node_modules/ansi/server.js
deleted file mode 100644 (file)
index 452bc52..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-var http = require('http')
-  , ansi = require('./')
-  , Canvas = require('canvas')
-  , Image = Canvas.Image
-  , imageFile = process.argv[2] || __dirname + '/examples/yoshi.png'
-  , image = require('fs').readFileSync(imageFile)
-
-var img = new Image()
-img.src = image
-
-var server = http.createServer(function (req, res) {
-  draw(res);
-})
-
-server.listen(8080, function () {
-  console.error('HTTP server listening on:', this.address())
-})
-
-function draw (stream) {
-  var cursor = ansi(stream)
-    , pixel = '  '
-    , width = img.width
-    , scaleW = img.width > width ? width / img.width : 1
-    , w = Math.floor(img.width * scaleW)
-    , h = Math.floor(img.height * scaleW);
-
-  var canvas = new Canvas(w, h)
-    , ctx = canvas.getContext('2d');
-
-  ctx.drawImage(img, 0, 0, w, h);
-
-  var data = ctx.getImageData(0, 0, w, h).data;
-
-  for (var i=0, l=data.length; i<l; i+=4) {
-    var r = data[i]
-      , g = data[i+1]
-      , b = data[i+2]
-      , alpha = data[i+3];
-    if (alpha > 0) {
-      cursor.bg.rgb(r, g, b);
-    } else {
-      cursor.bg.reset();
-    }
-    stream.write(pixel);
-    if ((i/4|0) % w === (w-1)) {
-      cursor.bg.reset();
-      stream.write('\n');
-    }
-  }
-  stream.end();
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/examples/g.js b/deps/npm/node_modules/node-gyp/node_modules/glob/examples/g.js
deleted file mode 100644 (file)
index be122df..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-var Glob = require("../").Glob
-
-var pattern = "test/a/**/[cg]/../[cg]"
-console.log(pattern)
-
-var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
-  console.log("matches", matches)
-})
-console.log("after")
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/examples/usr-local.js b/deps/npm/node_modules/node-gyp/node_modules/glob/examples/usr-local.js
deleted file mode 100644 (file)
index 327a425..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-var Glob = require("../").Glob
-
-var pattern = "{./*/*,/*,/usr/local/*}"
-console.log(pattern)
-
-var mg = new Glob(pattern, {mark: true}, function (er, matches) {
-  console.log("matches", matches)
-})
-console.log("after")
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/package.json b/deps/npm/node_modules/node-gyp/node_modules/glob/package.json
deleted file mode 100644 (file)
index c1e8ce5..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-{
-  "author": {
-    "name": "Isaac Z. Schlueter",
-    "email": "i@izs.me",
-    "url": "http://blog.izs.me/"
-  },
-  "name": "glob",
-  "description": "a little globber",
-  "version": "3.1.9",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/isaacs/node-glob.git"
-  },
-  "main": "glob.js",
-  "engines": {
-    "node": "*"
-  },
-  "dependencies": {
-    "minimatch": "0.2",
-    "graceful-fs": "~1.1.2",
-    "inherits": "1"
-  },
-  "devDependencies": {
-    "tap": "~0.2.3",
-    "mkdirp": "0",
-    "rimraf": "1"
-  },
-  "scripts": {
-    "test": "tap test/*.js"
-  },
-  "license": "BSD",
-  "_npmUser": {
-    "name": "isaacs",
-    "email": "i@izs.me"
-  },
-  "_id": "glob@3.1.9",
-  "optionalDependencies": {},
-  "_engineSupported": true,
-  "_npmVersion": "1.1.24",
-  "_nodeVersion": "v0.7.10-pre",
-  "_defaultsLoaded": true,
-  "_from": "glob@3"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/test/00-setup.js b/deps/npm/node_modules/node-gyp/node_modules/glob/test/00-setup.js
deleted file mode 100644 (file)
index 2b60643..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// just a little pre-run script to set up the fixtures.
-// zz-finish cleans it up
-
-var mkdirp = require("mkdirp")
-var path = require("path")
-var i = 0
-var tap = require("tap")
-var fs = require("fs")
-var rimraf = require("rimraf")
-
-var files =
-[ "a/.abcdef/x/y/z/a"
-, "a/abcdef/g/h"
-, "a/abcfed/g/h"
-, "a/b/c/d"
-, "a/bc/e/f"
-, "a/c/d/c/b"
-, "a/cb/e/f"
-]
-
-var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
-var symlinkFrom = "../.."
-
-files = files.map(function (f) {
-  return path.resolve(__dirname, f)
-})
-
-tap.test("remove fixtures", function (t) {
-  rimraf(path.resolve(__dirname, "a"), function (er) {
-    t.ifError(er, "remove fixtures")
-    t.end()
-  })
-})
-
-files.forEach(function (f) {
-  tap.test(f, function (t) {
-    var d = path.dirname(f)
-    mkdirp(d, 0755, function (er) {
-      if (er) {
-        t.fail(er)
-        return t.bailout()
-      }
-      fs.writeFile(f, "i like tests", function (er) {
-        t.ifError(er, "make file")
-        t.end()
-      })
-    })
-  })
-})
-
-tap.test("symlinky", function (t) {
-  var d = path.dirname(symlinkTo)
-  console.error("mkdirp", d)
-  mkdirp(d, 0755, function (er) {
-    t.ifError(er)
-    fs.symlink(symlinkFrom, symlinkTo, function (er) {
-      t.ifError(er, "make symlink")
-      t.end()
-    })
-  })
-})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/test/bash-comparison.js b/deps/npm/node_modules/node-gyp/node_modules/glob/test/bash-comparison.js
deleted file mode 100644 (file)
index fbadc31..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-// basic test
-// show that it does the same thing by default as the shell.
-var tap = require("tap")
-, child_process = require("child_process")
-
-// put more patterns here.
-, globs =
-  [
-  "test/a/*/+(c|g)/./d"
-  ,"test/a/**/[cg]/../[cg]"
-  ,"test/a/{b,c,d,e,f}/**/g"
-  ,"test/a/b/**"
-  ,"test/**/g"
-  ,"test/a/abc{fed,def}/g/h"
-  ,"test/a/abc{fed/g,def}/**/"
-  ,"test/a/abc{fed/g,def}/**///**/"
-  ,"test/**/a/**/"
-  ,"test/+(a|b|c)/a{/,bc*}/**"
-  ,"test/*/*/*/f"
-  ,"test/**/f"
-  ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
-  ,"{./*/*,/usr/local/*}"
-  ,"{/*,*}" // evil owl face!  how you taunt me!
-  ]
-, glob = require("../")
-, path = require("path")
-
-// run from the root of the project
-// this is usually where you're at anyway, but be sure.
-process.chdir(path.resolve(__dirname, ".."))
-
-function alphasort (a, b) {
-  a = a.toLowerCase()
-  b = b.toLowerCase()
-  return a > b ? 1 : a < b ? -1 : 0
-}
-
-globs.forEach(function (pattern) {
-  var echoOutput
-  tap.test(pattern, function (t) {
-    var bashPattern = pattern
-    , cmd = "shopt -s globstar && " +
-            "shopt -s extglob && " +
-            "shopt -s nullglob && " +
-            // "shopt >&2; " +
-            "eval \'for i in " + bashPattern + "; do echo $i; done\'"
-    , cp = child_process.spawn("bash", ["-c",cmd])
-    , out = []
-    , globResult
-    cp.stdout.on("data", function (c) {
-      out.push(c)
-    })
-    cp.stderr.on("data", function (c) {
-      process.stderr.write(c)
-    })
-    cp.stdout.on("close", function () {
-      echoOutput = flatten(out)
-      if (!echoOutput) echoOutput = []
-      else {
-        echoOutput = echoOutput.split(/\r*\n/).map(function (m) {
-          // Bash is a oddly inconsistent with slashes in the
-          // the results.  This implementation is a bit more
-          // normalized.  Account for this in the test results.
-          return m.replace(/\/+/g, "/").replace(/\/$/, "")
-        }).sort(alphasort).reduce(function (set, f) {
-          if (f !== set[set.length - 1]) set.push(f)
-          return set
-        }, []).sort(alphasort)
-      }
-      next()
-    })
-
-    glob(pattern, function (er, matches) {
-      // sort and unpark, just to match the shell results
-      matches = matches.map(function (m) {
-        return m.replace(/\/+/g, "/").replace(/\/$/, "")
-      }).sort(alphasort).reduce(function (set, f) {
-        if (f !== set[set.length - 1]) set.push(f)
-        return set
-      }, []).sort(alphasort)
-
-      t.ifError(er, pattern + " should not error")
-      globResult = matches
-      next()
-    })
-
-    function next () {
-      if (!echoOutput || !globResult) return
-
-      t.deepEqual(globResult, echoOutput, "should match shell")
-      t.end()
-    }
-  })
-
-  tap.test(pattern + " sync", function (t) {
-    var matches = glob.sync(pattern).map(function (m) {
-        return m.replace(/\/+/g, "/").replace(/\/$/, "")
-      }).sort(alphasort).reduce(function (set, f) {
-        if (f !== set[set.length - 1]) set.push(f)
-        return set
-      }, []).sort(alphasort)
-
-    t.deepEqual(matches, echoOutput, "should match shell")
-    t.end()
-  })
-})
-
-function flatten (chunks) {
-  var s = 0
-  chunks.forEach(function (c) { s += c.length })
-  var out = new Buffer(s)
-  s = 0
-  chunks.forEach(function (c) {
-    c.copy(out, s)
-    s += c.length
-  })
-
-  return out.toString().trim()
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/test/cwd-test.js b/deps/npm/node_modules/node-gyp/node_modules/glob/test/cwd-test.js
deleted file mode 100644 (file)
index 352c27e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-var tap = require("tap")
-
-var origCwd = process.cwd()
-process.chdir(__dirname)
-
-tap.test("changing cwd and searching for **/d", function (t) {
-  var glob = require('../')
-  var path = require('path')
-  t.test('.', function (t) {
-    glob('**/d', function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
-      t.end()
-    })
-  })
-
-  t.test('a', function (t) {
-    glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ 'b/c/d', 'c/d' ])
-      t.end()
-    })
-  })
-
-  t.test('a/b', function (t) {
-    glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ 'c/d' ])
-      t.end()
-    })
-  })
-
-  t.test('a/b/', function (t) {
-    glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ 'c/d' ])
-      t.end()
-    })
-  })
-
-  t.test('.', function (t) {
-    glob('**/d', {cwd: process.cwd()}, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
-      t.end()
-    })
-  })
-
-  t.test('cd -', function (t) {
-    process.chdir(origCwd)
-    t.end()
-  })
-
-  t.end()
-})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/test/pause-resume.js b/deps/npm/node_modules/node-gyp/node_modules/glob/test/pause-resume.js
deleted file mode 100644 (file)
index 481d1aa..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-// show that no match events happen while paused.
-var tap = require("tap")
-, child_process = require("child_process")
-// just some gnarly pattern with lots of matches
-, pattern = "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
-, glob = require("../")
-, Glob = glob.Glob
-, path = require("path")
-
-// run from the root of the project
-// this is usually where you're at anyway, but be sure.
-process.chdir(path.resolve(__dirname, ".."))
-
-function alphasort (a, b) {
-  a = a.toLowerCase()
-  b = b.toLowerCase()
-  return a > b ? 1 : a < b ? -1 : 0
-}
-
-function cleanResults (m) {
-  // normalize discrepancies in ordering, duplication,
-  // and ending slashes.
-  return m.map(function (m) {
-    return m.replace(/\/+/g, "/").replace(/\/$/, "")
-  }).sort(alphasort).reduce(function (set, f) {
-    if (f !== set[set.length - 1]) set.push(f)
-    return set
-  }, []).sort(alphasort)
-}
-
-function flatten (chunks) {
-  var s = 0
-  chunks.forEach(function (c) { s += c.length })
-  var out = new Buffer(s)
-  s = 0
-  chunks.forEach(function (c) {
-    c.copy(out, s)
-    s += c.length
-  })
-
-  return out.toString().trim()
-}
-var bashResults
-tap.test("get bash output", function (t) {
-  var bashPattern = pattern
-  , cmd = "shopt -s globstar && " +
-          "shopt -s extglob && " +
-          "shopt -s nullglob && " +
-          // "shopt >&2; " +
-          "eval \'for i in " + bashPattern + "; do echo $i; done\'"
-  , cp = child_process.spawn("bash", ["-c",cmd])
-  , out = []
-  , globResult
-  cp.stdout.on("data", function (c) {
-    out.push(c)
-  })
-  cp.stderr.on("data", function (c) {
-    process.stderr.write(c)
-  })
-  cp.stdout.on("close", function () {
-    bashResults = flatten(out)
-    if (!bashResults) return t.fail("Didn't get results from bash")
-    else {
-      bashResults = cleanResults(bashResults.split(/\r*\n/))
-    }
-    t.ok(bashResults.length, "got some results")
-    t.end()
-  })
-})
-
-var globResults = []
-tap.test("use a Glob object, and pause/resume it", function (t) {
-  var g = new Glob(pattern)
-  , paused = false
-  , res = []
-
-  g.on("match", function (m) {
-    t.notOk(g.paused, "must not be paused")
-    globResults.push(m)
-    g.pause()
-    t.ok(g.paused, "must be paused")
-    setTimeout(g.resume.bind(g), 1)
-  })
-
-  g.on("end", function (matches) {
-    t.pass("reached glob end")
-    globResults = cleanResults(globResults)
-    matches = cleanResults(matches)
-    t.deepEqual(matches, globResults,
-      "end event matches should be the same as match events")
-
-    t.deepEqual(matches, bashResults,
-      "glob matches should be the same as bash results")
-
-    t.end()
-  })
-})
-
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/test/root-nomount.js b/deps/npm/node_modules/node-gyp/node_modules/glob/test/root-nomount.js
deleted file mode 100644 (file)
index 3ac5979..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-var tap = require("tap")
-
-var origCwd = process.cwd()
-process.chdir(__dirname)
-
-tap.test("changing root and searching for /b*/**", function (t) {
-  var glob = require('../')
-  var path = require('path')
-  t.test('.', function (t) {
-    glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [])
-      t.end()
-    })
-  })
-
-  t.test('a', function (t) {
-    glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
-      t.end()
-    })
-  })
-
-  t.test('root=a, cwd=a/b', function (t) {
-    glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
-      t.end()
-    })
-  })
-
-  t.test('cd -', function (t) {
-    process.chdir(origCwd)
-    t.end()
-  })
-
-  t.end()
-})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/test/root.js b/deps/npm/node_modules/node-gyp/node_modules/glob/test/root.js
deleted file mode 100644 (file)
index 5ccdd0e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-var tap = require("tap")
-
-var origCwd = process.cwd()
-process.chdir(__dirname)
-
-tap.test("changing root and searching for /b*/**", function (t) {
-  var glob = require('../')
-  var path = require('path')
-  t.test('.', function (t) {
-    glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [])
-      t.end()
-    })
-  })
-
-  t.test('a', function (t) {
-    glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
-        return path.join(path.resolve('a'), m)
-      }))
-      t.end()
-    })
-  })
-
-  t.test('root=a, cwd=a/b', function (t) {
-    glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
-      t.ifError(er)
-      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
-        return path.join(path.resolve('a'), m)
-      }))
-      t.end()
-    })
-  })
-
-  t.test('cd -', function (t) {
-    process.chdir(origCwd)
-    t.end()
-  })
-
-  t.end()
-})
diff --git a/deps/npm/node_modules/node-gyp/node_modules/glob/test/zz-cleanup.js b/deps/npm/node_modules/node-gyp/node_modules/glob/test/zz-cleanup.js
deleted file mode 100644 (file)
index e085f0f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// remove the fixtures
-var tap = require("tap")
-, rimraf = require("rimraf")
-, path = require("path")
-
-tap.test("cleanup fixtures", function (t) {
-  rimraf(path.resolve(__dirname, "a"), function (er) {
-    t.ifError(er, "removed")
-    t.end()
-  })
-})
index f4d7628..266b701 100644 (file)
@@ -10,8 +10,8 @@
     "bindings",
     "gyp"
   ],
-  "version": "0.4.5",
-  "installVersion": 8,
+  "version": "0.5.0",
+  "installVersion": 9,
   "author": {
     "name": "Nathan Rajlich",
     "email": "nathan@tootallnate.net",
   },
   "main": "./lib/node-gyp.js",
   "dependencies": {
-    "ansi": "0.0.x",
     "glob": "3",
     "graceful-fs": "1",
     "fstream": "~0.1.13",
-    "minimatch": "0.2.x",
+    "minimatch": "0.2",
     "mkdirp": "0.3",
     "nopt": "1",
-    "request": "2.9.x",
+    "npmlog": "0",
+    "request": "2.9",
     "rimraf": "2",
     "semver": "1",
     "tar": "~0.1.12",
   "engines": {
     "node": ">= 0.6.0"
   },
-  "_npmUser": {
-    "name": "isaacs",
-    "email": "i@izs.me"
+  "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n  * On Unix:\n    * `python`\n    * `make`\n    * A proper C/C++ compiler toolchain, like GCC\n  * On Windows:\n    * [Python][windows-python] ([`v2.7.2`][windows-python-v2.7.2] recommended, `v3.x.x` not yet supported)\n    * Microsoft Visual C++ ([Express][msvc] version works well)\n      * For 64-bit builds of node and native modules you will _also_ need the [Windows 7 64-bit SDK][win7sdk]\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` json\n{\n  \"targets\": [\n    {\n      \"target_name\": \"binding\",\n      \"sources\": [ \"src/binding.cc\" ]\n    }\n  ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * ['\"binding.gyp\" files out in the wild' wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n * `build` - Invokes `make`/`msbuild.exe` and builds the native addon\n * `clean` - Removes any generated project files and the `out` dir\n * `configure` - Generates project build files for the current platform\n * `rebuild` - Runs \"clean\", \"configure\" and \"build\" all at once\n * `install` - Installs node development files for the given version.\n * `list` - Lists the currently installed node development file versions\n * `remove` - Removes a node development files for a given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich &lt;nathan@tootallnate.net&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.2]: http://www.python.org/download/releases/2.7.2#download\n[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express\n[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279\n",
+  "_id": "node-gyp@0.5.0",
+  "dist": {
+    "shasum": "88ad842c9f3ccd29a8d2a393107896c99fe32d63"
   },
-  "_id": "node-gyp@0.4.5",
-  "devDependencies": {},
-  "optionalDependencies": {},
-  "_engineSupported": true,
-  "_npmVersion": "1.1.24",
-  "_nodeVersion": "v0.7.10-pre",
-  "_defaultsLoaded": true,
-  "_from": "node-gyp@~0.4.5"
+  "_from": "node-gyp@~0.5"
 }
index 25657ff..8116d73 100644 (file)
@@ -43,7 +43,7 @@ function requestAll (cb) {
 
   mkdir(path.join(this.cache, "-", "all"), function (er) {
     fs.readFile(cache, function (er, data) {
-      if (er) return requestAll_(0, {}, cb)
+      if (er) return requestAll_.call(this, 0, {}, cb)
       try {
         data = JSON.parse(data)
       } catch (ex) {
index f966d93..4db3761 100644 (file)
@@ -6,7 +6,7 @@
   },
   "name": "npm-registry-client",
   "description": "Client for the npm registry",
-  "version": "0.0.4",
+  "version": "0.0.5",
   "repository": {
     "url": "git://github.com/isaacs/npm-registry-client"
   },
   "engines": {
     "node": "*"
   },
-  "_npmUser": {
-    "name": "isaacs",
-    "email": "i@izs.me"
-  },
-  "_id": "npm-registry-client@0.0.4",
-  "_engineSupported": true,
-  "_npmVersion": "1.1.25",
-  "_nodeVersion": "v0.7.10-pre",
-  "_defaultsLoaded": true,
+  "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(options)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n  // error is an error if there was a problem.\n  // data is the parsed data object\n  // raw is the json string\n  // res is the response from couch\n})\n```\n\n# Options\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `alwaysAuth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n  Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `strictSSL` {Boolean} Whether or not to be strict with SSL\n  certificates.  Default = `true`\n* `userAgent` {String} User agent header to send.  Default =\n  `\"node/{process.version}\"`\n* `log` {Object} The logger to use.  Defaults to `require(\"npmlog\")` if\n  that works, otherwise logs are disabled.\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body.  Objects\n  that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n  * `error` {Error | null}\n  * `data` {Object} the parsed data object\n  * `raw` {String} the json\n  * `res` {Response Object} response from couch\n\nMake a request to the registry.  All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n  before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n  to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder.  However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n  versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry.  When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment.  Mostly used by `client.publish()`.\n",
+  "_id": "npm-registry-client@0.0.5",
   "_from": "npm-registry-client@0"
 }
diff --git a/deps/npm/node_modules/read-installed/README.md b/deps/npm/node_modules/read-installed/README.md
new file mode 100644 (file)
index 0000000..59e882f
--- /dev/null
@@ -0,0 +1,16 @@
+# read-installed
+
+Read all the installed packages in a folder, and return a tree
+structure with all the data.
+
+npm uses this.
+
+## Usage
+
+```javascript
+var readInstalled = require("read-installed")
+// depth is optional, defaults to Infinity
+readInstalled(folder, depth, function (er, data) {
+  ...
+})
+```
diff --git a/deps/npm/node_modules/read-installed/package.json b/deps/npm/node_modules/read-installed/package.json
new file mode 100644 (file)
index 0000000..3e703bf
--- /dev/null
@@ -0,0 +1,32 @@
+{
+  "name": "read-installed",
+  "description": "Read all the installed packages in a folder, and return a tree structure with all the data.",
+  "version": "0.0.1",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/read-installed"
+  },
+  "main": "read-installed.js",
+  "scripts": {
+    "test": "node test/basic.js"
+  },
+  "dependencies": {
+    "semver": "~1.0.14",
+    "slide": "~1.1.3",
+    "read-package-json": "0",
+    "graceful-fs": "~1.1.8",
+    "npmlog": "0"
+  },
+  "optionalDependencies": {
+    "graceful-fs": "~1.1.8",
+    "npmlog": "0"
+  },
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// depth is optional, defaults to Infinity\nreadInstalled(folder, depth, function (er, data) {\n  ...\n})\n```\n",
+  "_id": "read-installed@0.0.1",
+  "_from": "read-installed"
+}
@@ -86,21 +86,30 @@ as far as the left-most node_modules folder.
 
 */
 
+try {
+  var fs = require("graceful-fs")
+} catch (er) {
+  var fs = require("fs")
+}
+
+try {
+  var log = require("npmlog")
+} catch (_) {
+  var log = { verbose: noop, info: noop, warn: noop, error: noop }
+  function noop () {}
+}
 
-var npm = require("../npm.js")
-  , fs = require("graceful-fs")
-  , path = require("path")
-  , asyncMap = require("slide").asyncMap
-  , semver = require("semver")
-  , readJson = require("./read-json.js")
-  , log = require("npmlog")
-  , url = require("url")
+var path = require("path")
+var asyncMap = require("slide").asyncMap
+var semver = require("semver")
+var readJson = require("read-package-json")
+var url = require("url")
 
 module.exports = readInstalled
 
-function readInstalled (folder, cb) {
-  var d = npm.config.get("depth")
-  readInstalled_(folder, null, null, null, 0, d, function (er, obj) {
+function readInstalled (folder, depth, cb) {
+  if (typeof cb !== "function") cb = depth, depth = Infinity
+  readInstalled_(folder, null, null, null, 0, depth, function (er, obj) {
     if (er) return cb(er)
     // now obj has all the installed things, where they're installed
     // figure out the inheritance links, now that the object is built.
@@ -294,39 +303,3 @@ function copy (obj) {
   for (var i in obj) o[i] = copy(obj[i])
   return o
 }
-
-if (module === require.main) {
-  var util = require("util")
-  console.error("testing")
-
-  var called = 0
-  readInstalled(process.cwd(), function (er, map) {
-    console.error(called ++)
-    if (er) return console.error(er.stack || er.message)
-    cleanup(map)
-    console.error(util.inspect(map, true, 10, true))
-  })
-
-  var seen = []
-  function cleanup (map) {
-    if (seen.indexOf(map) !== -1) return
-    seen.push(map)
-    for (var i in map) switch (i) {
-      case "_id":
-      case "path":
-      case "extraneous": case "invalid":
-      case "dependencies": case "name":
-        continue
-      default: delete map[i]
-    }
-    var dep = map.dependencies
-//    delete map.dependencies
-    if (dep) {
-//      map.dependencies = dep
-      for (var i in dep) if (typeof dep[i] === "object") {
-        cleanup(dep[i])
-      }
-    }
-    return map
-  }
-}
diff --git a/deps/npm/node_modules/read-package-json/README.md b/deps/npm/node_modules/read-package-json/README.md
new file mode 100644 (file)
index 0000000..97fb19f
--- /dev/null
@@ -0,0 +1,162 @@
+# read-package-json
+
+This is the thing that npm uses to read package.json files.  It
+validates some stuff, and loads some default things.
+
+It keeps a cache of the files you've read, so that you don't end
+up reading the same package.json file multiple times.
+
+Note that if you just want to see what's literally in the package.json
+file, you can usually do `var data = require('some-module/package.json')`.
+
+This module is basically only needed by npm, but it's handy to see what
+npm will see when it looks at your package.
+
+## Usage
+
+```javascript
+var readJson = require('read-package-json')
+
+readJson('/path/to/package.json', function (er, data) {
+  if (er) {
+    console.error("There was an error reading the file")
+    return
+  }
+
+  console.error('the package data is', data)
+}
+```
+
+## readJson(file, cb)
+
+* `file` {String} The path to the package.json file
+* `cb` {Function}
+
+Reads the JSON file and does the things.
+
+## `package.json` Fields
+
+See `man 5 package.json` or `npm help json`.
+
+## readJson.log
+
+By default this is a reference to the `npmlog` module.  But if that
+module can't be found, then it'll be set to just a dummy thing that does
+nothing.
+
+Replace with your own `{log,warn,error}` object for fun loggy time.
+
+## readJson.extras(file, data, cb)
+
+Run all the extra stuff relative to the file, with the parsed data.
+
+Modifies the data as it does stuff.  Calls the cb when it's done.
+
+## readJson.extraSet = [fn, fn, ...]
+
+Array of functions that are called by `extras`.  Each one receives the
+arguments `fn(file, data, cb)` and is expected to call `cb(er, data)`
+when done or when an error occurs.
+
+Order is indeterminate, so each function should be completely
+independent.
+
+Mix and match!
+
+## readJson.cache
+
+The `lru-cache` object that readJson uses to not read the same file over
+and over again.  See
+[lru-cache](https://github.com/isaacs/node-lru-cache) for details.
+
+## Other Relevant Files Besides `package.json`
+
+Some other files have an effect on the resulting data object, in the
+following ways:
+
+### `README?(.*)`
+
+If there is a `README` or `README.*` file present, then npm will attach
+a `readme` field to the data with the contents of this file.
+
+Owing to the fact that roughly 100% of existing node modules have
+Markdown README files, it will generally be assumed to be Markdown,
+regardless of the extension.  Please plan accordingly.
+
+### `server.js`
+
+If there is a `server.js` file, and there is not already a
+`scripts.start` field, then `scripts.start` will be set to `node
+server.js`.
+
+### `AUTHORS`
+
+If there is not already a `contributors` field, then the `contributors`
+field will be set to the contents of the `AUTHORS` file, split by lines,
+and parsed.
+
+### `bindings.gyp`
+
+If a bindings.gyp file exists, and there is not already a
+`scripts.install` field, then the `scripts.install` field will be set to
+`node-gyp rebuild`.
+
+### `wscript`
+
+If a wscript file exists, and there is not already a `scripts.install`
+field, then the `scripts.install` field will be set to `node-waf clean ;
+node-waf configure build`.
+
+Note that the `bindings.gyp` file supercedes this, since node-waf has
+been deprecated in favor of node-gyp.
+
+### `index.js`
+
+If the json file does not exist, but there is a `index.js` file
+present instead, and that file has a package comment, then it will try
+to parse the package comment, and use that as the data instead.
+
+A package comment looks like this:
+
+```javascript
+/**package
+ * { "name": "my-bare-module"
+ * , "version": "1.2.3"
+ * , "description": "etc...." }
+ **/
+
+// or...
+
+/**package
+{ "name": "my-bare-module"
+, "version": "1.2.3"
+, "description": "etc...." }
+**/
+```
+
+The important thing is that it starts with `/**package`, and ends with
+`**/`.  If the package.json file exists, then the index.js is not
+parsed.
+
+### `{directories.man}/*.[0-9]`
+
+If there is not already a `man` field defined as an array of files or a
+single file, and
+there is a `directories.man` field defined, then that directory will
+be searched for manpages.
+
+Any valid manpages found in that directory will be assigned to the `man`
+array, and installed in the appropriate man directory at package install
+time, when installed globally on a Unix system.
+
+### `{directories.bin}/*`
+
+If there is not already a `bin` field defined as a string filename or a
+hash of `<name> : <filename>` pairs, then the `directories.bin`
+directory will be searched and all the files within it will be linked as
+executables at install time.
+
+When installing locally, npm links bins into `node_modules/.bin`, which
+is in the `PATH` environ when npm runs scripts.  When
+installing globally, they are linked into `{prefix}/bin`, which is
+presumably in the `PATH` environment variable.
diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json
new file mode 100644 (file)
index 0000000..a018382
--- /dev/null
@@ -0,0 +1,38 @@
+{
+  "name": "read-package-json",
+  "version": "0.0.4",
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "description": "The thing npm uses to read package.json files with semantics and defaults and validation",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/read-package-json.git"
+  },
+  "main": "read-json.js",
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "dependencies": {
+    "glob": "~3.1.9",
+    "lru-cache": "~1.1.0",
+    "semver": "~1.0.14",
+    "npmlog": "0",
+    "graceful-fs": "~1.1.8"
+  },
+  "devDependencies": {
+    "tap": "~0.2.5"
+  },
+  "optionalDependencies": {
+    "npmlog": "0",
+    "graceful-fs": "~1.1.8"
+  },
+  "readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files.  It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n  if (er) {\n    console.error(\"There was an error reading the file\")\n    return\n  }\n\n  console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module.  But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff.  Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`.  Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again.  See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension.  Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`.  If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts.  When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
+  "_id": "read-package-json@0.0.4",
+  "dist": {
+    "shasum": "c6241ec84f4577117dbf96a9a290570ff3aaf8d0"
+  },
+  "_from": "read-package-json@0"
+}
diff --git a/deps/npm/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/read-package-json/read-json.js
new file mode 100644 (file)
index 0000000..d00a476
--- /dev/null
@@ -0,0 +1,511 @@
+// vim: set softtabstop=16 shiftwidth=16:
+
+try {
+                readJson.log = require("npmlog")
+} catch (er) {
+                readJson.log = {
+                                info: function () {},
+                                verbose: function () {},
+                                warn: function () {}
+                }
+}
+
+
+try {
+                var fs = require("graceful-fs")
+} catch (er) {
+                var fs = require("fs")
+}
+
+
+module.exports = readJson
+
+var LRU = require("lru-cache")
+readJson.cache = new LRU(1000)
+var path = require("path")
+var glob = require("glob")
+var slide = require("slide")
+var asyncMap = slide.asyncMap
+var semver = require("semver")
+
+// put more stuff on here to customize.
+readJson.extraSet = [gypfile, wscript, serverjs, authors, readme, mans, bins]
+
+var typoWarned = {}
+// http://registry.npmjs.org/-/fields
+var typos = { "dependancies": "dependencies"
+            , "dependecies": "dependencies"
+            , "depdenencies": "dependencies"
+            , "devEependencies": "devDependencies"
+            , "depends": "dependencies"
+            , "dev-dependencies": "devDependencies"
+            , "devDependences": "devDependencies"
+            , "devDepenencies": "devDependencies"
+            , "devdependencies": "devDependencies"
+            , "repostitory": "repository"
+            , "prefereGlobal": "preferGlobal"
+            , "hompage": "homepage"
+            , "hampage": "homepage"
+            , "autohr": "author"
+            , "autor": "author"
+            , "contributers": "contributors"
+            , "publicationConfig": "publishConfig"
+            }
+var bugsTypos = { "web": "url", "name": "url" }
+var scriptTypos = { "server": "start", "tests": "test" }
+var depTypes = [ "dependencies"
+               , "devDependencies"
+               , "optionalDependencies" ]
+
+
+function readJson (file, cb) {
+                var c = readJson.cache.get(file)
+                if (c) {
+                                readJson.log.verbose("from cache", file)
+                                cb = cb.bind(null, null, c)
+                                return process.nextTick(cb);
+                }
+                readJson.log.verbose("read json", file)
+                cb = (function (orig) { return function (er, data) {
+                                if (data) readJson.cache.set(file, data);
+                                return orig(er, data)
+                } })(cb)
+                readJson_(file, cb)
+}
+
+
+function readJson_ (file, cb) {
+                fs.readFile(file, "utf8", function (er, d) {
+                                if (er && er.code === "ENOENT") {
+                                                indexjs(file, er, cb)
+                                                return
+                                }
+                                if (er) return cb(er);
+                                try {
+                                                d = JSON.parse(d)
+                                } catch (er) {
+                                                er = parseError(er, file);
+                                                return cb(er);
+                                }
+                                extras(file, d, cb)
+                })
+}
+
+
+function indexjs (file, er, cb) {
+                if (path.basename(file) === "index.js") {
+                                return cb(er);
+                }
+                var index = path.resolve(path.dirname(file), "index.js")
+                fs.readFile(index, "utf8", function (er2, d) {
+                                if (er2) return cb(er);
+                                d = parseIndex(d)
+                                if (!d) return cb(er);
+                                extras(file, d, cb)
+                })
+}
+
+
+readJson.extras = extras
+function extras (file, data, cb) {
+                asyncMap(readJson.extraSet, function (fn, cb) {
+                                return fn(file, data, cb)
+                }, function (er) {
+                                if (er) return cb(er);
+                                final(file, data, cb)
+                })
+}
+
+function gypfile (file, data, cb) {
+                var dir = path.dirname(file)
+                var s = data.scripts || {}
+                if (s.install || s.preinstall) {
+                                return cb(null, data);
+                }
+                glob("*.gyp", { cwd: dir }, function (er, files) {
+                                if (er) return cb(er);
+                                gypfile_(file, data, files, cb)
+                })
+}
+
+function gypfile_ (file, data, files, cb) {
+                if (!files.length) return cb(null, data);
+                var s = data.scripts || {}
+                s.install = "node-gyp rebuild"
+                data.scripts = s
+                data.gypfile = true
+                return cb(null, data);
+}
+
+function wscript (file, data, cb) {
+                var dir = path.dirname(file)
+                var s = data.scripts || {}
+                if (s.install || s.preinstall) {
+                                return cb(null, data);
+                }
+                glob("wscript", { cwd: dir }, function (er, files) {
+                                if (er) return cb(er);
+                                wscript_(file, data, files, cb)
+                })
+}
+function wscript_ (file, data, files, cb) {
+                if (!files.length || data.gypfile) return cb(null, data);
+                var s = data.scripts || {}
+                s.install = "node-waf clean ; node-waf configure build"
+                data.scripts = s
+                return cb(null, data);
+}
+
+function serverjs (file, data, cb) {
+                var dir = path.dirname(file)
+                var s = data.scripts || {}
+                if (s.start) return cb(null, data)
+                glob("server.js", { cwd: dir }, function (er, files) {
+                                if (er) return cb(er);
+                                serverjs_(file, data, files, cb)
+                })
+}
+function serverjs_ (file, data, files, cb) {
+                if (!files.length) return cb(null, data);
+                var s = data.scripts || {}
+                s.start = "node server.js"
+                data.scripts = s
+                return cb(null, data)
+}
+
+function authors (file, data, cb) {
+                if (data.contributors) return cb(null, data);
+                var af = path.resolve(path.dirname(file), "AUTHORS")
+                fs.readFile(af, "utf8", function (er, ad) {
+                                // ignore error.  just checking it.
+                                if (er) return cb(null, data);
+                                authors_(file, data, ad, cb)
+                })
+}
+function authors_ (file, data, ad, cb) {
+                ad = ad.split(/\r?\n/g).map(function (line) {
+                                return line.replace(/^\s*#.*$/, '').trim()
+                }).filter(function (line) {
+                                return line
+                })
+                data.contributors = ad
+                return cb(null, data)
+}
+
+function readme (file, data, cb) {
+                if (data.readme) return cb(null, data);
+                var dir = path.dirname(file)
+                glob("README?(.*)", { cwd: dir }, function (er, files) {
+                                if (er) return cb(er);
+                                if (!files.length) return cb()
+                                var rm = path.resolve(dir, files[0])
+                                readme_(file, data, rm, cb)
+                })
+}
+function readme_(file, data, rm, cb) {
+                fs.readFile(rm, "utf8", function (er, rm) {
+                                data.readme = rm
+                                return cb(er, data)
+                })
+}
+
+function mans (file, data, cb) {
+                var m = data.directories && data.directories.man
+                if (data.man || !m) return cb(null, data);
+                m = path.resolve(path.dirname(file), m)
+                glob("**/*.[0-9]", { cwd: m }, function (er, mans) {
+                                if (er) return cb(er);
+                                mans_(file, data, mans, cb)
+                })
+}
+function mans_ (file, data, mans, cb) {
+                var m = data.directories && data.directories.man
+                data.man = mans.map(function (mf) {
+                                return path.resolve(m, mf)
+                })
+                return cb(null, data)
+}
+
+function bins (file, data, cb) {
+                var m = data.directories && data.directories.bin
+                if (data.bin || !m) return cb(null, data);
+                m = path.resolve(path.dirname(file), m)
+                glob("**", { cwd: m }, function (er, bins) {
+                                if (er) return cb(er);
+                                bins_(file, data, bins, cb)
+                })
+}
+function bins_ (file, data, bins, cb) {
+                var m = data.directories && data.directories.bin
+                data.bin = bins.map(function (mf) {
+                                return path.resolve(m, mf)
+                })
+                return cb(null, data)
+}
+
+function final (file, data, cb) {
+                var ret = validName(file, data)
+                if (ret !== true) return cb(ret);
+                ret = validVersion(file, data)
+                if (ret !== true) return cb(ret);
+
+                data._id = data.name + "@" + data.version
+                typoWarn(file, data)
+                validRepo(file, data)
+                validFiles(file, data)
+                validBin(file, data)
+                validMan(file, data)
+                validBundled(file, data)
+                objectifyDeps(file, data)
+                unParsePeople(file, data)
+                parsePeople(file, data)
+
+                readJson.cache.set(file, data)
+                cb(null, data)
+}
+
+
+// /**package { "name": "foo", "version": "1.2.3", ... } **/
+function parseIndex (data) {
+                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, "")
+                try {
+                                return JSON.parse(data)
+                } catch (er) {
+                                return null
+                }
+}
+
+function parseError (ex, file) {
+                var e = new Error("Failed to parse json\n"+ex.message)
+                e.code = "EJSONPARSE"
+                e.file = file
+                return e
+}
+
+// a warning for deprecated or likely-incorrect fields
+function typoWarn (file, data) {
+                if (typoWarned[data._id]) return;
+                typoWarned[data._id] = true
+                if (data.modules) {
+                                warn(file, data,
+                                     "'modules' is deprecated")
+                                delete data.modules
+                }
+                Object.keys(typos).forEach(function (d) {
+                                checkTypo(file, data, d)
+                })
+                bugsTypoWarn(file, data)
+                scriptTypoWarn(file, data)
+}
+
+function checkTypo (file, data, d) {
+                if (!data.hasOwnProperty(d)) return;
+                warn(file, data,
+                     "'" + d + "' should probably be '" + typos[d] + "'" )
+}
+
+function bugsTypoWarn (file, data) {
+                var b = data.bugs
+                if (!b || typeof b !== "object") return
+                Object.keys(b).forEach(function (k) {
+                                if (bugsTypos[k]) {
+                                                b[bugsTypos[k]] = b[k]
+                                                delete b[k]
+                                }
+                })
+}
+
+function scriptTypoWarn (file, data) {
+                var s = data.scripts
+                if (!s || typeof s !== "object") return
+                Object.keys(s).forEach(function (k) {
+                                if (scriptTypos[k]) {
+                                                scriptWarn_(file, data, k)
+                                }
+                })
+}
+function scriptWarn_ (file, data, k) {
+                warn(file, data, "scripts['" + k + "'] should probably " +
+                     "be scripts['" + scriptTypos[k] + "']")
+}
+
+function validRepo (file, data) {
+                if (data.repostories) {
+                                warnRepositories(file, data)
+                }
+                if (!data.repository) return;
+                if (typeof data.repository === "string") {
+                                data.repository = {
+                                                type: "git",
+                                                url: data.repository
+                                }
+                }
+                var r = data.repository.url || ""
+                // use the non-private urls
+                r = r.replace(/^(https?|git):\/\/[^\@]+\@github.com/,
+                              '$1://github.com')
+                r = r.replace(/^https?:\/\/github.com/,
+                              'git://github.com')
+                if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) {
+                                warn(file, data, "Probably broken git " +
+                                     "url: " + r)
+                }
+}
+function warnRepostories (file, data) {
+                warn(file, data,
+                     "'repositories' (plural) Not supported.\n" +
+                     "Please pick one as the 'repository' field");
+                data.repository = data.repositories[0]
+}
+
+function validFiles (file, data) {
+                var files = data.files
+                if (files && !Array.isArray(files)) {
+                                warn(file, data, "Invalid 'files' member")
+                                delete data.files
+                }
+}
+
+function validBin (file, data) {
+                if (!data.bin) return;
+                if (typeof data.bin === "string") {
+                                var b = {}
+                                b[data.name] = data.bin
+                                data.bin = b
+                }
+}
+
+function validMan (file, data) {
+                if (!data.man) return;
+                if (typeof data.man === "string") {
+                                data.man = [ data.man ]
+                }
+}
+
+function validBundled (file, data) {
+                var bdd = "bundledDependencies"
+                var bd = "bundleDependencies"
+                if (data[bdd] && !data[bd]) {
+                                data[bd] = data[bdd]
+                                delete data[bdd]
+                }
+
+                if (data[bd] && !Array.isArray(data[bd])) {
+                                warn(file, data, "bundleDependencies " +
+                                     "must be an array")
+                }
+}
+
+function objectifyDeps (file, data) {
+                depTypes.forEach(function (d) {
+                                objectifyDep_(file, data, d)
+                })
+
+                var o = data.optionalDependencies
+                if (!o) return;
+                var d = data.dependencies || {}
+                Object.keys(o).forEach(function (k) {
+                                d[k] = o[k]
+                })
+                data.dependencies = d
+}
+function objectifyDep_ (file, data, type) {
+                if (!data[type]) return;
+                data[type] = depObjectify(file, data, data[type])
+}
+function depObjectify (file, data, deps) {
+                if (!deps) return {}
+                if (typeof deps === "string") {
+                                deps = deps.trim().split(/[\n\r\s\t ,]+/)
+                }
+                if (!Array.isArray(deps)) return deps
+                var o = {}
+                deps.forEach(function (d) {
+                                d = d.trim().split(/(:?[@\s><=])/)
+                                var dn = d.shift()
+                                var dv = d.join("")
+                                dv = dv.trim()
+                                dv = dv.replace(/^@/, "")
+                                o[dn] = dv
+                })
+                return o
+}
+
+
+function warn (f, d, m) {
+                readJson.log.warn("package.json", d._id, m)
+}
+
+
+function validName (file, data) {
+                if (!data.name) return new Error("No 'name' field")
+                data.name = data.name.trim()
+                if (data.name.charAt(0) === "." ||
+                    data.name.match(/[\/@\s\+%:]/) ||
+                    data.name.toLowerCase() === "node_modules" ||
+                    data.name.toLowerCase() === "favicon.ico") {
+                                return new Error("Invalid name: " +
+                                                 JSON.stringify(data.name))
+                }
+                return true
+}
+
+
+function parseKeywords (file, data) {
+                var kw = data.keywords
+                if (typeof kw === "string") {
+                                kw = kw.split(/,\s+/)
+                                data.keywords = kw
+                }
+}
+
+function validVersion (file, data) {
+                var v = data.version
+                if (!v) return new Error("no version");
+                if (!semver.valid(v)) {
+                                return new Error("invalid version: "+v)
+                }
+                data.version = semver.clean(data.version)
+                return true
+}
+function unParsePeople (file, data) {
+                return parsePeople(file, data, true)
+}
+
+function parsePeople (file, data, un) {
+                var fn = un ? unParsePerson : parsePerson
+                if (data.author) data.author = fn(data.author)
+                ;["maintainers", "contributors"].forEach(function (set) {
+                                if (!Array.isArray(data[set])) return;
+                                data[set] = data[set].map(fn)
+                })
+                return data
+}
+
+function unParsePerson (person) {
+                if (typeof person === "string") return person
+                var name = person.name || ""
+                var u = person.url || person.web
+                var url = u ? (" ("+u+")") : ""
+                var e = person.email || person.mail
+                var email = e ? (" <"+e+">") : ""
+                return name+email+url
+}
+
+function parsePerson (person) {
+                if (typeof person !== "string") return person
+                var name = person.match(/^([^\(<]+)/)
+                var url = person.match(/\(([^\)]+)\)/)
+                var email = person.match(/<([^>]+)>/)
+                var obj = {}
+                if (name && name[0].trim()) obj.name = name[0].trim()
+                if (email) obj.email = email[1];
+                if (url) obj.url = url[1];
+                return obj
+}
index 61476b0..b21d9b2 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "version": "1.1.25",
+  "version": "1.1.26",
   "name": "npm",
   "publishConfig": {
     "proprietary-attribs": false
     "inherits": "1",
     "mkdirp": "~0.3.3",
     "read": "0",
-    "lru-cache": "1",
-    "node-gyp": "~0.4.5",
+    "lru-cache": "~1.1.0",
+    "node-gyp": "~0.5",
     "fstream-npm": "0.1",
     "uid-number": "0",
     "archy": "0",
     "chownr": "0",
     "npmlog": "0",
     "ansi": "~0.1.2",
-    "npm-registry-client": "0"
+    "npm-registry-client": "0",
+    "read-package-json": "0",
+    "read-installed": "0",
+    "glob": "~3.1.9"
   },
   "bundleDependencies": [
     "slide",
     "chownr",
     "npmlog",
     "ansi",
-    "npm-registry-client"
+    "npm-registry-client",
+    "read-package-json",
+    "read-installed",
+    "glob"
   ],
   "devDependencies": {
     "ronn": "https://github.com/isaacs/ronnjs/tarball/master"
diff --git a/deps/npm/test/packages/npm-test-ignore-nested-nm/lib/node_modules/foo b/deps/npm/test/packages/npm-test-ignore-nested-nm/lib/node_modules/foo
new file mode 100644 (file)
index 0000000..2c9d06a
--- /dev/null
@@ -0,0 +1 @@
+I WILL NOT BE IGNORED!