npm 1.1.0-beta-2
authorisaacs <i@izs.me>
Wed, 14 Dec 2011 02:53:02 +0000 (18:53 -0800)
committerisaacs <i@izs.me>
Wed, 14 Dec 2011 22:17:16 +0000 (14:17 -0800)
160 files changed:
deps/npm/.gitmodules
deps/npm/.travis.yml [new file with mode: 0644]
deps/npm/bin/npm-cli.js
deps/npm/doc/cli/config.md
deps/npm/doc/cli/developers.md
deps/npm/doc/cli/search.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/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/adduser.js
deps/npm/lib/bugs.js
deps/npm/lib/cache.js
deps/npm/lib/init.js
deps/npm/lib/install.js
deps/npm/lib/npm.js
deps/npm/lib/rebuild.js
deps/npm/lib/search.js
deps/npm/lib/substack.js [new file with mode: 0644]
deps/npm/lib/unpublish.js
deps/npm/lib/utils/config-defs.js
deps/npm/lib/utils/excludes.js
deps/npm/lib/utils/fetch.js
deps/npm/lib/utils/get-agent.js
deps/npm/lib/utils/ini.js
deps/npm/lib/utils/lifecycle.js
deps/npm/lib/utils/log.js
deps/npm/lib/utils/npm-registry-client/get.js
deps/npm/lib/utils/npm-registry-client/publish.js
deps/npm/lib/utils/npm-registry-client/request.js
deps/npm/lib/utils/prompt.js [deleted file]
deps/npm/lib/utils/tar.js
deps/npm/man/man1/config.1
deps/npm/man/man1/developers.1
deps/npm/man/man1/npm.1
deps/npm/man/man1/search.1
deps/npm/man/man3/npm.3
deps/npm/node_modules/fast-list/.npmignore [new file with mode: 0644]
deps/npm/node_modules/fast-list/.travis.yml [new file with mode: 0644]
deps/npm/node_modules/fast-list/bench.js [deleted file]
deps/npm/node_modules/fstream/.npmignore [new file with mode: 0644]
deps/npm/node_modules/fstream/.travis.yml [new file with mode: 0644]
deps/npm/node_modules/fstream/lib/dir-reader.js
deps/npm/node_modules/fstream/lib/reader.js
deps/npm/node_modules/fstream/lib/socket-reader.js [new file with mode: 0644]
deps/npm/node_modules/fstream/package.json
deps/npm/node_modules/graceful-fs/.npmignore [new file with mode: 0644]
deps/npm/node_modules/graceful-fs/graceful-fs.js
deps/npm/node_modules/graceful-fs/package.json
deps/npm/node_modules/lru-cache/.npmignore [new file with mode: 0644]
deps/npm/node_modules/lru-cache/LICENSE [moved from deps/npm/node_modules/minimatch/node_modules/lru-cache/LICENSE with 100% similarity]
deps/npm/node_modules/lru-cache/README.md [moved from deps/npm/node_modules/minimatch/node_modules/lru-cache/README.md with 100% similarity]
deps/npm/node_modules/lru-cache/lib/lru-cache.js [moved from deps/npm/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js with 55% similarity]
deps/npm/node_modules/lru-cache/package.json [new file with mode: 0644]
deps/npm/node_modules/minimatch/.gitmodules [deleted file]
deps/npm/node_modules/minimatch/.travis.yml [new file with mode: 0644]
deps/npm/node_modules/minimatch/README.md
deps/npm/node_modules/minimatch/minimatch.js
deps/npm/node_modules/minimatch/node_modules/lru-cache/package.json [deleted file]
deps/npm/node_modules/minimatch/package.json
deps/npm/node_modules/node-uuid/.npmignore [new file with mode: 0644]
deps/npm/node_modules/nopt/.npmignore [new file with mode: 0644]
deps/npm/node_modules/read/README.md [new file with mode: 0644]
deps/npm/node_modules/read/lib/read.js [new file with mode: 0644]
deps/npm/node_modules/read/package.json [new file with mode: 0644]
deps/npm/node_modules/tar/.npmignore [new file with mode: 0644]
deps/npm/node_modules/tar/.travis.yml [new file with mode: 0644]
deps/npm/node_modules/tar/lib/pack.js
deps/npm/node_modules/tar/package.json
deps/npm/package.json
deps/npm/scripts/clean-old.sh [changed mode: 0644->0755]
deps/npm/scripts/index-build.js [changed mode: 0644->0755]
deps/npm/scripts/install.sh [changed mode: 0644->0755]

index c705633..169c875 100644 (file)
        url = https://github.com/mikeal/request.git
 [submodule "node_modules/tar"]
        path = node_modules/tar
-       url = git://github.com/isaacs/node-tar.git
+       url = https://github.com/isaacs/node-tar.git
 [submodule "node_modules/fstream"]
        path = node_modules/fstream
-       url = git://github.com/isaacs/fstream.git
+       url = https://github.com/isaacs/fstream.git
 [submodule "node_modules/inherits"]
        path = node_modules/inherits
-       url = git://github.com/isaacs/inherits.git
+       url = https://github.com/isaacs/inherits.git
 [submodule "node_modules/block-stream"]
        path = node_modules/block-stream
-       url = git://github.com/isaacs/block-stream.git
+       url = https://github.com/isaacs/block-stream.git
 [submodule "node_modules/mkdirp"]
        path = node_modules/mkdirp
-       url = git://github.com/isaacs/node-mkdirp.git
+       url = https://github.com/isaacs/node-mkdirp.git
 [submodule "node_modules/fast-list"]
        path = node_modules/fast-list
-       url = git://github.com/isaacs/fast-list.git
+       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
diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml
new file mode 100644 (file)
index 0000000..698bc9a
--- /dev/null
@@ -0,0 +1,4 @@
+language: node_js
+before_install: "make &>out || cat out; rm out"
+node_js:
+  - 0.6
index db6db2f..e0b9f20 100755 (executable)
@@ -12,6 +12,9 @@ if (typeof WScript !== "undefined") {
   return
 }
 
+
+process.title = "npm"
+
 var log = require("../lib/utils/log.js")
 log.waitForConfig()
 log.info("ok", "it worked if it ends with")
index e380e65..e70acc2 100644 (file)
@@ -225,6 +225,14 @@ The location of npm's cache directory.  See `npm-cache(1)`
 If false, never shows colors.  If `"always"` then always shows colors.
 If true, then only prints color codes for tty file descriptors.
 
+### coverage
+
+* Default: false
+* Type: Boolean
+
+A flag to tell test-harness to run with their coverage options enabled,
+if they respond to the `npm_config_coverage` environment variable.
+
 ### depth
 
 * Default: Infinity
@@ -379,13 +387,16 @@ The location to write log output.
 
 ### loglevel
 
-* Default: "warn"
+* Default: "http"
 * Type: String
-* Values: "silent", "win", "error", "warn", "info", "verbose", "silly"
+* Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"
 
 What level of logs to report.  On failure, *all* logs are written to
 `npm-debug.log` in the current working directory.
 
+Any logs of a higher level than the setting are shown.
+The default is "http", which shows http, warn, and error output.
+
 ### logprefix
 
 * Default: true on Posix, false on Windows
@@ -537,6 +548,16 @@ Space-separated options that are always passed to search.
 
 Space-separated options that limit the results from search.
 
+### searchsort
+
+* Default: "name"
+* Type: String
+* Values: "name", "-name", "date", "-date", "description",
+  "-description", "keywords", "-keywords"
+
+Indication of which field to sort search results by.  Prefix with a `-`
+character to indicate reverse sort.
+
 ### shell
 
 * Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
index 0f0f94c..9123f35 100644 (file)
@@ -150,8 +150,8 @@ You can give publish a url to a tarball, or a filename of a tarball,
 or a path to a folder.
 
 Note that pretty much **everything in that folder will be exposed**
-by default.  So, if you have secret stuff in there, use a `.npminclude`
-or `.npmignore` file to list out the globs to include/ignore, or publish
+by default.  So, if you have secret stuff in there, use a
+`.npmignore` file to list out the globs to ignore, or publish
 from a fresh checkout.
 
 ## Brag about it
index 3b15e9b..e9e408c 100644 (file)
@@ -9,28 +9,9 @@ npm-search(1) -- Search for packages
 
 Search the registry for packages matching the search terms.
 
-## CONFIGURATION
-
-### description
-
-* Default: true
-* Type: Boolean
-
-Show the description in `npm search`
-
-### searchopts
-
-* Default: ""
-* Type: String
-
-Space-separated options that are always passed to search.
-
-### searchexclude
-
-* Default: ""
-* Type: String
-
-Space-separated options that limit the results from search.
+If a term starts with `/`, then it's interpreted as a regular expression.
+A trailing `/` will be ignored in this case.  (Note that many regular
+expression characters must be escaped or quoted in most shells.)
 
 ## SEE ALSO
 
