From 7865c5c51dc6ef2f17644b4923ea451da21eee5a Mon Sep 17 00:00:00 2001 From: Marcel Laverdet Date: Tue, 10 Apr 2012 19:27:38 -0500 Subject: [PATCH 01/29] vm: cleanup module memory leakage There are some paths here that led to dangling contexts. By being smarter with handle management we can get rid of all the cleanup code and fix those issues. This is a backport of commit 7063575. --- src/node_script.cc | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/node_script.cc b/src/node_script.cc index 1f51113c9..9fe5d85f9 100644 --- a/src/node_script.cc +++ b/src/node_script.cc @@ -348,12 +348,18 @@ Handle WrappedScript::EvalMachine(const Arguments& args) { display_error = true; } - Persistent context; + Handle context = Context::GetCurrent(); Local keys; if (context_flag == newContext) { // Create the new context - context = Context::New(); + // Context::New returns a Persistent, but we only need it for this + // function. Here we grab a temporary handle to the new context, assign it + // to a local handle, and then dispose the persistent handle. This ensures + // that when this function exits the context will be disposed. + Persistent tmp = Context::New(); + context = Local::New(tmp); + tmp.Dispose(); } else if (context_flag == userContext) { // Use the passed in context @@ -362,11 +368,10 @@ Handle WrappedScript::EvalMachine(const Arguments& args) { context = nContext->GetV8Context(); } + Context::Scope context_scope(context); + // New and user context share code. DRY it up. if (context_flag == userContext || context_flag == newContext) { - // Enter the context - context->Enter(); - // Copy everything from the passed in sandbox (either the persistent // context for runInContext(), or the sandbox arg to runInNewContext()). CloneObject(args.This(), sandbox, context->Global()->GetPrototype()); @@ -408,11 +413,6 @@ Handle WrappedScript::EvalMachine(const Arguments& args) { if (output_flag == returnResult) { result = script->Run(); if (result.IsEmpty()) { - if (context_flag == newContext) { - context->DetachGlobal(); - context->Exit(); - context.Dispose(); - } return try_catch.ReThrow(); } } else { @@ -430,16 +430,6 @@ Handle WrappedScript::EvalMachine(const Arguments& args) { CloneObject(args.This(), context->Global()->GetPrototype(), sandbox); } - if (context_flag == newContext) { - // Clean up, clean up, everybody everywhere! - context->DetachGlobal(); - context->Exit(); - context.Dispose(); - } else if (context_flag == userContext) { - // Exit the passed in context. - context->Exit(); - } - return result == args.This() ? result : scope.Close(result); } From 7535e3930a6d78674fb163d62ab818f8cb924df1 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 6 Mar 2012 18:11:50 +0100 Subject: [PATCH 02/29] bench: add http_simple_auto benchmark Starts a server and benchmarks it with ab. --- benchmark/http_simple_auto.js | 109 ++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 benchmark/http_simple_auto.js diff --git a/benchmark/http_simple_auto.js b/benchmark/http_simple_auto.js new file mode 100644 index 000000000..4e136a67e --- /dev/null +++ b/benchmark/http_simple_auto.js @@ -0,0 +1,109 @@ +// +// Usage: +// node benchmark/http_simple_auto.js +// +// Where: +// Arguments to pass to `ab`. +// Target to benchmark, e.g. `bytes/1024` or `buffer/8192`. +// + +var path = require("path"); +var http = require("http"); +var spawn = require("child_process").spawn; + +var port = parseInt(process.env.PORT || 8000); + +var fixed = "" +for (var i = 0; i < 20*1024; i++) { + fixed += "C"; +} + +var stored = {}; +var storedBuffer = {}; + +var server = http.createServer(function (req, res) { + var commands = req.url.split("/"); + var command = commands[1]; + var body = ""; + var arg = commands[2]; + var n_chunks = parseInt(commands[3], 10); + var status = 200; + + if (command == "bytes") { + var n = parseInt(arg, 10) + if (n <= 0) + throw "bytes called with n <= 0" + if (stored[n] === undefined) { + stored[n] = ""; + for (var i = 0; i < n; i++) { + stored[n] += "C" + } + } + body = stored[n]; + + } else if (command == "buffer") { + var n = parseInt(arg, 10) + if (n <= 0) throw new Error("bytes called with n <= 0"); + if (storedBuffer[n] === undefined) { + storedBuffer[n] = new Buffer(n); + for (var i = 0; i < n; i++) { + storedBuffer[n][i] = "C".charCodeAt(0); + } + } + body = storedBuffer[n]; + + } else if (command == "quit") { + res.connection.server.close(); + body = "quitting"; + + } else if (command == "fixed") { + body = fixed; + + } else if (command == "echo") { + res.writeHead(200, { "Content-Type": "text/plain", + "Transfer-Encoding": "chunked" }); + req.pipe(res); + return; + + } else { + status = 404; + body = "not found\n"; + } + + // example: http://localhost:port/bytes/512/4 + // sends a 512 byte body in 4 chunks of 128 bytes + if (n_chunks > 0) { + res.writeHead(status, { "Content-Type": "text/plain", + "Transfer-Encoding": "chunked" }); + // send body in chunks + var len = body.length; + var step = ~~(len / n_chunks) || len; + + for (var i = 0; i < len; i += step) { + res.write(body.slice(i, i + step)); + } + + res.end(); + } else { + var content_length = body.length.toString(); + + res.writeHead(status, { "Content-Type": "text/plain", + "Content-Length": content_length }); + res.end(body); + } + +}); + +server.listen(port, function () { + var url = 'http://127.0.0.1:' + port + '/'; + + var n = process.argv.length - 1; + process.argv[n] = url + process.argv[n]; + + var cp = spawn('ab', process.argv.slice(2)); + cp.stdout.pipe(process.stdout); + cp.stderr.pipe(process.stderr); + cp.on('exit', function() { + server.close(); + }); +}); From 5ff2ae8389c8e4ea37709d02340f1b60c32f0737 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 11 May 2012 19:35:03 +0200 Subject: [PATCH 03/29] bench: start a worker for each CPU --- benchmark/http_simple_cluster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/http_simple_cluster.js b/benchmark/http_simple_cluster.js index ecc3169ad..9a886f2ee 100644 --- a/benchmark/http_simple_cluster.js +++ b/benchmark/http_simple_cluster.js @@ -3,7 +3,7 @@ var os = require('os'); if (cluster.isMaster) { console.log('master running on pid %d', process.pid); - for (var i = 1, n = os.cpus().length; i < n; ++i) cluster.fork(); + for (var i = 0, n = os.cpus().length; i < n; ++i) cluster.fork(); } else { require(__dirname + '/http_simple.js'); } From 2ae9b69871427697cf7c0abb6cd345f9778cc7a5 Mon Sep 17 00:00:00 2001 From: Andreas Madsen Date: Sat, 26 May 2012 15:28:35 +0200 Subject: [PATCH 04/29] fs: no end emit after createReadStream.pause() In case a fd option is given to fs.createReadStream a read will instantly happen. But in the edge case where fd point to an empty file and .pause() was executed instantly, the end event would emit since no async wait was between fs.createReadStream and the file read there emits end. This is a cherry-pick of commit 1f3e4a7 into the v0.6 branch. --- lib/fs.js | 4 +- test/simple/test-fs-empty-readStream.js | 66 +++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 test/simple/test-fs-empty-readStream.js diff --git a/lib/fs.js b/lib/fs.js index b48de3a5d..36998aa71 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1068,7 +1068,9 @@ var ReadStream = fs.ReadStream = function(path, options) { } if (this.fd !== null) { - this._read(); + process.nextTick(function () { + self._read(); + }); return; } diff --git a/test/simple/test-fs-empty-readStream.js b/test/simple/test-fs-empty-readStream.js new file mode 100644 index 000000000..a9b378fea --- /dev/null +++ b/test/simple/test-fs-empty-readStream.js @@ -0,0 +1,66 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); +var path = require('path'); +var fs = require('fs'); + +var emptyFile = path.join(common.fixturesDir, 'empty.txt'); + +fs.open(emptyFile, 'r', function (error, fd) { + assert.ifError(error); + + var read = fs.createReadStream(emptyFile, { 'fd': fd }); + + read.once('data', function () { + throw new Error("data event should not emit"); + }); + + var readEmit = false; + read.once('end', function () { + readEmit = true; + }); + + setTimeout(function () { + assert.equal(readEmit, true); + }, 50); +}); + +fs.open(emptyFile, 'r', function (error, fd) { + assert.ifError(error); + + var read = fs.createReadStream(emptyFile, { 'fd': fd }); + read.pause(); + + read.once('data', function () { + throw new Error("data event should not emit"); + }); + + var readEmit = false; + read.once('end', function () { + readEmit = true; + }); + + setTimeout(function () { + assert.equal(readEmit, false); + }, 50); +}); From ccc854d14ee73ff775f6425ba236aeaa62ff9fbf Mon Sep 17 00:00:00 2001 From: Erwin van der Koogh Date: Thu, 31 May 2012 14:11:12 +0200 Subject: [PATCH 05/29] doc: remove all references to setsid Fixes #2299. --- doc/api/child_process.markdown | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 3ddf32979..04296b25a 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -119,7 +119,6 @@ See `child_process.fork()` for details. * `customFds` {Array} **Deprecated** File descriptors for the child to use for stdio. (See below) * `env` {Object} Environment key-value pairs - * `setsid` {Boolean} * return: {ChildProcess object} Launches a new process with the given `command`, with command line arguments in `args`. @@ -228,7 +227,6 @@ See also: `child_process.exec()` and `child_process.fork()` * `customFds` {Array} **Deprecated** File descriptors for the child to use for stdio. (See below) * `env` {Object} Environment key-value pairs - * `setsid` {Boolean} * `encoding` {String} (Default: 'utf8') * `timeout` {Number} (Default: 0) * `maxBuffer` {Number} (Default: 200*1024) @@ -285,7 +283,6 @@ the child process is killed. * `customFds` {Array} **Deprecated** File descriptors for the child to use for stdio. (See below) * `env` {Object} Environment key-value pairs - * `setsid` {Boolean} * `encoding` {String} (Default: 'utf8') * `timeout` {Number} (Default: 0) * `maxBuffer` {Number} (Default: 200*1024) @@ -310,7 +307,6 @@ leaner than `child_process.exec`. It has the same options. * `customFds` {Array} **Deprecated** File descriptors for the child to use for stdio. (See below) * `env` {Object} Environment key-value pairs - * `setsid` {Boolean} * `encoding` {String} (Default: 'utf8') * `timeout` {Number} (Default: 0) * Return: ChildProcess object From 434404e3bbb0a293106fd830378dfd4e8091a7d6 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 1 Jun 2012 10:20:56 -0700 Subject: [PATCH 06/29] website: Add nodejs.es to localized sites --- doc/community/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/community/index.html b/doc/community/index.html index 13f73230b..cba93f985 100644 --- a/doc/community/index.html +++ b/doc/community/index.html @@ -146,6 +146,8 @@
Node Hispano Spanish language community
+ Node.js EspaƱol Node.js in Spanish +
OctoberSkyJs Korea Node.js community

From 0742f5629cea120e8569f8985983d295a5868ff9 Mon Sep 17 00:00:00 2001 From: koichik Date: Tue, 5 Jun 2012 22:10:37 +0900 Subject: [PATCH 07/29] Revert "punycode: Update to v1.0.0" This reverts commit 483edbdf1aef40c208f6c96efbbcc3c34122e5f2. Fixes #3359. --- lib/punycode.js | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/lib/punycode.js b/lib/punycode.js index c3791e3ef..315f1e4da 100644 --- a/lib/punycode.js +++ b/lib/punycode.js @@ -1,4 +1,9 @@ -/*! http://mths.be/punycode by @mathias */ +/*! + * Punycode.js + * Copyright 2011 Mathias Bynens + * Available under MIT license + */ + ;(function(root) { /** @@ -29,7 +34,7 @@ delimiter = '-', // '\x2D' /** Regular expressions */ - regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars + regexNonASCII = /[^ -~]/, // matches unprintable ASCII chars + non-ASCII chars regexPunycode = /^xn--/, /** Error messages */ @@ -92,17 +97,14 @@ } /** - * Creates an array containing the decimal code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 + * Creates an array containing the decimal code points of each character in + * the string. + * @see `punycode.utf16.encode` + * @see + * @memberOf punycode.utf16 * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. + * @param {String} string The Unicode input string. + * @returns {Array} The new array. */ function utf16decode(string) { var output = [], @@ -131,7 +133,7 @@ * @memberOf punycode.utf16 * @name encode * @param {Array} codePoints The array of decimal code points. - * @returns {String} The new Unicode string (UCS-2). + * @returns {String} The new string. */ function utf16encode(array) { return map(array, function(value) { @@ -281,7 +283,7 @@ } i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (digit < t) { break; @@ -404,7 +406,7 @@ if (currentValue == n) { // Represent delta as a generalized variable-length integer for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (q < t) { break; } @@ -473,11 +475,10 @@ * @memberOf punycode * @type String */ - 'version': '1.0.0', + 'version': '0.2.1', /** * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to decimal Unicode code points, and back. - * @see + * representation to Unicode and back. * @memberOf punycode * @type Object */ From cb76999bad6f20f3643fd6a052511fdca51f0efa Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 5 Jun 2012 17:04:52 +0200 Subject: [PATCH 08/29] deps: upgrade libuv to 06e0319 --- deps/uv/src/unix/ev/ev.c | 1 - deps/uv/src/unix/stream.c | 11 +++++++++-- deps/uv/src/unix/udp.c | 8 +++++++- deps/uv/src/win/tty.c | 2 +- deps/uv/test/runner.c | 1 + 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/deps/uv/src/unix/ev/ev.c b/deps/uv/src/unix/ev/ev.c index a432bfbf6..b6e190f75 100644 --- a/deps/uv/src/unix/ev/ev.c +++ b/deps/uv/src/unix/ev/ev.c @@ -2554,7 +2554,6 @@ void ev_unref (EV_P) { --activecnt; - if (activecnt < 0) abort(); } void diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c index 6f0d1378f..bcfa1c939 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -523,12 +523,19 @@ static void uv__read(uv_stream_t* stream) { struct cmsghdr* cmsg; char cmsg_space[64]; struct ev_loop* ev = stream->loop->ev; + int count; + + /* Prevent loop starvation when the data comes in as fast as (or faster than) + * we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O. + */ + count = 32; /* XXX: Maybe instead of having UV_READING we just test if * tcp->read_cb is NULL or not? */ - while ((stream->read_cb || stream->read2_cb) && - stream->flags & UV_READING) { + while ((stream->read_cb || stream->read2_cb) + && (stream->flags & UV_READING) + && (count-- > 0)) { assert(stream->alloc_cb); buf = stream->alloc_cb((uv_handle_t*)stream, 64 * 1024); diff --git a/deps/uv/src/unix/udp.c b/deps/uv/src/unix/udp.c index 349bfae3c..7d58fd9fe 100644 --- a/deps/uv/src/unix/udp.c +++ b/deps/uv/src/unix/udp.c @@ -208,12 +208,17 @@ static void uv__udp_recvmsg(uv_udp_t* handle) { ssize_t nread; uv_buf_t buf; int flags; + int count; assert(handle->recv_cb != NULL); assert(handle->alloc_cb != NULL); + /* Prevent loop starvation when the data comes in as fast as (or faster than) + * we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O. + */ + count = 32; + do { - /* FIXME: hoist alloc_cb out the loop but for now follow uv__read() */ buf = handle->alloc_cb((uv_handle_t*)handle, 64 * 1024); assert(buf.len > 0); assert(buf.base != NULL); @@ -254,6 +259,7 @@ static void uv__udp_recvmsg(uv_udp_t* handle) { } /* recv_cb callback may decide to pause or close the handle */ while (nread != -1 + && count-- > 0 && handle->fd != -1 && handle->recv_cb != NULL); } diff --git a/deps/uv/src/win/tty.c b/deps/uv/src/win/tty.c index 601bf5ed1..df7ae2898 100644 --- a/deps/uv/src/win/tty.c +++ b/deps/uv/src/win/tty.c @@ -688,7 +688,7 @@ void uv_process_tty_read_line_req(uv_loop_t* loop, uv_tty_t* handle, if (!REQ_SUCCESS(req)) { /* Read was not successful */ if ((handle->flags & UV_HANDLE_READING) && - !(handle->flags & UV_HANDLE_TTY_RAW)) { + handle->read_line_handle != NULL) { /* Real error */ handle->flags &= ~UV_HANDLE_READING; uv__set_sys_error(loop, GET_REQ_ERROR(req)); diff --git a/deps/uv/test/runner.c b/deps/uv/test/runner.c index 73570fc33..d4903379f 100644 --- a/deps/uv/test/runner.c +++ b/deps/uv/test/runner.c @@ -86,6 +86,7 @@ int run_test(const char* test, int timeout, int benchmark_output) { int i; status = 255; + main_proc = NULL; process_count = 0; /* If it's a helper the user asks for, start it directly. */ From e5d3ea77719b2466e8a474b0d660e5c9e6e3300a Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 5 Jun 2012 17:20:05 -0700 Subject: [PATCH 09/29] Upgrade npm to 1.1.24 --- deps/npm/.npmignore | 3 + deps/npm/AUTHORS | 1 + deps/npm/Makefile | 2 + deps/npm/doc/cli/json.md | 31 + deps/npm/html/api/GubbleBum-Blocky.ttf | Bin 10292 -> 0 bytes deps/npm/html/api/author.html | 69 -- deps/npm/html/api/bin.html | 4 +- deps/npm/html/api/bugs.html | 4 +- deps/npm/html/api/commands.html | 4 +- deps/npm/html/api/config.html | 4 +- deps/npm/html/api/deprecate.html | 4 +- deps/npm/html/api/docs.html | 4 +- deps/npm/html/api/edit.html | 4 +- deps/npm/html/api/explore.html | 4 +- deps/npm/html/api/find.html | 88 --- deps/npm/html/api/get.html | 68 -- deps/npm/html/api/help-search.html | 4 +- deps/npm/html/api/home.html | 60 -- deps/npm/html/api/init.html | 4 +- deps/npm/html/api/install.html | 4 +- deps/npm/html/api/link.html | 4 +- deps/npm/html/api/list.html | 88 --- deps/npm/html/api/ln.html | 74 --- deps/npm/html/api/load.html | 4 +- deps/npm/html/api/ls.html | 4 +- deps/npm/html/api/npm.html | 6 +- deps/npm/html/api/outdated.html | 4 +- deps/npm/html/api/owner.html | 4 +- deps/npm/html/api/pack.html | 4 +- deps/npm/html/api/prefix.html | 4 +- deps/npm/html/api/prune.html | 4 +- deps/npm/html/api/publish.html | 4 +- deps/npm/html/api/rebuild.html | 4 +- deps/npm/html/api/restart.html | 4 +- deps/npm/html/api/rm.html | 57 -- deps/npm/html/api/root.html | 4 +- deps/npm/html/api/run-script.html | 4 +- deps/npm/html/api/search.html | 4 +- deps/npm/html/api/set.html | 68 -- deps/npm/html/api/shrinkwrap.html | 4 +- deps/npm/html/api/start.html | 4 +- deps/npm/html/api/stop.html | 4 +- deps/npm/html/api/style.css | 336 ---------- deps/npm/html/api/submodule.html | 4 +- deps/npm/html/api/tag.html | 4 +- deps/npm/html/api/test.html | 4 +- deps/npm/html/api/uninstall.html | 4 +- deps/npm/html/api/unpublish.html | 4 +- deps/npm/html/api/update.html | 4 +- deps/npm/html/api/version.html | 4 +- deps/npm/html/api/view.html | 4 +- deps/npm/html/api/whoami.html | 4 +- deps/npm/html/doc/GubbleBum-Blocky.ttf | Bin 10292 -> 0 bytes deps/npm/html/doc/README.html | 4 +- deps/npm/html/doc/adduser.html | 4 +- deps/npm/html/doc/author.html | 69 -- deps/npm/html/doc/bin.html | 4 +- deps/npm/html/doc/bugs.html | 4 +- deps/npm/html/doc/build.html | 4 +- deps/npm/html/doc/bundle.html | 4 +- deps/npm/html/doc/cache.html | 4 +- deps/npm/html/doc/changelog.html | 4 +- deps/npm/html/doc/coding-style.html | 4 +- deps/npm/html/doc/completion.html | 4 +- deps/npm/html/doc/config.html | 4 +- deps/npm/html/doc/deprecate.html | 4 +- deps/npm/html/doc/developers.html | 4 +- deps/npm/html/doc/disputes.html | 4 +- deps/npm/html/doc/docs.html | 4 +- deps/npm/html/doc/edit.html | 4 +- deps/npm/html/doc/explore.html | 4 +- deps/npm/html/doc/faq.html | 4 +- deps/npm/html/doc/find.html | 75 --- deps/npm/html/doc/folders.html | 4 +- deps/npm/html/doc/get.html | 621 ------------------ deps/npm/html/doc/global.html | 240 ------- deps/npm/html/doc/help-search.html | 4 +- deps/npm/html/doc/help.html | 4 +- deps/npm/html/doc/home.html | 72 -- deps/npm/html/doc/index.html | 4 +- deps/npm/html/doc/init.html | 4 +- deps/npm/html/doc/install.html | 4 +- deps/npm/html/doc/json.html | 35 +- deps/npm/html/doc/link.html | 4 +- deps/npm/html/doc/list.html | 4 +- deps/npm/html/doc/ln.html | 93 --- deps/npm/html/doc/ls.html | 87 --- deps/npm/html/doc/npm.html | 6 +- deps/npm/html/doc/outdated.html | 4 +- deps/npm/html/doc/owner.html | 4 +- deps/npm/html/doc/pack.html | 4 +- deps/npm/html/doc/prefix.html | 4 +- deps/npm/html/doc/prune.html | 4 +- deps/npm/html/doc/publish.html | 4 +- deps/npm/html/doc/rebuild.html | 4 +- deps/npm/html/doc/registry.html | 4 +- deps/npm/html/doc/removing-npm.html | 4 +- deps/npm/html/doc/restart.html | 4 +- deps/npm/html/doc/rm.html | 57 -- deps/npm/html/doc/root.html | 4 +- deps/npm/html/doc/run-script.html | 4 +- deps/npm/html/doc/scripts.html | 4 +- deps/npm/html/doc/search.html | 4 +- deps/npm/html/doc/semver.html | 4 +- deps/npm/html/doc/set.html | 621 ------------------ deps/npm/html/doc/shrinkwrap.html | 4 +- deps/npm/html/doc/star.html | 4 +- deps/npm/html/doc/start.html | 4 +- deps/npm/html/doc/stop.html | 4 +- deps/npm/html/doc/submodule.html | 4 +- deps/npm/html/doc/tag.html | 4 +- deps/npm/html/doc/test.html | 4 +- deps/npm/html/doc/uninstall.html | 4 +- deps/npm/html/doc/unpublish.html | 4 +- deps/npm/html/doc/update.html | 4 +- deps/npm/html/doc/version.html | 4 +- deps/npm/html/doc/view.html | 4 +- deps/npm/html/doc/whoami.html | 4 +- deps/npm/html/dochead.html | 2 +- deps/npm/html/{doc => }/style.css | 35 +- deps/npm/html/webfonts/23242D_3_0.eot | Bin 0 -> 9662 bytes deps/npm/html/webfonts/23242D_3_0.ttf | Bin 0 -> 9356 bytes deps/npm/html/webfonts/23242D_3_0.woff | Bin 0 -> 4373 bytes deps/npm/lib/bugs.js | 24 +- deps/npm/lib/cache.js | 12 +- deps/npm/lib/docs.js | 24 +- deps/npm/lib/install.js | 2 +- deps/npm/lib/owner.js | 2 +- deps/npm/lib/publish.js | 9 +- deps/npm/lib/utils/error-handler.js | 53 +- deps/npm/lib/utils/lifecycle.js | 8 + deps/npm/lib/utils/tar.js | 16 +- deps/npm/man/man1/README.1 | 2 +- deps/npm/man/man1/adduser.1 | 2 +- deps/npm/man/man1/bin.1 | 2 +- deps/npm/man/man1/bugs.1 | 2 +- deps/npm/man/man1/build.1 | 2 +- deps/npm/man/man1/bundle.1 | 2 +- deps/npm/man/man1/cache.1 | 2 +- deps/npm/man/man1/changelog.1 | 2 +- deps/npm/man/man1/coding-style.1 | 2 +- deps/npm/man/man1/completion.1 | 2 +- deps/npm/man/man1/config.1 | 2 +- deps/npm/man/man1/deprecate.1 | 2 +- deps/npm/man/man1/developers.1 | 2 +- deps/npm/man/man1/disputes.1 | 2 +- deps/npm/man/man1/docs.1 | 2 +- deps/npm/man/man1/edit.1 | 2 +- deps/npm/man/man1/explore.1 | 2 +- deps/npm/man/man1/faq.1 | 2 +- deps/npm/man/man1/folders.1 | 2 +- deps/npm/man/man1/help-search.1 | 2 +- deps/npm/man/man1/help.1 | 2 +- deps/npm/man/man1/index.1 | 2 +- deps/npm/man/man1/init.1 | 2 +- deps/npm/man/man1/install.1 | 2 +- deps/npm/man/man1/json.1 | 37 +- deps/npm/man/man1/link.1 | 2 +- deps/npm/man/man1/list.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/outdated.1 | 2 +- deps/npm/man/man1/owner.1 | 2 +- deps/npm/man/man1/pack.1 | 2 +- deps/npm/man/man1/prefix.1 | 2 +- deps/npm/man/man1/prune.1 | 2 +- deps/npm/man/man1/publish.1 | 2 +- deps/npm/man/man1/rebuild.1 | 2 +- deps/npm/man/man1/registry.1 | 2 +- deps/npm/man/man1/removing-npm.1 | 2 +- deps/npm/man/man1/restart.1 | 2 +- deps/npm/man/man1/root.1 | 2 +- deps/npm/man/man1/run-script.1 | 2 +- deps/npm/man/man1/scripts.1 | 2 +- deps/npm/man/man1/search.1 | 2 +- deps/npm/man/man1/semver.1 | 2 +- deps/npm/man/man1/shrinkwrap.1 | 2 +- deps/npm/man/man1/star.1 | 2 +- deps/npm/man/man1/start.1 | 2 +- deps/npm/man/man1/stop.1 | 2 +- deps/npm/man/man1/submodule.1 | 2 +- deps/npm/man/man1/tag.1 | 2 +- deps/npm/man/man1/test.1 | 2 +- deps/npm/man/man1/uninstall.1 | 2 +- deps/npm/man/man1/unpublish.1 | 2 +- deps/npm/man/man1/update.1 | 2 +- deps/npm/man/man1/version.1 | 2 +- deps/npm/man/man1/view.1 | 2 +- deps/npm/man/man1/whoami.1 | 2 +- deps/npm/man/man3/bin.3 | 2 +- deps/npm/man/man3/bugs.3 | 2 +- deps/npm/man/man3/commands.3 | 2 +- deps/npm/man/man3/config.3 | 2 +- deps/npm/man/man3/deprecate.3 | 2 +- deps/npm/man/man3/docs.3 | 2 +- deps/npm/man/man3/edit.3 | 2 +- deps/npm/man/man3/explore.3 | 2 +- deps/npm/man/man3/help-search.3 | 2 +- deps/npm/man/man3/init.3 | 2 +- deps/npm/man/man3/install.3 | 2 +- deps/npm/man/man3/link.3 | 2 +- deps/npm/man/man3/load.3 | 2 +- deps/npm/man/man3/ls.3 | 2 +- deps/npm/man/man3/npm.3 | 4 +- deps/npm/man/man3/outdated.3 | 2 +- deps/npm/man/man3/owner.3 | 2 +- deps/npm/man/man3/pack.3 | 2 +- deps/npm/man/man3/prefix.3 | 2 +- deps/npm/man/man3/prune.3 | 2 +- deps/npm/man/man3/publish.3 | 2 +- deps/npm/man/man3/rebuild.3 | 2 +- deps/npm/man/man3/restart.3 | 2 +- deps/npm/man/man3/root.3 | 2 +- deps/npm/man/man3/run-script.3 | 2 +- deps/npm/man/man3/search.3 | 2 +- deps/npm/man/man3/shrinkwrap.3 | 2 +- deps/npm/man/man3/start.3 | 2 +- deps/npm/man/man3/stop.3 | 2 +- deps/npm/man/man3/submodule.3 | 2 +- deps/npm/man/man3/tag.3 | 2 +- deps/npm/man/man3/test.3 | 2 +- deps/npm/man/man3/uninstall.3 | 2 +- deps/npm/man/man3/unpublish.3 | 2 +- deps/npm/man/man3/update.3 | 2 +- deps/npm/man/man3/version.3 | 2 +- deps/npm/man/man3/view.3 | 2 +- deps/npm/man/man3/whoami.3 | 2 +- deps/npm/node_modules/chownr/package.json | 10 +- .../node_modules/fstream-npm/fstream-npm.js | 14 +- .../node_modules/fstream-ignore/package.json | 4 +- .../npm/node_modules/fstream-npm/package.json | 11 +- deps/npm/node_modules/mkdirp/README.markdown | 7 + deps/npm/node_modules/mkdirp/index.js | 25 +- deps/npm/node_modules/mkdirp/package.json | 12 +- deps/npm/node_modules/node-gyp/README.md | 4 +- .../node_modules/node-gyp/legacy/common.gypi | 15 +- .../tools/gyp/pylib/gyp/generator/make.py | 10 +- deps/npm/node_modules/node-gyp/lib/build.js | 21 +- .../node_modules/node-gyp/lib/configure.js | 89 ++- .../npm/node_modules/node-gyp/lib/node-gyp.js | 23 +- .../node-gyp/node_modules/ansi/package.json | 4 +- .../node-gyp/node_modules/glob/package.json | 4 +- deps/npm/node_modules/node-gyp/package.json | 16 +- deps/npm/node_modules/semver/package.json | 49 +- deps/npm/node_modules/semver/semver.js | 2 +- deps/npm/node_modules/uid-number/package.json | 9 +- deps/npm/package.json | 8 +- .../npm-test-ignore-nested-nm/package.json | 3 + .../npm-test-ignore-nested-nm/test.js | 2 + 248 files changed, 761 insertions(+), 3286 deletions(-) delete mode 100755 deps/npm/html/api/GubbleBum-Blocky.ttf delete mode 100644 deps/npm/html/api/author.html delete mode 100644 deps/npm/html/api/find.html delete mode 100644 deps/npm/html/api/get.html delete mode 100644 deps/npm/html/api/home.html delete mode 100644 deps/npm/html/api/list.html delete mode 100644 deps/npm/html/api/ln.html delete mode 100644 deps/npm/html/api/rm.html delete mode 100644 deps/npm/html/api/set.html delete mode 100644 deps/npm/html/api/style.css delete mode 100755 deps/npm/html/doc/GubbleBum-Blocky.ttf delete mode 100644 deps/npm/html/doc/author.html delete mode 100644 deps/npm/html/doc/find.html delete mode 100644 deps/npm/html/doc/get.html delete mode 100644 deps/npm/html/doc/global.html delete mode 100644 deps/npm/html/doc/home.html delete mode 100644 deps/npm/html/doc/ln.html delete mode 100644 deps/npm/html/doc/ls.html delete mode 100644 deps/npm/html/doc/rm.html delete mode 100644 deps/npm/html/doc/set.html rename deps/npm/html/{doc => }/style.css (84%) create mode 100644 deps/npm/html/webfonts/23242D_3_0.eot create mode 100644 deps/npm/html/webfonts/23242D_3_0.ttf create mode 100644 deps/npm/html/webfonts/23242D_3_0.woff create mode 100644 deps/npm/test/packages/npm-test-ignore-nested-nm/package.json create mode 100644 deps/npm/test/packages/npm-test-ignore-nested-nm/test.js diff --git a/deps/npm/.npmignore b/deps/npm/.npmignore index 5ddef3560..94dc33f00 100644 --- a/deps/npm/.npmignore +++ b/deps/npm/.npmignore @@ -12,6 +12,9 @@ npm-debug.log .gitignore release/ +# don't need these in the npm package. +html/*.png + # don't ignore .npmignore files # these are used in some tests. !.npmignore diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index a2b8141d7..fcfa7f2b0 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -65,3 +65,4 @@ Jens Grunert Joost-Wim Boekesteijn Dalmais Maxence Marcus Ekwall +Aaron Stacy diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 19efd815c..2663075c6 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -121,6 +121,8 @@ docpublish: doc-publish doc-publish: doc rsync -vazu --stats --no-implied-dirs --delete html/doc/ npmjs.org:/var/www/npmjs.org/public/doc rsync -vazu --stats --no-implied-dirs --delete html/api/ npmjs.org:/var/www/npmjs.org/public/api + rsync -vazu --stats --no-implied-dirs --delete html/webfonts/ npmjs.org:/var/www/npmjs.org/public/webfonts + scp html/style.css npmjs.org:/var/www/npmjs.org/public/ zip-publish: release scp release/* npmjs.org:/var/www/npmjs.org/public/dist/ diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md index ddd500e3b..5f50cd2cf 100644 --- a/deps/npm/doc/cli/json.md +++ b/deps/npm/doc/cli/json.md @@ -394,6 +394,7 @@ Git urls can be of the form: git://github.com/user/project.git#commit-ish git+ssh://user@hostname:project.git#commit-ish + git+ssh://user@hostname/project.git#commit-ish git+http://user@hostname/project/blah.git#commit-ish git+https://user@hostname/project/blah.git#commit-ish @@ -420,6 +421,36 @@ Array of package names that will be bundled when publishing the package. If this is spelled `"bundleDependencies"`, then that is also honorable. +## optionalDependencies + +If a dependency can be used, but you would like npm to proceed if it +cannot be found or fails to install, then you may put it in the +`optionalDependencies` hash. This is a map of package name to version +or url, just like the `dependencies` hash. The difference is that +failure is tolerated. + +It is still your program's responsibility to handle the lack of the +dependency. For example, something like this: + + try { + var foo = require('foo') + var fooVersion = require('foo/package.json').version + } catch (er) { + foo = null + } + if ( notGoodFooVersion(fooVersion) ) { + foo = null + } + + // .. then later in your program .. + + if (foo) { + foo.doFooThings() + } + +Entries in `optionalDependencies` will override entries of the same name in +`dependencies`, so it's usually best to only put in one place. + ## engines You can specify the version of diff --git a/deps/npm/html/api/GubbleBum-Blocky.ttf b/deps/npm/html/api/GubbleBum-Blocky.ttf deleted file mode 100755 index 8eac02f7ada5402c2fd8775f6bb5e94a5ee5c9f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10292 zcmdU#4V+bVna7`V&%JZ!1;k+(P!v7G074EpGL9gkf=+_s3#QV9ncU%CU|^V;W(E`_ z(j=oYn=I3m$dYQ*G&3!-sfdhjFWc5G+q$j0vD%uFYgtI9%-p`u^FR08I|Hoysn2IW zyK}j}`#7WlNeaZEoMW{&Eq2o=9Tf z^0leX<42Z1DpD43%}Xm&-JQ9dz+q|~*O#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55d%XMt0<9c8#muUQYKxpDyy-CKCIaooasEos*VujM?* z-!Mc*v4lDBI-D{XLaW#0b$+vJmzYl7Slz*Y7YIn;8D?#L5s!dx+j;l!PKCB*Oz)K0 zbhwP^L-aZP`=R - - author - - - - -
-

owner

Manage package owners

- -

SYNOPSIS

- -
npm.commands.owner(args, callback)
- -

DESCRIPTION

- -

The first element of the 'args' parameter defines what to do, and the subsequent -elements depend on the action. Possible values for the action are (order of -parameters are given in parenthesis):

- -
  • ls (package): -List all the users who have access to modify a package and push new versions. -Handy when you need to know who to bug for help.
  • add (user, package): -Add a new user as a maintainer of a package. This user is enabled to modify -metadata, publish new versions, and add other owners.
  • rm (user, package): -Remove a user from the package owner list. This immediately revokes their -privileges.
- -

Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but -that is not implemented at this time.

- -

SEE ALSO

- - -
- - - diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 2d659898c..f6781bfa4 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -2,7 +2,7 @@ bin - +
@@ -19,7 +19,7 @@

This function should not be used programmatically. Instead, just refer to the npm.bin member.

- + - diff --git a/deps/npm/html/api/get.html b/deps/npm/html/api/get.html deleted file mode 100644 index 46d372ad6..000000000 --- a/deps/npm/html/api/get.html +++ /dev/null @@ -1,68 +0,0 @@ - - - get - - - - -
-

config

Manage the npm configuration files

- -

SYNOPSIS

- -
npm.commands.config(args, callback)
-var val = npm.config.get(key)
-npm.config.set(key, val)
- -

DESCRIPTION

- -

This function acts much the same way as the command-line version. The first -element in the array tells config what to do. Possible values are:

- -
  • set

    Sets a config parameter. The second element in args is interpreted as the -key, and the third element is interpreted as the value.

  • get

    Gets the value of a config parameter. The second element in args is the -key to get the value of.

  • delete (rm or del)

    Deletes a parameter from the config. The second element in args is the -key to delete.

  • list (ls)

    Show all configs that aren't secret. No parameters necessary.

  • edit:

    Opens the config file in the default editor. This command isn't very useful -programmatically, but it is made available.

- -

To programmatically access npm configuration settings, or set them for -the duration of a program, use the npm.config.set and npm.config.get -functions instead.

- -

SEE ALSO

- - -
- - - diff --git a/deps/npm/html/api/help-search.html b/deps/npm/html/api/help-search.html index d5c6f046c..86ba337e9 100644 --- a/deps/npm/html/api/help-search.html +++ b/deps/npm/html/api/help-search.html @@ -2,7 +2,7 @@ help-search - +
@@ -32,7 +32,7 @@ Name of the file that matched

The silent parameter is not neccessary not used, but it may in the future.

- + - diff --git a/deps/npm/html/api/init.html b/deps/npm/html/api/init.html index 30a409425..4e8b7f92f 100644 --- a/deps/npm/html/api/init.html +++ b/deps/npm/html/api/init.html @@ -2,7 +2,7 @@ init - +
@@ -35,7 +35,7 @@ then go ahead and use this programmatically.

json(1)

- + - diff --git a/deps/npm/html/api/ln.html b/deps/npm/html/api/ln.html deleted file mode 100644 index 0629e0642..000000000 --- a/deps/npm/html/api/ln.html +++ /dev/null @@ -1,74 +0,0 @@ - - - ln - - - - -
-

link

Symlink a package folder

- -

SYNOPSIS

- -
npm.command.link(callback)
-npm.command.link(packages, callback)
- -

DESCRIPTION

- -

Package linking is a two-step process.

- -

Without parameters, link will create a globally-installed -symbolic link from prefix/package-name to the current folder.

- -

With a parameters, link will create a symlink from the local node_modules -folder to the global symlink.

- -

When creating tarballs for npm publish, the linked packages are -"snapshotted" to their current state by resolving the symbolic links.

- -

This is -handy for installing your own stuff, so that you can work on it and test it -iteratively without having to continually rebuild.

- -

For example:

- -
npm.commands.link(cb)           # creates global link from the cwd
-                                # (say redis package)
-npm.commands.link('redis', cb)  # link-install the package
- -

Now, any changes to the redis package will be reflected in -the package in the current working directory

-
- - - diff --git a/deps/npm/html/api/load.html b/deps/npm/html/api/load.html index 500e92387..68ac85386 100644 --- a/deps/npm/html/api/load.html +++ b/deps/npm/html/api/load.html @@ -2,7 +2,7 @@ load - +
@@ -32,7 +32,7 @@ config object.

For a list of all the available command-line configs, see npm help config

- + - diff --git a/deps/npm/html/api/root.html b/deps/npm/html/api/root.html index 7300437d0..174ca4611 100644 --- a/deps/npm/html/api/root.html +++ b/deps/npm/html/api/root.html @@ -2,7 +2,7 @@ root - +
@@ -21,7 +21,7 @@

This function is not useful programmatically.

- + - diff --git a/deps/npm/html/api/shrinkwrap.html b/deps/npm/html/api/shrinkwrap.html index 2f08685b1..8be37c6a9 100644 --- a/deps/npm/html/api/shrinkwrap.html +++ b/deps/npm/html/api/shrinkwrap.html @@ -2,7 +2,7 @@ shrinkwrap - +
@@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.

Finally, 'callback' is a function that will be called when the shrinkwrap has been saved.

- + - diff --git a/deps/npm/html/doc/bin.html b/deps/npm/html/doc/bin.html index b4b90d541..c6252a668 100644 --- a/deps/npm/html/doc/bin.html +++ b/deps/npm/html/doc/bin.html @@ -2,7 +2,7 @@ bin - + - + - diff --git a/deps/npm/html/doc/folders.html b/deps/npm/html/doc/folders.html index 127c452a5..582305a55 100644 --- a/deps/npm/html/doc/folders.html +++ b/deps/npm/html/doc/folders.html @@ -2,7 +2,7 @@ folders - +
@@ -205,7 +205,7 @@ cannot be found elsewhere. See json(1)
  • faq(1)
  • json(1)
  • install(1)
  • pack(1)
  • cache(1)
  • config(1)
  • publish(1)
  • - + - diff --git a/deps/npm/html/doc/global.html b/deps/npm/html/doc/global.html deleted file mode 100644 index 9904c30ce..000000000 --- a/deps/npm/html/doc/global.html +++ /dev/null @@ -1,240 +0,0 @@ - - - global - - - - -
    -

    folders

    Folder Structures Used by npm

    - -

    DESCRIPTION

    - -

    npm puts various things on your computer. That's its job.

    - -

    This document will tell you what it puts where.

    - -

    tl;dr

    - -
    • Local install (default): puts stuff in ./node_modules of the current -package root.
    • Global install (with -g): puts stuff in /usr/local or wherever node -is installed.
    • Install it locally if you're going to require() it.
    • Install it globally if you're going to run it on the command line.
    • If you need both, then install it in both places, or use npm link.
    - -

    prefix Configuration

    - -

    The prefix config defaults to the location where node is installed. -On most systems, this is /usr/local, and most of the time is the same -as node's process.installPrefix.

    - -

    On windows, this is the exact location of the node.exe binary. On Unix -systems, it's one level up, since node is typically installed at -{prefix}/bin/node rather than {prefix}/node.exe.

    - -

    When the global flag is set, npm installs things into this prefix. -When it is not set, it uses the root of the current package, or the -current working directory if not in a package already.

    - -

    Node Modules

    - -

    Packages are dropped into the node_modules folder under the prefix. -When installing locally, this means that you can -require("packagename") to load its main module, or -require("packagename/lib/path/to/sub/module") to load other modules.

    - -

    Global installs on Unix systems go to {prefix}/lib/node_modules. -Global installs on Windows go to {prefix}/node_modules (that is, no -lib folder.)

    - -

    If you wish to require() a package, then install it locally.

    - -

    Executables

    - -

    When in global mode, executables are linked into {prefix}/bin on Unix, -or directly into {prefix} on Windows.

    - -

    When in local mode, executables are linked into -./node_modules/.bin so that they can be made available to scripts run -through npm. (For example, so that a test runner will be in the path -when you run npm test.)

    - -

    Man Pages

    - -

    When in global mode, man pages are linked into {prefix}/share/man.

    - -

    When in local mode, man pages are not installed.

    - -

    Man pages are not installed on Windows systems.

    - -

    Cache

    - -

    See cache(1). Cache files are stored in ~/.npm on Posix, or -~/npm-cache on Windows.

    - -

    This is controlled by the cache configuration param.

    - -

    Temp Files

    - -

    Temporary files are stored by default in the folder specified by the -tmp config, which defaults to the TMPDIR, TMP, or TEMP environment -variables, or /tmp on Unix and c:\windows\temp on Windows.

    - -

    Temp files are given a unique folder under this root for each run of the -program, and are deleted upon successful exit.

    - -

    More Information

    - -

    When installing locally, npm first tries to find an appropriate -prefix folder. This is so that npm install foo@1.2.3 will install -to the sensible root of your package, even if you happen to have cded -into some other folder.

    - -

    Starting at the $PWD, npm will walk up the folder tree checking for a -folder that contains either a package.json file, or a node_modules -folder. If such a thing is found, then that is treated as the effective -"current directory" for the purpose of running npm commands. (This -behavior is inspired by and similar to git's .git-folder seeking -logic when running git commands in a working dir.)

    - -

    If no package root is found, then the current folder is used.

    - -

    When you run npm install foo@1.2.3, then the package is loaded into -the cache, and then unpacked into ./node_modules/foo. Then, any of -foo's dependencies are similarly unpacked into -./node_modules/foo/node_modules/....

    - -

    Any bin files are symlinked to ./node_modules/.bin/, so that they may -be found by npm scripts when necessary.

    - -

    Global Installation

    - -

    If the global configuration is set to true, then npm will -install packages "globally".

    - -

    For global installation, packages are installed roughly the same way, -but using the folders described above.

    - -

    Cycles, Conflicts, and Folder Parsimony

    - -

    Cycles are handled using the property of node's module system that it -walks up the directories looking for node_modules folders. So, at every -stage, if a package is already installed in an ancestor node_modules -folder, then it is not installed at the current location.

    - -

    Consider the case above, where foo -> bar -> baz. Imagine if, in -addition to that, baz depended on bar, so you'd have: -foo -> bar -> baz -> bar -> baz .... However, since the folder -structure is: foo/node_modules/bar/node_modules/baz, there's no need to -put another copy of bar into .../baz/node_modules, since when it calls -require("bar"), it will get the copy that is installed in -foo/node_modules/bar.

    - -

    This shortcut is only used if the exact same -version would be installed in multiple nested node_modules folders. It -is still possible to have a/node_modules/b/node_modules/a if the two -"a" packages are different versions. However, without repeating the -exact same package multiple times, an infinite regress will always be -prevented.

    - -

    Another optimization can be made by installing dependencies at the -highest level possible, below the localized "target" folder.

    - -

    Example

    - -

    Consider this dependency graph:

    - -
    foo
    -+-- blerg@1.2.5
    -+-- bar@1.2.3
    -|   +-- blerg@1.x (latest=1.3.7)
    -|   +-- baz@2.x
    -|   |   `-- quux@3.x
    -|   |       `-- bar@1.2.3 (cycle)
    -|   `-- asdf@*
    -`-- baz@1.2.3
    -    `-- quux@3.x
    -        `-- bar
    - -

    In this case, we might expect a folder structure like this:

    - -
    foo
    -+-- node_modules
    -    +-- blerg (1.2.5) <---[A]
    -    +-- bar (1.2.3) <---[B]
    -    |   +-- node_modules
    -    |   |   `-- baz (2.0.2) <---[C]
    -    |   |       `-- node_modules
    -    |   |           `-- quux (3.2.0)
    -    |   `-- asdf (2.3.4)
    -    `-- baz (1.2.3) <---[D]
    -        `-- node_modules
    -            `-- quux (3.2.0) <---[E]
    - -

    Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are -installed in foo's node_modules folder.

    - -

    Even though the latest copy of blerg is 1.3.7, foo has a specific -dependency on version 1.2.5. So, that gets installed at [A]. Since the -parent installation of blerg satisfie's bar's dependency on blerg@1.x, -it does not install another copy under [B].

    - -

    Bar [B] also has dependencies on baz and asdf, so those are installed in -bar's node_modules folder. Because it depends on baz@2.x, it cannot -re-use the baz@1.2.3 installed in the parent node_modules folder [D], -and must install its own copy [C].

    - -

    Underneath bar, the baz->quux->bar dependency creates a cycle. -However, because bar is already in quux's ancestry [B], it does not -unpack another copy of bar into that folder.

    - -

    Underneath foo->baz [D], quux's [E] folder tree is empty, because its -dependency on bar is satisfied by the parent folder copy installed at [B].

    - -

    For a graphical breakdown of what is installed where, use npm ls.

    - -

    Publishing

    - -

    Upon publishing, npm will look in the node_modules folder. If any of -the items there are not in the bundledDependencies array, then they will -not be included in the package tarball.

    - -

    This allows a package maintainer to install all of their dependencies -(and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See json(1) for more information.

    - -

    SEE ALSO

    - - -
    - - - diff --git a/deps/npm/html/doc/help-search.html b/deps/npm/html/doc/help-search.html index 45fa05553..fd8537766 100644 --- a/deps/npm/html/doc/help-search.html +++ b/deps/npm/html/doc/help-search.html @@ -2,7 +2,7 @@ help-search - +
    @@ -38,7 +38,7 @@ where the terms were found in the documentation.

    - + - diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index a7e647ef4..84d6d3443 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -2,7 +2,7 @@ index - +
    @@ -384,7 +384,7 @@

    Display npm username

    - + - diff --git a/deps/npm/html/doc/ls.html b/deps/npm/html/doc/ls.html deleted file mode 100644 index 9ad1fca27..000000000 --- a/deps/npm/html/doc/ls.html +++ /dev/null @@ -1,87 +0,0 @@ - - - ls - - - - -
    -

    ls

    List installed packages

    - -

    SYNOPSIS

    - -
    npm list
    -npm ls
    -npm la
    -npm ll
    - -

    DESCRIPTION

    - -

    This command will print to stdout all the versions of packages that are -installed, as well as their dependencies, in a tree-structure.

    - -

    It does not take positional arguments, though you may set config flags -like with any other command, such as -g to list global packages.

    - -

    It will print out extraneous, missing, and invalid packages.

    - -

    When run as ll or la, it shows extended information by default.

    - -

    CONFIGURATION

    - -

    long

    - -
    • Default: false
    • Type: Boolean
    - -

    Show extended information.

    - -

    parseable

    - -
    • Default: false
    • Type: Boolean
    - -

    Show parseable output instead of tree view.

    - -

    global

    - -
    • Default: false
    • Type: Boolean
    - -

    List packages in the global install prefix instead of in the current -project.

    - -

    SEE ALSO

    - - -
    - - - diff --git a/deps/npm/html/doc/npm.html b/deps/npm/html/doc/npm.html index 5d80a30f1..0d5a06942 100644 --- a/deps/npm/html/doc/npm.html +++ b/deps/npm/html/doc/npm.html @@ -2,7 +2,7 @@ npm - +
    @@ -14,7 +14,7 @@

    VERSION

    -

    1.1.21

    +

    1.1.24

    DESCRIPTION

    @@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.

    - + - diff --git a/deps/npm/html/doc/root.html b/deps/npm/html/doc/root.html index a7874010a..bdb274d22 100644 --- a/deps/npm/html/doc/root.html +++ b/deps/npm/html/doc/root.html @@ -2,7 +2,7 @@ root - + - + - diff --git a/deps/npm/html/doc/shrinkwrap.html b/deps/npm/html/doc/shrinkwrap.html index 158ed0994..e0d115e14 100644 --- a/deps/npm/html/doc/shrinkwrap.html +++ b/deps/npm/html/doc/shrinkwrap.html @@ -2,7 +2,7 @@ shrinkwrap - +
    @@ -169,7 +169,7 @@ versions.

    - +