Update npm to 1.1.0-2
authorisaacs <i@izs.me>
Mon, 16 Jan 2012 23:06:16 +0000 (15:06 -0800)
committerisaacs <i@izs.me>
Mon, 16 Jan 2012 23:06:16 +0000 (15:06 -0800)
142 files changed:
deps/npm/.gitmodules [deleted file]
deps/npm/.npmignore
deps/npm/AUTHORS
deps/npm/Makefile
deps/npm/bin/npm [new file with mode: 0755]
deps/npm/bin/npm-g.cmd [deleted file]
deps/npm/bin/npm_g.cmd [deleted file]
deps/npm/doc/cli/config.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/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/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/cache.js
deps/npm/lib/init.js
deps/npm/lib/install.js
deps/npm/lib/submodule.js
deps/npm/lib/utils/cmd-shim.js
deps/npm/lib/utils/config-defs.js
deps/npm/lib/utils/error-handler.js
deps/npm/lib/utils/ini.js
deps/npm/lib/utils/lifecycle.js
deps/npm/lib/utils/read-installed.js
deps/npm/lib/utils/read-json.js
deps/npm/lib/version.js
deps/npm/man/man1/config.1
deps/npm/man/man1/npm.1
deps/npm/man/man3/npm.3
deps/npm/node_modules/fast-list/README.md
deps/npm/node_modules/fast-list/fast-list.js
deps/npm/node_modules/fast-list/package.json
deps/npm/node_modules/ini/README.md
deps/npm/node_modules/ini/ini.js
deps/npm/node_modules/ini/package.json
deps/npm/node_modules/minimatch/README.md
deps/npm/node_modules/minimatch/minimatch.js
deps/npm/node_modules/minimatch/package.json
deps/npm/node_modules/node-uuid/README.md
deps/npm/node_modules/node-uuid/package.json
deps/npm/node_modules/node-uuid/uuid.js
deps/npm/node_modules/request/README.md
deps/npm/node_modules/request/forever.js [new file with mode: 0644]
deps/npm/node_modules/request/main.js
deps/npm/node_modules/request/oauth.js
deps/npm/node_modules/request/package.json
deps/npm/node_modules/request/vendor/cookie/index.js
deps/npm/node_modules/rimraf/package.json
deps/npm/node_modules/rimraf/rimraf.js
deps/npm/node_modules/semver/package.json
deps/npm/node_modules/semver/semver.js
deps/npm/node_modules/tar/lib/parse.js
deps/npm/node_modules/tar/package.json
deps/npm/package.json
deps/npm/scripts/doc-build.sh
deps/npm/test/packages/npm-test-optional-deps/package.json [new file with mode: 0644]

diff --git a/deps/npm/.gitmodules b/deps/npm/.gitmodules
deleted file mode 100644 (file)
index 169c875..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-[submodule "node_modules/semver"]
-       path = node_modules/semver
-       url = https://github.com/isaacs/node-semver.git
-[submodule "node_modules/abbrev"]
-       path = node_modules/abbrev
-       url = https://github.com/isaacs/abbrev-js.git
-[submodule "node_modules/nopt"]
-       path = node_modules/nopt
-       url = https://github.com/isaacs/nopt.git
-[submodule "node_modules/node-uuid"]
-       path = node_modules/node-uuid
-       url = https://github.com/broofa/node-uuid
-[submodule "node_modules/minimatch"]
-       path = node_modules/minimatch
-       url = https://github.com/isaacs/minimatch.git
-[submodule "node_modules/graceful-fs"]
-       path = node_modules/graceful-fs
-       url = https://github.com/isaacs/node-graceful-fs.git
-[submodule "node_modules/slide"]
-       path = node_modules/slide
-       url = https://github.com/isaacs/slide-flow-control.git
-[submodule "node_modules/rimraf"]
-       path = node_modules/rimraf
-       url = https://github.com/isaacs/rimraf.git
-[submodule "node_modules/proto-list"]
-       path = node_modules/proto-list
-       url = https://github.com/isaacs/proto-list.git
-[submodule "node_modules/ini"]
-       path = node_modules/ini
-       url = https://github.com/isaacs/ini.git
-[submodule "node_modules/which"]
-       path = node_modules/which
-       url = https://github.com/isaacs/node-which.git
-[submodule "node_modules/request"]
-       path = node_modules/request
-       url = https://github.com/mikeal/request.git
-[submodule "node_modules/tar"]
-       path = node_modules/tar
-       url = https://github.com/isaacs/node-tar.git
-[submodule "node_modules/fstream"]
-       path = node_modules/fstream
-       url = https://github.com/isaacs/fstream.git
-[submodule "node_modules/inherits"]
-       path = node_modules/inherits
-       url = https://github.com/isaacs/inherits.git
-[submodule "node_modules/block-stream"]
-       path = node_modules/block-stream
-       url = https://github.com/isaacs/block-stream.git
-[submodule "node_modules/mkdirp"]
-       path = node_modules/mkdirp
-       url = https://github.com/isaacs/node-mkdirp.git
-[submodule "node_modules/fast-list"]
-       path = node_modules/fast-list
-       url = https://github.com/isaacs/fast-list.git
-[submodule "node_modules/read"]
-       path = node_modules/read
-       url = https://github.com/isaacs/read.git
-[submodule "node_modules/lru-cache"]
-       path = node_modules/lru-cache
-       url = https://github.com/isaacs/node-lru-cache.git
index 7ba078e516c6575180df8a9288731e5416122541..6ab186883a59ee8e2709197c909a1280635af83c 100644 (file)
@@ -10,3 +10,4 @@ node_modules/.bin
 npm-debug.log
 ./npmrc
 .gitignore
+release/
index 59d7257e810ecad55ab9ca92ac7bae27b5a3d38b..c977af8c48bb5b5c5abd63a68bd678c3b97defb6 100644 (file)
@@ -48,3 +48,6 @@ Jameson Little <t.jameson.little@gmail.com>
 cspotcode <cspotcode@gmail.com>
 Maciej MaÅ‚ecki <maciej.malecki@notimplemented.org>
 Stephen Sugden <glurgle@gmail.com>
+Gautham Pai <buzypi@gmail.com>
+David Trejo <david.daniel.trejo@gmail.com>
+Paul Vorbach <paul@vorb.de>
index 7d3e10653592843298f6932486bb25df46869f3d..415a1b3d6864282b4eb9ef248d19f652c76bce9e 100644 (file)
@@ -27,12 +27,9 @@ mandocs = $(api_mandocs) $(cli_mandocs)
 
 htmldocs = $(api_htmldocs) $(cli_htmldocs)
 
-all: submodules doc
+all: doc
 
-submodules:
-       ! [ -d .git ] || git submodule update --init --recursive
-
-latest: submodules
+latest:
        @echo "Installing latest published npm"
        @echo "Use 'make install' or 'make link' to install the code"
        @echo "in this folder that you're looking at right now."
@@ -51,7 +48,7 @@ clean: doc-clean uninstall
        rm npmrc
        node cli.js cache clean
 
-uninstall: submodules
+uninstall:
        node cli.js rm npm -g -f
 
 doc: $(mandocs) $(htmldocs)
@@ -94,14 +91,14 @@ html/api/%.html: doc/api/%.md html/dochead.html html/docfoot.html scripts/doc-bu
 doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh package.json
        node scripts/index-build.js > $@
 
-node_modules/ronn:
+node_modules/.bin/ronn:
        node cli.js install https://github.com/isaacs/ronnjs/tarball/master
 
 doc: man
 
 man: $(cli_docs) $(api_docs)
 
-test: submodules
+test:
        node cli.js test
 
 version: link
@@ -109,9 +106,10 @@ version: link
        git ci -m v$(shell npm -v)
 
 publish: link doc
-       git tag -d v$(shell npm -v) || true
-       git push origin :v$(shell npm -v) || true
-       npm unpublish npm@$(shell npm -v) || true
+       @git tag -d v$(shell npm -v) || true
+       @git push origin :v$(shell npm -v) || true
+       @npm unpublish npm@$(shell npm -v) || true
+       git clean -fd
        git tag -s -m v$(shell npm -v) v$(shell npm -v) &&\
        git push origin --tags &&\
        npm publish &&\
diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm
new file mode 100755 (executable)
index 0000000..5fbcd3b
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ -x "`dirname "$0"`/node.exe" ]; then
+  "`dirname "$0"`/node.exe" "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"
+else
+  node "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"
+fi
diff --git a/deps/npm/bin/npm-g.cmd b/deps/npm/bin/npm-g.cmd
deleted file mode 100644 (file)
index bac9e5f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-:: Created by npm, please don't edit manually.\r
-@IF EXIST "%~dp0"\"node.exe" (\r
-  "%~dp0"\"node.exe"  "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
-) ELSE (\r
-  node  "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
-)
\ No newline at end of file
diff --git a/deps/npm/bin/npm_g.cmd b/deps/npm/bin/npm_g.cmd
deleted file mode 100644 (file)
index bac9e5f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-:: Created by npm, please don't edit manually.\r
-@IF EXIST "%~dp0"\"node.exe" (\r
-  "%~dp0"\"node.exe"  "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
-) ELSE (\r
-  node  "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*\r
-)
\ No newline at end of file
index e70acc258a72d13761e0ff0fb6ea81d31ad61555..2c6ca26c02b16039ecc4ffad62752ab506f640cb 100644 (file)
@@ -101,6 +101,7 @@ The following shorthands are parsed on the command-line:
 * `-v`: `--version`
 * `-h`, `-?`, `--help`, `-H`: `--usage`
 * `-s`, `--silent`: `--loglevel silent`
+* `-q`, `--quiet`: `--loglevel warn`
 * `-d`: `--loglevel info`
 * `-dd`, `--verbose`: `--loglevel verbose`
 * `-ddd`: `--loglevel silly`
@@ -278,6 +279,15 @@ Makes various commands more forceful.
 * skips cache when requesting from the registry.
 * prevents checks against clobbering non-npm files.
 
+### git
+
+* Default: `"git"`
+* Type: String
+
+The command to use for git commands.  If git is installed on the
+computer, but is not in the `PATH`, then set this to the full path to
+the git binary.
+
 ### global
 
 * Default: false
index a5bd3325c4c74aae6ee84855157cc9c88c300d9b..c4392671df19191dd5806f465d73044118d32ce5 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.0-beta-10</p>
+<p id="footer">bin &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3e21d5f700f1ce84889c86c2a0499725d24d3071..df2aaf6c30fb6d5da48d4237c2095c369658367a 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.0-beta-10</p>
+<p id="footer">bugs &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a8c0889d3413624c621d532ffe477f94b3de8a8f..cfdc5f1f5099beeeeb00b40ccf22bfd0d8ac5f68 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.0-beta-10</p>
+<p id="footer">commands &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 95ad4c3f48526c39f612ffede1d4307a54b31fb1..f7431f9afebc8c1fcac2a3e55b2d214ffdf83a2f 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.0-beta-10</p>
+<p id="footer">config &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f16520e88e9c387e2f0eb09e54857bc7c44b5da2..b68d13449e75d44d3b77f24676ea3f28a497d748 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.0-beta-10</p>
+<p id="footer">deprecate &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 88f06a714dcc929f01a9ef3757782cd87db5cd8c..00913e5f363961de4e3ac4c40785a51ef6af47b7 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.0-beta-10</p>
+<p id="footer">docs &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 92c5f58d9299472ea537ad98469974afc344f9f3..fbf2ff1cbab91b71231846658e4662cd63831be1 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.0-beta-10</p>
+<p id="footer">edit &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c54d5c47b955c3b85a98d71bbd0a870a32597fc8..29fe1f20596009f47cc87bf831dc3baf9ae363c2 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.0-beta-10</p>
+<p id="footer">explore &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9bc8e1b85eb13dfc171f87f9cace6a5bdd3dd3be..d784c426f2cf187bcf4c3c351d5cd89fc1dd4ca3 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.0-beta-10</p>
+<p id="footer">help-search &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9aedc224e10b45df791467f8d18d91816058be39..1a45b58daf755a8f702772d572e454cebfd392e8 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.0-beta-10</p>
+<p id="footer">init &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a2d26c9ae4184f769bd77c7a8a034e4291f6c87a..41d51b37c0e3606b3a974df3378afa437856e9af 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.0-beta-10</p>
+<p id="footer">install &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 256069b248ef9db7e4ed32642f10a1f98816fe8b..eb1151c17a20ce957ba16b7d3d14bc3692965206 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.0-beta-10</p>
+<p id="footer">link &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c23136a22ce24ed3a52a6354fbc3624b08f56fa9..f134cfcb501e2034cc95f44fdced266f3a16a494 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.0-beta-10</p>
+<p id="footer">load &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index ba4e59a4547d0d38bae2434a78ebd6f98b89f889..d68d94579d791f13f8cd6881ec16ce62db250642 100644 (file)
@@ -53,7 +53,7 @@ project.</p>
 This means that if a submodule a same dependency as a parent module, then the
 dependency will only be output once.</p>
 </div>