index accd17c..6fc1156 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-alpha-6</p>
+<p id="footer">bin &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 71f7da2..1d99858 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-alpha-6</p>
+<p id="footer">bugs &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 7102efd..900ef71 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-alpha-6</p>
+<p id="footer">commands &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f91ef57..9616c8c 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-alpha-6</p>
+<p id="footer">config &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 0e77dba..57c6d09 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-alpha-6</p>
+<p id="footer">deprecate &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b2a5ca2..3b170ae 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-alpha-6</p>
+<p id="footer">docs &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 52c4830..4316a72 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-alpha-6</p>
+<p id="footer">edit &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index bc052c5..1497eec 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-alpha-6</p>
+<p id="footer">explore &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a603fe5..f69331d 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-alpha-6</p>
+<p id="footer">help-search &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e693070..6c5c3c4 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-alpha-6</p>
+<p id="footer">init &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 135ac35..a705782 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-alpha-6</p>
+<p id="footer">install &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 70cb2ad..e481748 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-alpha-6</p>
+<p id="footer">link &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 985f879..815ef53 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-alpha-6</p>
+<p id="footer">load &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3842221..76157b4 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-alpha-6</p>
+<p id="footer">ls &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 7121387..9ee4117 100644 (file)
@@ -24,7 +24,7 @@ npm.load(configObject, function (er, npm) {
 
 <h2 id="VERSION">VERSION</h2>
 
-<p>1.1.0-alpha-6</p>
+<p>1.1.0-beta-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-alpha-6</p>
+<p id="footer">npm &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 0825805..1ae2b4d 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-alpha-6</p>
+<p id="footer">outdated &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dc5408d..323ee1c 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-alpha-6</p>
+<p id="footer">owner &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d3a3159..ecd0a05 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-alpha-6</p>
+<p id="footer">pack &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c184ea6..7e4f9bc 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically</p>
 </div>
-<p id="footer">prefix &mdash; npm@1.1.0-alpha-6</p>
+<p id="footer">prefix &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9358fb4..1a01416 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-alpha-6</p>
+<p id="footer">prune &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 81e2570..090cb27 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-alpha-6</p>
+<p id="footer">publish &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 05932eb..dfedf01 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-alpha-6</p>
+<p id="footer">rebuild &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f51bd12..c0ac892 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-alpha-6</p>
+<p id="footer">restart &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b8ed4cd..2d808b6 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically.</p>
 </div>
-<p id="footer">root &mdash; npm@1.1.0-alpha-6</p>
+<p id="footer">root &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9afd96d..631703e 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-alpha-6</p>
+<p id="footer">run-script &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3cf9710..8785f28 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-alpha-6</p>
+<p id="footer">search &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 8a6a2c6..d1e7c08 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-alpha-6</p>
+<p id="footer">start &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a1a5931..371453c 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-alpha-6</p>
+<p id="footer">stop &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6ba9e46..7346069 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-alpha-6</p>
+<p id="footer">submodule &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2921500..b2a8ac2 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-alpha-6</p>
+<p id="footer">tag &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e1d1e6c..5e30bbc 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-alpha-6</p>
+<p id="footer">test &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3508abb..168822c 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-alpha-6</p>
+<p id="footer">uninstall &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 186eed8..b43b52a 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-alpha-6</p>
+<p id="footer">unpublish &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c1f4c14..09b0d59 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-alpha-6</p>
+<p id="footer">update &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 174ec68..1ad5f9f 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-alpha-6</p>
+<p id="footer">version &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 5da1895..7da3176 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-alpha-6</p>
+<p id="footer">view &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 937ee89..59a030a 100644 (file)
@@ -21,7 +21,7 @@
 
 <p>This function is not useful programmatically</p>
 </div>
-<p id="footer">whoami &mdash; npm@1.1.0-alpha-6</p>
+<p id="footer">whoami &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2abe255..93f9b33 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-alpha-6</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2eefce6..3d178f4 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-alpha-6</p>
+<p id="footer">adduser &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 313f2fb..9ce5f55 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-alpha-6</p>
+<p id="footer">bin &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4770f5f..29bf158 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-alpha-6</p>
+<p id="footer">bugs &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2217e88..ba6b361 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-alpha-6</p>
+<p id="footer">build &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a582db8..8383ade 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-alpha-6</p>
+<p id="footer">bundle &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f815ba3..a0e5fb1 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-alpha-6</p>
+<p id="footer">cache &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dbaabca..6171efd 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-alpha-6</p>
+<p id="footer">changelog &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 99e7254..d4b760b 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-alpha-6</p>
+<p id="footer">coding-style &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c0f2089..410303d 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-alpha-6</p>
+<p id="footer">completion &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 724d449..4550b2f 100644 (file)
@@ -207,6 +207,13 @@ to trust only that specific signing authority.</p>
 <p>If false, never shows colors.  If <code>"always"</code> then always shows colors.
 If true, then only prints color codes for tty file descriptors.</p>
 
+<h3 id="coverage">coverage</h3>
+
+<ul><li>Default: false</li><li>Type: Boolean</li></ul>
+
+<p>A flag to tell test-harness to run with their coverage options enabled,
+if they respond to the <code>npm_config_coverage</code> environment variable.</p>
+
 <h3 id="depth">depth</h3>
 
 <ul><li>Default: Infinity</li><li>Type: Number</li></ul>
@@ -338,11 +345,14 @@ being installed locally.</li></ul>
 
 <h3 id="loglevel">loglevel</h3>
 
-<ul><li>Default: "warn"</li><li>Type: String</li><li>Values: "silent", "win", "error", "warn", "info", "verbose", "silly"</li></ul>
+<ul><li>Default: "http"</li><li>Type: String</li><li>Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"</li></ul>
 
 <p>What level of logs to report.  On failure, <em>all</em> logs are written to
 <code>npm-debug.log</code> in the current working directory.</p>
 
+<p>Any logs of a higher level than the setting are shown.
+The default is "http", which shows http, warn, and error output.</p>
+
 <h3 id="logprefix">logprefix</h3>
 
 <ul><li>Default: true on Posix, false on Windows</li><li>Type: Boolean</li></ul>
@@ -474,6 +484,14 @@ this as true.</p>
 
 <p>Space-separated options that limit the results from search.</p>
 
+<h3 id="searchsort">searchsort</h3>
+
+<ul><li>Default: "name"</li><li>Type: String</li><li>Values: "name", "-name", "date", "-date", "description",
+"-description", "keywords", "-keywords"</li></ul>
+
+<p>Indication of which field to sort search results by.  Prefix with a <code>-</code>
+character to indicate reverse sort.</p>
+
 <h3 id="shell">shell</h3>
 
 <ul><li>Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
@@ -597,7 +615,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-alpha-6</p>
+<p id="footer">config &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 65af3e7..e610005 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-alpha-6</p>
+<p id="footer">deprecate &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9d48bbd..50ae346 100644 (file)
@@ -136,8 +136,8 @@ bring in your module's main module.</p>
 or a path to a folder.</p>
 
 <p>Note that pretty much <strong>everything in that folder will be exposed</strong>
-by default.  So, if you have secret stuff in there, use a <code>.npminclude</code>
-or <code>.npmignore</code> file to list out the globs to include/ignore, or publish
+by default.  So, if you have secret stuff in there, use a
+<code>.npmignore</code> file to list out the globs to ignore, or publish
 from a fresh checkout.</p>
 
 <h2 id="Brag-about-it">Brag about it</h2>
@@ -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-alpha-6</p>
+<p id="footer">developers &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6e600c6..a7af56b 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-alpha-6</p>
+<p id="footer">docs &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c400727..bdd65b9 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-alpha-6</p>
+<p id="footer">edit &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 36b1aeb..9de965b 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-alpha-6</p>
+<p id="footer">explore &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 883f0df..962b9ed 100644 (file)
@@ -215,7 +215,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-alpha-6</p>
+<p id="footer">faq &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index a5cff40..a7e384e 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-alpha-6</p>
+<p id="footer">folders &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3fa0d77..f9548b4 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-alpha-6</p>
+<p id="footer">help-search &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c79bfdb..cf92805 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-alpha-6</p>
+<p id="footer">help &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 84a5554..a6cf8d2 100644 (file)
 
 <p> Display npm username</p>
 </div>
-<p id="footer">index &mdash; npm@1.1.0-alpha-6</p>
+<p id="footer">index &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3f9dbb1..bbfd6f3 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-alpha-6</p>
+<p id="footer">init &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 2aac715..2d492d1 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-alpha-6</p>
+<p id="footer">install &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3e360b7..a0d130a 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-alpha-6</p>
+<p id="footer">json &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index eafeb22..0d037dc 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-alpha-6</p>
+<p id="footer">link &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 56d0e9f..6db59ec 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-alpha-6</p>
+<p id="footer">list &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f83e3c0..d6d35b6 100644 (file)
@@ -14,7 +14,7 @@
 
 <h2 id="VERSION">VERSION</h2>
 
-<p>1.1.0-alpha-6</p>
+<p>1.1.0-beta-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-alpha-6</p>
+<p id="footer">npm &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d451098..2b5191d 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-alpha-6</p>
+<p id="footer">outdated &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 399a9d4..b0c9ed1 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></ul>
 </div>
-<p id="footer">owner &mdash; npm@1.1.0-alpha-6</p>
+<p id="footer">owner &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 72cdeae..f32e43e 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-alpha-6</p>
+<p id="footer">pack &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c17b7e1..5f7361b 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-alpha-6</p>
+<p id="footer">prefix &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 710a84d..ebfdcdc 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-alpha-6</p>
+<p id="footer">prune &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b6046cd..1ec39af 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-alpha-6</p>
+<p id="footer">publish &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 6cf2e53..d27fd9f 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-alpha-6</p>
+<p id="footer">rebuild &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c53c234..b8c6298 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></ul>
 </div>
-<p id="footer">registry &mdash; npm@1.1.0-alpha-6</p>
+<p id="footer">registry &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 095fbca..bcc2d7a 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-alpha-6</p>
+<p id="footer">removing-npm &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3eb4fd3..82be565 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-alpha-6</p>
+<p id="footer">restart &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c3d2610..86f2761 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-alpha-6</p>
+<p id="footer">root &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d2e018a..cabcc5c 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-alpha-6</p>
+<p id="footer">run-script &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 759cca5..18c08ed 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-alpha-6</p>
+<p id="footer">scripts &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index c042d1e..9774b02 100644 (file)
 
 <p>Search the registry for packages matching the search terms.</p>
 
-<h2 id="CONFIGURATION">CONFIGURATION</h2>
-
-<h3 id="description">description</h3>
-
-<ul><li>Default: true</li><li>Type: Boolean</li></ul>
-
-<p>Show the description in <code>npm search</code></p>
-
-<h3 id="searchopts">searchopts</h3>
-
-<ul><li>Default: ""</li><li>Type: String</li></ul>
-
-<p>Space-separated options that are always passed to search.</p>
-
-<h3 id="searchexclude">searchexclude</h3>
-
-<ul><li>Default: ""</li><li>Type: String</li></ul>
-
-<p>Space-separated options that limit the results from search.</p>
+<p>If a term starts with <code>/</code>, then it's interpreted as a regular expression.
+A trailing <code>/</code> will be ignored in this case.  (Note that many regular
+expression characters must be escaped or quoted in most shells.)</p>
 
 <h2 id="SEE-ALSO">SEE ALSO</h2>
 
 <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-alpha-6</p>
+<p id="footer">search &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 3bd1954..5ec9cdf 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-alpha-6</p>
+<p id="footer">semver &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dd3b074..bd8dfb6 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-alpha-6</p>
+<p id="footer">star &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index dae9352..0417ac6 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-alpha-6</p>
+<p id="footer">start &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 13c2c9f..d54ba60 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-alpha-6</p>
+<p id="footer">stop &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index bc61746..eda87a6 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-alpha-6</p>
+<p id="footer">submodule &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 4662c1d..751139d 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-alpha-6</p>
+<p id="footer">tag &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index e415cef..c775dd6 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-alpha-6</p>
+<p id="footer">test &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index d262cfc..474e1b6 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-alpha-6</p>
+<p id="footer">uninstall &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 89b312c..74f53a0 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-alpha-6</p>
+<p id="footer">unpublish &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b5e9d00..b0ee875 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-alpha-6</p>
+<p id="footer">update &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 9bc3ce4..b5e7bb2 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-alpha-6</p>
+<p id="footer">version &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index f1ed5c4..67491cf 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-alpha-6</p>
+<p id="footer">view &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index 30826d3..d3a8d15 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-alpha-6</p>
+<p id="footer">whoami &mdash; npm@1.1.0-beta-2</p>
 <script>
 ;(function () {
 var wrapper = document.getElementById("wrapper")
index b6d08ed..d65eed5 100644 (file)
@@ -5,7 +5,7 @@ var registry = require("./utils/npm-registry-client/index.js")
   , ini = require("./utils/ini.js")
   , log = require("./utils/log.js")
   , npm = require("./npm.js")
-  , prompt = require("./utils/prompt.js")
+  , read = require("read")
   , promiseChain = require("./utils/promise-chain.js")
   , crypto
 
@@ -26,15 +26,15 @@ function adduser (args, cb) {
     , changed = false
 
   promiseChain(cb)
-    (prompt, ["Username: ", u.u], function (un) {
+    (read, [{prompt: "Username: ", default: u.u}], function (un) {
       changed = u.u !== un
       u.u = un
     })
     (function (cb) {
       if (u.p && !changed) return cb(null, u.p)
-      prompt("Password: ", u.p, true, cb)
+      read({prompt: "Password: ", default: u.p, silent: true}, cb)
     }, [], function (pw) { u.p = pw })
-    (prompt, ["Email: ", u.e], function (em) { u.e = em })
+    (read, [{prompt: "Email: ", default: u.e}], function (em) { u.e = em })
     (function (cb) {
       if (changed) npm.config.del("_auth")
       registry.adduser(u.u, u.p, u.e, function (er) {
index 1c52ffd..a3a017c 100644 (file)
@@ -23,8 +23,8 @@ function bugs (args, cb) {
     var bugs = d.bugs
       , repo = d.repository || d.repositories
     if (bugs) {
-        if (typeof bugs === "string") return open(bugs, cb)
-        if (bugs.url) return open(bugs.url, cb)
+      if (typeof bugs === "string") return open(bugs, cb)
+      if (bugs.url) return open(bugs.url, cb)
     }
     if (repo) {
       if (Array.isArray(repo)) repo = repo.shift()
index 7260ab6..a73a874 100644 (file)
@@ -105,9 +105,7 @@ function read (name, ver, forceBypass, cb) {
     return cb(er, data)
   }
 
-  if (forceBypass
-      && (npm.config.get("force")
-          || process.platform === "cygwin")) {
+  if (forceBypass && npm.config.get("force")) {
     log.verbose(true, "force found, skipping cache")
     return addNamed(name, ver, c)
   }
@@ -335,7 +333,7 @@ function addRemoteGit (u, parsed, name, cb_) {
 // name@blah thing.
 var inFlightNames = {}
 function addNamed (name, x, cb_) {
-  log.info([name, x], "addNamed")
+  log.verbose([name, x], "addNamed")
   var k = name + "@" + x
   if (!inFlightNames[k]) inFlightNames[k] = []
   var iF = inFlightNames[k]
@@ -368,10 +366,11 @@ function addNameTag (name, tag, cb) {
     engineFilter(data)
     if (data["dist-tags"] && data["dist-tags"][tag]
         && data.versions[data["dist-tags"][tag]]) {
-      return addNameVersion(name, data["dist-tags"][tag], cb)
+      var ver = data["dist-tags"][tag]
+      return addNameVersion(name, ver, data.versions[ver], cb)
     }
     if (!explicit && Object.keys(data.versions).length) {
-      return addNameRange(name, "*", cb)
+      return addNameRange(name, "*", data, cb)
     }
     return cb(installTargetsError(tag, data))
   })
@@ -393,24 +392,84 @@ function engineFilter (data) {
   })
 }
 
-function addNameRange (name, range, cb) {
+function addNameRange (name, range, data, cb) {
+  if (typeof cb !== "function") cb = data, data = null
+
   range = semver.validRange(range)
   if (range === null) return cb(new Error(
     "Invalid version range: "+range))
-  registry.get(name, function (er, data, json, response) {
+
+  log.silly([name, range, !!data], "name, range, hasData")
+
+  if (data) return next()
+  registry.get(name, function (er, d, json, response) {
     if (er) return cb(er)
+    data = d
+    next()
+  })
+
+  function next () {
+    log.silly([name, range, !!data], "name, range, hasData 2")
     engineFilter(data)
+
+    if (npm.config.get("registry")) return next_()
+
+    cachedFilter(data, range, function (er) {
+      if (er) return cb(er)
+      if (Object.keys(data.versions).length === 0) {
+        return cb(new Error( "Can't fetch, and not cached: "
+                           + data.name + "@" + range))
+      }
+      next_()
+    })
+  }
+
+  function next_ () {
+    log.silly([data.name, Object.keys(data.versions)], "versions")
     // if the tagged version satisfies, then use that.
     var tagged = data["dist-tags"][npm.config.get("tag")]
     if (tagged && data.versions[tagged] && semver.satisfies(tagged, range)) {
-      return addNameVersion(name, tagged, cb)
+      return addNameVersion(name, tagged, data.versions[tagged], cb)
     }
+
     // find the max satisfying version.
     var ms = semver.maxSatisfying(Object.keys(data.versions || {}), range)
     if (!ms) {
       return cb(installTargetsError(range, data))
     }
-    addNameVersion(name, ms, cb)
+
+    // if we don't have a registry connection, try to see if
+    // there's a cached copy that will be ok.
+    addNameVersion(name, ms, data.versions[ms], cb)
+  }
+}
+
+// filter the versions down based on what's already in cache.
+function cachedFilter (data, range, cb) {
+  log.silly(data.name, "cachedFilter")
+  ls_(data.name, 1, function (er, files) {
+    if (er) return log.er(cb, "Not in cache, can't fetch: "+data.name)(er)
+    files = files.map(function (f) {
+      return path.basename(f.replace(/(\\|\/)$/, ""))
+    }).filter(function (f) {
+      return semver.valid(f) && semver.satisfies(f, range)
+    })
+
+    if (files.length === 0) {
+      return cb(new Error("Not in cache, can't fetch: "+data.name+"@"+range))
+    }
+
+    log.silly([data.name, files], "cached")
+    Object.keys(data.versions).forEach(function (v) {
+      if (files.indexOf(v) === -1) delete data.versions[v]
+    })
+
+    if (Object.keys(data.versions).length === 0) {
+      return log.er(cb, "Not in cache, can't fetch: "+data.name)(er)
+    }
+
+    log.silly([data.name, Object.keys(data.versions)], "filtered")
+    cb(null, data)
   })
 }
 
@@ -430,11 +489,26 @@ function installTargetsError (requested, data) {
                   + requested + "\n" + targets)
 }
 
-function addNameVersion (name, ver, cb) {
+function addNameVersion (name, ver, data, cb) {
+  if (typeof cb !== "function") cb = data, data = null
+
   ver = semver.valid(ver)
   if (ver === null) return cb(new Error("Invalid version: "+ver))
-  registry.get(name, ver, function (er, data, json, response) {
+
+  var response
+
+  if (data) {
+    response = null
+    return next()
+  }
+  registry.get(name, ver, function (er, d, json, resp) {
     if (er) return cb(er)
+    data = d
+    response = resp
+    next()
+  })
+
+  function next () {
     deprCheck(data)
     var dist = data.dist
 
@@ -452,8 +526,7 @@ function addNameVersion (name, ver, cb) {
     if (!dist.tarball) return cb(new Error(
       "No dist.tarball in " + data._id + " package"))
 
-    if (response.statusCode !== 304 || npm.config.get("force")
-        || process.platform === "cygwin") {
+    if ((response && response.statusCode !== 304) || npm.config.get("force")) {
       return fetchit()
     }
 
@@ -469,6 +542,10 @@ function addNameVersion (name, ver, cb) {
     })
 
     function fetchit () {
+      if (!npm.config.get("registry")) {
+        return cb(new Error("Cannot fetch: "+dist.tarball))
+      }
+
       // use the same protocol as the registry.
       // https registry --> https tarballs.
       var tb = url.parse(dist.tarball)
@@ -480,7 +557,7 @@ function addNameVersion (name, ver, cb) {
                              , name+"-"+ver
                              , cb )
     }
-  })
+  }
 }
 
 function addLocal (p, name, cb_) {
index 950cb45..ee7e877 100644 (file)
@@ -3,7 +3,7 @@
 
 module.exports = init
 
-var prompt = require("./utils/prompt.js")
+var read = require("read")
   , path = require("path")
   , readJson = require("./utils/read-json.js")
   , fs = require("graceful-fs")
@@ -66,24 +66,26 @@ function init_ (data, folder, cb) {
     ,""
     ].join("\n"))
   promiseChain(cb)
-    ( prompt
-    , ["Package name: ", defaultName(folder, data)]
+    ( read
+    , [{prompt: "Package name: ", default: defaultName(folder, data)}]
     , function (n) { data.name = n }
     )
-    ( prompt
-    , ["Description: ", data.description]
+    ( read
+    , [{prompt: "Description: ", default: data.description}]
     , function (d) { data.description = d }
     )
     ( defaultVersion, [folder, data], function (v) { data.version = v } )
     (function (cb) {
-      prompt("Package version: ", data.version, function (er, v) {
+      read( { prompt: "Package version: ", default: data.version }
+          , function (er, v) {
         if (er) return cb(er)
         data.version = v
         cb()
       })
     }, [])
-    ( prompt
-    , ["Project homepage: ", data.homepage || data.url || "none"]
+    ( read
+    , [ { prompt: "Project homepage: "
+        , default: data.homepage || data.url || "none" } ]
     , function (u) {
         if (u === "none") return
         data.homepage = u
@@ -92,40 +94,42 @@ function init_ (data, folder, cb) {
     )
     ( defaultRepo, [folder, data], function (r) { data.repository = r } )
     (function (cb) {
-      prompt( "Project git repository: "
-            , data.repository && data.repository.url || "none"
-            , function (er, r) {
-                if (er) return cb(er)
-                if (r !== "none") {
-                  data.repository = (data.repository || {}).url = r
-                }
-                cb()
+      read( { prompt: "Project git repository: "
+            , default: data.repository && data.repository.url || "none" }
+          , function (er, r) {
+              if (er) return cb(er)
+              if (r !== "none") {
+                data.repository = (data.repository || {}).url = r
               }
-            )
+              cb()
+            }
+          )
     }, [])
-    ( prompt
-    , ["Author name: ", data.author && data.author.name]
+    ( read
+    , [{ prompt: "Author name: ", default: data.author && data.author.name }]
     , function (n) {
         if (!n) return
         (data.author = data.author || {}).name = n
       }
     )
-    ( prompt
-    , ["Author email: ", data.author && data.author.email || "none"]
+    ( read
+    , [ { prompt: "Author email: " 
+        , default: data.author && data.author.email || "none" } ]
     , function (n) {
         if (n === "none") return
         (data.author = data.author || {}).email = n
       }
     )
-    ( prompt
-    , ["Author url: ", data.author && data.author.url || "none"]
+    ( read
+    , [ { prompt: "Author url: "
+        , default: data.author && data.author.url || "none" } ]
     , function (n) {
         if (n === "none") return
         (data.author = data.author || {}).url = n
       }
     )
-    ( prompt
-    , ["Main module/entry point: ", data.main || "none"]
+    ( read
+    , [ { prompt: "Main module/entry point: ", default: data.main || "none" } ]
     , function (m) {
         if (m === "none") {
           delete data.main
@@ -134,18 +138,17 @@ function init_ (data, folder, cb) {
         data.main = m
       }
     )
-    ( prompt
-    , ["Test command: ", data.scripts && data.scripts.test || "none"]
+    ( read
+    , [ { prompt: "Test command: "
+        , default: data.scripts && data.scripts.test || "none" } ]
     , function (t) {
         if (t === "none") return
         (data.scripts = data.scripts || {}).test = t
       }
     )
-    ( prompt
-    , [ "What versions of node does it run on? "
-      , data.engines && data.engines.node
-        || (eng)
-      ]
+    ( read
+    , [ { prompt: "What versions of node does it run on? "
+        , default: data.engines && data.engines.node || (eng) } ]
     , function (nodever) {
         (data.engines = data.engines || {}).node = nodever
       }
@@ -167,7 +170,7 @@ function init_ (data, folder, cb) {
       output.write(msg, cb)
     })
     (function (cb) {
-      prompt("\nIs this ok? ", "yes", function (er, ok) {
+      read({ prompt: "\nIs this ok? ", default: "yes" }, function (er, ok) {
         if (er) return cb(er)
         if (ok.toLowerCase().charAt(0) !== "y") {
           return cb(new Error("cancelled"))
index 4d71b9a..ca54585 100644 (file)
@@ -565,7 +565,7 @@ function write (target, targetFolder, family, ancestors, cb_) {
     // cache.unpack returns the data object, and all we care about
     // is the list of installed packages from that last thing.
     if (!er) return cb_(er, data)
-    log.error(er, "error installing "+target._id)
+    log.error(target._id,"error installing")
     if (false === npm.config.get("rollback")) return cb_(er)
     npm.commands.unbuild([targetFolder], function (er2) {
       if (er2) log.error(er2, "error rolling back "+target._id)
index 51f7d64..44a687f 100644 (file)
@@ -11,9 +11,6 @@ if (typeof WScript !== "undefined") {
 }
 
 
-process.title = "npm"
-
-
 // FIXME there really ought to be a path.split in node core
 require("path").SPLIT_CHAR = process.platform === "win32" ? "\\" : "/"
 
@@ -166,6 +163,7 @@ var commandCache = {}
   , plumbing = [ "build"
                , "unbuild"
                , "xmas"
+               , "substack"
                ]
   , fullList = npm.fullList = cmdList.concat(aliasNames).filter(function (c) {
       return plumbing.indexOf(c) === -1
index f3f7596..fc5f968 100644 (file)
@@ -7,6 +7,9 @@ var readInstalled = require("./utils/read-installed.js")
   , path = require("path")
   , npm = require("./npm.js")
   , output = require("./utils/output.js")
+  , asyncMap = require("slide").asyncMap
+  , fs = require("graceful-fs")
+  , exec = require("./utils/exec.js")
 
 rebuild.usage = "npm rebuild [<name>[@<version>] [name[@<version>] ...]]"
 
@@ -22,6 +25,33 @@ function rebuild (args, cb) {
         })
     if (!folders.length) return cb()
     log.silly(folders, "rebuild set")
+    cleanBuild(folders, set, cb)
+  })
+}
+
+function cleanBuild (folders, set, cb) {
+  // https://github.com/isaacs/npm/issues/1872
+  // If there's a makefile, try 'make clean'
+  // If there's a wscript, try 'node-waf clean'
+  // But don't die on either of those if they fail.
+  // Just a best-effort kind of deal.
+  asyncMap(folders, function (f, cb) {
+    fs.readdir(f, function (er, files) {
+      // everything should be a dir.
+      if (er) return cb(er)
+      if (files.indexOf("wscript") !== -1) {
+        exec("node-waf", ["clean"], null, false, f, thenBuild)
+      } else if (files.indexOf("Makefile") !== -1) {
+        exec("make", ["clean"], null, false, f, thenBuild)
+      } else thenBuild()
+    })
+    function thenBuild (er) {
+      // ignore error, just continue
+      // it could be that it's not configured yet or whatever.
+      cb()
+    }
+  }, function (er) {
+    if (er) return cb(er)
     npm.commands.build(folders, function (er) {
       if (er) return cb(er)
       output.write(folders.map(function (f) {
index 45e436a..92f4319 100644 (file)
@@ -82,13 +82,19 @@ function filter (data, args, notArgs) {
 }
 
 function stripData (data) {
-  return { name:data.name
-         , description:npm.config.get("description") ? data.description : ""
-         , maintainers:(data.maintainers || []).map(function (m) {
+  return { name: data.name
+         , description: npm.config.get("description") ? data.description : ""
+         , maintainers: (data.maintainers || []).map(function (m) {
              return "=" + m.name
            })
-         , url:!Object.keys(data.versions || {}).length ? data.url : null
-         , keywords:data.keywords || []
+         , url: !Object.keys(data.versions || {}).length ? data.url : null
+         , keywords: data.keywords || []
+         , time: data.time
+                 && data.time.modified
+                 && (new Date(data.time.modified).toISOString()
+                     .split("T").join(" ")
+                     .replace(/:[0-9]{2}\.[0-9]{3}Z$/, ""))
+                 || "(prehistoric)"
          }
 }
 
@@ -108,16 +114,23 @@ function getWords (data) {
 function filterWords (data, args, notArgs) {
   var words = data.words
   for (var i = 0, l = args.length; i < l; i ++) {
-    if (words.indexOf(args[i]) === -1) {
-      return false
-    }
+    if (!match(words, args[i])) return false
   }
   for (var i = 0, l = notArgs.length; i < l; i ++) {
-    if (words.indexOf(notArgs[i]) !== -1) return false
+    if (match(words, notArgs[i])) return false
   }
   return true
 }
 
+function match (words, arg) {
+  if (arg.charAt(0) === "/") {
+    arg = arg.replace(/\/$/, "")
+    arg = new RegExp(arg.substr(1, arg.length - 1))
+    return words.match(arg)
+  }
+  return words.indexOf(arg) !== -1
+}
+
 function prettify (data, args) {
   try {
     var tty = require("tty")
@@ -130,14 +143,24 @@ function prettify (data, args) {
   // name, desc, author, keywords
   var longest = []
     , spaces
-    , maxLen = [20, 60, 20, Infinity]
-    , headings = ["NAME", "DESCRIPTION", "AUTHOR", "KEYWORDS"]
+    , maxLen = npm.config.get("description")
+             ? [20, 60, 20, 20, Infinity]
+             : [20, 20, 20, Infinity]
+    , headings = npm.config.get("description")
+               ? ["NAME", "DESCRIPTION", "AUTHOR", "DATE", "KEYWORDS"]
+               : ["NAME", "AUTHOR", "DATE", "KEYWORDS"]
     , lines
+    , searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase()
+    , sortFields = { name: 0
+                   , description: 1
+                   , author: 2
+                   , date: 3
+                   , keywords: 4 }
+    , searchRev = searchsort.charAt(0) === "-"
+    , sortField = sortFields[searchsort.replace(/^\-+/, "")]
 
   lines = Object.keys(data).map(function (d) {
     return data[d]
-  }).filter(function (data) {
-    return data.name
   }).map(function (data) {
     // turn a pkg data into a string
     // [name,who,desc,targets,keywords] tuple
@@ -149,6 +172,7 @@ function prettify (data, args) {
     var l = [ data.name
             , data.description || ""
             , data.maintainers.join(" ")
+            , data.time
             , (data.keywords || []).join(" ")
             ]
     l.forEach(function (s, i) {
@@ -162,6 +186,13 @@ function prettify (data, args) {
       l[i] = l[i].replace(/\s+/g, " ")
     })
     return l
+  }).sort(function (a, b) {
+    // a and b are "line" objects of [name, desc, maint, time, kw]
+    var aa = a[sortField].toLowerCase()
+      , bb = b[sortField].toLowerCase()
+    return aa === bb ? 0
+         : aa < bb ? (searchRev ? 1 : -1)
+         : (searchRev ? -1 : 1)
   }).map(function (line) {
     return line.map(function (s, i) {
       spaces = spaces || longest.map(function (n) {
@@ -173,8 +204,6 @@ function prettify (data, args) {
       }
       return s + spaces[i].substr(len)
     }).join(" ").substr(0, cols).trim()
-  }).sort(function (a, b) {
-    return a === b ? 0 : a > b ? 1 : -1
   }).map(function (line) {
     // colorize!
     args.forEach(function (arg, i) {
@@ -201,8 +230,18 @@ function addColorMarker (str, arg, i) {
   var m = i % cl + 1
     , markStart = String.fromCharCode(m)
     , markEnd = String.fromCharCode(0)
-    , pieces = str.toLowerCase().split(arg.toLowerCase())
+
+  if (arg.charAt(0) === "/") {
+    //arg = arg.replace(/\/$/, "")
+    return str.replace( new RegExp(arg.substr(1, arg.length - 1), "gi")
+                      , function (bit) { return markStart + bit + markEnd } )
+
+  }
+
+  // just a normal string, do the split/map thing
+  var pieces = str.toLowerCase().split(arg.toLowerCase())
     , p = 0
+
   return pieces.map(function (piece, i) {
     piece = str.substr(p, piece.length)
     var mark = markStart
@@ -211,8 +250,8 @@ function addColorMarker (str, arg, i) {
     p += piece.length + arg.length
     return piece + mark
   }).join("")
-  return str.split(arg).join(mark)
 }
+
 function colorize (line) {
   for (var i = 0; i < cl; i ++) {
     var m = i + 1
diff --git a/deps/npm/lib/substack.js b/deps/npm/lib/substack.js
new file mode 100644 (file)
index 0000000..95a90f8
--- /dev/null
@@ -0,0 +1,10 @@
+module.exports = substack
+var npm = require("./npm.js")
+  , log = require("./utils/log.js")
+
+function substack (args, cb) {
+  console.log("\033[32mbeep \033[35mboop\033[m")
+  var c = args.shift()
+  if (c) npm.commands[c](args, cb)
+  else cb()
+}
index 2945a78..b7f6cbe 100644 (file)
@@ -39,10 +39,19 @@ unpublish.completion = function (opts, cb) {
 }
 
 function unpublish (args, cb) {
+
+  if (args.length > 1) return cb(unpublish.usage)
+
   var thing = args.length ? args.shift().split("@") : []
     , project = thing.shift()
     , version = thing.join("@")
 
+  if (!version && !npm.config.get("force")) {
+    return cb("Refusing to delete entire project.\n"
+             +"Run with --force to do this.\n"
+             +unpublish.usage)
+  }
+
   if (!project || path.resolve(project) === npm.prefix) {
     // if there's a package.json in the current folder, then
     // read the package name and version out of that.
index c0ed1fc..c4663b5 100644 (file)
@@ -141,6 +141,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
             : path.resolve( home || temp, ".npm")
 
     , color : process.platform !== "win32" || winColor
+    , coverage: false
     , depth: Infinity
     , description : true
     , dev : false
@@ -159,7 +160,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
     , "init.author.url" : ""
     , link: false
     , logfd : 2
-    , loglevel : "warn"
+    , loglevel : "http"
     , logprefix : process.platform !== "win32" || winColor
     , long : false
     , message : "%s"
@@ -182,6 +183,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
     , save : false
     , searchopts: ""
     , searchexclude: null
+    , searchsort: "name"
     , shell : process.platform === "win32"
             ? process.env.ComSpec || "cmd"
             : process.env.SHELL || "bash"
@@ -216,6 +218,7 @@ exports.types =
   , ca: [null, String]
   , cache : path
   , color : ["always", Boolean]
+  , coverage: Boolean
   , depth : Number
   , description : Boolean
   , dev : Boolean
@@ -233,7 +236,7 @@ exports.types =
   , "init.author.url" : ["", url]
   , link: Boolean
   , logfd : [Number, Stream]
-  , loglevel : ["silent","win","error","warn","info","verbose","silly"]
+  , loglevel : ["silent","win","error","warn","http","info","verbose","silly"]
   , logprefix : Boolean
   , long : Boolean
   , message: String
@@ -254,6 +257,11 @@ exports.types =
   , save : Boolean
   , searchopts : String
   , searchexclude: [null, String]
+  , searchsort: [ "name", "-name"
+                , "description", "-description"
+                , "author", "-author"
+                , "date", "-date"
+                , "keywords", "-keywords" ]
   , shell : String
   , "strict-ssl": Boolean
   , tag : String
index 6df89cc..c992067 100644 (file)
@@ -98,7 +98,7 @@ function test (file, excludeList) {
 
     // chop the filename down to be relative to excludeDir
     var rf = relativize(file, dir, true)
-    rf = rf.replace(/^\.\//, "")
+    rf = rf.replace(/^\.?\//, "")
 
     for (var ii = 0, ll = excludes.length; ii < ll; ii ++) {
       //log.warn(JSON.stringify(excludes[ii]), "ex")
index 726be88..fcb4139 100644 (file)
@@ -16,7 +16,6 @@ module.exports = fetch
 
 function fetch (remote, local, headers, cb) {
   if (typeof cb !== "function") cb = headers, headers = {}
-  log.info(remote, "fetch")
   log.verbose(local, "fetch to")
   mkdir(path.dirname(local), function (er) {
     if (er) return cb(er)
@@ -42,6 +41,7 @@ function fetch_ (remote, local, headers, cb) {
 
 function makeRequest (remote, fstr, headers) {
   remote = url.parse(remote)
+  log.http(remote.href, "GET")
   regHost = regHost || url.parse(npm.config.get("registry")).host
 
   if (remote.host === regHost && npm.config.get("always-auth")) {
@@ -58,5 +58,10 @@ function makeRequest (remote, fstr, headers) {
   request({ url: remote
           , proxy: proxy
           , agent: getAgent(remote)
-          , strictSSL: npm.config.get("strict-ssl") }).pipe(fstr)
+          , strictSSL: npm.config.get("strict-ssl")
+          , onResponse: onResponse }).pipe(fstr)
+  function onResponse (er, res) {
+    if (er) return cb(er)
+    log.http(res.statusCode + " " + remote.href)
+  }
 }
index b4a5738..4bc074f 100644 (file)
@@ -13,7 +13,7 @@ var npm = require("../npm.js")
   , url = require("url")
   , agents = {}
   , isHttp2 = !!require("http").globalAgent
-  , registry = url.parse(npm.config.get("registry"))
+  , registry = url.parse(npm.config.get("registry") || "")
   , regCA = npm.config.get("ca")
 
 function getAgent (remote) {
index 7d7d468..ac45c8b 100644 (file)
@@ -162,6 +162,8 @@ function parseEnv (env) {
   Object.keys(env)
     .filter(function (k) { return k.match(/^npm_config_[^_]/i) })
     .forEach(function (k) {
+      if (!env[k]) return
+
       conf[k.replace(/^npm_config_/i, "")
             .toLowerCase()
             .replace(/_/g, "-")] = parseField(env[k], k)
index 878fc88..547bbef 100644 (file)
@@ -232,7 +232,10 @@ function makeEnv (data, prefix, env) {
     if (i.charAt(0) === "_" && i.indexOf("_"+namePref) !== 0) {
       return
     }
-    var value = String(ini.get(i))
+    var value = ini.get(i)
+    if (!value) value = ""
+    else if (typeof value !== "string") value = JSON.stringify(value)
+
     value = -1 !== value.indexOf("\n")
           ? JSON.stringify(value)
           : value
index dece9e3..07867e3 100644 (file)
@@ -1,21 +1,4 @@
 
-/*
-log levels:
-0,1,2,3
-verbose,info,warn,error
-
-Default setting for logs is "info"
-Default setting to show is "info"
-
-Possible values of level/loglevel:
-silly,verbose,info,warn,error,win,silent
-
-silent quiets everything
-
-
-*/
-
-
 module.exports = log
 
 var output = require("./output.js")
@@ -28,6 +11,7 @@ var l = -1
   , LEVEL = { silly   : l++
             , verbose : l++
             , info    : l++
+            , "http"  : l++
             , WARN    : l++
             , "ERR!"  : l++
             , ERROR   : "ERR!"
@@ -59,6 +43,7 @@ Object.keys(LEVEL).forEach(function (l) {
 COLOR[LEVEL.silly] = 30
 COLOR[LEVEL.verbose] = "34;40"
 COLOR[LEVEL.info] = 32
+COLOR[LEVEL.http] = "32;40"
 COLOR[LEVEL.warn] = "30;41"
 COLOR[LEVEL.error] = "31;40"
 for (var c in COLOR) COLOR[LEVEL[c]] = COLOR[c]
index 062244d..375bb5f 100644 (file)
@@ -119,6 +119,13 @@ function get_ (uri, timeout, cache, stat, data, nofollow, staleOk, cb) {
   }
 
   GET(uri, etag, nofollow, function (er, remoteData, raw, response) {
+    // if we get an error talking to the registry, but we have it
+    // from the cache, then just pretend we got it.
+    if (er && cache) {
+      er = null
+      response = {statusCode: 304}
+    }
+
     if (response) {
       log.silly([response.statusCode, response.headers], "get cb")
       if (response.statusCode === 304 && etag) {
@@ -128,6 +135,10 @@ function get_ (uri, timeout, cache, stat, data, nofollow, staleOk, cb) {
     }
 
     data = remoteData
+    if (!data) {
+      er = new Error("failed to fetch from registry: " + uri)
+    }
+
     if (er) return cb(er, data, raw, response)
 
     // just give the write the old college try.  if it fails, whatever.
index 86cfdc6..a196a3c 100644 (file)
@@ -13,7 +13,7 @@ var request = require("./request.js")
   , url = require("url")
 
 function publish (data, prebuilt, readme, cb) {
-  if (typeof readme === "function") cb = readme, readme = null
+  if (typeof readme === "function") cb = readme, readme = ""
   if (typeof prebuilt === "function") cb = prebuilt, prebuilt = null
   // add the dist-url to the data, pointing at the tarball.
   // if the {name} isn't there, then create it.
@@ -23,13 +23,15 @@ function publish (data, prebuilt, readme, cb) {
   var registry = reg()
   if (registry instanceof Error) return cb(registry)
 
+  readme = readme ? "" + readme : ""
+
   var fullData =
     { _id : data.name
     , name : data.name
     , description : data.description
     , "dist-tags" : {}
     , versions : {}
-    , readme: readme ? "" + readme : null
+    , readme: readme
     , maintainers :
       [ { name : npm.config.get("username")
         , email : npm.config.get("email")
@@ -103,6 +105,11 @@ function publish (data, prebuilt, readme, cb) {
         })
       }
 
+      // this way, it'll also get attached to packages that were previously
+      // published with a version of npm that lacked this feature.
+      if (!fullData.readme) {
+        data.readme = readme
+      }
       PUT(dataURI, data, function (er) {
         if (er) {
           if (er.message.indexOf("conflict Document update conflict.") === 0) {
index d19e3ac..d98135e 100644 (file)
@@ -23,8 +23,6 @@ function regRequest (method, where, what, etag, nofollow, cb_) {
   if (typeof cb_ !== "function") cb_ = etag, etag = null
   if (typeof cb_ !== "function") cb_ = what, what = null
 
-  log.verbose(where||"/", method)
-
   // Since there are multiple places where an error could occur,
   // don't let the cb be called more than once.
   var errState = null
@@ -119,6 +117,8 @@ function makeRequest (method, remote, where, what, etag, nofollow, cb) {
     opts.followRedirect = false
   }
 
+  log.http(remote.href || "/", method)
+
   var req = request(opts, requestDone(method, where, cb))
   var r = npm.config.get("registry")
   if (!r) {
@@ -136,6 +136,8 @@ function makeRequest (method, remote, where, what, etag, nofollow, cb) {
 function requestDone (method, where, cb) { return function (er, response, data) {
   if (er) return cb(er)
 
+  log.http(response.statusCode + " " + url.parse(where).href)
+
   var parsed
 
   if (Buffer.isBuffer(data)) {
diff --git a/deps/npm/lib/utils/prompt.js b/deps/npm/lib/utils/prompt.js
deleted file mode 100644 (file)
index d23e4ac..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-
-module.exports = prompt
-
-var log = require("./log.js")
-  , buffer = ""
-  , tty = require("tty")
-
-function prompt (p, def, silent, cb) {
-  if (!cb) cb = silent, silent = false
-  if (!cb) cb = def, def = null
-  if (def) p += "("+(silent ? "<hidden>" : def)+") "
-  var r = (silent ? silentRead : read).bind(null, def, cb)
-  if (!process.stdout.write(p)) process.stdout.on("drain", function D () {
-    process.stdout.removeListener("drain", D)
-    r()
-  })
-  else r()
-}
-
-function read (def, cb) {
-  var stdin = process.openStdin()
-    , val = ""
-  stdin.resume()
-  stdin.setEncoding("utf8")
-  stdin.on("error", cb)
-  stdin.on("data", function D (chunk) {
-    val += buffer + chunk
-    buffer = ""
-    val = val.replace(/\r/g, '')
-    if (val.indexOf("\n") !== -1) {
-      if (val !== "\n") val = val.replace(/^\n+/, "")
-      buffer = val.substr(val.indexOf("\n"))
-      val = val.substr(0, val.indexOf("\n"))
-      stdin.pause()
-      stdin.removeListener("data", D)
-      stdin.removeListener("error", cb)
-      val = val.trim() || def
-      cb(null, val)
-    }
-  })
-}
-
-function silentRead (def, cb) {
-  var stdin = process.openStdin()
-    , val = ""
-  tty.setRawMode(true)
-  stdin.resume()
-  stdin.on("error", cb)
-  stdin.on("data", function D (c) {
-    c = "" + c
-    switch (c) {
-      case "\n": case "\r": case "\r\n": case "\u0004":
-        tty.setRawMode(false)
-        stdin.removeListener("data", D)
-        stdin.removeListener("error", cb)
-        val = val.trim() || def
-        process.stdout.write("\n")
-        stdin.pause()
-        return cb(null, val)
-      case "\u0003": case "\0":
-        return cb("cancelled")
-        break
-      default:
-        val += buffer + c
-        buffer = ""
-        break
-    }
-  })
-}
index 2c2b96f..f315bbf 100644 (file)
@@ -29,7 +29,10 @@ exports.makeList = makeList
 
 function pack (targetTarball, folder, pkg, dfc, cb) {
   if (typeof cb !== "function") cb = dfc, dfc = true
-  folder = path.resolve(process.cwd(), folder)
+  folder = path.resolve(folder)
+
+  log.verbose(folder, "pack")
+
   if (typeof pkg === "function") {
     cb = pkg, pkg = null
     return readJson(path.resolve(folder, "package.json"), function (er, pkg) {
@@ -88,7 +91,22 @@ function packFiles (targetTarball, parent, files, pkg, cb_) {
                      // being installed from some wackey vm-mounted
                      // read-only filesystem.
                      this.props.mode = this.props.mode | 0200
-                     return -1 !== files.indexOf(this.path)
+                     var inc = -1 !== files.indexOf(this.path)
+
+                     // WARNING! Hackety hack!
+                     // XXX Fix this in a better way.
+                     // Rename .gitignore to .npmignore if there is not a
+                     // .npmignore file there already, the better to lock
+                     // down installed packages with git for deployment.
+                     if (this.basename === ".gitignore") {
+                       if (this.parent._entries.indexOf(".npmignore") !== -1) {
+                         return false
+                       }
+                       var d = path.dirname(this.path)
+                       this.basename = ".npmignore"
+                       this.path = path.join(d, ".npmignore")
+                     }
+                     return inc
                    }
                  })
     .on("error", log.er(cb, "error reading "+parent))
index 3cbbc72..f63e155 100644 (file)
@@ -368,6 +368,20 @@ Type: Boolean or \fB"always"\fR
 If false, never shows colors\.  If \fB"always"\fR then always shows colors\.
 If true, then only prints color codes for tty file descriptors\.
 .
+.SS "coverage"
+.
+.IP "\(bu" 4
+Default: false
+.
+.IP "\(bu" 4
+Type: Boolean
+.
+.IP "" 0
+.
+.P
+A flag to tell test\-harness to run with their coverage options enabled,
+if they respond to the \fBnpm_config_coverage\fR environment variable\.
+.
 .SS "depth"
 .
 .IP "\(bu" 4
@@ -645,19 +659,23 @@ The location to write log output\.
 .SS "loglevel"
 .
 .IP "\(bu" 4
-Default: "warn"
+Default: "http"
 .
 .IP "\(bu" 4
 Type: String
 .
 .IP "\(bu" 4
-Values: "silent", "win", "error", "warn", "info", "verbose", "silly"
+Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"
 .
 .IP "" 0
 .
 .P
 What level of logs to report\.  On failure, \fIall\fR logs are written to \fBnpm\-debug\.log\fR in the current working directory\.
 .
+.P
+Any logs of a higher level than the setting are shown\.
+The default is "http", which shows http, warn, and error output\.
+.
 .SS "logprefix"
 .
 .IP "\(bu" 4
@@ -930,6 +948,24 @@ Type: String
 .P
 Space\-separated options that limit the results from search\.
 .
+.SS "searchsort"
+.
+.IP "\(bu" 4
+Default: "name"
+.
+.IP "\(bu" 4
+Type: String
+.
+.IP "\(bu" 4
+Values: "name", "\-name", "date", "\-date", "description",
+"\-description", "keywords", "\-keywords"
+.
+.IP "" 0
+.
+.P
+Indication of which field to sort search results by\.  Prefix with a \fB\-\fR
+character to indicate reverse sort\.
+.
 .SS "shell"
 .
 .IP "\(bu" 4
index 8ef25da..a2678d6 100644 (file)
@@ -222,8 +222,7 @@ or a path to a folder\.
 .
 .P
 Note that pretty much \fBeverything in that folder will be exposed\fR
-by default\.  So, if you have secret stuff in there, use a \fB\|\.npminclude\fR
-or \fB\|\.npmignore\fR file to list out the globs to include/ignore, or publish
+by default\.  So, if you have secret stuff in there, use a \fB\|\.npmignore\fR file to list out the globs to ignore, or publish
 from a fresh checkout\.
 .
 .SH "Brag about it"
index fd31e7a..b5e29a1 100644 (file)
@@ -14,7 +14,7 @@ npm <command> [args]
 .fi
 .
 .SH "VERSION"
-1.1.0-alpha-6
+1.1.0-beta-2
 .
 .SH "DESCRIPTION"
 npm is the package manager for the Node JavaScript platform\.  It puts
index 2121798..39985a7 100644 (file)
@@ -16,46 +16,10 @@ npm search [search terms \.\.\.]
 .SH "DESCRIPTION"
 Search the registry for packages matching the search terms\.
 .
-.SH "CONFIGURATION"
-.
-.SS "description"
-.
-.IP "\(bu" 4
-Default: true
-.
-.IP "\(bu" 4
-Type: Boolean
-.
-.IP "" 0
-.
-.P
-Show the description in \fBnpm search\fR
-.
-.SS "searchopts"
-.
-.IP "\(bu" 4
-Default: ""
-.
-.IP "\(bu" 4
-Type: String
-.
-.IP "" 0
-.
-.P
-Space\-separated options that are always passed to search\.
-.
-.SS "searchexclude"
-.
-.IP "\(bu" 4
-Default: ""
-.
-.IP "\(bu" 4
-Type: String
-.
-.IP "" 0
-.
 .P
-Space\-separated options that limit the results from search\.
+If a term starts with \fB/\fR, then it\'s interpreted as a regular expression\.
+A trailing \fB/\fR will be ignored in this case\.  (Note that many regular
+expression characters must be escaped or quoted in most shells\.)
 .
 .SH "SEE ALSO"
 .
index b224269..693247a 100644 (file)
@@ -21,7 +21,7 @@ npm\.load(configObject, function (er, npm) {
 .fi
 .
 .SH "VERSION"
-1.1.0-alpha-6
+1.1.0-beta-2
 .
 .SH "DESCRIPTION"
 This is the API documentation for npm\.
diff --git a/deps/npm/node_modules/fast-list/.npmignore b/deps/npm/node_modules/fast-list/.npmignore
new file mode 100644 (file)
index 0000000..c2658d7
--- /dev/null
@@ -0,0 +1 @@
+node_modules/
diff --git a/deps/npm/node_modules/fast-list/.travis.yml b/deps/npm/node_modules/fast-list/.travis.yml
new file mode 100644 (file)
index 0000000..f1d0f13
--- /dev/null
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+  - 0.4
+  - 0.6
diff --git a/deps/npm/node_modules/fast-list/bench.js b/deps/npm/node_modules/fast-list/bench.js
deleted file mode 100644 (file)
index f15450f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-var bench = require("bench")
-
-var l = 1000
-  , FastList = require("./fast-list.js")
-
-exports.countPerLap = l * 2
-
-exports.compare =
-  { "[]": function () {
-      var list = []
-      for (var j = 0; j < l; j ++) {
-        if (j % 2) list.push(j)
-        else list.unshift(j)
-      }
-      for (var j = 0; j < l; j ++) {
-        if (j % 2) list.shift(j)
-        else list.pop(j)
-      }
-    }
-  , "new Array()": function () {
-      var list = new Array()
-      for (var j = 0; j < l; j ++) {
-        if (j % 2) list.push(j)
-        else list.unshift(j)
-      }
-      for (var j = 0; j < l; j ++) {
-        if (j % 2) list.shift(j)
-        else list.pop(j)
-      }
-    }
-  // , "FastList()": function () {
-  //     var list = FastList()
-  //     for (var j = 0; j < l; j ++) {
-  //       if (j % 2) list.push(j)
-  //       else list.unshift(j)
-  //     }
-  //     for (var j = 0; j < l; j ++) {
-  //       if (j % 2) list.shift(j)
-  //       else list.pop(j)
-  //     }
-  //   }
-  , "new FastList()": function () {
-      var list = new FastList()
-      for (var j = 0; j < l; j ++) {
-        if (j % 2) list.push(j)
-        else list.unshift(j)
-      }
-      for (var j = 0; j < l; j ++) {
-        if (j % 2) list.shift(j)
-        else list.pop(j)
-      }
-    }
-  }
-
-bench.runMain()
diff --git a/deps/npm/node_modules/fstream/.npmignore b/deps/npm/node_modules/fstream/.npmignore
new file mode 100644 (file)
index 0000000..66880db
--- /dev/null
@@ -0,0 +1,3 @@
+.*.swp
+examples/deep-copy
+node_modules/
diff --git a/deps/npm/node_modules/fstream/.travis.yml b/deps/npm/node_modules/fstream/.travis.yml
new file mode 100644 (file)
index 0000000..2d26206
--- /dev/null
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+  - 0.6
index dc991e3..ab990d1 100644 (file)
@@ -115,8 +115,16 @@ DirReader.prototype._read = function () {
         return me.once("resume", EMITCHILD)
       }
 
-      me.emit("entry", entry)
-      me.emit("child", entry)
+      // skip over sockets.  they can't be piped around properly,
+      // so there's really no sense even acknowledging them.
+      // if someone really wants to see them, they can listen to
+      // the "socket" events.
+      if (entry.type === "Socket") {
+        me.emit("socket", entry)
+      } else {
+        me.emit("entry", entry)
+        me.emit("child", entry)
+      }
     })
 
     var ended = false
index 344766f..6aa67ad 100644 (file)
@@ -15,6 +15,7 @@ inherits(Reader, Abstract)
 var DirReader = require("./dir-reader.js")
   , FileReader = require("./file-reader.js")
   , LinkReader = require("./link-reader.js")
+  , SocketReader = require("./socket-reader.js")
   , ProxyReader = require("./proxy-reader.js")
 
 function Reader (props, currentStat) {
@@ -75,6 +76,10 @@ function Reader (props, currentStat) {
       ClassType = LinkReader
       break
 
+    case "Socket":
+      ClassType = SocketReader
+      break
+
     case null:
       ClassType = ProxyReader
       break
@@ -230,6 +235,6 @@ Reader.prototype.resume = function (who) {
 }
 
 Reader.prototype._read = function () {
-  me.warn("Cannot read unknown type: "+me.type)
+  this.error("Cannot read unknown type: "+this.type)
 }
 
diff --git a/deps/npm/node_modules/fstream/lib/socket-reader.js b/deps/npm/node_modules/fstream/lib/socket-reader.js
new file mode 100644 (file)
index 0000000..e89c173
--- /dev/null
@@ -0,0 +1,38 @@
+// Just get the stats, and then don't do anything.
+// You can't really "read" from a socket.  You "connect" to it.
+// Mostly, this is here so that reading a dir with a socket in it
+// doesn't blow up.
+
+module.exports = SocketReader
+
+var fs = require("graceful-fs")
+  , fstream = require("../fstream.js")
+  , inherits = require("inherits")
+  , mkdir = require("mkdirp")
+  , Reader = require("./reader.js")
+
+inherits(SocketReader, Reader)
+
+function SocketReader (props) {
+  var me = this
+  if (!(me instanceof SocketReader)) throw new Error(
+    "SocketReader must be called as constructor.")
+
+  if (!(props.type === "Socket" && props.Socket)) {
+    throw new Error("Non-socket type "+ props.type)
+  }
+
+  Reader.call(me, props)
+}
+
+SocketReader.prototype._read = function () {
+  var me = this
+  if (me._paused) return
+  // basically just a no-op, since we got all the info we have
+  // from the _stat method
+  if (!me._ended) {
+    me.emit("end")
+    me.emit("close")
+    me._ended = true
+  }
+}
index c2d8fdc..2661624 100644 (file)
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
   "name": "fstream",
   "description": "Advanced file system stream things",
-  "version": "0.1.5",
+  "version": "0.1.9",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/fstream.git"
@@ -14,7 +14,7 @@
   "dependencies": {
     "rimraf": "~1.0.8",
     "mkdirp": "~0.1.0",
-    "graceful-fs": "~1.1.1",
+    "graceful-fs": "~1.1.2",
     "inherits": "~1.0.0"
   },
   "devDependencies": {
diff --git a/deps/npm/node_modules/graceful-fs/.npmignore b/deps/npm/node_modules/graceful-fs/.npmignore
new file mode 100644 (file)
index 0000000..c2658d7
--- /dev/null
@@ -0,0 +1 @@
+node_modules/
index 13c312c..7467f30 100644 (file)
@@ -1,20 +1,27 @@
 // this keeps a queue of opened file descriptors, and will make
 // fs operations wait until some have closed before trying to open more.
+
 var fs = require("fs")
-  , FastList = require("fast-list")
+
+// there is such a thing as TOO graceful.
+if (fs.open === gracefulOpen) return
+
+var FastList = require("fast-list")
   , queue = new FastList()
   , curOpen = 0
   , constants = require("constants")
 
+
 exports = module.exports = fs
 
+
 fs.MIN_MAX_OPEN = 64
 fs.MAX_OPEN = 1024
 
-fs._open = fs.open
-fs._openSync = fs.openSync
-fs._close = fs.close
-fs._closeSync = fs.closeSync
+var originalOpen = fs.open
+  , originalOpenSync = fs.openSync
+  , originalClose = fs.close
+  , originalCloseSync = fs.closeSync
 
 
 // prevent EMFILE errors
@@ -27,7 +34,9 @@ function OpenReq (path, flags, mode, cb) {
 
 function noop () {}
 
-fs.open = function (path, flags, mode, cb) {
+fs.open = gracefulOpen
+
+function gracefulOpen (path, flags, mode, cb) {
   if (typeof mode === "function") cb = mode, mode = null
   if (typeof cb !== "function") cb = noop
 
@@ -51,7 +60,7 @@ fs.open = function (path, flags, mode, cb) {
 function open (path, flags, mode, cb) {
   cb = cb || noop
   curOpen ++
-  fs._open(path, flags, mode, function (er, fd) {
+  originalOpen.call(fs, path, flags, mode, function (er, fd) {
     if (er) {
       onclose()
     }
@@ -62,7 +71,7 @@ function open (path, flags, mode, cb) {
 
 fs.openSync = function (path, flags, mode) {
   curOpen ++
-  return fs._openSync(path, flags, mode)
+  return originalOpenSync.call(fs, path, flags, mode)
 }
 
 function onclose () {
@@ -81,7 +90,7 @@ function flush () {
 
 fs.close = function (fd, cb) {
   cb = cb || noop
-  fs._close(fd, function (er) {
+  originalClose.call(fs, fd, function (er) {
     onclose()
     cb(er)
   })
@@ -89,7 +98,7 @@ fs.close = function (fd, cb) {
 
 fs.closeSync = function (fd) {
   onclose()
-  return fs._closeSync(fd)
+  return originalCloseSync.call(fs, fd)
 }
 
 
index 19f5611..ec72aff 100644 (file)
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
   "name": "graceful-fs",
   "description": "fs monkey-patching to avoid EMFILE and other problems",
-  "version": "1.1.1",
+  "version": "1.1.2",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/node-graceful-fs.git"
diff --git a/deps/npm/node_modules/lru-cache/.npmignore b/deps/npm/node_modules/lru-cache/.npmignore
new file mode 100644 (file)
index 0000000..07e6e47
--- /dev/null
@@ -0,0 +1 @@
+/node_modules
@@ -1,5 +1,11 @@
+;(function () { // closure for web browsers
 
-module.exports = LRUCache
+if (module) {
+  module.exports = LRUCache
+} else {
+  // just set the global for non-node platforms.
+  ;(function () { return this })().LRUCache = LRUCache
+}
 
 function hOP (obj, key) {
   return Object.prototype.hasOwnProperty.call(obj, key)
@@ -27,12 +33,22 @@ function LRUCache (maxLength) {
     , get : function () { return maxLength }
     , enumerable : true
     })
+
   this.maxLength = maxLength
+
   Object.defineProperty(this, "length",
     { get : function () { return length }
     , enumerable : true
     })
 
+  this.reset = function () {
+    cache = {}
+    lruList = {}
+    lru = 0
+    mru = 0
+    length = 0
+  }
+
   this.set = function (key, value) {
     if (hOP(cache, key)) {
       this.get(key)
@@ -44,6 +60,7 @@ function LRUCache (maxLength) {
     length ++
     if (length > maxLength) trim()
   }
+
   this.get = function (key) {
     if (!hOP(cache, key)) return undefined
     var hit = cache[key]
@@ -53,6 +70,7 @@ function LRUCache (maxLength) {
     lruList[hit.lu] = hit
     return hit.value
   }
+
   this.del = function (key) {
     if (!hOP(cache, key)) return undefined
     var hit = cache[key]
@@ -61,10 +79,12 @@ function LRUCache (maxLength) {
     if (hit.lu === lru) lruWalk()
     length --
   }
+
   function lruWalk () {
     // lru has been deleted, hop up to the next hit.
     lru = Object.keys(lruList).shift()
   }
+
   function trim () {
     if (length <= maxLength) return undefined
     var prune = Object.keys(lruList).slice(0, length - maxLength)
@@ -77,75 +97,4 @@ function LRUCache (maxLength) {
   }
 }
 
-if (!process || !module || module !== process.mainModule) return undefined
-
-var l = LRUCache(3)
-  , assert = require("assert")
-
-l.set(1, 1)
-l.set(2, 1)
-l.set(3, 1)
-l.set(4, 1)
-l.set(5, 1)
-l.set(6, 1)
-
-assert.equal(l.get(1), undefined)
-assert.equal(l.get(2), undefined)
-assert.equal(l.get(3), undefined)
-assert.equal(l.get(4), 1)
-assert.equal(l.get(5), 1)
-assert.equal(l.get(6), 1)
-
-// now keep re-getting the 6 so it remains the most recently used.
-// in this case, we'll have 6, 7, 8, 9, 10, 11, so the ending length = 5
-l.set(7, 1)
-l.get(6)
-l.set(8, 1)
-l.get(6)
-l.set(9, 1)
-l.get(6)
-l.set(10, 1)
-l.get(6)
-l.set(11, 1)
-assert.equal(l.length, 3)
-assert.equal(l.get(4), undefined)
-assert.equal(l.get(5), undefined)
-assert.equal(l.get(6), 1)
-assert.equal(l.get(7), undefined)
-assert.equal(l.get(8), undefined)
-assert.equal(l.get(9), undefined)
-assert.equal(l.get(10), 1)
-assert.equal(l.get(11), 1)
-
-// test changing the maxLength, verify that the LRU items get dropped.
-l.maxLength = 100
-for (var i = 0; i < 100; i ++) l.set(i, i)
-assert.equal(l.length, 100)
-for (var i = 0; i < 100; i ++) {
-  assert.equal(l.get(i), i)
-}
-l.maxLength = 3
-assert.equal(l.length, 3)
-for (var i = 0; i < 97; i ++) {
-  assert.equal(l.get(i), undefined)
-}
-for (var i = 98; i < 100; i ++) {
-  assert.equal(l.get(i), i)
-}
-
-// now remove the maxLength restriction, and try again.
-l.maxLength = "hello"
-for (var i = 0; i < 100; i ++) l.set(i, i)
-assert.equal(l.length, 100)
-for (var i = 0; i < 100; i ++) {
-  assert.equal(l.get(i), i)
-}
-// should trigger an immediate resize
-l.maxLength = 3
-assert.equal(l.length, 3)
-for (var i = 0; i < 97; i ++) {
-  assert.equal(l.get(i), undefined)
-}
-for (var i = 98; i < 100; i ++) {
-  assert.equal(l.get(i), i)
-}
+})()
diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json
new file mode 100644 (file)
index 0000000..676ec3a
--- /dev/null
@@ -0,0 +1,13 @@
+{ "name": "lru-cache"
+, "description": "A cache object that deletes the least-recently-used items."
+, "version": "1.0.5"
+, "author": "Isaac Z. Schlueter <i@izs.me>"
+, "scripts": { "test": "tap test" }
+, "main": "lib/lru-cache.js"
+, "repository": "git://github.com/isaacs/node-lru-cache.git"
+, "devDependencies": { "tap": "0.1" }
+, "license":
+  { "type": "MIT"
+  , "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
+  }
+}
diff --git a/deps/npm/node_modules/minimatch/.gitmodules b/deps/npm/node_modules/minimatch/.gitmodules
deleted file mode 100644 (file)
index 7e29c80..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "node_modules/lru-cache"]
-       path = node_modules/lru-cache
-       url = https://github.com/isaacs/node-lru-cache.git
diff --git a/deps/npm/node_modules/minimatch/.travis.yml b/deps/npm/node_modules/minimatch/.travis.yml
new file mode 100644 (file)
index 0000000..f1d0f13
--- /dev/null
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+  - 0.4
+  - 0.6
index f17ec59..2664c08 100644 (file)
@@ -1,3 +1,10 @@
+# minimatch
+
+A minimal matching utility.
+
+[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
+
+
 This is the matching library used internally by npm.
 
 Eventually, it will replace the C binding in node-glob.
index 76e7d6d..c50ab71 100644 (file)
@@ -17,6 +17,7 @@ minimatch.filter = function (pattern, options) {
 minimatch.match = function (list, pattern, options) {
   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
@@ -47,7 +48,7 @@ function minimatch (p, pattern, options) {
   if (pattern.trim().charAt(0) === "#") return false
 
   // check the cache
-  var re = cache.get(pattern)
+  var re = cache.get(pattern + "\n" + JSON.stringify(options))
   if (!re && re !== false) {
     cache.set(pattern, re = minimatch.makeRe(pattern, options))
   }
@@ -93,18 +94,45 @@ minimatch.makeRe = makeRe
 function makeRe (pattern, options) {
   options = options || {}
 
+  function clearStateChar () {
+    if (stateChar) {
+      // we had some state-tracking character
+      // that wasn't consumed by this pass.
+      switch (stateChar) {
+        case "*":
+          re += oneStar
+          break
+        case "?":
+          re += "."
+          break
+        default:
+          re += "\\"+stateChar
+          break
+      }
+      stateChar = false
+    }
+  }
+
   var braceDepth = 0
     , re = ""
     , escaping = false
-    , oneStar = "[^\\/]*?"
-    , twoStar = ".*?"
+    , 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 = []
+    , reClassStart = -1
+    , classStart = -1
+    , classStartPattern = options.dot ? ""
+      : "(?:(?!(?:\\\/|^)\\.)"
+    , classEndPattern = options.dot ? "" : ")"
 
   for ( var i = 0, len = pattern.length, c
       ; (i < len) && (c = pattern.charAt(i))
@@ -129,6 +157,7 @@ function makeRe (pattern, options) {
         }
         continue
 
+      // the various stateChar values
       case "!":
         if (i === 0 || negating) {
           negate = !negate
@@ -213,21 +242,8 @@ function makeRe (pattern, options) {
 
       // these are mostly the same in regexp and glob :)
       case "[":
-        if (stateChar) {
-          // some state-tracking char was before the [
-          switch (stateChar) {
-            case "*":
-              re += oneStar
-              break
-            case "?":
-              re += "."
-              break
-            default:
-              re += "\\"+stateChar
-              break
-          }
-          stateChar = false
-        }
+        // swallow any state-tracking char before the [
+        clearStateChar()
 
         if (escaping || inClass) {
           re += "\\" + c
@@ -236,6 +252,7 @@ function makeRe (pattern, options) {
           inClass = true
           classStart = i
           reClassStart = re.length
+          re += classStartPattern
           re += c
         }
         continue
@@ -252,7 +269,7 @@ function makeRe (pattern, options) {
           escaping = false
         } else {
           inClass = false
-          re += c
+          re += c + classEndPattern
         }
         continue
 
@@ -271,6 +288,8 @@ function makeRe (pattern, options) {
           re += "\\}"
           escaping = false
         } else {
+          // swallow any state char that wasn't consumed
+          clearStateChar()
           re += ")"
           braceDepth --
         }
@@ -281,27 +300,15 @@ function makeRe (pattern, options) {
           re += ","
           escaping = false
         } else {
+          // swallow any state char that wasn't consumed
+          clearStateChar()
           re += "|"
         }
         continue
 
       default:
-        if (stateChar) {
-          // we had some state-tracking character
-          // that wasn't consumed by this pass.
-          switch (stateChar) {
-            case "*":
-              re += oneStar
-              break
-            case "?":
-              re += "."
-              break
-            default:
-              re += "\\"+stateChar
-              break
-          }
-          stateChar = false
-        }
+        // swallow any state char that wasn't consumed
+        clearStateChar()
 
         if (escaping) {
           // no need
@@ -321,20 +328,7 @@ function makeRe (pattern, options) {
 
   // handle trailing things that only matter at the very end.
   if (stateChar) {
-    // we had some state-tracking character
-    // that wasn't consumed by this pass.
-    switch (stateChar) {
-      case "*":
-        re += oneStar
-        break
-      case "?":
-        re += "."
-        break
-      default:
-        re += "\\"+stateChar
-        break
-    }
-    stateChar = false
+    clearStateChar()
   } else if (escaping) {
     re += "\\\\"
   }
@@ -345,7 +339,7 @@ function makeRe (pattern, options) {
     // 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 + 1)
+    var cs = re.substr(reClassStart + classStartPattern.length + 1)
       , csOpts = Object.create(options)
     csOpts.partial = true
 
@@ -355,11 +349,6 @@ function makeRe (pattern, options) {
 
   if (options.partial) return re
 
-  // don't match "." files unless pattern starts with "."
-  if (!options.dot && pattern.charAt(0) !== ".") {
-    re = "(?!\\.)" + re
-  }
-
   // must match entire pattern
   // ending in a * or ** will make it less strict.
   re = "^" + re + "$"
@@ -381,19 +370,3 @@ function makeRe (pattern, options) {
     return false
   }
 }
-
-if (require.main === module) {
-  // more tests in test/*.js
-  var tests = ["{a,b{c,d}}"
-              ,"a.*$?"
-              ,"\\{a,b{c,d}}"
-              ,"a/{c/,}d/{e/,f/{g,h,i}/}k"
-              ,"!*.bak"
-              ,"!!*.bak"
-              ,"!!!*.bak"
-              ,"\\a\\b\\c\\d"
-              ]
-  tests.forEach(function (t) {
-    console.log([t,makeRe(t)])
-  })
-}
diff --git a/deps/npm/node_modules/minimatch/node_modules/lru-cache/package.json b/deps/npm/node_modules/minimatch/node_modules/lru-cache/package.json
deleted file mode 100644 (file)
index 289f839..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "name" : "lru-cache"
-, "description" : "A cache object that deletes the least-recently-used items."
-, "version" : "1.0.4"
-, "author" : "Isaac Z. Schlueter <i@izs.me>"
-, "scripts" : { "test" : "node lib/lru-cache.js" }
-, "main" : "lib/lru-cache"
-, "repository" : "git://github.com/isaacs/node-lru-cache.git"
-, "licenses" :
-  [ { "type" : "MIT"
-    , "url" : "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
-    }
-  ]
-}
index b83bebb..54ac959 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.4",
+  "version": "0.0.5",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/minimatch.git"
@@ -14,9 +14,6 @@
   "engines": {
     "node": "*"
   },
-  "bundleDependencies": [
-    "lru-cache"
-  ],
   "dependencies": {
     "lru-cache": "~1.0.2"
   },
diff --git a/deps/npm/node_modules/node-uuid/.npmignore b/deps/npm/node_modules/node-uuid/.npmignore
new file mode 100644 (file)
index 0000000..fd4f2b0
--- /dev/null
@@ -0,0 +1,2 @@
+node_modules
+.DS_Store
diff --git a/deps/npm/node_modules/nopt/.npmignore b/deps/npm/node_modules/nopt/.npmignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/deps/npm/node_modules/read/README.md b/deps/npm/node_modules/read/README.md
new file mode 100644 (file)
index 0000000..9913b4d
--- /dev/null
@@ -0,0 +1,43 @@
+For reading user input from stdin.
+
+## USAGE
+
+```javascript
+var read = require("read")
+read(options, callback)
+```
+
+The callback gets called with either the user input, or the default
+specified, or an error, in the traditional `callback(error, result)`
+node style.
+
+## OPTIONS
+
+Every option is optional.
+
+* `prompt` What to write to stdout before reading input.
+* `silent` Don't echo the output as the user types it.
+* `num` Max number of chars to read from terminal.
+* `delim` The char that means we're done.  Default: `"\n"`
+* `timeout` Number of ms to wait for user input before giving up.
+* `default` The default value if the user enters nothing.
+
+If silent is true, or num is set, or delim is something other than
+`"\n"`, then read will set raw mode, and read character by character.
+
+At this time, backspace and arrow keys are not supported in raw mode.
+It's probably not too hard to add support for this, perhaps using node's
+built-in readline module.
+
+## CONTRIBUTING
+
+Patches welcome.
+
+## BUGS
+
+In node 0.6.0 through 0.6.5, you must explicitly call
+`process.stdin.destroy()` or `process.exit()` when you know that your
+program is done reading, or else it will keep the event loop running
+forever.
+
+See: <https://github.com/joyent/node/issues/2257>
diff --git a/deps/npm/node_modules/read/lib/read.js b/deps/npm/node_modules/read/lib/read.js
new file mode 100644 (file)
index 0000000..246044b
--- /dev/null
@@ -0,0 +1,151 @@
+
+module.exports = read
+
+var buffer = ""
+  , tty = require("tty")
+  , StringDecoder = require("string_decoder").StringDecoder
+
+function read (opts, cb) {
+  if (!cb) cb = opts, opts = {}
+
+  var p = opts.prompt || ""
+    , def = opts.default
+    , silent = opts.silent
+    , timeout = opts.timeout
+    , num = opts.num || null
+    , delim = opts.delim || "\n"
+
+  if (p && def) p += "("+(silent ? "<default hidden>" : def)+") "
+
+  // switching into raw mode is a little bit painful.
+  // avoid if possible.
+  var r = silent || num || delim !== "\n" ? rawRead : normalRead
+
+  if (timeout) {
+    cb = (function (cb) {
+      var called = false
+      var t = setTimeout(function () {
+        tty.setRawMode(false)
+        process.stdout.write("\n")
+        if (def) done(null, def)
+        else done(new Error("timeout"))
+      }, timeout)
+
+      function done (er, data) {
+        clearTimeout(t)
+        if (called) return
+        // stop reading!
+        stdin.pause()
+        called = true
+        cb(er, data)
+      }
+
+      return done
+    })(cb)
+  }
+
+  if (p && !process.stdout.write(p)) {
+    process.stdout.on("drain", function D () {
+      process.stdout.removeListener("drain", D)
+      r(def, timeout, delim, silent, num, cb)
+    })
+  } else {
+    process.nextTick(function () {
+      r(def, timeout, delim, silent, num, cb)
+    })
+  }
+}
+
+function normalRead (def, timeout, delim, silent, num, cb) {
+  var stdin = process.openStdin()
+    , val = ""
+    , decoder = new StringDecoder("utf8")
+
+  stdin.resume()
+  stdin.on("error", cb)
+  stdin.on("data", function D (chunk) {
+    // get the characters that are completed.
+    val += buffer + decoder.write(chunk)
+    buffer = ""
+
+    // \r has no place here.
+    // XXX But what if \r is the delim or something dumb like that?
+    // Meh.  If anyone complains about this, deal with it.
+    val = val.replace(/\r/g, "")
+
+    // TODO Make delim configurable
+    if (val.indexOf(delim) !== -1) {
+      // pluck off any delims at the beginning.
+      if (val !== delim) {
+        var i, l
+        for (i = 0, l = val.length; i < l; i ++) {
+          if (val.charAt(i) !== delim) break
+        }
+        if (i !== 0) val = val.substr(i)
+      }
+
+      // buffer whatever might have come *after* the delimter
+      var delimIndex = val.indexOf(delim)
+      if (delimIndex !== -1) {
+        buffer = val.substr(delimIndex)
+        val = val.substr(0, delimIndex)
+      } else {
+        buffer = ""
+      }
+
+      stdin.pause()
+      stdin.removeListener("data", D)
+      stdin.removeListener("error", cb)
+
+      // read(1) trims
+      val = val.trim() || def
+      cb(null, val)
+    }
+  })
+}
+
+function rawRead (def, timeout, delim, silent, num, cb) {
+  var stdin = process.openStdin()
+    , val = ""
+    , decoder = new StringDecoder
+
+  tty.setRawMode(true)
+  stdin.resume()
+  stdin.on("error", cb)
+  stdin.on("data", function D (c) {
+    // \r is my enemy.
+    c = decoder.write(c).replace(/\r/g, "\n")
+
+    switch (c) {
+      case "": // probably just a \r that was ignored.
+        break
+
+      case "\u0004": // EOF
+      case delim:
+        tty.setRawMode(false)
+        stdin.removeListener("data", D)
+        stdin.removeListener("error", cb)
+        val = val.trim() || def
+        process.stdout.write("\n")
+        stdin.pause()
+        return cb(null, val)
+
+      case "\u0003": case "\0": // ^C or other signal abort
+        tty.setRawMode(false)
+        stdin.removeListener("data", D)
+        stdin.removeListener("error", cb)
+        stdin.pause()
+        return cb(new Error("cancelled"))
+        break
+
+      default: // just a normal char
+        val += buffer + c
+        buffer = ""
+        if (!silent) process.stdout.write(c)
+
+        // explicitly process a delim if we have enough chars.
+        if (num && val.length >= num) D(delim)
+        break
+    }
+  })
+}
diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json
new file mode 100644 (file)
index 0000000..bc05577
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name": "read",
+  "version": "0.0.1",
+  "main": "lib/read.js",
+  "dependencies": {},
+  "devDependencies": {},
+  "engines": {
+    "node": ">=0.6"
+  },
+  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+  "description": "read(1) for node programs",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/read.git"
+  }
+}
diff --git a/deps/npm/node_modules/tar/.npmignore b/deps/npm/node_modules/tar/.npmignore
new file mode 100644 (file)
index 0000000..856407e
--- /dev/null
@@ -0,0 +1,5 @@
+.*.swp
+node_modules
+examples/extract/
+test/tmp/
+test/fixtures/symlink
diff --git a/deps/npm/node_modules/tar/.travis.yml b/deps/npm/node_modules/tar/.travis.yml
new file mode 100644 (file)
index 0000000..2d26206
--- /dev/null
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+  - 0.6
index 0de7c16..c713c57 100644 (file)
@@ -148,6 +148,10 @@ Pack.prototype._process = function () {
   }
 
   switch (wprops.type) {
+    // sockets not supported
+    case "Socket":
+      return
+
     case "Directory":
       wprops.path += "/"
       wprops.size = 0
index a736fe7..6877cf2 100644 (file)
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
   "name": "tar",
   "description": "tar for node",
-  "version": "0.1.7",
+  "version": "0.1.9",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/node-tar.git"
@@ -17,7 +17,7 @@
   "dependencies": {
     "inherits": "1.x",
     "block-stream": "*",
-    "fstream": "~0.1.5"
+    "fstream": "~0.1.8"
   },
   "devDependencies": {
     "tap": "0.x",
index f1e6fd6..7fb17c4 100644 (file)
@@ -2,7 +2,7 @@
 , "publishConfig": { "tag": "alpha", "proprietary-attribs": false }
 , "description": "A package manager for node"
 , "keywords": [ "package manager", "modules", "install", "package.json" ]
-, "version": "1.1.0-alpha-6"
+, "version": "1.1.0-beta-2"
 , "preferGlobal": true
 , "config": { "publishtest": false }
 , "homepage": "http://npmjs.org/"
@@ -24,6 +24,7 @@
 , "bin": { "npm": "./bin/npm-cli.js"
          , "npm_g": "./bin/npm-cli.js"
          , "npm-g": "./bin/npm-cli.js" }
+
 , "dependencies":
   { "semver": "1"
   , "ini": "1"
   , "inherits": "1"
   , "mkdirp": "0.1"
   , "fast-list": "~1.0.1"
+  , "read": "0"
+  , "lru-cache": "1"
   }
+
 , "bundleDependencies":
   [ "slide"
   , "ini"
   , "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": "./test/run"
              , "prepublish": "make -j4 doc"
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)