From 4d809e297f905daf198b252a5870e8732d4201e6 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Tue, 5 Mar 2013 12:17:48 -0800 Subject: [PATCH 1/4] process: invoke EventEmitter on `process` This properly sets the `_maxListeners` property, which fixes the max listener warning. Closes #4924. --- src/node.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node.js b/src/node.js index 1abd0b6506..9c80ab5aaa 100644 --- a/src/node.js +++ b/src/node.js @@ -35,6 +35,7 @@ value: process.constructor } }); + EventEmitter.call(process); process.EventEmitter = EventEmitter; // process.EventEmitter is deprecated From 116d6c44025e6553359221fdb873fc738b02dc16 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 6 Mar 2013 13:56:56 -0800 Subject: [PATCH 2/4] blog: Post for 0.9.12 --- doc/blog/release/v0.9.12.md | 107 ++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 doc/blog/release/v0.9.12.md diff --git a/doc/blog/release/v0.9.12.md b/doc/blog/release/v0.9.12.md new file mode 100644 index 0000000000..5de3974c1f --- /dev/null +++ b/doc/blog/release/v0.9.12.md @@ -0,0 +1,107 @@ +date: Wed Mar 6 13:51:00 PST 2013 +version: 0.9.12 +category: release +title: Node v0.9.12 (Unstable) +slug: node-v0-9-12-unstable + +As of this release, Node v0.9 is finally performing faster than v0.8 +on HTTP, file system, and TLS benchmarks. + +Unless there are serious problems found, v0.10.0 will be released on +Monday, 2013.03.11, along with more details about the benchmark +results and the plans for what comes next. + +Please consider this a v0.10 Release Candidate. Use it in your +programs. It is as stable as 0.9 is going to get. + +---- + +2013.03.06, Version 0.9.12 (Unstable) + +* stream: Allow strings in Readable.push/unshift (isaacs) + +* stream: Remove bufferSize option (isaacs) + +* stream: Increase highWaterMark on large reads (isaacs) + +* stream: _write: takes an encoding argument (isaacs) + +* stream: _transform: remove output() method, provide encoding (isaacs) + +* stream: Don't require read(0) to emit 'readable' event (isaacs) + +* node: Add --throw-deprecation (isaacs) + +* http: fix multiple timeout events (Eugene Girshov) + +* http: More useful setTimeout API on server (isaacs) + +* net: use close callback, not process.nextTick (Ben Noordhuis) + +* net: Provide better error when writing after FIN (isaacs) + +* dns: Support NAPTR queries (Pavel Lang) + +* dns: fix ReferenceError in resolve() error path (Xidorn Quan) + +* child_process: handle ENOENT correctly on Windows (Scott Blomquist) + +* cluster: Rename destroy() to kill(signal=SIGTERM) (isaacs) + +* build: define nightly tag external to build system (Timothy J Fontaine) + +* build: make msi build work when spaces are present in the path (Bert Belder) + +* build: fix msi build issue with WiX 3.7/3.8 (Raymond Feng) + +* repl: make compatible with domains (Dave Olszewski) + +* events: Code cleanup and performance improvements (Trevor Norris) + + +Source Code: http://nodejs.org/dist/v0.9.12/node-v0.9.12.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.9.12/node-v0.9.12.pkg + +Windows Installer: http://nodejs.org/dist/v0.9.12/node-v0.9.12-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.9.12/x64/node-v0.9.12-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.9.12/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.9.12/node-v0.9.12-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.9.12/node-v0.9.12-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.9.12/node-v0.9.12-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.9.12/node-v0.9.12-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.9.12/ + +Website: http://nodejs.org/docs/v0.9.12/ + +Documentation: http://nodejs.org/docs/v0.9.12/api/ + +Shasums: + +``` +caa171a35f7eb36fd585f4e16dbf1c60f9d056af node-v0.9.12-darwin-x64.tar.gz +ffd98e60cdb630c4239c3d94e89b5ba84fb8d234 node-v0.9.12-darwin-x86.tar.gz +85c008721b33872085c3af6253b6e92a6587a467 node-v0.9.12-linux-x64.tar.gz +cc3d50b8ba0474f1907959aae5dfa5e64801bc6b node-v0.9.12-linux-x86.tar.gz +bcedc7c18f9984ea8873752672a09622e56008e1 node-v0.9.12-sunos-x64.tar.gz +4a7e2baf41fc994044c204a9c90eb894b60ee4c3 node-v0.9.12-sunos-x86.tar.gz +0f7c4f600768736c0e7107e7da33a748a4e2d61e node-v0.9.12-x86.msi +a9e610225a6cad24923a7242eba97ab1577f3886 node-v0.9.12.pkg +2353d3e5c6518f75202b74236fa9d8eeecd26ca3 node-v0.9.12.tar.gz +9be76f46fbfc66a84fbd02210b6422f14d5dd7eb node.exe +1f528fdf910036bb791fc6031e2dc9aff300f7eb node.exp +6aec59165f64fea2e89b6ec4ddbf55ab630b318f node.lib +fd575f13dc714fdeb64f814e67db9ef5d142e7f8 node.pdb +442dae32457159a579eb44da12c7c5f182c1ae4c x64/node-v0.9.12-x64.msi +8dc7f6fec9172a5e606ca1b6b3520178313caa29 x64/node.exe +f441fb3807930ee658a105db97ec61a2b5e331d4 x64/node.exp +f8b3880e5fa00151343bf0000f324ea9e96155a7 x64/node.lib +7adb54566301d39866e93506ffc9391870f9c644 x64/node.pdb +``` From 277a2545d2615420240f9b6f0e866ce1cde66890 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 6 Mar 2013 14:19:16 -0800 Subject: [PATCH 3/4] blog: Update streams2 feature post to match actual doc --- doc/blog/feature/streams2.md | 367 +++++++++++++++++++++++++++++------ 1 file changed, 312 insertions(+), 55 deletions(-) diff --git a/doc/blog/feature/streams2.md b/doc/blog/feature/streams2.md index 38479e81de..c1a135920b 100644 --- a/doc/blog/feature/streams2.md +++ b/doc/blog/feature/streams2.md @@ -111,7 +111,7 @@ feedback. A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout. Streams are readable, writable, or both. All streams are -instances of EventEmitter. +instances of [EventEmitter][] You can load the Stream base classes by doing `require('stream')`. There are base classes provided for Readable streams, Writable @@ -190,47 +190,210 @@ method. A `Readable Stream` has the following methods, members, and events. Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size, cb)` +extended with an underlying implementation of the `_read(size)` method. (See below.) ### new stream.Readable([options]) * `options` {Object} - * `bufferSize` {Number} The size of the chunks to consume from the - underlying resource. Default=16kb - * `lowWaterMark` {Number} The minimum number of bytes to store in - the internal buffer before emitting `readable`. Default=0 * `highWaterMark` {Number} The maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. Default=16kb * `encoding` {String} If specified, then buffers will be decoded to strings using the specified encoding. Default=null + * `objectMode` {Boolean} Whether this stream should behave + as a stream of objects. Meaning that stream.read(n) returns + a single value instead of a Buffer of size n In classes that extend the Readable class, make sure to call the constructor so that the buffering settings can be properly initialized. -### readable.\_read(size, callback) +### readable.\_read(size) * `size` {Number} Number of bytes to read asynchronously -* `callback` {Function} Called with an error or with data -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -**This function MUST NOT be called directly.** It should be +Note: **This function should NOT be called directly.** It should be implemented by child classes, and called by the internal Readable class methods only. -Call the callback using the standard `callback(error, data)` pattern. -When no more data can be fetched, call `callback(null, null)` to -signal the EOF. +All Readable stream implementations must provide a `_read` method +to fetch data from the underlying resource. This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user programs. However, you **are** expected to override this method in your own extension classes. +When data is available, put it into the read queue by calling +`readable.push(chunk)`. If `push` returns false, then you should stop +reading. When `_read` is called again, you should start pushing more +data. + +The `size` argument is advisory. Implementations where a "read" is a +single call that returns data can use this to know how much data to +fetch. Implementations where that is not relevant, such as TCP or +TLS, may ignore this argument, and simply provide data whenever it +becomes available. There is no need, for example to "wait" until +`size` bytes are available before calling `stream.push(chunk)`. + +### readable.push(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to push into the read queue +* return {Boolean} Whether or not more pushes should be performed + +Note: **This function should be called by Readable implementors, NOT +by consumers of Readable subclasses.** The `_read()` function will not +be called again until at least one `push(chunk)` call is made. If no +data is available, then you MAY call `push('')` (an empty string) to +allow a future `_read` call, without adding any data to the queue. + +The `Readable` class works by putting data into a read queue to be +pulled out later by calling the `read()` method when the `'readable'` +event fires. + +The `push()` method will explicitly insert some data into the read +queue. If it is called with `null` then it will signal the end of the +data. + +In some cases, you may be wrapping a lower-level source which has some +sort of pause/resume mechanism, and a data callback. In those cases, +you could wrap the low-level source object by doing something like +this: + +```javascript +// source is an object with readStop() and readStart() methods, +// and an `ondata` member that gets called when it has data, and +// an `onend` member that gets called when the data is over. + +var stream = new Readable(); + +source.ondata = function(chunk) { + // if push() returns false, then we need to stop reading from source + if (!stream.push(chunk)) + source.readStop(); +}; + +source.onend = function() { + stream.push(null); +}; + +// _read will be called when the stream wants to pull more data in +// the advisory size argument is ignored in this case. +stream._read = function(n) { + source.readStart(); +}; +``` + +### readable.unshift(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue +* return {Boolean} Whether or not more pushes should be performed + +This is the corollary of `readable.push(chunk)`. Rather than putting +the data at the *end* of the read queue, it puts it at the *front* of +the read queue. + +This is useful in certain use-cases where a stream is being consumed +by a parser, which needs to "un-consume" some data that it has +optimistically pulled out of the source. + +```javascript +// A parser for a simple data protocol. +// The "header" is a JSON object, followed by 2 \n characters, and +// then a message body. +// +// Note: This can be done more simply as a Transform stream. See below. + +function SimpleProtocol(source, options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Readable.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + + // source is a readable stream, such as a socket or file + this._source = source; + + var self = this; + source.on('end', function() { + self.push(null); + }); + + // give it a kick whenever the source is readable + // read(0) will not consume any bytes + source.on('readable', function() { + self.read(0); + }); + + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Readable.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._read = function(n) { + if (!this._inBody) { + var chunk = this._source.read(); + + // if the source doesn't have data, we don't have data yet. + if (chunk === null) + return this.push(''); + + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + this.push(''); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // now, because we got some extra data, unshift the rest + // back into the read queue so that our consumer will see it. + var b = chunk.slice(split); + this.unshift(b); + + // and let them know that we are done parsing the header. + this.emit('header', this.header); + } + } else { + // from there on, just provide the data to our consumer. + // careful not to push(null), since that would indicate EOF. + var chunk = this._source.read(); + if (chunk) this.push(chunk); + } +}; + +// Usage: +var parser = new SimpleProtocol(source); +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` ### readable.wrap(stream) @@ -256,9 +419,7 @@ myReader.on('readable', function() { ### Event: 'readable' -When there is data ready to be consumed, this event will fire. The -number of bytes that are required to be considered "readable" depends -on the `lowWaterMark` option set in the constructor. +When there is data ready to be consumed, this event will fire. When this event emits, call the `read()` method to consume the data. @@ -299,6 +460,8 @@ constructor. * `size` {Number | null} Optional number of bytes to read. * Return: {Buffer | String | null} +Note: **This function SHOULD be called by Readable stream users.** + Call this method to consume data once the `'readable'` event is emitted. @@ -310,8 +473,8 @@ If there is no data to consume, or if there are fewer bytes in the internal buffer than the `size` argument, then `null` is returned, and a future `'readable'` event will be emitted when more is available. -Note that calling `stream.read(0)` will always return `null`, and will -trigger a refresh of the internal buffer, but otherwise be a no-op. +Calling `stream.read(0)` will always return `null`, and will trigger a +refresh of the internal buffer, but otherwise be a no-op. ### readable.pipe(destination, [options]) @@ -377,16 +540,14 @@ Resumes the incoming `'data'` events after a `pause()`. A `Writable` Stream has the following methods, members, and events. Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the `_write(chunk, cb)` -method. (See below.) +extended with an underlying implementation of the +`_write(chunk, encoding, cb)` method. (See below.) ### new stream.Writable([options]) * `options` {Object} * `highWaterMark` {Number} Buffer level when `write()` starts returning false. Default=16kb - * `lowWaterMark` {Number} The buffer level when `'drain'` is - emitted. Default=0 * `decodeStrings` {Boolean} Whether or not to decode strings into Buffers before passing them to `_write()`. Default=true @@ -394,15 +555,21 @@ In classes that extend the Writable class, make sure to call the constructor so that the buffering settings can be properly initialized. -### writable.\_write(chunk, callback) +### writable.\_write(chunk, encoding, callback) -* `chunk` {Buffer | Array} The data to be written -* `callback` {Function} Called with an error, or null when finished +* `chunk` {Buffer | String} The chunk to be written. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. Ignore chunk is a buffer. Note that chunk will + **always** be a buffer unless the `decodeStrings` option is + explicitly set to `false`. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. All Writable stream implementations must provide a `_write` method to send data to the underlying resource. -**This function MUST NOT be called directly.** It should be +Note: **This function MUST NOT be called directly.** It should be implemented by child classes, and called by the internal Writable class methods only. @@ -410,9 +577,12 @@ Call the callback using the standard `callback(error)` pattern to signal that the write completed successfully or with an error. If the `decodeStrings` flag is set in the constructor options, then -`chunk` will be an array rather than a Buffer. This is to support +`chunk` may be a string rather than a Buffer, and `encoding` will +indicate the sort of string that it is. This is to support implementations that have an optimized handling for certain string -data encodings. +data encodings. If you do not explicitly set the `decodeStrings` +option to `false`, then you can safely ignore the `encoding` argument, +and assume that `chunk` will always be a Buffer. This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user @@ -434,16 +604,16 @@ flushed to the underlying resource. Returns `false` to indicate that the buffer is full, and the data will be sent out in the future. The `'drain'` event will indicate when the buffer is empty again. -The specifics of when `write()` will return false, and when a -subsequent `'drain'` event will be emitted, are determined by the -`highWaterMark` and `lowWaterMark` options provided to the -constructor. +The specifics of when `write()` will return false, is determined by +the `highWaterMark` option provided to the constructor. -### writable.end([chunk], [encoding]) +### writable.end([chunk], [encoding], [callback]) * `chunk` {Buffer | String} Optional final data to be written * `encoding` {String} Optional. If `chunk` is a string, then encoding defaults to `'utf8'` +* `callback` {Function} Optional. Called when the final chunk is + successfully written. Call this method to signal the end of the data being written to the stream. @@ -459,6 +629,11 @@ without buffering again. Listen for it when `stream.write()` returns Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this. +### Event: 'finish' + +When `end()` is called and there are no more chunks to write, this +event is emitted. + ### Event: 'pipe' * `source` {Readable Stream} @@ -480,14 +655,14 @@ A "duplex" stream is one that is both Readable and Writable, such as a TCP socket connection. Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size, cb)` -and `_write(chunk, callback)` methods as you would with a Readable or +extended with an underlying implementation of the `_read(size)` +and `_write(chunk, encoding, callback)` methods as you would with a Readable or Writable stream class. Since JavaScript doesn't have multiple prototypal inheritance, this class prototypally inherits from Readable, and then parasitically from Writable. It is thus up to the user to implement both the lowlevel -`_read(n,cb)` method as well as the lowlevel `_write(chunk,cb)` method +`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method on extension duplex classes. ### new stream.Duplex(options) @@ -527,44 +702,46 @@ In classes that extend the Transform class, make sure to call the constructor so that the buffering settings can be properly initialized. -### transform.\_transform(chunk, outputFn, callback) +### transform.\_transform(chunk, encoding, callback) -* `chunk` {Buffer} The chunk to be transformed. -* `outputFn` {Function} Call this function with any output data to be - passed to the readable interface. +* `chunk` {Buffer | String} The chunk to be transformed. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. (Ignore if `decodeStrings` chunk is a buffer.) * `callback` {Function} Call this function (optionally with an error argument) when you are done processing the supplied chunk. -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -**This function MUST NOT be called directly.** It should be +Note: **This function MUST NOT be called directly.** It should be implemented by child classes, and called by the internal Transform class methods only. +All Transform stream implementations must provide a `_transform` +method to accept input and produce output. + `_transform` should do whatever has to be done in this specific Transform class, to handle the bytes being written, and pass them off to the readable portion of the interface. Do asynchronous I/O, process things, and so on. +Call `transform.push(outputChunk)` 0 or more times to generate output +from this input chunk, depending on how much data you want to output +as a result of this chunk. + Call the callback function only when the current chunk is completely -consumed. Note that this may mean that you call the `outputFn` zero -or more times, depending on how much data you want to output as a -result of this chunk. +consumed. Note that there may or may not be output as a result of any +particular input chunk. This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user programs. However, you **are** expected to override this method in your own extension classes. -### transform.\_flush(outputFn, callback) +### transform.\_flush(callback) -* `outputFn` {Function} Call this function with any output data to be - passed to the readable interface. * `callback` {Function} Call this function (optionally with an error argument) when you are done flushing any remaining data. -**This function MUST NOT be called directly.** It MAY be implemented +Note: **This function MUST NOT be called directly.** It MAY be implemented by child classes, and if so, will be called by the internal Transform class methods only. @@ -577,14 +754,91 @@ can with what is left, so that the data will be complete. In those cases, you can implement a `_flush` method, which will be called at the very end, after all the written data is consumed, but before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `outputFn` zero or more times, as -appropriate, and call `callback` when the flush operation is complete. +like with `_transform`, call `transform.push(chunk)` zero or more +times, as appropriate, and call `callback` when the flush operation is +complete. This method is prefixed with an underscore because it is internal to the class that defines it, and should not be called directly by user programs. However, you **are** expected to override this method in your own extension classes. +### Example: `SimpleProtocol` parser + +The example above of a simple protocol parser can be implemented much +more simply by using the higher level `Transform` stream class. + +In this example, rather than providing the input as an argument, it +would be piped into the parser, which is a more idiomatic Node stream +approach. + +```javascript +function SimpleProtocol(options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Transform.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Transform.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._transform = function(chunk, encoding, done) { + if (!this._inBody) { + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // and let them know that we are done parsing the header. + this.emit('header', this.header); + + // now, because we got some extra data, emit this first. + this.push(b); + } + } else { + // from there on, just provide the data to our consumer as-is. + this.push(b); + } + done(); +}; + +var parser = new SimpleProtocol(); +source.pipe(parser) + +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + ## Class: stream.PassThrough @@ -592,3 +846,6 @@ This is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is mainly for examples and testing, but there are occasionally use cases where it can come in handy. + + +[EventEmitter]: http://nodejs.org/api/events.html#events_class_events_eventemitter From 80fb580936d82bb274bd35fe66e7d61cc01b0fd4 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 6 Mar 2013 15:41:06 -0800 Subject: [PATCH 4/4] npm: Update to 1.2.14 --- deps/npm/README.md | 4 +- deps/npm/html/api/bin.html | 2 +- deps/npm/html/api/bugs.html | 2 +- deps/npm/html/api/commands.html | 2 +- deps/npm/html/api/config.html | 2 +- deps/npm/html/api/deprecate.html | 2 +- deps/npm/html/api/docs.html | 2 +- deps/npm/html/api/edit.html | 2 +- deps/npm/html/api/explore.html | 2 +- deps/npm/html/api/help-search.html | 2 +- deps/npm/html/api/init.html | 2 +- deps/npm/html/api/install.html | 2 +- deps/npm/html/api/link.html | 2 +- deps/npm/html/api/load.html | 2 +- deps/npm/html/api/ls.html | 2 +- deps/npm/html/api/npm.html | 4 +- deps/npm/html/api/outdated.html | 2 +- deps/npm/html/api/owner.html | 2 +- deps/npm/html/api/pack.html | 2 +- deps/npm/html/api/prefix.html | 2 +- deps/npm/html/api/prune.html | 2 +- deps/npm/html/api/publish.html | 2 +- deps/npm/html/api/rebuild.html | 2 +- deps/npm/html/api/restart.html | 2 +- deps/npm/html/api/root.html | 2 +- deps/npm/html/api/run-script.html | 2 +- deps/npm/html/api/search.html | 2 +- deps/npm/html/api/shrinkwrap.html | 2 +- deps/npm/html/api/start.html | 2 +- deps/npm/html/api/stop.html | 2 +- deps/npm/html/api/submodule.html | 2 +- deps/npm/html/api/tag.html | 2 +- deps/npm/html/api/test.html | 2 +- deps/npm/html/api/uninstall.html | 2 +- deps/npm/html/api/unpublish.html | 2 +- deps/npm/html/api/update.html | 2 +- deps/npm/html/api/version.html | 2 +- deps/npm/html/api/view.html | 2 +- deps/npm/html/api/whoami.html | 2 +- deps/npm/html/doc/README.html | 6 +- deps/npm/html/doc/adduser.html | 2 +- deps/npm/html/doc/bin.html | 2 +- deps/npm/html/doc/bugs.html | 2 +- deps/npm/html/doc/build.html | 2 +- deps/npm/html/doc/bundle.html | 2 +- deps/npm/html/doc/cache.html | 2 +- deps/npm/html/doc/changelog.html | 2 +- deps/npm/html/doc/coding-style.html | 2 +- deps/npm/html/doc/completion.html | 2 +- deps/npm/html/doc/config.html | 2 +- deps/npm/html/doc/dedupe.html | 2 +- deps/npm/html/doc/deprecate.html | 2 +- deps/npm/html/doc/developers.html | 2 +- deps/npm/html/doc/disputes.html | 2 +- deps/npm/html/doc/docs.html | 2 +- deps/npm/html/doc/edit.html | 2 +- deps/npm/html/doc/explore.html | 2 +- deps/npm/html/doc/faq.html | 2 +- deps/npm/html/doc/folders.html | 2 +- deps/npm/html/doc/global.html | 2 +- deps/npm/html/doc/help-search.html | 2 +- deps/npm/html/doc/help.html | 2 +- deps/npm/html/doc/index.html | 2 +- deps/npm/html/doc/init.html | 2 +- deps/npm/html/doc/install.html | 2 +- deps/npm/html/doc/json.html | 2 +- deps/npm/html/doc/link.html | 2 +- deps/npm/html/doc/ls.html | 4 +- deps/npm/html/doc/npm.html | 4 +- deps/npm/html/doc/outdated.html | 2 +- deps/npm/html/doc/owner.html | 2 +- deps/npm/html/doc/pack.html | 2 +- deps/npm/html/doc/prefix.html | 2 +- deps/npm/html/doc/prune.html | 2 +- deps/npm/html/doc/publish.html | 2 +- deps/npm/html/doc/rebuild.html | 2 +- deps/npm/html/doc/registry.html | 2 +- deps/npm/html/doc/removing-npm.html | 2 +- deps/npm/html/doc/restart.html | 2 +- deps/npm/html/doc/rm.html | 2 +- deps/npm/html/doc/root.html | 2 +- deps/npm/html/doc/run-script.html | 2 +- deps/npm/html/doc/scripts.html | 2 +- deps/npm/html/doc/search.html | 2 +- deps/npm/html/doc/semver.html | 2 +- deps/npm/html/doc/shrinkwrap.html | 2 +- deps/npm/html/doc/star.html | 2 +- deps/npm/html/doc/stars.html | 2 +- deps/npm/html/doc/start.html | 2 +- deps/npm/html/doc/stop.html | 2 +- deps/npm/html/doc/submodule.html | 2 +- deps/npm/html/doc/tag.html | 2 +- deps/npm/html/doc/test.html | 2 +- deps/npm/html/doc/uninstall.html | 2 +- deps/npm/html/doc/unpublish.html | 2 +- deps/npm/html/doc/update.html | 2 +- deps/npm/html/doc/version.html | 2 +- deps/npm/html/doc/view.html | 2 +- deps/npm/html/doc/whoami.html | 2 +- deps/npm/lib/cache.js | 49 ++++---- deps/npm/man/man1/README.1 | 20 +++- 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/dedupe.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/global.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 | 2 +- deps/npm/man/man1/link.1 | 2 +- deps/npm/man/man1/ls.1 | 4 +- 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/rm.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/stars.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/chmodr/LICENSE | 27 +++++ deps/npm/node_modules/chmodr/README.md | 3 + deps/npm/node_modules/chmodr/chmodr.js | 54 +++++++++ deps/npm/node_modules/chmodr/package.json | 28 +++++ deps/npm/node_modules/chmodr/test/basic.js | 63 ++++++++++ deps/npm/node_modules/chmodr/test/sync.js | 58 +++++++++ deps/npm/node_modules/glob/package.json | 12 +- .../node_modules/glob/test/bash-results.json | 1 + .../node_modules/glob/test/nocase-nomagic.js | 113 ++++++++++++++++++ deps/npm/node_modules/lru-cache/README.md | 41 +++++++ .../node_modules/lru-cache/lib/lru-cache.js | 52 +++++++- deps/npm/node_modules/lru-cache/package.json | 11 +- deps/npm/node_modules/lru-cache/test/basic.js | 34 ++++++ .../node_modules/lru-cache/test/foreach.js | 52 ++++++++ .../lru-cache/test/memory-leak.js | 50 ++++++++ deps/npm/node_modules/minimatch/minimatch.js | 2 +- deps/npm/node_modules/minimatch/package.json | 8 +- deps/npm/node_modules/mkdirp/.travis.yml | 3 +- deps/npm/node_modules/mkdirp/README.markdown | 50 ++++---- deps/npm/node_modules/mkdirp/package.json | 18 +-- deps/npm/node_modules/node-gyp/lib/build.js | 1 + deps/npm/node_modules/node-gyp/package.json | 10 +- .../npm-registry-client/lib/publish.js | 42 +++---- .../npm-registry-client/package.json | 4 +- .../read-package-json/package.json | 6 +- .../read-package-json/read-json.js | 2 +- deps/npm/node_modules/semver/package.json | 6 +- deps/npm/node_modules/semver/semver.js | 4 +- deps/npm/node_modules/semver/test.js | 3 + deps/npm/package.json | 20 ++-- .../test/packages/npm-test-peer-deps/test.js | 13 +- 229 files changed, 934 insertions(+), 336 deletions(-) create mode 100644 deps/npm/node_modules/chmodr/LICENSE create mode 100644 deps/npm/node_modules/chmodr/README.md create mode 100644 deps/npm/node_modules/chmodr/chmodr.js create mode 100644 deps/npm/node_modules/chmodr/package.json create mode 100644 deps/npm/node_modules/chmodr/test/basic.js create mode 100644 deps/npm/node_modules/chmodr/test/sync.js create mode 100644 deps/npm/node_modules/glob/test/nocase-nomagic.js create mode 100644 deps/npm/node_modules/lru-cache/test/foreach.js create mode 100644 deps/npm/node_modules/lru-cache/test/memory-leak.js diff --git a/deps/npm/README.md b/deps/npm/README.md index d3e361c3d6..c8b7afca88 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -42,11 +42,11 @@ There's a pretty robust install script at You can set any npm configuration params with that script: -npm_config_prefix=/some/path sh install.sh + npm_config_prefix=/some/path sh install.sh Or, you can run it in uber-debuggery mode: -npm_debug=1 sh install.sh + npm_debug=1 sh install.sh ### Even Fancier diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 762ed898d6..7aa186c24f 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@

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

- +