-<p id="footer">ls &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">ls &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6824bd4c335603be69afa56f1b5915e9213a811c..f01571b28b3f8a54c07058f8b1b6505c0b77a97a 100644 (file)
@@ -24,7 +24,7 @@ npm.load(configObject, function (er, npm) {
 
 <h2 id="VERSION">VERSION</h2>
 
-<p>1.1.0-beta-10</p>
+<p>1.1.0-2</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.0-beta-10</p>
+<p id="footer">npm &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 31fa66eded3a4907da07edde4b87a7b3b253d82d..f145e17d9b020084befcdc1e174a735fbe75c814 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.0-beta-10</p>
+<p id="footer">outdated &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 8e9f9f904ffb4a33bc57eb27840056e992acb4d5..7829e5b098b5ed362b798f9370faf9b5331c08ee 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.0-beta-10</p>
+<p id="footer">owner &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 0eb4a1203f927001edd0016efffa033f27524356..cc6cd870ad7c0311ced033356e11a4e86b9b3787 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.0-beta-10</p>
+<p id="footer">pack &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 15be64df7cd2abfe92e3c554fc22dc9b51a0ee13..52c5c8d55abb271314d0591f1d4889e83a109351 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically</p>
 </div>
-<p id="footer">prefix &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">prefix &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2700cf0d390d5464e19a7da6ca16261726a059d4..e40426942a96272c800184f9cb80a9cd820ae528 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.0-beta-10</p>
+<p id="footer">prune &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 99d2cb8643416caf4528347463e7531b056d1f7b..7e80a2cc1fc75c8dea292e096f5e781d959de625 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.0-beta-10</p>
+<p id="footer">publish &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 669913174ea0d51c7c619123b7aee47f500eda93..271c85cf4b3ba7a48eb0c743bc6c212cec56df04 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.0-beta-10</p>
+<p id="footer">rebuild &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 03c9b81687c5f2d180f8bf9ec43050e2fe938d6e..bbff37d955e2c25436d0e980f5087fa517997841 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.0-beta-10</p>
+<p id="footer">restart &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 26ab52576b0d5cdfa9f9421f1b6b9682c60dadf3..fe1e0ddd2424b4b3a93578d16cc57db956b9f99b 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically.</p>
 </div>
-<p id="footer">root &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">root &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f945341130043b9530dcec28939896f0b9cc1322..6fc2ed3b911140e91f4aa0d550c57a9f1162e739 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.0-beta-10</p>
+<p id="footer">run-script &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 24782a583aeb7004257b47062ad305e558ad5762..dace13e2e0d070592c4961558b1c49e05da7e897 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.0-beta-10</p>
+<p id="footer">search &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d415c950f1bdeeb53204eb736e2741f4da019cbe..28f6eb34fb2e6fcfd4f1d90b8685a35c95161faf 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.0-beta-10</p>
+<p id="footer">start &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index ef9b22d72ceb88e8f40816edb9c205a999f84948..d6fd91ce883dc0f35f9b18e9064306b92683ca81 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.0-beta-10</p>
+<p id="footer">stop &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 7dcb184af55f6a6258f7966e9b154478ea46a995..a9fed04a54fceccb2f0f2b7e9e8fb8574602fd90 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.0-beta-10</p>
+<p id="footer">submodule &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 5bfa51fb0dc9a86b74d7372f43bb1235828a56ca..c94f459de218e4038dfe897a494f6a6be17d9b31 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.0-beta-10</p>
+<p id="footer">tag &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 27918a9f1e1f9dec34d48e256cfd511da3e3c9e4..d72d7cdf1c0d6a260ae6aa9826e27dcf9c4af24b 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.0-beta-10</p>
+<p id="footer">test &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6b11b26b742b4632806b7cabb97e71aa8f7913b0..1b86afc0122fde6802d44e19594068cd95c5eb17 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.0-beta-10</p>
+<p id="footer">uninstall &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2f302d010190e50c19c8e9abfb330bb655edc445..d5afd9a87fb6aaa60a2f3d2ae9101a77edb2a404 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.0-beta-10</p>
+<p id="footer">unpublish &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d99018b63e48bb8c64d0c51535f2421b12ca94c9..a9db9fa58a44b6a1e5d246612ed7d25ddcfab7d8 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.0-beta-10</p>
+<p id="footer">update &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a2c4271db425f73d5933b8638b25ddcc110546bc..4c4e906a216eb3faf5602360bd7fe207f632483c 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.0-beta-10</p>
+<p id="footer">version &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 0d3974c06a78a02eaad06c33ddabe29206e562e2..d25d2db41916850ce88005da1c9d17581719197c 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.0-beta-10</p>
+<p id="footer">view &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e2f6058b11079c51f28dddf6b375fe270084f464..85b3134952129a6e25ee3f5bd8f675b1b259191f 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically</p>
 </div>
-<p id="footer">whoami &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">whoami &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 8417f1cca9b2fe3bd7446592bee577cdb729d35b..b353238bfc63849c87aa92370f324214dfefbd74 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.0-beta-10</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index cb17e967e75306352de6ee92c9cd5ecbf4e977ff..9757f703e6f0f92b0377b20323c6d02ef8faa3d2 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.0-beta-10</p>
+<p id="footer">adduser &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a46607bf326d06c1918880aad40023e9dcb538e3..582493e5759b6060b23d3aa401eb2be5186ddeb6 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.0-beta-10</p>
+<p id="footer">bin &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f7401af0782fb1ceec700bcd491a7bf363050e48..4653330968767223906db4149efff980302c9ca9 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.0-beta-10</p>
+<p id="footer">bugs &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d374962378bdc9c85054a9ae090623281ea49b95..d0709fb51da8e12742cca509777b10d142de3d13 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.0-beta-10</p>
+<p id="footer">build &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 25b9991e83d01230a4e3c1bcb87157931ea56139..b449b4915429062770908987e45870837e2e23ce 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.0-beta-10</p>
+<p id="footer">bundle &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a693cb0f324cb08134dcc252fa03fd0f6f7e1175..92fbf6467083957760eb86095eaf0531b497c8dc 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.0-beta-10</p>
+<p id="footer">cache &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9b96ce15ffd6a39ba156c9754fa8032f1424d9ed..514b76258f600aba9a2097c52119a320b37faac8 100644 (file)
@@ -34,7 +34,7 @@
 
 <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
 </div>
-<p id="footer">changelog &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">changelog &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 5fd2f8f9332bea67a31feed71c79f4085f11b949..1d05ff507fbd50cddc38492ecd05e4bab4ac59ae 100644 (file)
@@ -191,7 +191,7 @@ set to anything."</p>
 
 <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
 </div>
-<p id="footer">coding-style &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">coding-style &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index efd7399d00f8ce35324738c26a5c65b300da2abc..386a2760aed2285d5c13cfe35f9ce4b39bae6e6b 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.0-beta-10</p>
+<p id="footer">completion &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 98d3856b79ff8e455c490277e26a90d9234df0c9..c950154f241f8c6a63c6144802b7aba1cdffb8c4 100644 (file)
@@ -105,7 +105,7 @@ global config.</p>
 
 <p>The following shorthands are parsed on the command-line:</p>
 
-<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
+<ul><li><code>-v</code>: <code>--version</code></li><li><code>-h</code>, <code>-?</code>, <code>--help</code>, <code>-H</code>: <code>--usage</code></li><li><code>-s</code>, <code>--silent</code>: <code>--loglevel silent</code></li><li><code>-q</code>, <code>--quiet</code>: <code>--loglevel warn</code></li><li><code>-d</code>: <code>--loglevel info</code></li><li><code>-dd</code>, <code>--verbose</code>: <code>--loglevel verbose</code></li><li><code>-ddd</code>: <code>--loglevel silly</code></li><li><code>-g</code>: <code>--global</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-m</code>: <code>--message</code></li><li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li><li><code>-reg</code>: <code>--registry</code></li><li><code>-v</code>: <code>--version</code></li><li><code>-f</code>: <code>--force</code></li><li><code>-l</code>: <code>--long</code></li><li><code>-desc</code>: <code>--description</code></li><li><code>-S</code>: <code>--save</code></li><li><code>-y</code>: <code>--yes</code></li><li><code>-n</code>: <code>--yes false</code></li><li><code>ll</code> and <code>la</code> commands: <code>ls --long</code></li></ul>
 
 <p>If the specified configuration param resolves unambiguously to a known
 configuration parameter, then it is expanded to that configuration
@@ -251,6 +251,14 @@ or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul>
 
 <ul><li>lifecycle script failure does not block progress.</li><li>publishing clobbers previously published versions.</li><li>skips cache when requesting from the registry.</li><li>prevents checks against clobbering non-npm files.</li></ul>
 
+<h3 id="git">git</h3>
+
+<ul><li>Default: <code>"git"</code></li><li>Type: String</li></ul>
+
+<p>The command to use for git commands.  If git is installed on the
+computer, but is not in the <code>PATH</code>, then set this to the full path to
+the git binary.</p>
+
 <h3 id="global">global</h3>
 
 <ul><li>Default: false</li><li>Type: Boolean</li></ul>
@@ -615,7 +623,7 @@ then answer "no" to any prompt.</p>
 
 <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
 </div>
-<p id="footer">config &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">config &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 055ed7f00383ee79baea914a5c237e25fd7c34f3..43f07a490fb4249b7229bfd3532b55a38a05fc50 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.0-beta-10</p>
+<p id="footer">deprecate &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b611b6ed9b44c905686a40cadd7ef8f65cd53b76..ba3189bb60ac76d26cfa2dc393464658d38a330e 100644 (file)
@@ -150,7 +150,7 @@ from a fresh checkout.</p>
 
 <ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
 </div>
-<p id="footer">developers &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">developers &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 42320d3057bf2de9355c65fda05820f2704b1241..074fa001e28744822ecdbc336a24b72348390ed6 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.0-beta-10</p>
+<p id="footer">disputes &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 7c0d94d7daf209530c1003c95a5a433ff13bee82..aad9a402c12090fc71eac2933813cf762ddb2a9c 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.0-beta-10</p>
+<p id="footer">docs &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b4e42ea42b81b590a5796e9570e537e82c4e493d..0a5371e16ffe0cd56fba0fa8b130810d50cfb146 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.0-beta-10</p>
+<p id="footer">edit &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 8eac9c9b06589024c2856b5ad2926a538696d7eb..6c29e11235c172719291ce74065cf63ece26a87f 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.0-beta-10</p>
+<p id="footer">explore &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 18304738f5c254161338ee6cb5be83c177739095..d4853ac42fd9bd30c26bb495e0fc1ab23de95a8d 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.0-beta-10</p>
+<p id="footer">faq &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9f17e6545c62d3416ac637afeafcb5f2c20d1be8..987c5b8a860d45b49ea5c898a21958747df767b8 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.0-beta-10</p>
+<p id="footer">folders &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 976fab5645fb1de95bc89766f9220212253d1326..92e8f2e54563a9914ac39ac3149034559dbd803d 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.0-beta-10</p>
+<p id="footer">help-search &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index cb07b8f081b20b5906f68fc326c051381b8111b7..576df1b25e8bc02d276097048d184f51a528b6df 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.0-beta-10</p>
+<p id="footer">help &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 22eec4bc10a8246abdb5d0ee3bf16ebd34996453..cd527bb2ae69f6c5e41d2d2de6c2aa758bfbc686 100644 (file)
 
 <p> Display npm username</p>
 </div>
-<p id="footer">index &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">index &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 58f01d1e7335603a6b5139db8314ad587a4769fc..fb895e7e61d18d27d10850cbb69c3382b14f0de7 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.0-beta-10</p>
+<p id="footer">init &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 660224f0100acf680544ab61e4d5ddd7ac625e19..f059df50808bcc6172de30246cb3279f53151bc8 100644 (file)
@@ -134,7 +134,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></ul>
 </div>
-<p id="footer">install &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">install &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index aea5e344ed38f677a807f3eff815c37132e3fa1e..54e29f8b736ddb42badc74862cbd40b69ae1724e 100644 (file)
@@ -436,7 +436,7 @@ overridden.</p>
 
 <ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
 </div>
-<p id="footer">json &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">json &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6d7e2535b55c850c4387490f07008ffe916caf6d..95cdbdd84679438af6e6294e39b3abdcf44d3bbf 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.0-beta-10</p>
+<p id="footer">link &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 60042a5dc785c11507f34aea72329ecf3879dd59..4d25dd7033dc6da7ccff3cbaead8187c1f43d983 100644 (file)
@@ -52,7 +52,7 @@ project.</p>
 
 <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
 </div>
-<p id="footer">list &mdash; npm@1.1.0-beta-10</p>
+<p id="footer">list &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index fcb270699bf09c132c0f5610c41ffa2c223955e1..ba12b6edabdfb26101928c5a2ebb1b42bbed487c 100644 (file)
@@ -14,7 +14,7 @@
 
 <h2 id="VERSION">VERSION</h2>
 
-<p>1.1.0-beta-10</p>
+<p>1.1.0-2</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.0-beta-10</p>
+<p id="footer">npm &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d036cc2d51377ed51ee352d63fdaf0e3cc741b43..63f6017441b1e3cf2ac0c86184cf0a95adbb6737 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.0-beta-10</p>
+<p id="footer">outdated &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 845846d91df1d635e24c2957a9d3f6c9b0180a49..828307eeec983866d5ccd8f8df74e0b04bca1bbe 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.0-beta-10</p>
+<p id="footer">owner &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b997bf8d0ad00d1709fa356051038c01a7a7270c..6d77e17f9a65a3fb78b0f245974bb75e98831cfd 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.0-beta-10</p>
+<p id="footer">pack &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 893e3f3e0871825ad002c8d96768931f7f14527d..eca0805abe626bf27c3e95056eb1914c77f00d38 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.0-beta-10</p>
+<p id="footer">prefix &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 20f371f70657131e59c62e074c7bdc150052464e..fc2e919c7e5b5955d53f5240c80ba9bebbe4b35c 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.0-beta-10</p>
+<p id="footer">prune &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 65466dbe22934c49cd05da35ec33f1b92e405692..46662fad0e87ff2903b4f110156cbe43dc6fcd1d 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.0-beta-10</p>
+<p id="footer">publish &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e4199827d06790d3643c45ba6b68729488a55f15..fea67ea0c6194038a7a50a199002e23a019befda 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.0-beta-10</p>
+<p id="footer">rebuild &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 203b798833d214aa1340eb4f5a01bf71bb66b4eb..ed4455513a711bcf65f81f45ce7bf0d3738c82a0 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.0-beta-10</p>
+<p id="footer">registry &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 989f624229cd18fbf1e9386d25768eea792470b9..06109b0378f15a5a2e21eae5fd02c76fdaaf4d2d 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.0-beta-10</p>
+<p id="footer">removing-npm &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a8a2ec5d4a93dc4ba8e298392f6ef5a7d855d014..07fe2c36a3a90c9556cc48628fc4ecc2e02934de 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.0-beta-10</p>
+<p id="footer">restart &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 8bd360c1f74dbc681128c0dff8dd7b47259330e6..fb5bb965ed503a5a362613c9b799f98d5bda60d8 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.0-beta-10</p>
+<p id="footer">root &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 1d9b606ebe9154943ead17df6f468fb29c7af8e4..f9706a79d1e2abb3babcc897e96cc3f9d15f5274 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.0-beta-10</p>
+<p id="footer">run-script &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index fb1265d8c8f1aa2dbe06229b50d522941a20bb3e..16b3026d29c8e50366a959ec4daf52bc4bf2e8cc 100644 (file)
@@ -164,7 +164,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.0-beta-10</p>
+<p id="footer">scripts &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c313509b190ee67171b6fc8fd85e25882f33cd15..dc451277db1e0964197cd801d97be50ea4e277c5 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.0-beta-10</p>
+<p id="footer">search &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 93c51cea2a01c08bc0a7ff9447c0946ca7fd749f..7ca3e4d6f73e77fe7e5bcd1b0b0cf8ffdb904240 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.0-beta-10</p>
+<p id="footer">semver &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e4acef022aab4edfa2beb65a062a16b37337675b..fac1ab74b5d7bbff7d876a626fdc169078b46a7c 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.0-beta-10</p>
+<p id="footer">star &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 8c1eea9f3833b3fdc3eafa8f84906ffd45c90aed..f9c7fe807790065893f268cb1747e6aebdc2b2bb 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.0-beta-10</p>
+<p id="footer">start &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 1f4248eb11b50c75c6da7522771a7ec4bc608697..a954d8a9229c57886a888af5f15cb2d28d847075 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.0-beta-10</p>
+<p id="footer">stop &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 60062547543bfe7361fe6a55cd4781770a43b9d0..0b4206e73598fd392ae3d642e08fb298751408f7 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.0-beta-10</p>
+<p id="footer">submodule &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index ae1081fe0b456becc23be7d1e992897f99edab94..9976dc5c8caa744cba430290448403391d4184f8 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.0-beta-10</p>
+<p id="footer">tag &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4be6272112a0b21039512779236286bcb5fe20a6..9209e40e0e5b3ad15df465568d21e82de1003155 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.0-beta-10</p>
+<p id="footer">test &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c8e6c820e930fbb8f45499c1bf1ca66afee1b1a0..867e6af43a73c6c1d704a7bd15f4b18ab8ec6251 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.0-beta-10</p>
+<p id="footer">uninstall &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9e7603f2f99044133d08121bde91b31515ee494e..51fa5811e5ec748497771dccf93d80da944535f3 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.0-beta-10</p>
+<p id="footer">unpublish &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 31750845a567d8db33678a2bff7f352219f8ba37..e41dbfb11b5e22a71ab5da0d3c882f0c5c7d9cf9 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.0-beta-10</p>
+<p id="footer">update &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b7e900fef58c4178561dfe9f573dd43df1b421dc..63d93a3d94173da79cb454655f02482769254c5d 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.0-beta-10</p>
+<p id="footer">version &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 20571e7764b66b0fbcfe9c6a39c3345f5338120a..fe97f2e5d7445f72e38368ca6a37aae858d59fd0 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.0-beta-10</p>
+<p id="footer">view &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index edd0798b0e6dfaa9d442d31eb79ad73cd8885bd9..b4b2a9bb988259d1a90692df340c82747a0a2b06 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.0-beta-10</p>
+<p id="footer">whoami &mdash; npm@1.1.0-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a73a8746217d5165e1231eb36b98a1965e2a831f..3dc1fb3a0a3889e9512df1a7c253f81476b0e0b5 100644 (file)
@@ -306,7 +306,7 @@ function addRemoteGit (u, parsed, name, cb_) {
   var tmp = path.join(npm.tmp, Date.now()+"-"+Math.random())
   mkdir(path.dirname(tmp), function (er) {
     if (er) return cb(er)
-    exec( "git", ["clone", u, tmp], null, false
+    exec( npm.config.get("git"), ["clone", u, tmp], null, false
         , function (er, code, stdout, stderr) {
       stdout = (stdout + "\n" + stderr).trim()
       if (er) {
@@ -314,7 +314,7 @@ function addRemoteGit (u, parsed, name, cb_) {
         return cb(er)
       }
       log.verbose(stdout, "git clone "+u)
-      exec( "git", ["checkout", co], null, false, tmp
+      exec( npm.config.get("git"), ["checkout", co], null, false, tmp
           , function (er, code, stdout, stderr) {
         stdout = (stdout + "\n" + stderr).trim()
         if (er) {
index ee7e8773af222a855eee9209945a184e44ea91c2..2ddb3e86fc6ab688b505d6c70c74de47312ebf80 100644 (file)
@@ -195,7 +195,7 @@ function defaultName (folder, data) {
 
 function defaultVersion (folder, data, cb) {
   if (data.version) return cb(null, data.version)
-  exec("git", ["describe", "--tags"], process.env, false, folder,
+  exec(npm.config.get("git"), ["describe", "--tags"], process.env, false, folder,
        function (er, code, out) {
     out = (out || "").trim()
     if (semver.valid(out)) return cb(null, out)
@@ -207,7 +207,7 @@ function defaultVersion (folder, data, cb) {
 
 function defaultRepo (folder, data, cb) {
   if (data.repository) return cb(null, data.repository)
-  exec( "git", ["remote", "-v"], process.env, false, folder
+  exec( npm.config.get("git"), ["remote", "-v"], process.env, false, folder
       , function (er, code, out) {
     out = (out || "")
       .trim()
index ca54585e03b6563a65070bb6b30a0a255038017b..1fb6dc30c0a7a0dd6f0f5527972833782c6b90a4 100644 (file)
@@ -118,11 +118,9 @@ function install (args, cb_) {
         installManyTop(deps.map(function (dep) {
           var target = data.dependencies[dep]
             , parsed = url.parse(target.replace(/^git\+/, "git"))
-          if (!parsed.protocol) {
-            target = dep + "@" + target
-          }
+          target = dep + "@" + target
           return target
-        }), where, family, ancestors, false, cb)
+        }), where, family, ancestors, false, data, cb)
       })
     }
 
@@ -134,7 +132,7 @@ function install (args, cb_) {
         , ancestors = {}
       if (data) family[data.name] = ancestors[data.name] = data.version
       var fn = npm.config.get("global") ? installMany : installManyTop
-      fn(args, where, family, ancestors, true, cb)
+      fn(args, where, family, ancestors, true, data, cb)
     })
   })
 }
@@ -151,7 +149,6 @@ function save (where, installed, tree, pretty, cb) {
   // The relevant tree shape is { <folder>: {what:<pkg>} }
   var saveTarget = path.resolve(where, "package.json")
     , things = Object.keys(tree).map(function (k) {
-        //log.warn(k, "k")
         return tree[k].what.split("@")
       }).reduce(function (set, k) {
         var rangeDescriptor = semver.gte(k[1], "0.1.0") ? "~" : ""
@@ -159,8 +156,6 @@ function save (where, installed, tree, pretty, cb) {
         return set
       }, {})
 
-  //log.warn(things, "things")
-
   // don't use readJson, because we don't want to do all the other
   // tricky npm-specific stuff that's in there.
   fs.readFile(saveTarget, function (er, data) {
@@ -257,7 +252,7 @@ function treeify (installed) {
 
 // just like installMany, but also add the existing packages in
 // where/node_modules to the family object.
-function installManyTop (what, where, family, ancestors, explicit, cb_) {
+function installManyTop (what, where, family, ancestors, explicit, parent, cb_) {
 
   function cb (er, d) {
     if (explicit || er) return cb_(er, d)
@@ -277,18 +272,18 @@ function installManyTop (what, where, family, ancestors, explicit, cb_) {
 
   function next (er) {
     if (er) return cb(er)
-    installManyTop_(what, where, family, ancestors, explicit, cb)
+    installManyTop_(what, where, family, ancestors, explicit, parent, cb)
   }
 }
 
-function installManyTop_ (what, where, family, ancestors, explicit, cb) {
+function installManyTop_ (what, where, family, ancestors, explicit, parent, cb) {
   var nm = path.resolve(where, "node_modules")
     , names = explicit
             ? what.map(function (w) { return w.split(/@/).shift() })
             : []
 
   fs.readdir(nm, function (er, pkgs) {
-    if (er) return installMany(what, where, family, ancestors, explicit, cb)
+    if (er) return installMany(what, where, family, ancestors, explicit, parent, cb)
     pkgs = pkgs.filter(function (p) {
       return !p.match(/^[\._-]/)
           && (!explicit || names.indexOf(p) === -1)
@@ -306,12 +301,12 @@ function installManyTop_ (what, where, family, ancestors, explicit, cb) {
       packages.forEach(function (p) {
         family[p[0]] = p[1]
       })
-      return installMany(what, where, family, ancestors, explicit, cb)
+      return installMany(what, where, family, ancestors, explicit, parent, cb)
     })
   })
 }
 
-function installMany (what, where, family, ancestors, explicit, cb) {
+function installMany (what, where, family, ancestors, explicit, parent, cb) {
   // 'npm install foo' should install the version of foo
   // that satisfies the dep in the current folder.
   // This will typically return immediately, since we already read
@@ -320,15 +315,16 @@ function installMany (what, where, family, ancestors, explicit, cb) {
     if (er) data = {}
 
     d = data.dependencies || {}
-    var parent = data._id
+    var parent = data
 
-    log.verbose(what, "into "+where)
     // what is a list of things.
     // resolve each one.
     asyncMap( what
-            , targetResolver(where, family, ancestors, explicit, d)
+            , targetResolver(where, family, ancestors, explicit, d, parent)
             , function (er, targets) {
+
       if (er) return cb(er)
+
       // each target will be a data object corresponding
       // to a package, folder, or whatever that is in the cache now.
       var newPrev = Object.create(family)
@@ -350,7 +346,7 @@ function installMany (what, where, family, ancestors, explicit, cb) {
   })
 }
 
-function targetResolver (where, family, ancestors, explicit, deps) {
+function targetResolver (where, family, ancestors, explicit, deps, parent) {
   var alreadyInstalledManually = explicit ? [] : null
     , nm = path.resolve(where, "node_modules")
 
@@ -389,8 +385,13 @@ function targetResolver (where, family, ancestors, explicit, deps) {
     if (deps[what]) {
       what = what + "@" + deps[what]
     }
-    log.verbose(what, "cache add")
+
     cache.add(what, function (er, data) {
+      if (er && parent && parent.optionalDependencies &&
+          parent.optionalDependencies.hasOwnProperty(what.split("@").shift())) {
+        log.warn(what, "optional dependency failed, continuing")
+        return cb(null, [])
+      }
       if (!er && data && family[data.name] === data.version) {
         return cb(null, [])
       }
@@ -430,7 +431,7 @@ function localLink (target, where, family, ancestors, parent, cb) {
       function thenLink () {
         npm.commands.link([target.name], function (er, d) {
           log.silly([er, d], "back from link")
-          cb(er, [resultList(target, where, parent)])
+          cb(er, [resultList(target, where, parent && parent._id)])
         })
       }
 
@@ -441,7 +442,7 @@ function localLink (target, where, family, ancestors, parent, cb) {
   })
 }
 
-function resultList (target, where, parent) {
+function resultList (target, where, parentId) {
   var nm = path.resolve(where, "node_modules")
     , targetFolder = path.resolve(nm, target.name)
     , prettyWhere = relativize(where, process.cwd() + "/x")
@@ -456,8 +457,8 @@ function resultList (target, where, parent) {
 
   return [ target._id
          , targetFolder
-         , prettyWhere && parent
-         , parent && prettyWhere ]
+         , prettyWhere && parentId
+         , parentId && prettyWhere ]
 }
 
 function installOne_ (target, where, family, ancestors, parent, cb) {
@@ -475,8 +476,7 @@ function installOne_ (target, where, family, ancestors, parent, cb) {
     , function (er, d) {
         log.verbose(target._id, "installOne cb")
         if (er) return cb(er)
-
-        d.push(resultList(target, where, parent))
+        d.push(resultList(target, where, parent && parent._id))
         cb(er, d)
       }
     )
@@ -591,12 +591,9 @@ function write (target, targetFolder, family, ancestors, cb_) {
       }).map(function (d) {
         var t = target.dependencies[d]
           , parsed = url.parse(t.replace(/^git\+/, "git"))
-        if (!parsed.protocol) {
-          t = d + "@" + t
-        }
+        t = d + "@" + t
         return t
-      }), targetFolder, family, ancestors, false, function (er, d) {
-        //log.warn(d, "write installMany cb")
+      }), targetFolder, family, ancestors, false, target, function (er, d) {
         log.verbose(targetFolder, "about to build")
         if (er) return cb(er)
         npm.commands.build( [targetFolder]
index 92fb41f8830687bd930955a8185e4e20a627bf2e..9a2cffa9e13797f22ab5907b42a30b30ec2fe9b4 100644 (file)
@@ -57,13 +57,13 @@ function submodule_ (pkg, cb) {
 }
 
 function updateSubmodule (name, cb) {
-  exec( "git", [ "submodule", "update", "--init"
+  exec( npm.config.get("git"), [ "submodule", "update", "--init"
                , "node_modules/" + name ]
       , null, true, npm.prefix, cb)
 }
 
 function addSubmodule (name, url, cb) {
-  exec( "git", [ "submodule", "add", url
+  exec( npm.config.get("git"), [ "submodule", "add", url
                , "node_modules/" + name ]
       , null, true, npm.prefix, function (er) {
     if (er) return cb(er)
@@ -73,7 +73,7 @@ function addSubmodule (name, url, cb) {
 
 
 var getSubmodules = function getSubmodules (cb) {
-  exec( "git", ["submodule", "status"], null, false
+  exec( npm.config.get("git"), ["submodule", "status"], null, false
       , npm.prefix, function (er, code, stdout, stderr) {
     if (er) return cb(er)
     res = stdout.trim().split(/\n/).map(function (line) {
index 476bfae52215334d5daefe4487dd96587a3631ed..a7892e8ee3d3b980470f15e3f903afa8fabdab99 100644 (file)
@@ -1,4 +1,4 @@
-// XXX Todo: 
+// XXX Todo:
 // On windows, create a .cmd file.
 // Read the #! in the file to see what it uses.  The vast majority
 // of the time, this will be either:
@@ -37,13 +37,14 @@ function cmdShim (from, to, cb) {
   chain
     ( [ [fs, "stat", from]
       , [rm, to + ".cmd"]
+      , [rm, to]
       , [mkdir, path.dirname(to)]
       , [writeShim, from, to] ]
     , cb )
 }
 
 function writeShim (from, to, cb) {
-  // make a cmd file
+  // make a cmd file and a sh script
   // First, check if the bin is a #! of some sort.
   // If not, then assume it's something that'll be compiled, or some other
   // sort of script, and just call it directly.
@@ -59,16 +60,23 @@ function writeShim (from, to, cb) {
 }
 
 function writeShim_ (from, to, prog, args, cb) {
-  var target = relativize(from, to).split("/").join("\\")
+  var shTarget = relativize(from, to)
+    , target = shTarget.split("/").join("\\")
     , longProg
+    , shProg = prog
+    , shLongProg
   args = args || ""
   if (!prog) {
     prog = "\"%~dp0\\" + target + "\""
+    shProg = "\"`dirname \"$0\"`/" + shTarget + "\""
     args = ""
     target = ""
+    shTarget = ""
   } else {
     longProg = "\"%~dp0\"\\\"" + prog + ".exe\""
+    shLongProg = "\"`dirname \"$0\"`/" + prog + "\""
     target = "\"%~dp0\\" + target + "\""
+    shTarget = "\"`dirname \"$0\"`/" + shTarget + "\""
   }
 
   // @IF EXIST "%~dp0"\"node.exe" (
@@ -89,10 +97,40 @@ function writeShim_ (from, to, prog, args, cb) {
 
   cmd = ":: Created by npm, please don't edit manually.\r\n" + cmd
 
+  // #!/bin/sh
+  // if [ -x "`dirname "$0"`/node.exe" ]; then
+  //   "`dirname "$0"`/node.exe" "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"
+  // else
+  //   node "`dirname "$0"`/node_modules/npm/bin/npm-cli.js" "$@"
+  // fi
+  var sh = "#!/bin/sh\n"
+
+  if (shLongProg) {
+    sh = sh
+       + "if [ -x "+shLongProg+" ]; then\n"
+       + "  " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n"
+       + "  ret=$?\n"
+       + "else \n"
+       + "  " + shProg + " " + args + " " + shTarget + " \"$@\"\n"
+       + "  ret=$?\n"
+       + "fi\n"
+       + "exit $ret\n"
+  } else {
+    sh = shProg + " " + args + " " + shTarget + " \"$@\"\n"
+       + "exit $?\n"
+  }
+
   fs.writeFile(to + ".cmd", cmd, "utf8", function (er) {
     if (er) {
       log.warn("Could not write "+to+".cmd", "cmdShim")
+      return cb(er)
     }
-    cb(er)
+    fs.writeFile(to, sh, "utf8", function (er) {
+      if (er) {
+        log.warn("Could not write "+to, "shShim")
+        return cb(er)
+      }
+      fs.chmod(to, 0755, cb)
+    })
   })
 }
index c4663b5820e3799565ce670f288ca73c6da29d95..d368c497264aa849cc79a0f1bb1d011178d53396 100644 (file)
@@ -148,6 +148,9 @@ Object.defineProperty(exports, "defaults", {get: function () {
     , editor : process.env.EDITOR ||
              ( process.platform === "win32" ? "notepad" : "vi" )
     , force : false
+
+    , git: "git"
+
     , global : false
     , globalconfig : path.resolve(globalPrefix, "etc", "npmrc")
     , globalignorefile : path.resolve( globalPrefix, "etc", "npmignore")
@@ -224,6 +227,7 @@ exports.types =
   , dev : Boolean
   , editor : String
   , force : Boolean
+  , git: String
   , global : Boolean
   , globalconfig : path
   , globalignorefile: path
@@ -290,6 +294,8 @@ exports.shorthands =
   , "no-reg" : ["--no-registry"]
   , silent : ["--loglevel", "silent"]
   , verbose : ["--loglevel", "verbose"]
+  , quiet: ["--loglevel", "warn"]
+  , q: ["--loglevel", "warn"]
   , h : ["--usage"]
   , H : ["--usage"]
   , "?" : ["--usage"]
index af52e6169786ad05ab4a2e01c7cbeabd32238d6d..22d26d8d6c11bd9af3064a493a112a5cf4b8a4e4 100644 (file)
@@ -59,16 +59,13 @@ function errorHandler (er) {
     er.errno = npm[m] || constants[m]
   }
 
-  switch (er.errno) {
+  console.error("")
+  switch (er.code || er.errno) {
   case "ECONNREFUSED":
   case constants.ECONNREFUSED:
     log.error(er)
-    log.error(["If you are using Cygwin, please set up your /etc/resolv.conf"
-              ,"See step 4 in this wiki page:"
-              ,"    http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29"
-              ,"If you are not using Cygwin, please report this"
-              ,"at <http://github.com/isaacs/npm/issues>"
-              ,"or email it to <npm-@googlegroups.com>"
+    log.error(["\nIf you are behind a proxy, please make sure that the"
+              ,"'proxy' config is set properly.  See: 'npm help config'"
               ].join("\n"))
     break
 
@@ -77,15 +74,7 @@ function errorHandler (er) {
   case constants.EACCES:
   case constants.EPERM:
     log.error(er)
-    log.error(["",
-              "Please use 'sudo' or log in as root to run this command."
-              ,""
-              ,"    sudo npm "
-                +npm.config.get("argv").original.map(JSON.stringify).join(" ")
-              ,""
-              ,"or set the 'unsafe-perm' config var to true."
-              ,""
-              ,"    npm config set unsafe-perm true"
+    log.error(["\nPlease try running this command again as root/Administrator."
               ].join("\n"))
     break
 
@@ -118,15 +107,16 @@ function errorHandler (er) {
     er.code = "E404"
     if (er.pkgid && er.pkgid !== "-") {
       var msg = ["'"+er.pkgid+"' is not in the npm registry."
-                ,"You could maybe bug the author to publish it"]
+                ,"You should bug the author to publish it"]
       if (er.pkgid.match(/^node[\.\-]|[\.\-]js$/)) {
         var s = er.pkgid.replace(/^node[\.\-]|[\.\-]js$/g, "")
         if (s !== er.pkgid) {
           s = s.replace(/[^a-z0-9]/g, ' ')
-          msg.push("Maybe try 'npm search " + s + "'")
+          msg.push("\nMaybe try 'npm search " + s + "'")
         }
       }
-      msg.push("Note that you can also install from a tarball or folder.")
+      msg.push("\nNote that you can also install from a"
+              ,"tarball, folder, or http url, or git url.")
       log.error(msg.join("\n"), "404")
     }
     break
@@ -178,7 +168,7 @@ function errorHandler (er) {
 
   default:
     log.error(er)
-    log.error(["Report this *entire* log at:"
+    log.error(["You may report this log at:"
               ,"    <http://github.com/isaacs/npm/issues>"
               ,"or email it to:"
               ,"    <npm-@googlegroups.com>"
@@ -208,6 +198,7 @@ function errorHandler (er) {
     , "arguments"
     , "code"
     , "message"
+    , "errno"
     ].forEach(function (k) {
       if (er[k]) log.error(er[k], k)
     })
index 088327506a7134af192c3b28ff6540b8182bcc1c..48d4f99edf4a2f117a2d7f17cce1154143ac66e3 100644 (file)
@@ -156,7 +156,7 @@ function unParseField (f, k) {
   if (isPath) {
     if (typeof process.env.HOME !== 'undefined') {
       if (process.env.HOME.substr(-1) === "/") {
-        process.env.HOME = process.env.HOME(0, process.env.HOME.length-1)
+        process.env.HOME = process.env.HOME.slice(0, process.env.HOME.length-1)
       }
       if (f.indexOf(process.env.HOME) === 0) {
         f = "~"+f.substr(process.env.HOME.length)
index 547bbef0eb33e6215943d0dff023a8fc40ed02d0..970157349a75b5c6d02c9c74728aa7e3cd7691bb 100644 (file)
@@ -269,7 +269,7 @@ function cmd (stage) {
         return [npm.commands, "run-script", [p, stage]]
       }), cb)
     } else npm.commands["run-script"]([stage], cb)
- }
 }
   CMD.usage = "npm "+stage+" <name>"
   var installedShallow = require("./completion/installed-shallow.js")
   CMD.completion = function (opts, cb) {
index 59fc6c490b585c52de1c34b3de48fc3fe73a1a9f..6c0ece25bc003564b40c9a71c871f14625f3e177 100644 (file)
@@ -196,6 +196,16 @@ function readInstalled_ (folder, parent, name, reqver, depth, maxDepth, cb) {
       installedData.forEach(function (dep) {
         obj.dependencies[dep.realName] = dep
       })
+
+      // any strings here are unmet things.  however, if it's
+      // optional, then that's fine, so just delete it.
+      if (obj.optionalDependencies) {
+        Object.keys(obj.optionalDependencies).forEach(function (dep) {
+          if (typeof obj.dependencies[dep] === "string") {
+            delete obj.dependencies[dep]
+          }
+        })
+      }
       return cb(null, obj)
     })
   }
@@ -253,6 +263,7 @@ function findUnmet (obj) {
         }
         deps[d] = found
       }
+
     })
   log.verbose([obj._id], "returning")
   return obj
index ffd447d32bd11dd77ced8dc64d184a622ac05aa8..388d6727eb2ec81426463d27fe6061b2afd47cef 100644 (file)
@@ -362,11 +362,23 @@ function processObject (opts, cb) { return function (er, json) {
     delete json["dev-dependencies"]
   }
 
-  ;["dependencies", "devDependencies"].forEach(function (d) {
-    json[d] = json.hasOwnProperty(d) ? depObjectify(json[d], d, json._id) : {}
+  ; [ "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")) {
+  if (opts.dev
+      || npm.config.get("dev")
+      || npm.config.get("npat")) {
     // log.warn(json._id, "Adding devdeps")
     Object.keys(json.devDependencies || {}).forEach(function (d) {
       json.dependencies[d] = json.devDependencies[d]
index e626e474a358a0b61f2d904d0adf5e283d520ac8..f13d9e1b2e667237198c8e315171a5742e51924b 100644 (file)
@@ -40,7 +40,7 @@ function version (args, cb) {
   })
 }
 function checkGit (data, cb) {
-  exec( "git", ["status", "--porcelain"], process.env, false
+  exec( npm.config.get("git"), ["status", "--porcelain"], process.env, false
       , function (er, code, stdout, stderr) {
     var lines = stdout.trim().split("\n").filter(function (line) {
       return line.trim() && !line.match(/^\?\? /)
@@ -51,10 +51,12 @@ function checkGit (data, cb) {
       if (er) return cb(er)
       var message = npm.config.get("message").replace(/%s/g, data.version)
       chain
-        ( [ [ exec, "git", ["add","package.json"], process.env, false ]
-          , [ exec, "git", ["commit", "-m", message ]
-            , process.env, false ]
-          , [ exec, "git", ["tag", "v"+data.version], process.env, false ] ]
+        ( [ [ exec, npm.config.get("git")
+            , ["add","package.json"], process.env, false ]
+          , [ exec, npm.config.get("git")
+            , ["commit", "-m", message ], process.env, false ]
+          , [ exec, npm.config.get("git")
+            , ["tag", "v"+data.version], process.env, false ] ]
         , cb )
     })
   })
index 7374f5907aad93df1b3c144e7501d8147e5d9239..2e38c0f6f1ef1d219c7c254fb55e3fd0c354abca 100644 (file)
@@ -129,6 +129,9 @@ The following shorthands are parsed on the command\-line:
 \fB\-s\fR, \fB\-\-silent\fR: \fB\-\-loglevel silent\fR
 .
 .IP "\(bu" 4
+\fB\-q\fR, \fB\-\-quiet\fR: \fB\-\-loglevel warn\fR
+.
+.IP "\(bu" 4
 \fB\-d\fR: \fB\-\-loglevel info\fR
 .
 .IP "\(bu" 4
@@ -466,6 +469,21 @@ prevents checks against clobbering non\-npm files\.
 .
 .IP "" 0
 .
+.SS "git"
+.
+.IP "\(bu" 4
+Default: \fB"git"\fR
+.
+.IP "\(bu" 4
+Type: String
+.
+.IP "" 0
+.
+.P
+The command to use for git commands\.  If git is installed on the
+computer, but is not in the \fBPATH\fR, then set this to the full path to
+the git binary\.
+.
 .SS "global"
 .
 .IP "\(bu" 4
index 4a657b4e8813cb0167dcd7f443157f66e890ddae..7d606a7c9a7bc26ee6eea1b632dd4f6502ac4539 100644 (file)
@@ -14,7 +14,7 @@ npm <command> [args]
 .fi
 .
 .SH "VERSION"
-1.1.0-beta-10
+1.1.0-2
 .
 .SH "DESCRIPTION"
 npm is the package manager for the Node JavaScript platform\.  It puts
index b15d8634a27c75e5e0b9ff7f3efa61f6e620cb89..ff96d77780f92823cd116110cfc761be3420a9c9 100644 (file)
@@ -21,7 +21,7 @@ npm\.load(configObject, function (er, npm) {
 .fi
 .
 .SH "VERSION"
-1.1.0-beta-10
+1.1.0-2
 .
 .SH "DESCRIPTION"
 This is the API documentation for npm\.
index 3340f4bdbafe07a1bf77e8b69705dbd292ead3ae..88a842ef0e0ac18e6d06ae09a281d4e3281b8101 100644 (file)
@@ -100,6 +100,11 @@ console.log(list.shift()) // foo
 * `item(n)`: Retrieve the nth item in the list.  This involves a walk
   every time.  It's very slow.  If you find yourself using this,
   consider using a normal Array instead.
+* `map(fn, thisp)`: Like `Array.prototype.map`.  Returns a new FastList.
+* `reduce(fn, startValue, thisp)`: Like `Array.prototype.reduce`
+* `forEach(fn, this)`: Like `Array.prototype.forEach`
+* `filter(fn, thisp)`: Like `Array.prototype.filter`. Returns a new
+  FastList.
 * `slice(start, end)`: Retrieve an array of the items at this position.
   This involves a walk every time.  It's very slow.  If you find
   yourself using this, consider using a normal Array instead.
index 57168784665f9efcbcb2fa558fbd0dd5e76b42bd..692db0df8f53d0511536d5dd599f11e57577c859 100644 (file)
@@ -21,6 +21,7 @@ FastList.prototype =
     if (!this._head) this._head = this._tail
     this.length ++
   }
+
 , pop: function () {
     if (this.length === 0) return undefined
     var t = this._tail
@@ -33,11 +34,13 @@ FastList.prototype =
     else if (this.length === 0) this._head = this._tail = null
     return t.data
   }
+
 , unshift: function (data) {
     this._head = new Item(data, null, this._head)
     if (!this._tail) this._tail = this._head
     this.length ++
   }
+
 , shift: function () {
     if (this.length === 0) return undefined
     var h = this._head
@@ -50,20 +53,26 @@ FastList.prototype =
     else if (this.length === 0) this._head = this._tail = null
     return h.data
   }
+
 , item: function (n) {
     if (n < 0) n = this.length + n
     var h = this._head
     while (n-- > 0 && h) h = h.next
     return h ? h.data : undefined
   }
+
 , slice: function (n, m) {
     if (!n) n = 0
     if (!m) m = this.length
     if (m < 0) m = this.length + m
     if (n < 0) n = this.length + n
 
-    if (m <= n) {
-      throw new Error("invalid offset: "+n+","+m)
+    if (m === n) {
+      return []
+    }
+
+    if (m < n) {
+      throw new Error("invalid offset: "+n+","+m+" (length="+this.length+")")
     }
 
     var len = m - n
@@ -77,9 +86,54 @@ FastList.prototype =
     }
     return ret
   }
+
 , drop: function () {
     FastList.call(this)
   }
+
+, forEach: function (fn, thisp) {
+    var p = this._head
+      , i = 0
+      , len = this.length
+    while (i < len && p) {
+      fn.call(thisp || this, p.data, i, this)
+      p = p.next
+      i ++
+    }
+  }
+
+, map: function (fn, thisp) {
+    var n = new FastList()
+    this.forEach(function (v, i, me) {
+      n.push(fn.call(thisp || me, v, i, me))
+    })
+    return n
+  }
+
+, filter: function (fn, thisp) {
+    var n = new FastList()
+    this.forEach(function (v, i, me) {
+      if (fn.call(thisp || me, v, i, me)) n.push(v)
+    })
+    return n
+  }
+
+, reduce: function (fn, val, thisp) {
+    var i = 0
+      , p = this._head
+      , len = this.length
+    if (!val) {
+      i = 1
+      val = p && p.data
+      p = p && p.next
+    }
+    while (i < len && p) {
+      val = fn.call(thisp || this, val, p.data, this)
+      i ++
+      p = p.next
+    }
+    return val
+  }
 }
 
 if ("undefined" !== typeof(exports)) module.exports = FastList
index 1a8fd650cc58c639c412bb3cd19edd61c5c31f37..9bcc6b41337a74904fa42887d273bfcdbc410e3f 100644 (file)
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
   "name": "fast-list",
   "description": "A fast linked list (good for queues, stacks, etc.)",
-  "version": "1.0.1",
+  "version": "1.0.2",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/fast-list.git"
@@ -14,7 +14,7 @@
     "tap": "~0.1.0"
   },
   "scripts": {
-    "test": "node test.js",
+    "test": "tap test.js",
     "bench": "node bench.js"
   }
 }
index cd434b7ae7773bad6ac2dffdc984f72b4a1552e7..9f82a765da63bdcd00d15f5bbb547a79fed31f12 100644 (file)
@@ -7,7 +7,7 @@ are saved on the object directly.
 
 Consider an ini-file `config.ini` that looks like this:
 
-    ; this comment is beeing ignored
+    ; this comment is being ignored
     scope = global
 
     [database]
index 468511a014057743b6b964c0679481afd6231a34..e8a949f944faef11f05e650d99c912467e9a2404 100644 (file)
@@ -23,7 +23,11 @@ function encode (obj, section) {
   }
 
   children.forEach(function (k, _, __) {
-    out += encode(obj[k], (section ? section + "." : "") + k)
+    var child = encode(obj[k], (section ? section + "." : "") + k)
+    if (out.length && child.length) {
+      out += "\n"
+    }
+    out += child
   })
 
   return out
@@ -82,6 +86,7 @@ function decode (str) {
 function safe (val) {
   return ( typeof val !== "string"
          || val.match(/[\r\n]/)
+         || val.match(/^\[/)
          || (val.length > 1
              && val.charAt(0) === "\""
              && val.slice(-1) === "\"")
index 6bf81b8fbcf97518892ccf7f81f5701707b46769..a022b598ffebc6851b1583efec64ba388f143c94 100644 (file)
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
   "name": "ini",
   "description": "An ini encoder/decoder for node",
-  "version": "1.0.1",
+  "version": "1.0.2",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/ini.git"
index 2664c085cb48146c2bf65464ee61e74d53d5afc0..d5f97234cd9c880ab931276581d9beed5fd7cb34 100644 (file)
@@ -23,24 +23,42 @@ minimatch("bar.foo", "*.bar") // false!
 
 ## Features
 
-Supports all glob features.
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
 
 See:
 
 * `man sh`
-* `man fnmatch`
+* `man bash`
+* `man 3 fnmatch`
 * `man 5 gitignore`
 
-### Departures from zsh/bash/ksh/sh
+### Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
 
-If the pattern starts with a `!` character, then it is negated.
+If the pattern starts with a `!` character, then it is negated.  Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally.  This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
 
 If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything.  (Use `\#` to match a literal `#` at the
-start of a line.)
+will not match anything.  Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
 
-The double-star `**` is always supported, instead of requiring a special
-flag.
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set.  This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.  **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
 
 If an escaped pattern has no matches, and the `null` flag is not set,
 then minimatch.match returns the pattern as-provided, rather than
@@ -48,17 +66,83 @@ interpreting the character escapes.  For example,
 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
 `"*a?"`.
 
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern.  Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity.  Since those two are valid, matching proceeds.
+
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+  Each row in the
+  array corresponds to a brace-expanded pattern.  Each item in the row
+  corresponds to a single path-part.  For example, the pattern
+  `{a,b/c}/d` would expand to a set of patterns like:
+
+        [ [ a, d ]
+        , [ b, c, d ] ]
+
+    If a portion of the pattern doesn't have any "magic" in it
+    (that is, it's something like `"foo"` rather than `fo*o?`), then it
+    will be left as a string rather than converted to a regular
+    expression.
+
+* `regexp` Created by the `makeRe` method.  A single regular expression
+  expressing the entire pattern.  This is useful in cases where you wish
+  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+  Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+  false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+  filename, and match it against a single row in the `regExpSet`.  This
+  method is mainly for internal use, but is exposed so that it can be
+  used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
 ## Functions
 
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items.  So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
 ### minimatch(path, pattern, options)
 
-Main export.  Tests a path against
-the pattern using the options.
+Main export.  Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
 
 ### minimatch.filter(pattern, options)
 
 Returns a function that tests its
-supplied argument, suitable for use with `Array.filter`.
+supplied argument, suitable for use with `Array.filter`.  Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
 
 ### minimatch.match(list, pattern, options)
 
@@ -66,10 +150,13 @@ Match against the list of
 files, in the style of fnmatch or glob.  If nothing is matched, then
 return the pattern (unless `{ null: true }` in the options.)
 
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
 ### minimatch.makeRe(pattern, options)
 
-Make a regular expression object
-from the pattern.
+Make a regular expression object from the pattern.
 
 ## Options
 
@@ -79,36 +166,47 @@ All options are `false` by default.
 
 Dump a ton of stuff to stderr.
 
-### null
+### nobrace
 
-Return an empty list from minimatch.match, instead of a list
-containing the pattern itself.
+Do not expand `{a,b}` and `{1..3}` brace sets.
 
-### nocase
+### noglobstar
 
-Perform a case-insensitive match.
+Disable `**` matching against multiple folder names.
 
-### cache
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
 
-An LRU cache with `.get(k)` and `.set(k,v)` methods.  By
-default, an instance of `node-lru-cache` is used, with 1000 max
-entries.
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
 
-### slash
+### noext
 
-If set, then `a/*` will match `a/` as well as `a/b`.
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself.  When set, an empty list is returned if there are
+no matches.
 
 ### matchBase
 
 If set, then patterns without slashes will be matched
 against the basename of the path if it contains slashes.  For example,
-`a?b` would match `xyz/123/acb`.
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
 
-### partial
+### nocomment
 
-Internal.  Used by `minimatch.makeRe`.
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
 
-### dot
+### nonegate
 
-Allow patterns to match paths starting with a period, even if
-the pattern does not explicitly start with a period.
+Suppress the behavior of treating a leading `!` character as negation.
index c50ab71a5f909b4b5c6c84a4ddd78a19b12f7ccb..768c8ebac7d064108e98803ce37140487d481de2 100644 (file)
-// This is a JavaScript implementation of the fnmatch-like
-// stuff that git uses in its .gitignore files.
-// See `man 5 gitignore`.
-
 module.exports = minimatch
+minimatch.Minimatch = Minimatch
+
+var LRU = require("lru-cache")
+  , cache = minimatch.cache = new LRU(100)
+  , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+  , pathSplit = process.platform === "win32" ? /\\|\// : "/"
 
 var path = require("path")
-  , LRU = require("lru-cache")
+  // any single thing other than /
+  // don't need to escape / when using new RegExp()
+  , qmark = "[^/]"
+
+  // * => any number of characters
+  , star = qmark + "*?"
+
+  // ** when dots are allowed.  Anything goes, except .. and .
+  // not (^ or / followed by one or two dots followed by $ or /),
+  // followed by anything, any number of times.
+  , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+
+  // not a ^ or / followed by a dot,
+  // followed by anything, any number of times.
+  , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+
+  // characters that need to be escaped in RegExp.
+  , reSpecials = charSet("().*{}+?[]^$\\!")
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+  return s.split("").reduce(function (set, c) {
+    set[c] = true
+    return set
+  }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
 
-minimatch.filter = function (pattern, options) {
+minimatch.monkeyPatch = monkeyPatch
+function monkeyPatch () {
+  var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
+  var orig = desc.value
+  desc.value = function (p) {
+    if (p instanceof Minimatch) return p.match(this)
+    return orig.call(this, p)
+  }
+  Object.defineProperty(String.prototype, desc)
+}
+
+minimatch.filter = filter
+function filter (pattern, options) {
   options = options || {}
   return function (p, i, list) {
     return minimatch(p, pattern, options)
   }
 }
 
-minimatch.match = function (list, pattern, options) {
+function minimatch (p, pattern, options) {
+  if (typeof pattern !== "string") {
+    throw new TypeError("glob pattern string required")
+  }
+
   if (!options) options = {}
-  var ret = list.filter(minimatch.filter(pattern, options))
-  if (options.debug) console.error("\nmatch: %s %j %j", pattern, list, ret)
 
-  // set the null flag to allow empty match sets
-  // Note that minimatch itself, and filter(), do not
-  // respect this flag, only minimatch.match(list, pattern) does.
-  if (!options.null && !ret.length) {
-    return [pattern]
+  // shortcut: comments match nothing.
+  if (!options.nocomment && pattern.charAt(0) === "#") {
+    return false
   }
 
-  return ret
+  // "" only matches ""
+  if (pattern.trim() === "") return p === ""
+
+  return new Minimatch(pattern, options).match(p)
 }
 
-function minimatch (p, pattern, options) {
+function Minimatch (pattern, options) {
+  if (!(this instanceof Minimatch)) {
+    return new Minimatch(pattern, options, cache)
+  }
+
   if (typeof pattern !== "string") {
     throw new TypeError("glob pattern string required")
   }
 
-  options = options || {}
+  if (!options) options = {}
+  pattern = pattern.trim()
+
+  // lru storage.
+  // these things aren't particularly big, but walking down the string
+  // and turning it into a regexp can get pretty costly.
+  var cacheKey = pattern + "\n" + Object.keys(options).filter(function (k) {
+    return options[k]
+  }).join(":")
+  var cached = minimatch.cache.get(cacheKey)
+  if (cached) return cached
+  minimatch.cache.set(cacheKey, this)
+
+  this.options = options
+  this.set = []
+  this.pattern = pattern
+  this.regexp = null
+  this.negate = false
+  this.comment = false
+  this.empty = false
+
+  // make the set of regexps etc.
+  this.make()
+}
 
-  // to set the cache, just replace with a different obj
-  // supporting set(k,v) and v=get(k) methods.
-  var cache = options.cache || minimatch.cache
-  if (!cache) cache = minimatch.cache = new LRU(1000)
+Minimatch.prototype.make = make
+function make () {
+  // don't do it more than once.
+  if (this._made) return
 
-  // "" only matches ""
-  if (!pattern) return p === ""
+  var pattern = this.pattern
+  var options = this.options
+
+  // empty patterns and comments match nothing.
+  if (!options.nocomment && pattern.charAt(0) === "#") {
+    this.comment = true
+    return
+  }
+  if (!pattern) {
+    this.empty = true
+    return
+  }
+
+  // step 1: figure out negation, etc.
+  this.parseNegate()
+
+  // step 2: expand braces
+  var set = this.braceExpand()
+
+  if (options.debug) console.error(this.pattern, set)
+
+  // step 3: now we have a set, so turn each one into a series of path-portion
+  // matching patterns.
+  // These will be regexps, except in the case of "**", which is
+  // set to the GLOBSTAR object for globstar behavior,
+  // and will not contain any / characters
+  set = set.map(function (s) {
+    return s.split(slashSplit)
+  })
+
+  // step 4: if we have a defined root, then patterns starting with ""
+  // get attached to that.  If we have a defined cwd, then patterns
+  // *not* starting with "" get attached to that.
+  // Exception 1: on windows, a pattern like //\?/c:/ or c:/ will
+  // not get anything prefixed to it.
+  // Exception 2: If matchBase is set, and it's just a filename,
+  // then don't prefix anything onto it, since it'll only match
+  // files with that basename anyhow.
+  set = set.map(function (p) {
+    if (process.platform === "win32" &&
+        ( (p[0] === "" && p[1] === "" && p[2] === "\\?") // unc
+        || (p[0].match(/^[a-zA-Z]:$/)) )) {
+      return p
+    }
+    if (options.matchBase && p.length === 1) return p
+    // do prefixing.
+    if (options.root && p[0] === "") {
+      return options.root.split(pathSplit).concat(p)
+    }
+    if (options.cwd && p[0] !== "") {
+      return options.cwd.split(pathSplit).concat(p)
+    }
+    return p
+  })
 
-  // comments.
-  if (pattern.trim().charAt(0) === "#") return false
 
-  // check the cache
-  var re = cache.get(pattern + "\n" + JSON.stringify(options))
-  if (!re && re !== false) {
-    cache.set(pattern, re = minimatch.makeRe(pattern, options))
+  if (options.debug) console.error(this.pattern, set)
+
+  // glob --> regexps
+  set = set.map(function (s, si, set) {
+    return s.map(this.parse, this)
+  }, this)
+
+  if (options.debug) console.error(this.pattern, set)
+
+  // filter out everything that didn't compile properly.
+  set = set.filter(function (s) {
+    return -1 === s.indexOf(false)
+  })
+
+  if (options.debug) console.error(this.pattern, set)
+
+  this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+  var pattern = this.pattern
+    , negate = false
+    , options = this.options
+    , negateOffset = 0
+
+  if (options.nonegate) return
+
+  for ( var i = 0, l = pattern.length
+      ; i < l && pattern.charAt(i) === "!"
+      ; i ++) {
+    negate = !negate
+    negateOffset ++
   }
 
-  if (options.debug) {
-    console.error(pattern + "\t" + re, JSON.stringify(p))
-  }
-
-  // some kind of invalid thing
-  if (!re) return false
-
-
-  // patterns that end in / can only match dirs
-  // however, dirs also match the same thing that *doesn't*
-  // end in a slash.
-  var match =
-    // a/ should not match a/*, but will match */
-    // accomplish this by not applying the regexp
-    // directly, unless the pattern would match
-    // trailing slash'ed things, or the thing isn't
-    // a trailing slash, or slashes are opted-in
-    ( ( options.slash ||
-        p.substr(-1) !== "/" ||
-        pattern.substr(-1) === "/" )
-      && !!p.match(re) )
-
-    // a/ should match * or a
-    || ( p.substr(-1) === "/" &&
-         !!p.slice(0, -1).match(re) )
-
-    // a pattern with *no* slashes will match against
-    // either the full path, or just the basename.
-    || ( options.matchBase &&
-         pattern.indexOf("/") === -1 &&
-         path.basename(p).match(re) )
-
-  //console.error("  MINIMATCH: %j %j %j %j",
-  //            re.toString(), pattern, p, match)
-  return match
+  if (negateOffset) this.pattern = pattern.substr(negateOffset)
+  this.negate = negate
 }
 
-minimatch.makeRe = makeRe
-function makeRe (pattern, options) {
-  options = options || {}
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+  return new Minimatch(pattern, options).braceExpand()
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+function braceExpand (pattern, options) {
+  options = options || this.options
+  pattern = typeof pattern === "undefined"
+    ? this.pattern : pattern
+
+  if (typeof pattern === "undefined") {
+    throw new Error("undefined pattern")
+  }
+
+  if (options.nobrace ||
+      !pattern.match(/\{.*\}/)) {
+    // shortcut. no need to expand.
+    return [pattern]
+  }
+
+  var escaping = false
+
+  // examples and comments refer to this crazy pattern:
+  // a{b,c{d,e},{f,g}h}x{y,z}
+  // expected:
+  // abxy
+  // abxz
+  // acdxy
+  // acdxz
+  // acexy
+  // acexz
+  // afhxy
+  // afhxz
+  // aghxy
+  // aghxz
+
+  // everything before the first \{ is just a prefix.
+  // So, we pluck that off, and work with the rest,
+  // and then prepend it to everything we find.
+  if (pattern.charAt(0) !== "{") {
+    // console.error(pattern)
+    var prefix = null
+    for (var i = 0, l = pattern.length; i < l; i ++) {
+      var c = pattern.charAt(i)
+      // console.error(i, c)
+      if (c === "\\") {
+        escaping = !escaping
+      } else if (c === "{" && !escaping) {
+        prefix = pattern.substr(0, i)
+        break
+      }
+    }
+
+    // actually no sets, all { were escaped.
+    if (prefix === null) {
+      // console.error("no sets")
+      return [pattern]
+    }
+
+    var tail = braceExpand(pattern.substr(i), options)
+    return tail.map(function (t) {
+      return prefix + t
+    })
+  }
+
+  // now we have something like:
+  // {b,c{d,e},{f,g}h}x{y,z}
+  // walk through the set, expanding each part, until
+  // the set ends.  then, we'll expand the suffix.
+  // If the set only has a single member, then'll put the {} back
+
+  // first, handle numeric sets, since they're easier
+  var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
+  if (numset) {
+    // console.error("numset", numset[1], numset[2])
+    var suf = braceExpand(pattern.substr(numset[0].length), options)
+      , start = +numset[1]
+      , end = +numset[2]
+      , inc = start > end ? -1 : 1
+      , set = []
+    for (var i = start; i != (end + inc); i += inc) {
+      // append all the suffixes
+      for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+        set.push(i + suf[ii])
+      }
+    }
+    return set
+  }
+
+  // ok, walk through the set
+  // We hope, somewhat optimistically, that there
+  // will be a } at the end.
+  // If the closing brace isn't found, then the pattern is
+  // interpreted as braceExpand("\\" + pattern) so that
+  // the leading \{ will be interpreted literally.
+  var i = 1 // skip the \{
+    , depth = 1
+    , set = []
+    , member = ""
+    , sawEnd = false
+    , escaping = false
+
+  function addMember () {
+    set.push(member)
+    member = ""
+  }
+
+  // console.error("Entering for")
+  FOR: for (i = 1, l = pattern.length; i < l; i ++) {
+    var c = pattern.charAt(i)
+    // console.error("", i, c)
+
+    if (escaping) {
+      escaping = false
+      member += "\\" + c
+    } else {
+      switch (c) {
+        case "\\":
+          escaping = true
+          continue
+
+        case "{":
+          depth ++
+          member += "{"
+          continue
+
+        case "}":
+          depth --
+          // if this closes the actual set, then we're done
+          if (depth === 0) {
+            addMember()
+            // pluck off the close-brace
+            i ++
+            break FOR
+          } else {
+            member += c
+            continue
+          }
+
+        case ",":
+          if (depth === 1) {
+            addMember()
+          } else {
+            member += c
+          }
+          continue
+
+        default:
+          member += c
+          continue
+      } // switch
+    } // else
+  } // for
+
+  // now we've either finished the set, and the suffix is
+  // pattern.substr(i), or we have *not* closed the set,
+  // and need to escape the leading brace
+  if (depth !== 0) {
+    // console.error("didn't close", pattern)
+    return braceExpand("\\" + pattern, options)
+  }
+
+  // x{y,z} -> ["xy", "xz"]
+  // console.error("set", set)
+  // console.error("suffix", pattern.substr(i))
+  var suf = braceExpand(pattern.substr(i), options)
+  // ["b", "c{d,e}","{f,g}h"] ->
+  //   [["b"], ["cd", "ce"], ["fh", "gh"]]
+  var addBraces = set.length === 1
+  // console.error("set pre-expanded", set)
+  set = set.map(function (p) {
+    return braceExpand(p, options)
+  })
+  // console.error("set expanded", set)
+
+
+  // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
+  //   ["b", "cd", "ce", "fh", "gh"]
+  set = set.reduce(function (l, r) {
+    return l.concat(r)
+  })
+
+  if (addBraces) {
+    set = set.map(function (s) {
+      return "{" + s + "}"
+    })
+  }
+
+  // now attach the suffixes.
+  var ret = []
+  for (var i = 0, l = set.length; i < l; i ++) {
+    for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+      ret.push(set[i] + suf[ii])
+    }
+  }
+  return ret
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion.  Otherwise, any series
+// of * is equivalent to a single *.  Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+  var options = this.options
+
+  // shortcuts
+  if (!options.noglobstar && pattern === "**") return GLOBSTAR
+  if (pattern === "") return ""
+
+  var re = ""
+    , hasMagic = false
+    , escaping = false
+    // ? => one single character
+    , patternListStack = []
+    , plType
+    , stateChar
+    , inClass = false
+    , reClassStart = -1
+    , classStart = -1
+    // . and .. never match anything that doesn't start with .,
+    // even when options.dot is set.
+    , patternStart = pattern.charAt(0) === "." ? "" // anything
+      // not (start or / followed by . or .. followed by / or end)
+      : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
+      : "(?!\\.)"
 
   function clearStateChar () {
     if (stateChar) {
@@ -100,10 +459,12 @@ function makeRe (pattern, options) {
       // that wasn't consumed by this pass.
       switch (stateChar) {
         case "*":
-          re += oneStar
+          re += star
+          hasMagic = true
           break
         case "?":
-          re += "."
+          re += qmark
+          hasMagic = true
           break
         default:
           re += "\\"+stateChar
@@ -113,27 +474,6 @@ function makeRe (pattern, options) {
     }
   }
 
-  var braceDepth = 0
-    , re = ""
-    , escaping = false
-    , oneStar = options.dot ? "[^\\/]*?"
-      : "(?:(?!(?:\\\/|^)\\.)[^\\/])*?"
-    , twoStar = options.dot ? ".*?"
-      // not a ^ or / followed by a dot,
-      // followed by anything, any number of times.
-      : "(?:(?!(?:\\\/|^)\\.).)*?"
-    , reSpecials = "().*{}+?[]^$/\\"
-    , patternListStack = []
-    , stateChar
-    , negate = false
-    , negating = false
-    , inClass = false
-    , reClassStart = -1
-    , classStart = -1
-    , classStartPattern = options.dot ? ""
-      : "(?:(?!(?:\\\/|^)\\.)"
-    , classEndPattern = options.dot ? "" : ")"
-
   for ( var i = 0, len = pattern.length, c
       ; (i < len) && (c = pattern.charAt(i))
       ; i ++ ) {
@@ -142,119 +482,115 @@ function makeRe (pattern, options) {
       console.error("%s\t%s %s %j", pattern, i, re, c)
     }
 
-    switch (c) {
+    // skip over any that are escaped.
+    if (escaping && reSpecials[c]) {
+      re += "\\" + c
+      escaping = false
+      continue
+    }
+
+    SWITCH: switch (c) {
+      case "/":
+        // completely not allowed, even escaped.
+        // Should already be path-split by now.
+        return false
+
       case "\\":
-        if (stateChar) {
-          if (stateChar === "*") re += oneStar
-          else re += "\\" + stateChar
-          stateChar = false
-        }
-        if (escaping) {
-          re += "\\\\" // must match literal \
-          escaping = false
-        } else {
-          escaping = true
-        }
+        clearStateChar()
+        escaping = true
         continue
 
       // the various stateChar values
-      case "!":
-        if (i === 0 || negating) {
-          negate = !negate
-          negating = true
-          break
-        } else {
-          negating = false
-        }
-        // fallthrough
+      // for the "extglob" stuff.
+      case "?":
+      case "*":
       case "+":
       case "@":
-      case "*":
-      case "?":
-       if (options.debug) {
-         console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
-       }
+      case "!":
+        if (options.debug) {
+          console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+        }
 
-        negating = false
-        if (escaping) {
-          re += "\\" + c
-          escaping = false
-        } else if (inClass) {
+        // all of those are literals inside a class, except that
+        // the glob [!a] means [^a] in regexp
+        if (inClass) {
+          if (c === "!" && i === classStart + 1) c = "^"
           re += c
-        } else if (c === "*" && stateChar === "*") { // **
-          re += twoStar
-          stateChar = false
-        } else {
-          if (stateChar) {
-            if (stateChar === "*") re += oneStar
-            else if (stateChar === "?") re += "."
-            else re += "\\" + stateChar
-          }
-          stateChar = c
+          continue
         }
+
+        // if we already have a stateChar, then it means
+        // that there was something like ** or +? in there.
+        // Handle the stateChar, then proceed with this one.
+        clearStateChar()
+        stateChar = c
+        // if extglob is disabled, then +(asdf|foo) isn't a thing.
+        // just clear the statechar *now*, rather than even diving into
+        // the patternList stuff.
+        if (options.noext) clearStateChar()
         continue
 
       case "(":
-        if (escaping) {
-          re += "\\("
-          escaping = false
-        } else if (inClass) {
+        if (inClass) {
           re += "("
-        } else if (stateChar) {
-          plType = stateChar
-          patternListStack.push(plType)
-          re += stateChar === "!" ? "(?!" : "(?:"
-          stateChar = false
-        } else {
+          continue
+        }
+
+        if (!stateChar) {
           re += "\\("
+          continue
         }
+
+        plType = stateChar
+        patternListStack.push({ type: plType
+                              , start: i - 1
+                              , reStart: re.length })
+        re += stateChar === "!" ? "(?!" : "(?:"
+        stateChar = false
         continue
 
       case ")":
-        if (escaping || inClass) {
-          re += "\\)"
-          escaping = false
-        } else if (patternListStack.length) {
-          re += ")"
-          plType = patternListStack.pop()
-          switch (plType) {
-            case "?":
-            case "+":
-            case "*": re += plType
-            case "!":
-            case "@": break
-          }
-        } else {
+        if (inClass || !patternListStack.length) {
           re += "\\)"
+          continue
+        }
+
+        hasMagic = true
+        re += ")"
+        plType = patternListStack.pop().type
+        switch (plType) {
+          case "?":
+          case "+":
+          case "*": re += plType
+          case "!": // already handled by the start
+          case "@": break // the default anyway
         }
         continue
 
       case "|":
-        if (escaping || inClass) {
+        if (inClass || !patternListStack.length || escaping) {
           re += "\\|"
           escaping = false
-        } else if (patternListStack.length) {
-          re += "|"
-        } else {
-          re += "\\|"
+          continue
         }
+
+        re += "|"
         continue
 
-      // these are mostly the same in regexp and glob :)
+      // these are mostly the same in regexp and glob
       case "[":
         // swallow any state-tracking char before the [
         clearStateChar()
 
-        if (escaping || inClass) {
+        if (inClass) {
           re += "\\" + c
-          escaping = false
-        } else {
-          inClass = true
-          classStart = i
-          reClassStart = re.length
-          re += classStartPattern
-          re += c
+          continue
         }
+
+        inClass = true
+        classStart = i
+        reClassStart = re.length
+        re += c
         continue
 
       case "]":
@@ -262,48 +598,16 @@ function makeRe (pattern, options) {
         //  meaning and represent itself in
         //  a bracket expression if it occurs
         //  first in the list.  -- POSIX.2 2.8.3.2
-        if (i === classStart + 1) escaping = true
-
-        if (escaping || !inClass) {
+        if (i === classStart + 1 || !inClass) {
           re += "\\" + c
           escaping = false
-        } else {
-          inClass = false
-          re += c + classEndPattern
-        }
-        continue
-
-      case "{":
-        if (escaping || inClass) {
-          re += "\\{"
-          escaping = false
-        } else {
-          re += "(?:"
-          braceDepth ++
-        }
-        continue
-
-      case "}":
-        if (escaping || inClass || braceDepth === 0) {
-          re += "\\}"
-          escaping = false
-        } else {
-          // swallow any state char that wasn't consumed
-          clearStateChar()
-          re += ")"
-          braceDepth --
+          continue
         }
-        continue
 
-      case ",":
-        if (escaping || inClass || braceDepth === 0) {
-          re += ","
-          escaping = false
-        } else {
-          // swallow any state char that wasn't consumed
-          clearStateChar()
-          re += "|"
-        }
+        // finish up the class.
+        hasMagic = true
+        inClass = false
+        re += c
         continue
 
       default:
@@ -313,7 +617,7 @@ function makeRe (pattern, options) {
         if (escaping) {
           // no need
           escaping = false
-        } else if (reSpecials.indexOf(c) !== -1
+        } else if (reSpecials[c]
                    && !(c === "^" && inClass)) {
           re += "\\"
         }
@@ -321,52 +625,397 @@ function makeRe (pattern, options) {
         re += c
 
     } // switch
-
-    if (negating && c !== "!") negating = false
-
   } // for
 
-  // handle trailing things that only matter at the very end.
-  if (stateChar) {
-    clearStateChar()
-  } else if (escaping) {
-    re += "\\\\"
-  }
 
+  // handle the case where we left a class open.
   // "[abc" is valid, equivalent to "\[abc"
   if (inClass) {
     // split where the last [ was, and escape it
     // this is a huge pita.  We now have to re-walk
     // the contents of the would-be class to re-translate
     // any characters that were passed through as-is
-    var cs = re.substr(reClassStart + classStartPattern.length + 1)
-      , csOpts = Object.create(options)
-    csOpts.partial = true
+    var cs = pattern.substr(classStart + 1)
+      , sp = this.parse(cs, SUBPARSE)
+    re = re.substr(0, reClassStart) + "\\[" + sp[0]
+    hasMagic = hasMagic || sp[1]
+  }
+
+  // handle the case where we had a +( thing at the *end*
+  // of the pattern.
+  // each pattern list stack adds 3 chars, and we need to go through
+  // and escape any | chars that were passed through as-is for the regexp.
+  // Go through and escape them, taking care not to double-escape any
+  // | chars that were already escaped.
+  var pl
+  while (pl = patternListStack.pop()) {
+    var tail = re.slice(pl.reStart + 3)
+    // maybe some even number of \, then maybe 1 \, followed by a |
+    tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+      if (!$2) {
+        // the | isn't already escaped, so escape it.
+        $2 = "\\"
+      }
+
+      // need to escape all those slashes *again*, without escaping the
+      // one that we need for escaping the | character.  As it works out,
+      // escaping an even number of slashes can be done by simply repeating
+      // it exactly after itself.  That's why this trick works.
+      //
+      // I am sorry that you have to see this.
+      return $1 + $1 + $2 + "|"
+    })
+
+    // console.error("tail=%j\n   %s", tail, tail)
+    var t = pl.type === "*" ? star
+          : pl.type === "?" ? qmark
+          : "\\" + pl.type
+
+    hasMagic = true
+    re = re.slice(0, pl.reStart)
+       + t + "\\("
+       + tail
+  }
+
+  // handle trailing things that only matter at the very end.
+  clearStateChar()
+  if (escaping) {
+    // trailing \\
+    re += "\\\\"
+  }
+
+  // only need to apply the nodot start if the re starts with
+  // something that could conceivably capture a dot
+  var addPatternStart = false
+  switch (re.charAt(0)) {
+    case ".":
+    case "[":
+    case "(": addPatternStart = true
+  }
+
+  // if the re is not "" at this point, then we need to make sure
+  // it doesn't match against an empty path part.
+  // Otherwise a/* will match a/, which it should not.
+  if (re !== "" && hasMagic) re = "(?=.)" + re
 
-    re = re.substr(0, reClassStart) + "\\["
-       + makeRe(cs, csOpts)
+  if (addPatternStart) re = patternStart + re
+
+  // parsing just a piece of a larger pattern.
+  if (isSub === SUBPARSE) {
+    return [ re, hasMagic ]
+  }
+
+  // skip the regexp for non-magical patterns
+  // unescape anything in it, though, so that it'll be
+  // an exact match against a file etc.
+  if (!hasMagic) {
+    return globUnescape(pattern)
   }
 
-  if (options.partial) return re
+  var flags = options.nocase ? "i" : ""
+    , regExp = new RegExp("^" + re + "$", flags)
+
+  regExp._glob = pattern
+  regExp._src = re
+
+  return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+  return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+  if (this.regexp || this.regexp === false) return this.regexp
+
+  // at this point, this.set is a 2d array of partial
+  // pattern strings, or "**".
+  //
+  // It's better to use .match().  This function shouldn't
+  // be used, really, but it's pretty convenient sometimes,
+  // when you just want to work with a regex.
+  var set = this.set
+
+  if (!set.length) return this.regexp = false
+  var options = this.options
+
+  var twoStar = options.noglobstar ? star
+      : options.dot ? twoStarDot
+      : twoStarNoDot
+    , flags = options.nocase ? "i" : ""
+
+  var re = set.map(function (pattern) {
+    return pattern.map(function (p) {
+      return (p === GLOBSTAR) ? twoStar
+           : (typeof p === "string") ? regExpEscape(p)
+           : p._src
+    }).join("\\\/")
+  }).join("|")
 
   // must match entire pattern
   // ending in a * or ** will make it less strict.
   re = "^" + re + "$"
 
-  // fail on the pattern, but allow anything otherwise.
-  if (negate) re = "^(?!" + re + ").*$"
+  // can match anything, as long as it's not this.
+  if (this.negate) re = "^(?!" + re + ").*$"
+
+  try {
+    return this.regexp = new RegExp(re, flags)
+  } catch (ex) {
+    return this.regexp = false
+  }
+}
+
+minimatch.match = function (list, pattern, options) {
+  var mm = new Minimatch(pattern, options)
+  list = list.filter(function (f) {
+    return mm.match(f)
+  })
+  if (options.nonull && !list.length) {
+    list.push(pattern)
+  }
+  return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+  // console.error("match", f, this.pattern)
+  // short-circuit in the case of busted things.
+  // comments, etc.
+  if (this.comment) return false
+  if (this.empty) return f === ""
+
+  var options = this.options
+
+  // first, normalize any slash-separated path parts.
+  // f = path.normalize(f)
+  var absolute = isAbsolute(f)
+
+  // console.error(this.pattern, f, absolute)
+
+  // windows: need to use /, not \
+  // On other platforms, \ is a valid (albeit bad) filename char.
+  if (process.platform === "win32") {
+    f = f.split("\\").join("/")
+  }
+
+  // treat the test path as a set of pathparts.
+  f = f.split(slashSplit)
+  // console.error(this.pattern, "split", f)
+
+  // just ONE of the pattern sets in this.set needs to match
+  // in order for it to be valid.  If negating, then just one
+  // match means that we have failed.
+  // Either way, return on the first hit.
+
+  var set = this.set
+  // console.error(this.pattern, "set", set)
+
+  for (var i = 0, l = set.length; i < l; i ++) {
+    var pattern = set[i]
+    var hit = this.matchOne(f, pattern, partial)
+    if (hit) {
+      return !this.negate
+    }
+  }
+
+  // didn't get any hits.  this is success if it's a negative
+  // pattern, failure otherwise.
+  return this.negate
+}
 
-  // really insane glob patterns can cause bad things.
-  var flags = ""
-  if (options.nocase) flags += "i"
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+  var options = this.options
 
   if (options.debug) {
-    console.error("/%s/%s", re, flags)
+    console.error("matchOne",
+                  { "this": this
+                  , file: file
+                  , pattern: pattern })
   }
 
-  try {
-    return new RegExp(re, flags)
-  } catch(ex) {
-    return false
+  if (options.matchBase && pattern.length === 1) {
+    file = path.basename(file.join("/")).split("/")
+  }
+
+  if (options.debug) {
+    console.error("matchOne", file.length, pattern.length)
+  }
+
+  for ( var fi = 0
+          , pi = 0
+          , fl = file.length
+          , pl = pattern.length
+      ; (fi < fl) && (pi < pl)
+      ; fi ++, pi ++ ) {
+
+    if (options.debug) {
+      console.error("matchOne loop")
+    }
+    var p = pattern[pi]
+      , f = file[fi]
+
+    if (options.debug) {
+      console.error(pattern, p, f)
+    }
+
+    // should be impossible.
+    // some invalid regexp stuff in the set.
+    if (p === false) return false
+
+    if (p === GLOBSTAR) {
+      // "**"
+      // a/**/b/**/c would match the following:
+      // a/b/x/y/z/c
+      // a/x/y/z/b/c
+      // a/b/x/b/x/c
+      // a/b/c
+      // To do this, take the rest of the pattern after
+      // the **, and see if it would match the file remainder.
+      // If so, return success.
+      // If not, the ** "swallows" a segment, and try again.
+      // This is recursively awful.
+      // a/b/x/y/z/c
+      // - a matches a
+      // - doublestar
+      //   - matchOne(b/x/y/z/c, b/**/c)
+      //     - b matches b
+      //     - doublestar
+      //       - matchOne(x/y/z/c, c) -> no
+      //       - matchOne(y/z/c, c) -> no
+      //       - matchOne(z/c, c) -> no
+      //       - matchOne(c, c) yes, hit
+      var fr = fi
+        , pr = pi + 1
+      if (pr === pl) {
+        // a ** at the end will just swallow the rest.
+        // We have found a match.
+        // however, it will not swallow /.x, unless
+        // options.dot is set.
+        // . and .. are *never* matched by **, for explosively
+        // exponential reasons.
+        for ( ; fi < fl; fi ++) {
+          if (file[fi] === "." || file[fi] === ".." ||
+              (!options.dot && file[fi].charAt(0) === ".")) return false
+        }
+        return true
+      }
+
+      // ok, let's see if we can swallow whatever we can.
+      WHILE: while (fr < fl) {
+        var swallowee = file[fr]
+        if (swallowee === "." || swallowee === ".." ||
+            (!options.dot && swallowee.charAt(0) === ".")) {
+          // console.error("dot detected!")
+          break WHILE
+        }
+
+        // XXX remove this slice.  Just pass the start index.
+        if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+          // found a match.
+          return true
+        } else {
+          // ** swallows a segment, and continue.
+          fr ++
+        }
+      }
+      // no match was found.
+      // However, in partial mode, we can't say this is necessarily over.
+      // If there's more *pattern* left, then 
+      if (partial) {
+        // ran out of file
+        // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
+        if (fr === fl) return true
+      }
+      return false
+    }
+
+    // something other than **
+    // non-magic patterns just have to match exactly
+    // patterns with magic have been turned into regexps.
+    var hit
+    if (typeof p === "string") {
+      if (options.nocase) {
+        hit = f.toLowerCase() === p.toLowerCase()
+      } else {
+        hit = f === p
+      }
+      if (options.debug) {
+        console.error("string match", p, f, hit)
+      }
+    } else {
+      hit = f.match(p)
+      if (options.debug) {
+        console.error("pattern match", p, f, hit)
+      }
+    }
+
+    if (!hit) return false
+  }
+
+  // Note: ending in / means that we'll get a final ""
+  // at the end of the pattern.  This can only match a
+  // corresponding "" at the end of the file.
+  // If the file ends in /, then it can only match a
+  // a pattern that ends in /, unless the pattern just
+  // doesn't have any more for it. But, a/b/ should *not*
+  // match "a/b/*", even though "" matches against the
+  // [^/]*? pattern, except in partial mode, where it might
+  // simply not be reached yet.
+  // However, a/b/ should still satisfy a/*
+
+  // now either we fell off the end of the pattern, or we're done.
+  if (fi === fl && pi === pl) {
+    // ran out of pattern and filename at the same time.
+    // an exact hit!
+    return true
+  } else if (fi === fl) {
+    // ran out of file, but still had pattern left.
+    // this is ok if we're doing the match as part of
+    // a glob fs traversal.
+    return partial
+  } else if (pi === pl) {
+    // ran out of pattern, still have file left.
+    // this is only acceptable if we're on the very last
+    // empty segment of a file with a trailing slash.
+    // a/* should match a/b/
+    var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+    return emptyFileEnd
   }
+
+  // should be unreachable.
+  throw new Error("wtf?")
+}
+
+
+// replace stuff like \* with *
+function globUnescape (s) {
+  return s.replace(/\\(.)/g, "$1")
+}
+
+
+function regExpEscape (s) {
+  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+}
+
+
+function isAbsolute (p) {
+  if (process.platform !== "win32") return p.charAt(0) === "/"
+
+  // yanked from node/lib/path.js
+  var splitDeviceRe =
+    /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?([\s\S]*?)$/
+
+  var result = p.match(splitDeviceRe)
+    , device = result[1] || ""
+    , isUnc = device && device.charAt(1) !== ":"
+    , isAbs = !!result[2] || isUnc // UNC always absolute
+
+  return isAbs
 }
index 54ac959b6ba7a28ef9ebb2c8de612677a9a0d224..92ccac5fb982bdabf073e9fbc5a6ba8cf83b5ab6 100644 (file)
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
   "name": "minimatch",
   "description": "a glob matcher in javascript",
-  "version": "0.0.5",
+  "version": "0.1.3",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/minimatch.git"
     "node": "*"
   },
   "dependencies": {
-    "lru-cache": "~1.0.2"
+    "lru-cache": "~1.0.5"
   },
   "devDependencies": {
-    "tap": "~0.0.5"
+    "tap": "~0.1.3"
   },
   "licenses" : [
     {
index 98083f304e1282542060733281f912dc0f028770..a44d9a761bf18142216cbbeb02a72cbe983f2b61 100644 (file)
@@ -7,7 +7,8 @@ Features:
 * Generate RFC4122 version 1 or version 4 UUIDs
 * Runs in node.js and all browsers.
 * Cryptographically strong random # generation on supporting platforms
-* 1.1K minified and gzip'ed
+* 1.1K minified and gzip'ed  (Want something smaller?  Check this [crazy shit](https://gist.github.com/982883) out! )
+* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
 
 ## Getting Started
 
@@ -45,10 +46,10 @@ Generate and return a RFC4122 v1 (timestamp-based) UUID.
 
 * `options` - (Object) Optional uuid state to apply. Properties may include:
 
-  * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomnly generated ID.  See note 2.
+  * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomnly generated ID.  See note 1.
   * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence.  Default: An internally maintained clockseq is used.
-  * `msecs` - (Number | Date) Time in milliseconds since unix Epoch.  Default: The current time is used.  See note 3.
-  * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
+  * `msecs` - (Number | Date) Time in milliseconds since unix Epoch.  Default: The current time is used.
+  * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
 
 * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
 * `offset` - (Number) Starting index in `buffer` at which to begin writing.
@@ -58,7 +59,6 @@ Returns `buffer`, if specified, otherwise the string form of the UUID
 Notes:
 
 1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
-1. Specifying the `msecs` option bypasses the internal logic for ensuring id uniqueness.  In this case you may want to also provide `clockseq` and `nsecs` options as well.
 
 Example: Generate string UUID with fully-specified options
 
@@ -74,14 +74,14 @@ uuid.v1({
 Example: In-place generation of two binary IDs
 
 ```javascript
-// In browsers: 'new Array(32)'
-var buffer = new Buffer(32).fill(0);  // -> <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
-uuid.v1(null, buffer, 0);             // -> <Buffer 02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
-uuid.v1(null, buffer, 16);            // -> <Buffer 02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15>
+// Generate two ids in an array
+var arr = new Array(32); // -> []
+uuid.v1(null, arr, 0);   // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
+uuid.v1(null, arr, 16);  // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
 
 // Optionally use uuid.unparse() to get stringify the ids
-uuid.unparse(buffer);                 // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
-uuid.unparse(buffer, 16)              // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
+uuid.unparse(buffer);    // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
+uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
 ```
 
 ### uuid.v4([`options` [, `buffer` [, `offset`]]])
@@ -91,6 +91,7 @@ Generate and return a RFC4122 v4 UUID.
 * `options` - (Object) Optional uuid state to apply. Properties may include:
 
   * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
+  * `rng` - (Function) Random # generator to use.  Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
 
 * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
 * `offset` - (Number) Starting index in `buffer` at which to begin writing.
@@ -186,10 +187,13 @@ For a more complete discussion of node-uuid performance, please see the `benchma
 
 For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
 
-### Release notes
+## Release notes
 
-v1.3: Includes
+v1.3.2:
+* Improve tests and handling of v1() options (Issue #24)
+* Expose RNG option to allow for perf testing with different generators
 
+v1.3:
 * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
 * Support for node.js crypto API
 * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
index a48f8904598b1c31999c7d8d2416cddc9f9a30a9..9df0da985d07d6dcc45c00880a4c09d24834270e 100644 (file)
@@ -7,8 +7,8 @@
   "contributors"  : [
     {"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"}
   ],
-  "dependencies"  : [],
+  "dependencies"  : {},
   "lib"           : ".",
   "main"          : "./uuid.js",
-  "version"       : "1.3.0"
+  "version"       : "1.3.3"
 }
index 2ee2b188715c0c59cd10dd7b0ea33e17713eedfd..27f1d1272dee42b62b85dacbf5e1a50fc82aa141 100644 (file)
@@ -1,51 +1,55 @@
-/*
- * Generate RFC4122 (v1 and v4) UUIDs
- *
- * Documentation at https://github.com/broofa/node-uuid
- */
+//     node-uuid/uuid.js
+//
+//     Copyright (c) 2010 Robert Kieffer
+//     Dual licensed under the MIT and GPL licenses.
+//     Documentation and details at https://github.com/broofa/node-uuid
 (function() {
   var _global = this;
 
-  // Random number generator (feature-detected below)
-  var _rng;
+  // Unique ID creation requires a high quality random # generator, but
+  // Math.random() does not guarantee "cryptographic quality".  So we feature
+  // detect for more robust APIs, normalizing each method to return 128-bits
+  // (16 bytes) of random data.
+  var mathRNG, nodeRNG, whatwgRNG;
 
-  // node.js 'crypto' API
-  // http://nodejs.org/docs/v0.6.2/api/crypto.html#randomBytes
-  try {
-    _rng = require('crypto').randomBytes;
-  } catch (e) {}
+  // Math.random()-based RNG.  All platforms, very fast, unknown quality
+  var _rndBytes = new Array(16);
+  mathRNG = function() {
+    var r, b = _rndBytes, i = 0;
+
+    for (var i = 0, r; i < 16; i++) {
+      if ((i & 0x03) == 0) r = Math.random() * 0x100000000;
+      b[i] = r >>> ((i & 0x03) << 3) & 0xff;
+    }
+
+    return b;
+  }
 
-  // WHATWG crypto api, available in Chrome
-  // http://wiki.whatwg.org/wiki/Crypto
-  if (!_rng && _global.crypto && crypto.getRandomValues) {
-    var _rnds = new Uint32Array(4), _rndBytes = new Array(16);
-    var _rng = function() {
-      // Get 32-bit rnds
+  // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
+  // WebKit only (currently), moderately fast, high quality
+  if (_global.crypto && crypto.getRandomValues) {
+    var _rnds = new Uint32Array(4);
+    whatwgRNG = function() {
       crypto.getRandomValues(_rnds);
 
-      // Unpack into byte array
       for (var c = 0 ; c < 16; c++) {
         _rndBytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff;
       }
       return _rndBytes;
-    };
+    }
   }
 
-  // Math.random - least desirable option since it does not guarantee
-  // cryptographic quality.
-  if (!_rng) {
-    var _rndBytes = new Array(16);
-    _rng = function() {
-      var r, b = _rndBytes, i = 0;
-
-      for (var i = 0, r; i < 16; i++) {
-        if ((i & 0x03) == 0) r = Math.random() * 0x100000000;
-        b[i] = r >>> ((i & 0x03) << 3) & 0xff;
-      }
-
-      return b;
+  // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
+  // Node.js only, moderately fast, high quality
+  try {
+    var _rb = require('crypto').randomBytes;
+    nodeRNG = _rb && function() {
+      return _rb(16);
     };
-  }
+  } catch (e) {}
+
+  // Select RNG with best quality
+  var _rng = nodeRNG || whatwgRNG || mathRNG;
 
   // Buffer class to use
   var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array;
@@ -58,7 +62,7 @@
     _hexToByte[_byteToHex[i]] = i;
   }
 
-  /** See docs at https://github.com/broofa/node-uuid */
+  // **`parse()` - Parse a UUID into it's component bytes**
   function parse(s, buf, offset) {
     var i = (buf && offset) || 0, ii = 0;
 
 
     // Zero out remaining bytes if string was short
     while (ii < 16) {
-      buf[i + ii] = 0;
+      buf[i + ii++] = 0;
     }
 
     return buf;
   }
 
-  /** See docs at https://github.com/broofa/node-uuid */
+  // **`unparse()` - Convert UUID byte array (ala parse()) into a string**
   function unparse(buf, offset) {
     var i = offset || 0, bth = _byteToHex;
     return  bth[buf[i++]] + bth[buf[i++]] +
             bth[buf[i++]] + bth[buf[i++]];
   }
 
-  // Pre allocate array for constructing uuids
-  var _buffer = new BufferClass(16);
-
-  //
-  // v1 UUID support
+  // **`v1()` - Generate time-based UUID**
   //
   // Inspired by https://github.com/LiosK/UUID.js
   // and http://docs.python.org/library/uuid.html
-  //
-
-  // Per 4.1.4 - Offset (in msecs) from JS time to UUID (gregorian) time
-  var EPOCH_OFFSET = 12219292800000;
 
   // random #'s we need to init node and clockseq
-  var _seedBytes = _rng(10);
+  var _seedBytes = _rng();
 
   // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
   var _nodeId = [
   ];
 
   // Per 4.2.2, randomize (14 bit) clockseq
-  var _clockSeq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
+  var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
 
   // Previous uuid creation time
-  var _last = 0;
+  var _lastMSecs = 0, _lastNSecs = 0;
 
-  // Count of UUIDs created during current time tick
-  var _count = 0;
-
-  /** See docs at https://github.com/broofa/node-uuid */
+  // See https://github.com/broofa/node-uuid for API details
   function v1(options, buf, offset) {
     var i = buf && offset || 0;
-    var b = buf || _buffer;
+    var b = buf || [];
 
     options = options || {};
 
-    // JS Numbers aren't capable of representing time in the RFC-specified
-    // 100-nanosecond units. To deal with this, we represent time as the usual
-    // JS milliseconds, plus an additional 100-nanosecond unit offset.
-    var msecs = 0; // JS time (msecs since Unix epoch)
-    var nsecs = 0; // additional 100-nanosecond units to add to msecs
-
-    if (options.msecs != null) {
-      // Explicit time specified.  Not that this turns off the internal logic
-      // around uuid count and clock sequence used insure uniqueness
-      msecs = (+options.msecs) + EPOCH_OFFSET;
-      nsecs = options.nsecs || 0;
-    } else {
-      // No time options - Follow the RFC logic (4.2.1.2) for maintaining
-      // clock seq and uuid count to help insure UUID uniqueness.
-
-      msecs = new Date().getTime() + EPOCH_OFFSET;
-
-      if (msecs < _last) {
-        // Clock regression - Per 4.2.1.2, increment clock seq
-        _clockSeq++;
-        _count = 0;
-      } else {
-        // Per 4.2.1.2, use a count of uuid's generated during the current
-        // clock cycle to simulate higher resolution clock
-        _count = (msecs == _last) ? _count + 1 : 0;
-      }
-      _last = msecs;
-
-      // Per 4.2.1.2 If generator creates more than one id per uuid 100-ns
-      // interval, throw an error
-      // (Requires generating > 10M uuids/sec. While unlikely, it's not
-      // entirely inconceivable given the benchmark results we're getting)
-      if (_count >= 10000) {
-        throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
-      }
+    var clockseq = options.clockseq != null ? options.clockseq : _clockseq;
+
+    // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+    // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so
+    // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+    // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+    var msecs = options.msecs != null ? options.msecs : new Date().getTime();
+
+    // Per 4.2.1.2, use count of uuid's generated during the current clock
+    // cycle to simulate higher resolution clock
+    var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;
+
+    // Time since last uuid creation (in msecs)
+    var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
+
+    // Per 4.2.1.2, Bump clockseq on clock regression
+    if (dt < 0 && options.clockseq == null) {
+      clockseq = clockseq + 1 & 0x3fff;
+    }
+
+    // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+    // time interval
+    if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
+      nsecs = 0;
+    }
 
-      nsecs = _count;
+    // Per 4.2.1.2 Throw error if too many uuids are requested
+    if (nsecs >= 10000) {
+      throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
     }
 
-    // Per 4.1.4, timestamp composition
+    _lastMSecs = msecs;
+    _lastNSecs = nsecs;
+    _clockseq = clockseq;
 
-    // time_low
+    // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+    msecs += 12219292800000;
+
+    // `time_low`
     var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
     b[i++] = tl >>> 24 & 0xff;
     b[i++] = tl >>> 16 & 0xff;
     b[i++] = tl >>> 8 & 0xff;
     b[i++] = tl & 0xff;
 
-    // time_mid
+    // `time_mid`
     var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
     b[i++] = tmh >>> 8 & 0xff;
     b[i++] = tmh & 0xff;
 
-    // time_high_and_version
+    // `time_high_and_version`
     b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
     b[i++] = tmh >>> 16 & 0xff;
 
-    // Clock sequence
-    var cs = options.clockseq != null ? options.clockseq : _clockSeq;
-
-    // clock_seq_hi_and_reserved (Per 4.2.2 - include variant)
-    b[i++] = cs >>> 8 | 0x80;
+    // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+    b[i++] = clockseq >>> 8 | 0x80;
 
-    // clock_seq_low
-    b[i++] = cs & 0xff;
+    // `clock_seq_low`
+    b[i++] = clockseq & 0xff;
 
-    // node
+    // `node`
     var node = options.node || _nodeId;
     for (var n = 0; n < 6; n++) {
       b[i + n] = node[n];
     return buf ? buf : unparse(b);
   }
 
-  //
-  // v4 UUID support
-  //
+  // **`v4()` - Generate random UUID**
 
-  /** See docs at https://github.com/broofa/node-uuid */
+  // See https://github.com/broofa/node-uuid for API details
   function v4(options, buf, offset) {
     // Deprecated - 'format' argument, as supported in v1.2
     var i = buf && offset || 0;
+
     if (typeof(options) == 'string') {
       buf = options == 'binary' ? new BufferClass(16) : null;
       options = null;
     }
+    options = options || {};
+
+    var rnds = options.random || (options.rng || _rng)();
 
-    var rnds = options && options.random || _rng(16);
-    // Per 4.4, set bits for version and clock_seq_hi_and_reserved
+    // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
     rnds[6] = (rnds[6] & 0x0f) | 0x40;
     rnds[8] = (rnds[8] & 0x3f) | 0x80;
 
     return buf || unparse(rnds);
   }
 
-  //
-  // Export API
-  //
-
+  // Export public API
   var uuid = v4;
   uuid.v1 = v1;
   uuid.v4 = v4;
   uuid.unparse = unparse;
   uuid.BufferClass = BufferClass;
 
+  // Export RNG options
+  uuid.mathRNG = mathRNG;
+  uuid.nodeRNG = nodeRNG;
+  uuid.whatwgRNG = whatwgRNG;
+
   if (typeof(module) != 'undefined') {
+    // Play nice with node.js
     module.exports = uuid;
   } else {
+    // Play nice with browsers
     var _previousRoot = _global.uuid;
+
+    // **`noConflict()` - (browser only) to reset global 'uuid' var**
     uuid.noConflict = function() {
       _global.uuid = _previousRoot;
       return uuid;
index c30f1a5f67665fa00e30da9dd896c5788f184694..4ea89f794afa787f3cdf149c25dd3bc631d5a302 100644 (file)
@@ -149,12 +149,13 @@ The first argument can be either a url or an options object. The only required o
 * `method` - http method, defaults to GET
 * `headers` - http headers, defaults to {}
 * `body` - entity body for POST and PUT requests. Must be buffer or string.
+* `form` - sets `body` but to querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header.
 * `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header.
 * `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.
 * `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.
 * `maxRedirects` - the maximum number of redirects to follow, defaults to 10.
 * `onResponse` - If true the callback will be fired on the "response" event instead of "end". If a function it will be called on "response" and not effect the regular semantics of the main callback on "end".
-* `encoding` - Encoding to be used on response.setEncoding when buffering the response data.
+* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.
 * `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.
 * `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.
 * `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request       
@@ -164,7 +165,7 @@ The first argument can be either a url or an options object. The only required o
 * `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section)
 
 
-The callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body buffer.
+The callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body String or Buffer.
 
 ## Convenience methods
 
diff --git a/deps/npm/node_modules/request/forever.js b/deps/npm/node_modules/request/forever.js
new file mode 100644 (file)
index 0000000..e6531a2
--- /dev/null
@@ -0,0 +1,84 @@
+module.exports = ForeverAgent
+
+var util = require('util')
+  , Agent = require('http').Agent
+  , net = require('net')
+
+function ForeverAgent(options) {
+  var self = this
+  self.options = options || {}
+  self.requests = {}
+  self.sockets = {}
+  self.freeSockets = {}
+  self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
+  self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
+  self.on('free', function(socket, host, port) {
+    var name = host + ':' + port
+    if (self.requests[name] && self.requests[name].length) {
+      self.requests[name].shift().onSocket(socket)
+    } else if (self.sockets[name].length < self.minSockets) {
+      if (!self.freeSockets[name]) self.freeSockets[name] = []
+      self.freeSockets[name].push(socket)
+      
+      // if an error happens while we don't use the socket anyway, meh, throw the socket away
+      function onIdleError() {
+        socket.destroy()
+      }
+      socket._onIdleError = onIdleError
+      socket.on('error', onIdleError)
+    } else {
+      // If there are no pending requests just destroy the
+      // socket and it will get removed from the pool. This
+      // gets us out of timeout issues and allows us to
+      // default to Connection:keep-alive.
+      socket.destroy();
+    }
+  })
+  self.createConnection = net.createConnection
+}
+util.inherits(ForeverAgent, Agent)
+
+ForeverAgent.defaultMinSockets = 5
+
+ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
+ForeverAgent.prototype.addRequest = function(req, host, port) {
+  var name = host + ':' + port
+  if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
+    var idleSocket = this.freeSockets[name].pop()
+    idleSocket.removeListener('error', idleSocket._onIdleError)
+    delete idleSocket._onIdleError
+    req._reusedSocket = true
+    req.onSocket(idleSocket)
+  } else {
+    this.addRequestNoreuse(req, host, port)
+  }
+}
+
+ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
+  if (this.sockets[name]) {
+    var index = this.sockets[name].indexOf(s);
+    if (index !== -1) {
+      this.sockets[name].splice(index, 1);
+    }
+  } else if (this.sockets[name] && this.sockets[name].length === 0) {
+    // don't leak
+    delete this.sockets[name];
+    delete this.requests[name];
+  }
+  
+  if (this.freeSockets[name]) {
+    var index = this.freeSockets[name].indexOf(s)
+    if (index !== -1) {
+      this.freeSockets[name].splice(index, 1)
+      if (this.freeSockets[name].length === 0) {
+        delete this.freeSockets[name]
+      }
+    }
+  }
+
+  if (this.requests[name] && this.requests[name].length) {
+    // If we have pending requests and a socket gets closed a new one
+    // needs to be created to take over in the pool for the one that closed.
+    this.createSocket(name, host, port).emit('free');
+  }
+}
index 68d97130985e11d633a53c648e47c022819a0e75..a25393ec3edfe6364882644d112ead739c37daae 100644 (file)
@@ -22,10 +22,15 @@ var http = require('http')
   , mimetypes = require('./mimetypes')
   , oauth = require('./oauth')
   , uuid = require('./uuid')
+  , ForeverAgent = require('./forever')
   , Cookie = require('./vendor/cookie')
   , CookieJar = require('./vendor/cookie/jar')
   , cookieJar = new CookieJar
   ;
+  
+if (process.logging) {
+  var log = process.logging('request')
+}
 
 try {
   https = require('https')
@@ -151,7 +156,13 @@ Request.prototype.request = function () {
     // fetch cookie from the global cookie jar
     var cookies = cookieJar.get({ url: self.uri.href })
   }
-  if (cookies) {self.headers.Cookie = cookies}
+  if (cookies) {
+    var cookieString = cookies.map(function (c) {
+      return c.name + "=" + c.value;
+    }).join("; ");
+    
+    self.headers.Cookie = cookieString;
+  }
 
   if (!self.uri.pathname) {self.uri.pathname = '/'}
   if (!self.uri.port) {
@@ -174,6 +185,12 @@ Request.prototype.request = function () {
 
   var clientErrorHandler = function (error) {
     if (setHost) delete self.headers.host
+    if (self.req._reusedSocket && error.code === 'ECONNRESET') {
+      self.agent = {addRequest: ForeverAgent.prototype.addRequestNoreuse.bind(self.agent)}
+      self.start()
+      self.req.end()
+      return
+    }
     if (self.timeout && self.timeoutTimer) clearTimeout(self.timeoutTimer)
     self.emit('error', error)
   }
@@ -223,8 +240,8 @@ Request.prototype.request = function () {
       }
     }
     self.headers.authorization = 
-      'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+encodeURIComponent(oa[i])+'"'}).join(',')
-    self.headers.authorization += ',oauth_signature="'+encodeURIComponent(signature)+'"'  
+      'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',')
+    self.headers.authorization += ',oauth_signature="'+oauth.rfc3986(signature)+'"'  
   }
 
   if (self.uri.auth && !self.headers.authorization) {
@@ -253,8 +270,14 @@ Request.prototype.request = function () {
     }
 
   } else if (self.multipart) {
-    self.body = [];
-    self.headers['content-type'] = 'multipart/related;boundary="frontier"'
+    self.body = []
+
+    if (!self.headers['content-type']) {
+      self.headers['content-type'] = 'multipart/related;boundary="frontier"';
+    } else {
+      self.headers['content-type'] = self.headers['content-type'].split(';')[0] + ';boundary="frontier"';
+    }
+
     if (!self.multipart.forEach) throw new Error('Argument error, options.multipart.')
 
     self.multipart.forEach(function (part) {
@@ -265,37 +288,40 @@ Request.prototype.request = function () {
       Object.keys(part).forEach(function(key){
         preamble += key + ': ' + part[key] + '\r\n'
       })
-      preamble += '\r\n';
-      self.body.push(new Buffer(preamble));
-      self.body.push(new Buffer(body));
-      self.body.push(new Buffer('\r\n'));
+      preamble += '\r\n'
+      self.body.push(new Buffer(preamble))
+      self.body.push(new Buffer(body))
+      self.body.push(new Buffer('\r\n'))
     })
-    self.body.push(new Buffer('--frontier--'));
+    self.body.push(new Buffer('--frontier--'))
   }
 
   if (self.body) {
-    var length = 0;
+    var length = 0
     if (!Buffer.isBuffer(self.body)) {
       if (Array.isArray(self.body)) {
         for (var i = 0; i < self.body.length; i++) {
-          length += self.body[i].length;
+          length += self.body[i].length
         }
       } else {
         self.body = new Buffer(self.body)
-        length = self.body.length;
+        length = self.body.length
       }
     } else {
-      length = self.body.length;
+      length = self.body.length
     }
     if (length) {
-      self.headers['content-length'] = length;
+      self.headers['content-length'] = length
     } else {
       throw new Error('Argument error, options.body.')
     }
   }
 
-  self.httpModule =
-    {"http:":http, "https:":https}[self.proxy ? self.proxy.protocol : self.uri.protocol]
+  var protocol = self.proxy ? self.proxy.protocol : self.uri.protocol
+    , defaultModules = {'http:':http, 'https:':https}
+    , httpModules = self.httpModules || {}
+    ;
+  self.httpModule = httpModules[protocol] || defaultModules[protocol]
 
   if (!self.httpModule) throw new Error("Invalid protocol")
 
@@ -304,12 +330,12 @@ Request.prototype.request = function () {
   } else {
     if (self.maxSockets) {
       // Don't use our pooling if node has the refactored client
-      self.agent = self.httpModule.globalAgent || self.getAgent(self.host, self.port)
+      self.agent = self.agent || self.httpModule.globalAgent || self.getAgent(self.host, self.port)
       self.agent.maxSockets = self.maxSockets
     }
     if (self.pool.maxSockets) {
       // Don't use our pooling if node has the refactored client
-      self.agent = self.httpModule.globalAgent || self.getAgent(self.host, self.port)
+      self.agent = self.agent || self.httpModule.globalAgent || self.getAgent(self.host, self.port)
       self.agent.maxSockets = self.pool.maxSockets
     }
   }
@@ -317,7 +343,8 @@ Request.prototype.request = function () {
   self.start = function () {
     self._started = true
     self.method = self.method || 'GET'
-
+    self.href = self.uri.href
+    if (log) log('%method %href', self)
     self.req = self.httpModule.request(self, function (response) {
       self.response = response
       response.request = self
@@ -332,6 +359,13 @@ Request.prototype.request = function () {
 
       if (setHost) delete self.headers.host
       if (self.timeout && self.timeoutTimer) clearTimeout(self.timeoutTimer)
+      
+      if (response.headers['set-cookie'] && (!self._disableCookies)) {
+        response.headers['set-cookie'].forEach(function(cookie) {
+          if (self.jar) self.jar.add(new Cookie(cookie))
+          else cookieJar.add(new Cookie(cookie))
+        })
+      }
 
       if (response.statusCode >= 300 &&
           response.statusCode < 400  &&
@@ -349,14 +383,18 @@ Request.prototype.request = function () {
           response.headers.location = url.resolve(self.uri.href, response.headers.location)
         }
         self.uri = response.headers.location
-        self.redirects.push( { statusCode : response.statusCode,
-                               redirectUri: response.headers.location })
+        self.redirects.push(
+          { statusCode : response.statusCode
+          , redirectUri: response.headers.location 
+          }
+        )
         delete self.req
         delete self.agent
         delete self._started
         if (self.headers) {
           delete self.headers.host
         }
+        if (log) log('Redirect to %uri', self)
         request(self, self.callback)
         return // Ignore the rest of the response
       } else {
@@ -425,7 +463,11 @@ Request.prototype.request = function () {
                 chunk.copy(body, i, 0, chunk.length)
                 i += chunk.length
               })
-              response.body = body.toString()
+              if (self.encoding === null) {
+                response.body = body
+              } else {
+                response.body = body.toString()
+              }
             } else if (buffer.length) {
               response.body = buffer.join('')
             }
@@ -435,17 +477,6 @@ Request.prototype.request = function () {
                 response.body = JSON.parse(response.body)
               } catch (e) {}
             }
-            if (response.statusCode == 200 && response.headers['set-cookie'] && (!self._disableCookies)) {
-              response.headers['set-cookie'].forEach(function(cookie) {
-                if (self.jar) {
-                  // custom defined jar
-                  self.jar.add(new Cookie(cookie));
-                } else {
-                  // add to the global cookie jar if user don't define his own
-                  cookieJar.add(new Cookie(cookie));
-                }
-              });
-            }
 
             self.callback(null, response, response.body)
           })
@@ -453,15 +484,15 @@ Request.prototype.request = function () {
       }
     })
 
-    if (self.timeout) {
+    if (self.timeout && !self.timeoutTimer) {
       self.timeoutTimer = setTimeout(function() {
-          self.req.abort()
-          var e = new Error("ETIMEDOUT")
-          e.code = "ETIMEDOUT"
-          self.emit("error", e)
+        self.req.abort()
+        var e = new Error("ETIMEDOUT")
+        e.code = "ETIMEDOUT"
+        self.emit("error", e)
       }, self.timeout)
     }
-
+    
     self.req.on('error', clientErrorHandler)
   }
 
@@ -493,8 +524,8 @@ Request.prototype.request = function () {
     if (self.body) {
       if (Array.isArray(self.body)) {
         self.body.forEach(function(part) {
-          self.write(part);
-        });
+          self.write(part)
+        })
       } else {
         self.write(self.body)
       }
@@ -577,6 +608,17 @@ request.defaults = function (options) {
   return de
 }
 
+request.forever = function (agentOptions, optionsArg) {
+  var options = {}
+  if (agentOptions) {
+    for (option in optionsArg) {
+      options[option] = optionsArg[option]
+    }
+  }
+  options.agent = new ForeverAgent(agentOptions)
+  return request.defaults(options)
+}
+
 request.get = request
 request.post = function (options, callback) {
   if (typeof options === 'string') options = {uri:options}
index e49c16e74645a6666a37496a9e93bd2fce4f8537..25db66977531925b4b60add4b00bb5e390c28e5b 100644 (file)
@@ -6,6 +6,16 @@ function sha1 (key, body) {
   return crypto.createHmac('sha1', key).update(body).digest('base64')
 }
 
+function rfc3986 (str) {
+  return encodeURIComponent(str)
+    .replace('!','%21')
+    .replace('*','%2A')
+    .replace('(','%28')
+    .replace(')','%29')
+    .replace("'",'%27')
+    ;
+}
+
 function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret, body) {
   // adapted from https://dev.twitter.com/docs/auth/oauth
   var base = 
@@ -13,11 +23,12 @@ function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret,
     encodeURIComponent(  base_uri ) + "&" +
     Object.keys(params).sort().map(function (i) {
       // big WTF here with the escape + encoding but it's what twitter wants
-      return encodeURIComponent(qs.escape(i)) + "%3D" + encodeURIComponent(qs.escape(params[i]))
+      return escape(rfc3986(i)) + "%3D" + escape(rfc3986(params[i]))
     }).join("%26")
   var key = consumer_secret + '&'
   if (token_secret) key += token_secret
   return sha1(key, base)
 }
 
-exports.hmacsign = hmacsign
\ No newline at end of file
+exports.hmacsign = hmacsign
+exports.rfc3986 = rfc3986
\ No newline at end of file
index a8bed6348b5b5ceb9b873f27e3a375dd4927f982..e7b899a8b1b5b7ca4a2caa02a7732b32e6f1df71 100644 (file)
@@ -1,7 +1,7 @@
 { "name" : "request"
 , "description" : "Simplified HTTP request client."
 , "tags" : ["http", "simple", "util", "utility"]
-, "version" : "2.2.0"
+, "version" : "2.9.3"
 , "author" : "Mikeal Rogers <mikeal.rogers@gmail.com>"
 , "repository" :
   { "type" : "git"
index d8f29b3f91f7606a5590f259a906e5f1415d2095..1eb2eaa22088d692c18b3e1df0e79c71162c3048 100644 (file)
@@ -22,13 +22,16 @@ var Cookie = exports = module.exports = function Cookie(str, req) {
   this.str = str;
 
   // First key is the name
-  this.name = str.substr(0, str.indexOf('='));
+  this.name = str.substr(0, str.indexOf('=')).trim();
 
   // Map the key/val pairs
   str.split(/ *; */).reduce(function(obj, pair){
-    pair = pair.split(/ *= */);
-    obj[pair[0].toLowerCase()] = pair[1] || true;
-    return obj;
+   var p = pair.indexOf('=');
+   if(p > 0)
+    obj[pair.substring(0, p).trim()] = pair.substring(p + 1).trim();
+   else
+    obj[pair.trim()] = true;
+   return obj;
   }, this);
 
   // Assign value
@@ -40,7 +43,9 @@ var Cookie = exports = module.exports = function Cookie(str, req) {
     : Infinity;
 
   // Default or trim path
-  this.path = this.path || '/';
+  this.path = this.path
+    ? this.path.trim(): req 
+    ? url.parse(req.url).pathname: '/';
 };
 
 /**
index 5b48d5bb2ebdc73e836af32646b0c93d663b70b0..2b69536ef982e0569e81acba48f8b4b17c70f1d7 100644 (file)
@@ -1,5 +1,5 @@
 {"name":"rimraf"
-,"version":"1.0.8"
+,"version":"1.0.9"
 ,"main":"rimraf.js"
 ,"description":"A deep deletion module for node (like `rm -rf`)"
 ,"author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
index 27e22669e3f0ddd5d9b54e75825a0343323b2266..e8104e9e4b3bf8e7fa1d232d2ade3bc41e2578a2 100644 (file)
@@ -31,7 +31,7 @@ function rimraf (p, opts, cb) {
 
   rimraf_(p, opts, function CB (er) {
     if (er) {
-      if (er.message.match(/^EBUSY/) && busyTries < opts.maxBusyTries) {
+      if (er.code === "EBUSY" && busyTries < opts.maxBusyTries) {
         var time = (opts.maxBusyTries - busyTries) * 100
         busyTries ++
         // try again, with the same exact callback as this one.
@@ -41,14 +41,14 @@ function rimraf (p, opts, cb) {
       }
 
       // this one won't happen if graceful-fs is used.
-      if (er.message.match(/^EMFILE/) && timeout < EMFILE_MAX) {
+      if (er.code === "EMFILE" && timeout < EMFILE_MAX) {
         return setTimeout(function () {
           rimraf_(p, opts, CB)
         }, timeout ++)
       }
 
       // already gone
-      if (er.message.match(/^ENOENT/)) er = null
+      if (er.code === "ENOENT") er = null
     }
 
     timeout = 0
@@ -61,7 +61,7 @@ function rimraf_ (p, opts, cb) {
     // if the stat fails, then assume it's already gone.
     if (er) {
       // already gone
-      if (er.message.match(/^ENOENT/)) return cb()
+      if (er.code === "ENOENT") return cb()
       // some other kind of error, permissions, etc.
       return cb(er)
     }
@@ -131,7 +131,12 @@ function asyncForEach (list, fn, cb) {
 // this looks simpler, but it will fail with big directory trees,
 // or on slow stupid awful cygwin filesystems
 function rimrafSync (p) {
-  var s = fs[lstatSync](p)
+  try {
+    var s = fs[lstatSync](p)
+  } catch (er) {
+    if (er.code === "ENOENT") return
+    throw er
+  }
   if (!s.isDirectory()) return fs.unlinkSync(p)
   fs.readdirSync(p).forEach(function (f) {
     rimrafSync(path.join(p, f))
index cd10e341ceb2bc3d39a86ecfa8f3c7c940e84fa1..563549ffed6a1d979ddce31a964ae5134de1ba60 100644 (file)
@@ -1,5 +1,5 @@
 { "name" : "semver"
-, "version" : "1.0.12"
+, "version" : "1.0.13"
 , "description" : "The semantic version parser used by npm."
 , "main" : "semver.js"
 , "scripts" : { "test" : "tap test.js" }
index 789b118b9ff3fa5985a9f4370613eb8f3848899f..d1266736e554af6d0a4fb7785e5386daf09e88ff 100644 (file)
@@ -1,3 +1,4 @@
+;(function (exports) { // nothing in here is node-specific.
 
 // See http://semver.org/
 // This implementation is a *hair* less strict in that it allows
@@ -35,6 +36,7 @@ Object.getOwnPropertyNames(expressions).forEach(function (i) {
 exports.rangeReplace = ">=$1 <=$7"
 exports.clean = clean
 exports.compare = compare
+exports.rcompare = rcompare
 exports.satisfies = satisfies
 exports.gt = gt
 exports.gte = gte
@@ -300,4 +302,4 @@ function inc (version, release) {
 
   return stringify(version)
 }
-
+})(typeof exports === "object" ? exports : semver = {})
index 939261aa4ac991e074ceb4dbe4d303d93874cb57..884e73dbac0b5dec73591582c3c2678aa7b83f70 100644 (file)
@@ -36,6 +36,7 @@ function Parse () {
   me.writable = true
   me.readable = true
   me._stream = new BlockStream(512)
+  me.position = 0
 
   me._stream.on("error", function (e) {
     me.emit("error", e)
@@ -125,6 +126,8 @@ Parse.prototype._process = function (c) {
     }
 
   }
+
+  this.position += 512
 }
 
 // take a header chunk, start the right kind of entry.
@@ -137,6 +140,14 @@ Parse.prototype._startEntry = function (c) {
     , onend
     , meta = false
 
+  if (null === header.size || !header.cksumValid) {
+    var e = new Error("invalid tar file")
+    e.header = header
+    e.tar_file_offset = this.position
+    e.tar_block = this.position / 512
+    this.emit("error", e)
+  }
+
   switch (tar.types[header.type]) {
     case "File":
     case "OldFile":
index 2f942394cbbff5a2c138b6b740b1f47e301f18ab..aa53022c643580887d7928576fa364442df8e889 100644 (file)
@@ -2,14 +2,14 @@
   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
   "name": "tar",
   "description": "tar for node",
-  "version": "0.1.10",
+  "version": "0.1.12",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/node-tar.git"
   },
   "main": "tar.js",
   "scripts": {
-    "test": "rm -rf test/tmp; tap test/*.js"
+    "test": "tap test/*.js"
   },
   "engines": {
     "node": "~0.5.9 || 0.6 || 0.7 || 0.8"
index 9a2fb94f5ffadd7c830e04998860d6df91fbdc39..55a2adf4c9847ce38d66045c1d4288acef3e9eb8 100644 (file)
@@ -1,87 +1,98 @@
-{ "name": "npm"
-, "publishConfig": { "tag": "alpha", "proprietary-attribs": false }
-, "description": "A package manager for node"
-, "keywords": [ "package manager", "modules", "install", "package.json" ]
-, "version": "1.1.0-beta-10"
-, "preferGlobal": true
-, "config": { "publishtest": false }
-, "homepage": "http://npmjs.org/"
-, "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)"
-, "repository":
-  { "type": "git"
-  , "url": "https://github.com/isaacs/npm"
-  }
-, "bugs":
-  { "email": "npm-@googlegroups.com"
-  , "url": "http://github.com/isaacs/npm/issues"
-  }
-, "directories": { "doc": "./doc"
-                 , "man": "./man"
-                 , "lib": "./lib"
-                 , "bin": "./bin"
-                 }
-, "main": "./lib/npm.js"
-, "bin": { "npm": "./bin/npm-cli.js"
-         , "npm_g": "./bin/npm-cli.js"
-         , "npm-g": "./bin/npm-cli.js" }
-
-, "dependencies":
-  { "semver": "1"
-  , "ini": "1"
-  , "slide": "1"
-  , "abbrev": "1"
-  , "graceful-fs": "~1.1.1"
-  , "minimatch": "0"
-  , "nopt": "1"
-  , "node-uuid": "~1.3"
-  , "proto-list": "1"
-  , "rimraf": "1"
-  , "request": "~2.2"
-  , "which": "1"
-  , "tar": "~0.1.7"
-  , "fstream": "~0.1.5"
-  , "block-stream": "*"
-  , "inherits": "1"
-  , "mkdirp": "0.1"
-  , "fast-list": "~1.0.1"
-  , "read": "0"
-  , "lru-cache": "1"
-  }
-
-, "bundleDependencies":
-  [ "slide"
-  , "ini"
-  , "semver"
-  , "abbrev"
-  , "graceful-fs"
-  , "minimatch"
-  , "nopt"
-  , "node-uuid"
-  , "rimraf"
-  , "request"
-  , "proto-list"
-  , "which"
-  , "tar"
-  , "fstream"
-  , "block-stream"
-  , "inherits"
-  , "mkdirp"
-  , "fast-list"
-  , "read"
-  , "lru-cache"
-  ]
-
-, "devDependencies":
-  { "ronn": "https://github.com/isaacs/ronnjs/tarball/master" }
-
-, "engines": { "node": "0.6 || 0.7 || 0.8", "npm": "1" }
-, "scripts": { "test": "node ./test/run.js"
-             , "prepublish": "make -j4 doc"
-             , "dumpconf": "env | grep npm | sort | uniq"
-             }
-, "licenses":
-  [ { "type": "MIT +no-false-attribs"
-    , "url": "http://github.com/isaacs/npm/raw/master/LICENSE"
+{
+  "name": "npm",
+  "publishConfig": {
+    "proprietary-attribs": false
+  },
+  "description": "A package manager for node",
+  "keywords": [
+    "package manager",
+    "modules",
+    "install",
+    "package.json"
+  ],
+  "version": "1.1.0-2",
+  "preferGlobal": true,
+  "config": {
+    "publishtest": false
+  },
+  "homepage": "http://npmjs.org/",
+  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/isaacs/npm"
+  },
+  "bugs": {
+    "email": "npm-@googlegroups.com",
+    "url": "http://github.com/isaacs/npm/issues"
+  },
+  "directories": {
+    "doc": "./doc",
+    "man": "./man",
+    "lib": "./lib",
+    "bin": "./bin"
+  },
+  "main": "./lib/npm.js",
+  "bin": "./bin/npm-cli.js",
+  "dependencies": {
+    "semver": "1",
+    "ini": "1",
+    "slide": "1",
+    "abbrev": "1",
+    "graceful-fs": "~1.1.1",
+    "minimatch": "0",
+    "nopt": "1",
+    "node-uuid": "~1.3",
+    "proto-list": "1",
+    "rimraf": "1",
+    "request": "~2.9",
+    "which": "1",
+    "tar": "~0.1.12",
+    "fstream": "~0.1.5",
+    "block-stream": "*",
+    "inherits": "1",
+    "mkdirp": "0.1",
+    "fast-list": "~1.0.1",
+    "read": "0",
+    "lru-cache": "1"
+  },
+  "bundleDependencies": [
+    "slide",
+    "ini",
+    "semver",
+    "abbrev",
+    "graceful-fs",
+    "minimatch",
+    "nopt",
+    "node-uuid",
+    "rimraf",
+    "request",
+    "proto-list",
+    "which",
+    "tar",
+    "fstream",
+    "block-stream",
+    "inherits",
+    "mkdirp",
+    "fast-list",
+    "read",
+    "lru-cache"
+  ],
+  "devDependencies": {
+    "ronn": "https://github.com/isaacs/ronnjs/tarball/master"
+  },
+  "engines": {
+    "node": "0.6 || 0.7 || 0.8",
+    "npm": "1"
+  },
+  "scripts": {
+    "test": "node ./test/run.js",
+    "prepublish": "npm prune; rm -rf node_modules/*/{test,example,bench}*; make -j4 doc",
+    "dumpconf": "env | grep npm | sort | uniq"
+  },
+  "licenses": [
+    {
+      "type": "MIT +no-false-attribs",
+      "url": "http://github.com/isaacs/npm/raw/master/LICENSE"
     }
   ]
 }
index 6c32ea1838621618a5ac17b94162f6b632dcad34..9a66d4dbbb3b8dd51d0d6bfe0830a6dee1ee68b8 100755 (executable)
@@ -7,7 +7,13 @@ set -o errexit
 set -o pipefail
 
 if ! [ -x node_modules/.bin/ronn ]; then
+  ps=0
   if [ -f .building_ronn ]; then
+    pid=$(cat .building_ronn)
+    ps=$(ps -p $pid | grep $pid | wc -l) || true
+  fi
+
+  if [ -f .building_ronn ] && [ $ps != 0 ]; then
     while [ -f .building_ronn ]; do
       sleep 1
     done
@@ -16,7 +22,7 @@ if ! [ -x node_modules/.bin/ronn ]; then
     echo $$ > .building_ronn
     sleep 1
     if [ $(cat .building_ronn) == $$ ]; then
-      make node_modules/ronn
+      make node_modules/.bin/ronn
       rm .building_ronn
     else
       while [ -f .building_ronn ]; do
diff --git a/deps/npm/test/packages/npm-test-optional-deps/package.json b/deps/npm/test/packages/npm-test-optional-deps/package.json
new file mode 100644 (file)
index 0000000..ebcd568
--- /dev/null
@@ -0,0 +1,10 @@
+{ "name": "npm-test-optional-deps"
+, "version": "1.2.5"
+, "optionalDependencies":
+  { "npm-test-foobarzaaakakaka": "http://example.com/"
+  , "dnode": "10.999.14234"
+  , "sax": "*"
+  , "999 invalid name": "1.2.3"
+  , "glob": "some invalid version 99 #! $$ x y z"
+  }
+}